diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 8b137891..afbcf2d7 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ - +custom: https://www.paypal.me/stsdc \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..511ef3a0 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ + +name: "CI: Lint" + +on: [push, pull_request] + +jobs: + lint: + + runs-on: ubuntu-latest + + container: + image: valalang/lint + + steps: + - uses: actions/checkout@v1 + - name: Lint + run: io.elementary.vala-lint -d . \ No newline at end of file diff --git a/data/Application.css b/data/Application.css index 74f90a78..7e700375 100644 --- a/data/Application.css +++ b/data/Application.css @@ -14,6 +14,14 @@ border-width: 0; } +.green { + background-color: alpha(@LIME_300, 0.6); +} + +.blue { + background-color: alpha(@BLUEBERRY_300, 0.6); +} + /* .vertical-label, .vertical-label:hover, .vertical-label:selected, @@ -84,15 +92,15 @@ } .core_badge-mild-warning { - background-color: @BANANA_100; + background-color: alpha(@BANANA_100, 0.7); color: @BANANA_900; - border: 1px solid @BANANA_300; + border: 1px solid alpha(@BANANA_300, 0.7); } .core_badge-strong-warning { - background-color: @ORANGE_100; + background-color: alpha(@ORANGE_100, 0.7); color: @ORANGE_900; - border: 1px solid @ORANGE_300; + border: 1px solid alpha(@ORANGE_300, 0.7); } .core_badge-critical-warning { diff --git a/data/com.github.stsdc.monitor.appdata.xml.in b/data/com.github.stsdc.monitor.appdata.xml.in index 24855d86..61c0c352 100644 --- a/data/com.github.stsdc.monitor.appdata.xml.in +++ b/data/com.github.stsdc.monitor.appdata.xml.in @@ -1,5 +1,5 @@ - + com.github.stsdc.monitor CC0 @@ -28,6 +28,16 @@ https://github.com/stsdc/monitor/issues + +​ +​
    +
  • Display Storage usage
  • +
  • Update Russian translation (@camellan)
  • +
  • Update Portuguese translation (@hugok79)
  • +
  • Different colours for Upload and Download
  • +
+​
+​
    diff --git a/meson.build b/meson.build index 42489952..c60fd15b 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('com.github.stsdc.monitor', 'vala', 'c', version: '0.9.1') +project('com.github.stsdc.monitor', 'vala', 'c', version: '0.9.2') # these are Meson modules gnome = import('gnome') @@ -71,6 +71,7 @@ executable( 'src/Views/SystemView/SystemCPUInfoPopover.vala', 'src/Views/SystemView/SystemMemoryView.vala', 'src/Views/SystemView/SystemNetworkView.vala', + 'src/Views/SystemView/SystemStorageView.vala', # Widgets related only to ProcessInfoView 'src/Views/ProcessView/ProcessInfoView/Preventor.vala', @@ -87,8 +88,6 @@ executable( 'src/Widgets/Labels/LabelRoundy.vala', 'src/Widgets/Labels/LabelH4.vala', 'src/Widgets/Chart/Chart.vala', - 'src/Widgets/Chart/ProcessChart.vala', - # Models 'src/Models/TreeViewModel.vala', @@ -112,6 +111,7 @@ executable( 'src/Resources/Swap.vala', 'src/Resources/TemperatureSensor.vala', 'src/Resources/Network.vala', + 'src/Resources/Storage.vala', c_args: c_args, dependencies: [ glib, diff --git a/po/com.github.stsdc.monitor.pot b/po/com.github.stsdc.monitor.pot index 70c1c958..c98ab12e 100644 --- a/po/com.github.stsdc.monitor.pot +++ b/po/com.github.stsdc.monitor.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.stsdc.monitor\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,7 +17,15 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +msgid "Processes" +msgstr "" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -29,20 +37,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "" @@ -55,15 +69,15 @@ msgstr "" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -84,6 +98,35 @@ msgstr "" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -104,27 +147,27 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -139,16 +182,11 @@ msgid "CPU" msgstr "" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -159,6 +197,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "" @@ -188,11 +320,7 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "" - -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" diff --git a/po/de.po b/po/de.po index d248c3ba..b8a59f17 100644 --- a/po/de.po +++ b/po/de.po @@ -1,11 +1,20 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Prozess Name" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -17,20 +26,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "GiB" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Zeige Monitor" @@ -43,15 +58,15 @@ msgstr "Beende Monitor" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -73,6 +88,35 @@ msgstr "PID" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -93,27 +137,27 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Prozess beenden" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Ausgewählten Prozess beenden" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Prozess abwürgen" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Ausgewählten Prozess abwürgen" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -128,16 +172,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Arbeitsspeicher" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "GiB" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -148,6 +187,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -177,15 +310,11 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "Berechne…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" - #~ msgid "Monitor Indicator" #~ msgstr "Monitor Indikator" diff --git a/po/es.po b/po/es.po index f66e3af8..89466c7c 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: 2019-06-03 23:25+0100\n" "Last-Translator: Mario Rodrigo\n" "Language-Team: \n" @@ -19,7 +19,16 @@ msgstr "" "X-Generator: Gtranslator 2.91.7\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Nombre del proceso" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -31,20 +40,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "GiB" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Mostrar Monitor" @@ -57,15 +72,15 @@ msgstr "Cerrar Monitor" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -87,6 +102,35 @@ msgstr "PID" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -107,27 +151,27 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Terminar proceso" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Terminar proceso" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Matar proceso" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Matar los procesos seleccionados" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -142,16 +186,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Memoria" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "GiB" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -162,6 +201,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -191,15 +324,11 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "Calculando…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" - #~ msgid "Monitor Indicator" #~ msgstr "Icono de monitorización" diff --git a/po/extra/pt.po b/po/extra/pt.po index 908b4df2..817962aa 100644 --- a/po/extra/pt.po +++ b/po/extra/pt.po @@ -8,12 +8,12 @@ msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-20 22:25+0900\n" -"PO-Revision-Date: 2019-11-04 12:19+0000\n" +"PO-Revision-Date: 2020-10-15 18:34+0100\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 2.0.6\n" "Last-Translator: Hugo Carvalho \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Language: pt\n" @@ -29,7 +29,7 @@ msgstr "Gerir processos e monitorizar os recursos do sistema" #: data/com.github.stsdc.monitor.appdata.xml.in:10 msgid "Display usage of system resources, filter and manage processes." -msgstr "Exibir o uso dos recursos do sistema, filtrar e gerir processos." +msgstr "Mostrar a utilização dos recursos do sistema, filtrar e gerir processos." #: data/com.github.stsdc.monitor.appdata.xml.in:22 msgid "Stanisław Dac" diff --git a/po/fr.po b/po/fr.po index c85291b1..dd5d452b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.stsdc.monitor\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: 2019-11-03 14:15+0200\n" "Last-Translator: Nathan Bonnemains\n" "Language-Team: \n" @@ -17,7 +17,16 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Nom du processus" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -29,20 +38,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "Kio" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "Mio" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "Gio" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Afficher Monitor" @@ -55,15 +70,15 @@ msgstr "Quitter Monitor" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -85,6 +100,35 @@ msgstr "PID" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -105,27 +149,27 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Mettre fin au processus" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Mettre fin au processus sélectionné" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Tuer le processus" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Tuer le processus sélectionné" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -140,16 +184,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Mémoire" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "Gio" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -160,6 +199,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -189,15 +322,11 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "Calcul en cours…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" - #~ msgid "Monitor Indicator" #~ msgstr "Indicateur du panneau" diff --git a/po/it.po b/po/it.po index 56263dff..0aa95555 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: 2019-03-31 10:59+0200\n" "Last-Translator: Raí B. Toffoletto \n" "Language-Team: \n" @@ -19,7 +19,16 @@ msgstr "" "X-Generator: Gtranslator 2.91.7\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Nome del processo" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -31,20 +40,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "GiB" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Apri il Monitor" @@ -57,15 +72,15 @@ msgstr "Chiudi il Monitor" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -87,6 +102,35 @@ msgstr "PID" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -107,29 +151,29 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 #, fuzzy msgid "End Process" msgstr "Terminare processo" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 #, fuzzy msgid "End selected process" msgstr "Terminare processo" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -144,16 +188,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Memoria" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "GiB" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -164,6 +203,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -194,15 +327,11 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" - #~ msgid "Monitor Indicator" #~ msgstr "Icona nel pannello" diff --git a/po/ja.po b/po/ja.po index 02a87330..7d88ccdd 100644 --- a/po/ja.po +++ b/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.stsdc.monitor\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-19 09:52+0900\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: 2019-10-22 00:09+0900\n" "Last-Translator: Ryo Nakano \n" "Language-Team: none\n" @@ -37,23 +37,23 @@ msgstr "システム" msgid "N/A" msgstr "N/A" -#: src/Utils.vala:33 +#: src/Utils.vala:67 msgid "B" msgstr "B" -#: src/Utils.vala:38 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:44 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" -#: src/Utils.vala:49 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:49 +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 msgid "GiB" msgstr "GiB" @@ -69,15 +69,15 @@ msgstr "モニターを終了" msgid "Deleted" msgstr "削除済み" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "この操作を実行してもよろしいですか?" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "はい" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "いいえ" @@ -113,8 +113,7 @@ msgstr "実行中、あるいは実行可能のプロセス" #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 msgid "" "The process is in an interruptible sleep; waiting for an event to complete" -msgstr "" -"スリープ中、あるいはイベントの完了待ちのプロセス" +msgstr "スリープ中、あるいはイベントの完了待ちのプロセス" #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 msgid "The process is stopped by a job control signal" @@ -148,27 +147,27 @@ msgstr "読み出し/書き込み" msgid "Cancelled write" msgstr "キャンセルされた書き込み" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "プロセスを終了" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "選択したプロセスを終了します" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "プロセスを強制終了" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "選択したプロセスを強制終了します" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "プロセスを強制終了してもよろしいですか?" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "プロセスを終了してもよろしいですか?" @@ -183,6 +182,7 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "メモリー" @@ -197,84 +197,96 @@ msgstr "CPU: %.1f%%" msgid "RAM: %.1f%%" msgstr "RAM: %.1f%%" -#: src/Views/SystemView/SystemCPUView.vala:22 -msgid "CPU: " -msgstr "CPU: " +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" -#: src/Views/SystemView/SystemCPUView.vala:42 -#, c-format -msgid "Thread %d: %s" -msgstr "スレッド %d: %s" +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" -#: src/Views/SystemView/SystemCPUView.vala:45 -#, c-format -msgid "CPU: % 3d%%" -msgstr "CPU: % 3d%%" +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" -#: src/Views/SystemView/SystemCPUView.vala:55 +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 #, c-format -msgid "Thread %d: " -msgstr "スレッド %d: " +msgid "%d%%" +msgstr "" -#: src/Views/SystemView/SystemMemoryView.vala:24 -msgid "Memory: " -msgstr "メモリー: " +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "GHz" -#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 msgid "Total: " msgstr "合計: " -#: src/Views/SystemView/SystemMemoryView.vala:33 +#: src/Views/SystemView/SystemMemoryView.vala:44 msgid "Used: " msgstr "使用済み: " -#: src/Views/SystemView/SystemMemoryView.vala:36 +#: src/Views/SystemView/SystemMemoryView.vala:47 msgid "Shared: " msgstr "共有: " -#: src/Views/SystemView/SystemMemoryView.vala:39 +#: src/Views/SystemView/SystemMemoryView.vala:50 msgid "Buffered: " msgstr "バッファー: " -#: src/Views/SystemView/SystemMemoryView.vala:42 +#: src/Views/SystemView/SystemMemoryView.vala:53 msgid "Cached: " msgstr "キャッシュ: " -#: src/Views/SystemView/SystemMemoryView.vala:45 +#: src/Views/SystemView/SystemMemoryView.vala:56 msgid "Locked: " msgstr "ロック: " -#: src/Views/SystemView/SystemMemoryView.vala:73 -#, c-format -msgid "Memory: % 3d%%" -msgstr "メモリー: % 3d%%" - -#: src/Views/SystemView/SystemMemoryView.vala:76 +#: src/Views/SystemView/SystemMemoryView.vala:103 #, c-format msgid "Total: %s" msgstr "合計: %s" -#: src/Views/SystemView/SystemMemoryView.vala:77 +#: src/Views/SystemView/SystemMemoryView.vala:104 #, c-format msgid "Used: %s" msgstr "使用済み: %s" -#: src/Views/SystemView/SystemMemoryView.vala:78 +#: src/Views/SystemView/SystemMemoryView.vala:105 #, c-format msgid "Shared: %s" msgstr "共有: %s" -#: src/Views/SystemView/SystemMemoryView.vala:79 +#: src/Views/SystemView/SystemMemoryView.vala:106 #, c-format msgid "Buffered: %s" msgstr "バッファー: %s" -#: src/Views/SystemView/SystemMemoryView.vala:80 +#: src/Views/SystemView/SystemMemoryView.vala:107 #, c-format msgid "Cached: %s" msgstr "キャッシュ: %s" -#: src/Views/SystemView/SystemMemoryView.vala:81 +#: src/Views/SystemView/SystemMemoryView.vala:108 #, c-format msgid "Locked: %s" msgstr "ロック: %s" @@ -308,11 +320,25 @@ msgid "Swap" msgstr "スワップ" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "計算しています…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "GHz" +#~ msgid "CPU: " +#~ msgstr "CPU: " + +#~ msgid "Thread %d: %s" +#~ msgstr "スレッド %d: %s" + +#~ msgid "CPU: % 3d%%" +#~ msgstr "CPU: % 3d%%" + +#~ msgid "Thread %d: " +#~ msgstr "スレッド %d: " + +#~ msgid "Memory: " +#~ msgstr "メモリー: " + +#~ msgid "Memory: % 3d%%" +#~ msgstr "メモリー: % 3d%%" diff --git a/po/lt.po b/po/lt.po index 4508b9df..0df16f43 100644 --- a/po/lt.po +++ b/po/lt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: 2017-09-07 11:24+0300\n" "Last-Translator: Moo\n" "Language-Team: \n" @@ -19,7 +19,16 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Proceso pavadinimas" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -31,20 +40,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "GiB" + #: src/Indicator/Widgets/PopoverWidget.vala:13 #, fuzzy msgid "Show Monitor" @@ -59,15 +74,15 @@ msgstr "Monitor" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -89,6 +104,35 @@ msgstr "PID" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -109,30 +153,30 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 #, fuzzy msgid "End Process" msgstr "Užbaigti procesą" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 #, fuzzy msgid "End selected process" msgstr "Užbaigti procesą" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 #, fuzzy msgid "Kill Process" msgstr "Ieškoti proceso" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -147,16 +191,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Atmintis" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "GiB" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -167,6 +206,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -198,15 +331,11 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" - #~ msgid "Background Applications" #~ msgstr "Foninės programos" diff --git a/po/nl.po b/po/nl.po index 2307ef3a..587d867e 100644 --- a/po/nl.po +++ b/po/nl.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: 2020-08-22 19:23+0200\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: \n" @@ -12,7 +12,17 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.4.1\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Procesnaam" + +#: src/MainWindow.vala:35 +#, fuzzy +msgid "System" +msgstr "Systeemaanroepen" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -24,20 +34,26 @@ msgstr "" msgid "N/A" msgstr "n/b" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "B" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "GiB" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Monitor tonen" @@ -50,15 +66,15 @@ msgstr "Monitor afsluiten" msgid "Deleted" msgstr "Verwijderd" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "Weet je zeker dat je dit wilt doen?" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "Ja" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "Nee" @@ -79,6 +95,35 @@ msgstr "PRI" msgid "THR" msgstr "THR" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "Geopende bestanden" @@ -99,27 +144,27 @@ msgstr "Uitgelezen/Weggeschreven" msgid "Cancelled write" msgstr "Wegschrijven afgebroken" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Proces beëindigen" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Geselecteerd proces beëindigen" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Proces vernietigen" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Geselecteerd proces vernietigen" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "Weet je het zeker?" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "Weet je het zeker?" @@ -134,16 +179,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Geheugen" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "GiB" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -154,6 +194,100 @@ msgstr "CPU: %.1f%%" msgid "RAM: %.1f%%" msgstr "RAM: %.1f%%" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "GHz" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -183,15 +317,11 @@ msgid "Swap" msgstr "Wisselgeheugen" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "Bezig met berekenen…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "GHz" - #~ msgid "Monitor Indicator" #~ msgstr "Monitor-indicator" diff --git a/po/pl.po b/po/pl.po index ccc5559b..a5f2ac1b 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1,11 +1,20 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Nazwa procesu" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -17,20 +26,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Pokaż Monitor" @@ -43,15 +58,15 @@ msgstr "Wyjdź" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -72,6 +87,35 @@ msgstr "" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -92,27 +136,27 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Zakończ proces" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Zakończ wybrany proces" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Zabij proces" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Zabij wybrany proces" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -127,16 +171,11 @@ msgid "CPU" msgstr "" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Pamięć" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -147,6 +186,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "" @@ -176,15 +309,11 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "Obliczam…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" - #~ msgid "Show system resources" #~ msgstr "Pokaż zasoby systemu" diff --git a/po/pt.po b/po/pt.po index d02e8a09..5e3b55d2 100644 --- a/po/pt.po +++ b/po/pt.po @@ -9,17 +9,27 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-28 22:18+0400\n" -"PO-Revision-Date: 2020-08-16 14:07+0100\n" -"Last-Translator: André Barata \n" +"PO-Revision-Date: 2020-10-15 18:36+0100\n" +"Last-Translator: Hugo Carvalho \n" "Language-Team: \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.1\n" +"X-Generator: Poedit 2.0.6\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Nome do processo" + +#: src/MainWindow.vala:35 +#, fuzzy +msgid "System" +msgstr "Chamadas de sistema" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -31,20 +41,26 @@ msgstr "" msgid "N/A" msgstr "N/A" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "B" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "GiB" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Mostrar Monitor" @@ -55,17 +71,17 @@ msgstr "Fechar Monitor" #: src/Views/ProcessView/ProcessInfoView/OpenFilesListBox.vala:56 msgid "Deleted" -msgstr "Apagado" +msgstr "Eliminado" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "Tem a certeza que quer fazer isso?" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "Sim" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "Não" @@ -86,6 +102,35 @@ msgstr "PRI" msgid "THR" msgstr "THR" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "Ficheiros abertos" @@ -106,27 +151,27 @@ msgstr "Ler/Escrita" msgid "Cancelled write" msgstr "Escrita cancelada" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Terminar processo" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Terminar processo selecionado" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Matar processo" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Matar processo selecionado" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "Confirma matar o processo?" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "Confirma terminar o processo?" @@ -141,16 +186,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Memória" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "GiB" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -161,6 +201,100 @@ msgstr "CPU: %.1f%%" msgid "RAM: %.1f%%" msgstr "RAM: %.1f%%" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "GHz" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -187,18 +321,14 @@ msgstr "Escreva o nome do processo ou PID a pesquisar" #: src/Widgets/Statusbar/Statusbar.vala:14 msgid "Swap" -msgstr "Trocar" +msgstr "Swap" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "A calcular…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "GHz" - #~ msgid "Monitor Indicator" #~ msgstr "Indicador do monitor" diff --git a/po/ru.po b/po/ru.po index d9ec03ab..14c0b30e 100644 --- a/po/ru.po +++ b/po/ru.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: \n" "Last-Translator: Andrey Kultyapov \n" "Language-Team: \n" @@ -12,7 +12,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.2.3\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +msgid "Processes" +msgstr "Процессы" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "Система" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -24,20 +32,26 @@ msgstr "" msgid "N/A" msgstr "Н/Д" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "Б" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "КиБ" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "МиБ" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "ГиБ" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Показать монитор" @@ -50,15 +64,15 @@ msgstr "Выход" msgid "Deleted" msgstr "Удалено" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "Вы уверены, что хотите это сделать?" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "Да" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "Нет" @@ -79,6 +93,34 @@ msgstr "PRI" msgid "THR" msgstr "THR" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "Приложение ожидает в непрерывном режиме ожидания диска" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "Неактивный поток ядра" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "Процесс запущен или готов к выполнению (в очереди выполнения)" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "The process is in an interruptible sleep; waiting for an event to complete" +msgstr "Процесс находится в прерывистом сне; ожидая завершения события" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "Процесс останавливается сигналом управления заданием" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "Процесс остановлен отладчиком во время трассировки" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "Приложение завершается, но не используется родителем" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "Открытые файлы" @@ -99,27 +141,27 @@ msgstr "Чтение/Запись" msgid "Cancelled write" msgstr "Отменённая запись" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Завершить процесс" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Завершает выбранные процессы" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Убить процесс" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Убивает выбранные процессы" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "Действительно убить процесс?" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "Действительно завершить процесс?" @@ -134,16 +176,11 @@ msgid "CPU" msgstr "ЦПУ" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Память" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "ГиБ" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -154,6 +191,100 @@ msgstr "ЦПУ: %.1f%%" msgid "RAM: %.1f%%" msgstr "Память: %.1f%%" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "ИСПОЛЬЗОВАНИЕ" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "Показать подробную информацию" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "ЧАСТОТА" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "ТЕМПЕРАТУРА" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "Скрыть подробную информацию" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "%d%%" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "ГГц" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "℃" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "Всего: " + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "Использовано: " + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "Общий: " + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "Буферизовано: " + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "Кешировано: " + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "Заблокировано: " + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "Всего: %s" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "Использовано: %s" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "Общий: %s" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "Буферизовано: %s" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "Кешировано: %s" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "Заблокировано: %s" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -183,15 +314,11 @@ msgid "Swap" msgstr "Подкачка" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "Вычисление…" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "ГГц" - #~ msgid "Monitor Indicator" #~ msgstr "Индикатор монитора" diff --git a/po/tr.po b/po/tr.po index eefc2c16..e4757ded 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.stsdc.monitor\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "PO-Revision-Date: 2020-04-15 21:51+0100\n" "Last-Translator: Harun Yasar \n" "Language-Team: none\n" @@ -17,7 +17,17 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Süreç Adı" + +#: src/MainWindow.vala:35 +#, fuzzy +msgid "System" +msgstr "Sistem çağrıları" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -29,20 +39,26 @@ msgstr "" msgid "N/A" msgstr "N/A" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "B" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "KiB" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "MiB" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "GiB" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "Monitor'ü Göster" @@ -55,15 +71,15 @@ msgstr "Monitor'ü Kapat" msgid "Deleted" msgstr "Silindi" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "Bunu yapmak istediğinizden emin misiniz?" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "Evet" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "Hayır" @@ -84,6 +100,35 @@ msgstr "PRI" msgid "THR" msgstr "THR" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "Açık dosyalar" @@ -104,27 +149,27 @@ msgstr "Okuma/Yazma" msgid "Cancelled write" msgstr "Geçersiz yazma" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 msgid "End Process" msgstr "Süreci Sonlandır" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 msgid "End selected process" msgstr "Seçilen süreci sonlandır" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "Süreci Öldür" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "Seçilen süreci öldür" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "Süreç öldürülsün mü?" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "Süreç sonlandırılsın mı?" @@ -139,16 +184,11 @@ msgid "CPU" msgstr "CPU" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Bellek" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "GiB" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -159,6 +199,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "GHz" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "Monitor" @@ -188,11 +322,7 @@ msgid "Swap" msgstr "Takas" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "Hesaplanıyor…" - -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "GHz" diff --git a/po/uk.po b/po/uk.po index 283a3490..59824902 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1,11 +1,20 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 22:18+0400\n" +"POT-Creation-Date: 2020-09-25 22:12+0400\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/Utils.vala:13 +#: src/MainWindow.vala:34 +#, fuzzy +msgid "Processes" +msgstr "Назва процесу" + +#: src/MainWindow.vala:35 +msgid "System" +msgstr "" + +#: src/Utils.vala:2 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35 #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24 @@ -17,20 +26,26 @@ msgstr "" msgid "N/A" msgstr "" -#: src/Utils.vala:45 +#: src/Utils.vala:67 msgid "B" msgstr "" -#: src/Utils.vala:50 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:113 +#: src/Utils.vala:72 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116 msgid "KiB" msgstr "КіБ" -#: src/Utils.vala:56 -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:118 +#: src/Utils.vala:78 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121 msgid "MiB" msgstr "МіБ" +#: src/Utils.vala:83 +#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127 +#: src/Widgets/Statusbar/Statusbar.vala:55 +msgid "GiB" +msgstr "ГіБ" + #: src/Indicator/Widgets/PopoverWidget.vala:13 msgid "Show Monitor" msgstr "" @@ -43,15 +58,15 @@ msgstr "" msgid "Deleted" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:21 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20 msgid "Are you sure you want to do this?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:24 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23 msgid "Yes" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:28 +#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27 msgid "No" msgstr "" @@ -72,6 +87,35 @@ msgstr "" msgid "THR" msgstr "" +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110 +msgid "The app is waiting in an uninterruptible disk sleep" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112 +msgid "Idle kernel thread" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114 +msgid "The process is running or runnable (on run queue)" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116 +msgid "" +"The process is in an interruptible sleep; waiting for an event to complete" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118 +msgid "The process is stopped by a job control signal" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120 +msgid "The process is stopped stopped by a debugger during the tracing" +msgstr "" + +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122 +msgid "The app is terminated but not reaped by its parent" +msgstr "" + #: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18 msgid "Opened files" msgstr "" @@ -92,29 +136,29 @@ msgstr "" msgid "Cancelled write" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73 #, fuzzy msgid "End Process" msgstr "Закінчити процес" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:81 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75 #, fuzzy msgid "End selected process" msgstr "Закінчити процес" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:85 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79 msgid "Kill Process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:86 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80 msgid "Kill selected process" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:96 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90 msgid "Confirm kill of the process?" msgstr "" -#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:103 +#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97 msgid "Confirm end of the process?" msgstr "" @@ -129,16 +173,11 @@ msgid "CPU" msgstr "ЦП" #: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49 +#: src/Views/SystemView/SystemMemoryView.vala:26 #: src/Widgets/Statusbar/Statusbar.vala:11 msgid "Memory" msgstr "Пам'ять" -#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:124 -#: src/Widgets/Statusbar/Statusbar.vala:41 -#: src/Widgets/Statusbar/Statusbar.vala:49 -msgid "GiB" -msgstr "ГіБ" - #: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50 #, c-format msgid "CPU: %.1f%%" @@ -149,6 +188,100 @@ msgstr "" msgid "RAM: %.1f%%" msgstr "" +#: src/Views/SystemView/SystemCPUView.vala:32 +#: src/Views/SystemView/SystemMemoryView.vala:28 +msgid "UTILIZATION" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:34 +#: src/Views/SystemView/SystemCPUView.vala:94 +#: src/Views/SystemView/SystemMemoryView.vala:30 +#: src/Views/SystemView/SystemMemoryView.vala:35 +msgid "Show detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:36 +msgid "FREQUENCY" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:40 +msgid "TEMPERATURE" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:96 +#: src/Views/SystemView/SystemMemoryView.vala:37 +msgid "Hide detailed info" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:152 +#: src/Views/SystemView/SystemMemoryView.vala:100 +#, c-format +msgid "%d%%" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:153 +#: src/Widgets/Statusbar/Statusbar.vala:44 +msgid "GHz" +msgstr "" + +#: src/Views/SystemView/SystemCPUView.vala:154 +msgid "℃" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:41 +msgid "Total: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:44 +msgid "Used: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:47 +msgid "Shared: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:50 +msgid "Buffered: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:53 +msgid "Cached: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:56 +msgid "Locked: " +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:103 +#, c-format +msgid "Total: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:104 +#, c-format +msgid "Used: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:105 +#, c-format +msgid "Shared: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:106 +#, c-format +msgid "Buffered: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:107 +#, c-format +msgid "Cached: %s" +msgstr "" + +#: src/Views/SystemView/SystemMemoryView.vala:108 +#, c-format +msgid "Locked: %s" +msgstr "" + #: src/Widgets/Headerbar/Headerbar.vala:13 msgid "Monitor" msgstr "" @@ -179,15 +312,11 @@ msgid "Swap" msgstr "" #: src/Widgets/Statusbar/Statusbar.vala:16 -#: src/Widgets/Statusbar/Statusbar.vala:20 -#: src/Widgets/Statusbar/Statusbar.vala:25 +#: src/Widgets/Statusbar/Statusbar.vala:22 +#: src/Widgets/Statusbar/Statusbar.vala:29 msgid "Calculating…" msgstr "" -#: src/Widgets/Statusbar/Statusbar.vala:38 -msgid "GHz" -msgstr "" - #~ msgid "Background Applications" #~ msgstr "Фонові додатки" diff --git a/src/Indicator/Indicator.vala b/src/Indicator/Indicator.vala index e75b82d8..57b1635c 100644 --- a/src/Indicator/Indicator.vala +++ b/src/Indicator/Indicator.vala @@ -1,8 +1,7 @@ // TODO: Change namespace public class Monitor.Indicator : Wingpanel.Indicator { - - private Widgets.DisplayWidget? display_widget = null; - private Widgets.PopoverWidget? popover_widget = null; + private Widgets.DisplayWidget ? display_widget = null; + private Widgets.PopoverWidget ? popover_widget = null; private Settings settings; private DBusClient dbusclient; @@ -43,7 +42,6 @@ public class Monitor.Indicator : Wingpanel.Indicator { warning (e.message); } }); - } public Indicator () { @@ -54,7 +52,7 @@ public class Monitor.Indicator : Wingpanel.Indicator { return display_widget; } - public override Gtk.Widget? get_widget () { + public override Gtk.Widget ? get_widget () { return popover_widget; } @@ -63,9 +61,10 @@ public class Monitor.Indicator : Wingpanel.Indicator { public override void closed () { } + } -public Wingpanel.Indicator? get_indicator (Module module, Wingpanel.IndicatorManager.ServerType server_type) { +public Wingpanel.Indicator ? get_indicator (Module module, Wingpanel.IndicatorManager.ServerType server_type) { debug ("Activating Monitor Indicator"); if (server_type != Wingpanel.IndicatorManager.ServerType.SESSION) { diff --git a/src/Indicator/Services/DBusClient.vala b/src/Indicator/Services/DBusClient.vala index 2f6522d7..8a7f0ff9 100644 --- a/src/Indicator/Services/DBusClient.vala +++ b/src/Indicator/Services/DBusClient.vala @@ -4,10 +4,11 @@ public interface Monitor.DBusClientInterface : Object { public abstract void show_monitor () throws Error; public signal void update (ResourcesSerialized data); public signal void indicator_state (bool state); + } public class Monitor.DBusClient : Object { - public DBusClientInterface? interface = null; + public DBusClientInterface ? interface = null; private static GLib.Once instance; public static unowned DBusClient get_default () { @@ -31,10 +32,7 @@ public class Monitor.DBusClient : Object { BusNameWatcherFlags.NONE, () => monitor_appeared (), () => monitor_vanished () - ); - - - + ); } catch (IOError e) { error ("Monitor Indicator DBus: %s\n", e.message); } diff --git a/src/Indicator/Widgets/IndicatorWidget.vala b/src/Indicator/Widgets/IndicatorWidget.vala index d6cb1ceb..5febde5c 100644 --- a/src/Indicator/Widgets/IndicatorWidget.vala +++ b/src/Indicator/Widgets/IndicatorWidget.vala @@ -3,14 +3,16 @@ public class Monitor.Widgets.IndicatorWidget : Gtk.Box { public string icon_name { get; construct; } public int percentage { - set { percentage_label.label = "%i%%".printf (value); } + set { + percentage_label.label = "%i%%".printf (value); + } } public IndicatorWidget (string icon_name) { Object ( orientation: Gtk.Orientation.HORIZONTAL, icon_name: icon_name - ); + ); } construct { diff --git a/src/Indicator/Widgets/TemperatureWidget.vala b/src/Indicator/Widgets/TemperatureWidget.vala index fe883dc2..80e17af1 100644 --- a/src/Indicator/Widgets/TemperatureWidget.vala +++ b/src/Indicator/Widgets/TemperatureWidget.vala @@ -3,7 +3,9 @@ public class Monitor.Widgets.TemperatureWidget : Gtk.Box { public string icon_name { get; construct; } public double degree { - set { degree_label.label = "%d℃".printf ((int)Math.round (value)); } + set { + degree_label.label = "%d℃".printf ((int) Math.round (value)); + } } public TemperatureWidget (string icon_name) { diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 37a48110..abc84683 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -31,8 +31,8 @@ public class Monitor.MainWindow : Gtk.Window { stack = new Gtk.Stack (); stack.set_transition_type (Gtk.StackTransitionType.SLIDE_LEFT_RIGHT); - stack.add_titled (process_view, "process_view", _ ("Processes")); - stack.add_titled (system_view, "system_view", _ ("System")); + stack.add_titled (process_view, "process_view", _("Processes")); + stack.add_titled (system_view, "system_view", _("System")); Gtk.StackSwitcher stack_switcher = new Gtk.StackSwitcher (); stack_switcher.set_stack (stack); @@ -130,4 +130,5 @@ public class Monitor.MainWindow : Gtk.Window { move (position_x, position_y); } } + } diff --git a/src/Managers/AppManager.vala b/src/Managers/AppManager.vala index 3420c88c..89a69a8b 100644 --- a/src/Managers/AppManager.vala +++ b/src/Managers/AppManager.vala @@ -1,9 +1,8 @@ namespace Monitor { - public struct App { public string name; public string icon; - public string? desktop_file; + public string ? desktop_file; public int[] pids; public uint32 xid; } @@ -14,8 +13,8 @@ namespace Monitor { public signal void application_opened (App app); public signal void application_closed (App app); - static AppManager? app_manager = null; - private Bamf.Matcher? matcher; + static AppManager ? app_manager = null; + private Bamf.Matcher ? matcher; private Gee.ArrayList transient_xids; public static AppManager get_default () { @@ -24,7 +23,6 @@ namespace Monitor { return app_manager; } - public AppManager () { transient_xids = new Gee.ArrayList (); @@ -33,7 +31,6 @@ namespace Monitor { matcher.view_closed.connect_after (handle_view_closed); } - ~AppManager () { matcher.view_opened.disconnect (handle_view_opened); matcher.view_closed.disconnect (handle_view_closed); @@ -49,18 +46,17 @@ namespace Monitor { int[] win_pids = {}; var window = (Bamf.Window)view; var app = matcher.get_application_for_window (window); - win_pids += (int)window.get_pid (); + win_pids += (int) window.get_pid (); if (has_desktop_file (app.get_desktop_file ())) { debug ("Handle View Opened: %s", view.get_name ()); application_opened ( App () { - name = app.get_name (), - icon = app.get_icon (), - desktop_file = app.get_desktop_file (), - pids = win_pids, - xid = app.get_xids ().index (0) - } - ); + name = app.get_name (), + icon = app.get_icon (), + desktop_file = app.get_desktop_file (), + pids = win_pids, + xid = app.get_xids ().index (0) + }); } } } @@ -70,23 +66,22 @@ namespace Monitor { int[] win_pids = {}; var window = (Bamf.Window)view; var app = matcher.get_application_for_window (window); - win_pids += (int)window.get_pid (); + win_pids += (int) window.get_pid (); if (has_desktop_file (app.get_desktop_file ())) { debug ("Handle View Closed: %s", view.get_name ()); application_closed ( App () { - name = app.get_name (), - icon = app.get_icon (), - desktop_file = app.get_desktop_file (), - pids = win_pids, - xid = app.get_xids ().index (0) - } - ); + name = app.get_name (), + icon = app.get_icon (), + desktop_file = app.get_desktop_file (), + pids = win_pids, + xid = app.get_xids ().index (0) + }); } } } - private bool has_desktop_file (string? desktop_file) { + private bool has_desktop_file (string ? desktop_file) { return !(desktop_file == null || desktop_file == ""); } @@ -99,16 +94,16 @@ namespace Monitor { // go through the windows of the application and add all of the pids var windows = bamf_app.get_windows (); foreach (var window in windows) { - win_pids += (int)window.get_pid (); + win_pids += (int) window.get_pid (); } if (has_desktop_file (bamf_app.get_desktop_file ())) { apps += App () { - name = bamf_app.get_name (), - icon = bamf_app.get_icon (), - desktop_file = bamf_app.get_desktop_file (), - pids = win_pids, - xid = bamf_app.get_xids ().index (0) - }; + name = bamf_app.get_name (), + icon = bamf_app.get_icon (), + desktop_file = bamf_app.get_desktop_file (), + pids = win_pids, + xid = bamf_app.get_xids ().index (0) + }; } } return apps; @@ -116,7 +111,7 @@ namespace Monitor { private bool is_main_window (Bamf.View view) { var window_type = ((Bamf.Window)view).get_window_type (); - debug ("Window type: %d, Is transient: %d", window_type, (int)is_transient (view)); + debug ("Window type: %d, Is transient: %d", window_type, (int) is_transient (view)); return (window_type == Bamf.WindowType.NORMAL || window_type == Bamf.WindowType.DOCK) && !is_transient (view); } @@ -132,5 +127,6 @@ namespace Monitor { } return false; } + } } diff --git a/src/Managers/Process.vala b/src/Managers/Process.vala index 7f0a094e..fdfb864e 100644 --- a/src/Managers/Process.vala +++ b/src/Managers/Process.vala @@ -1,6 +1,6 @@ -public class Monitor.Process : GLib.Object { +public class Monitor.Process : GLib.Object { // The size of each RSS page, in bytes - // private static long PAGESIZE = Posix.sysconf (Posix._SC_PAGESIZE); + // private static long PAGESIZE = Posix.sysconf (Posix._SC_PAGESIZE); public signal void fd_permission_error (string error); @@ -22,7 +22,9 @@ public class Monitor.Process : GLib.Object { Icon _icon; public Icon icon { - get { return _icon; } + get { + return _icon; + } set { if (value == null) { _icon = ProcessUtils.get_default_icon (); @@ -51,16 +53,16 @@ public class Monitor.Process : GLib.Object { private uint64 cpu_last_used; - //Memory usage of the process, measured in KiB. + // Memory usage of the process, measured in KiB. public uint64 mem_usage { get; private set; } public double mem_percentage { get; private set; } private uint64 last_total; - const int history_buffer_size = 30; - public Gee.ArrayList cpu_percentage_history = new Gee.ArrayList(); - public Gee.ArrayList mem_percentage_history = new Gee.ArrayList(); + const int HISTORY_BUFFER_SIZE = 30; + public Gee.ArrayList cpu_percentage_history = new Gee.ArrayList (); + public Gee.ArrayList mem_percentage_history = new Gee.ArrayList (); @@ -72,8 +74,8 @@ public class Monitor.Process : GLib.Object { last_total = 0; - io = { }; - stat = { }; + io = {}; + stat = {}; stat.pid = _pid; // getting uid @@ -106,7 +108,7 @@ public class Monitor.Process : GLib.Object { // Kills the process // Returns if kill was successful public bool kill () { - // Sends a kill signal that cannot be ignored + // Sends a kill signal that cannot be ignored if (Posix.kill (stat.pid, Posix.Signal.KILL) == 0) { return true; } @@ -116,7 +118,7 @@ public class Monitor.Process : GLib.Object { // Ends the process // Returns if end was successful public bool end () { - // Sends a terminate signal + // Sends a terminate signal if (Posix.kill (stat.pid, Posix.Signal.TERM) == 0) { return true; } @@ -137,28 +139,28 @@ public class Monitor.Process : GLib.Object { while ((line = dis.read_line ()) != null) { var splitted_line = line.split (":"); switch (splitted_line[0]) { - case "wchar" : + case "wchar": io.wchar = uint64.parse (splitted_line[1]); break; - case "rchar" : + case "rchar": io.rchar = uint64.parse (splitted_line[1]); break; - case "syscr" : + case "syscr": io.syscr = uint64.parse (splitted_line[1]); break; - case "syscw" : + case "syscw": io.syscw = uint64.parse (splitted_line[1]); break; - case "read_bytes" : + case "read_bytes": io.read_bytes = uint64.parse (splitted_line[1]); break; - case "write_bytes" : + case "write_bytes": io.write_bytes = uint64.parse (splitted_line[1]); break; - case "cancelled_write_bytes" : + case "cancelled_write_bytes": io.cancelled_write_bytes = uint64.parse (splitted_line[1]); break; - default : + default: warning ("Unknown value in /proc/%d/io", stat.pid); break; } @@ -188,7 +190,9 @@ public class Monitor.Process : GLib.Object { // But first we have to extract the command name, since it might include spaces // First find the command in stat file. It is inside `(command)` - Regex regex = /\((.*?)\)/; // <- there should be no spaces; uncrustify adds them + /* *INDENT-OFF* */ + Regex regex = /\((.*?)\)/; // vala-lint=space-before-paren, + /* *INDENT-ON* */ MatchInfo match_info; regex.match (stat_contents, 0, out match_info); @@ -238,7 +242,7 @@ public class Monitor.Process : GLib.Object { if (FileUtils.test (path, FileTest.IS_SYMLINK)) { string real_path = FileUtils.read_link (path); - // debug(content); + // debug(content); open_files_paths.add (real_path); } } @@ -271,11 +275,11 @@ public class Monitor.Process : GLib.Object { // Get CPU usage by process GTop.ProcTime proc_time; GTop.get_proc_time (out proc_time, stat.pid); - cpu_percentage = 100 * ((double)(proc_time.rtime - cpu_last_used)) / (cpu_total - cpu_last_total); + cpu_percentage = 100 * ((double) (proc_time.rtime - cpu_last_used)) / (cpu_total - cpu_last_total); cpu_last_used = proc_time.rtime; // Making CPU history - if (cpu_percentage_history.size == history_buffer_size) { + if (cpu_percentage_history.size == HISTORY_BUFFER_SIZE) { cpu_percentage_history.remove_at (0); } cpu_percentage_history.add (cpu_percentage); @@ -286,7 +290,7 @@ public class Monitor.Process : GLib.Object { GTop.ProcMem proc_mem; GTop.get_proc_mem (out proc_mem, stat.pid); - mem_usage = (proc_mem.resident - proc_mem.share) / 1024; // in KiB + mem_usage = (proc_mem.resident - proc_mem.share) / 1024; // in KiB // also if it is using X Window Server if (Gdk.Display.get_default () is Gdk.X11.Display) { @@ -294,13 +298,14 @@ public class Monitor.Process : GLib.Object { mem_usage += (resu.total_bytes_estimate / 1024); } - var total_installed_memory = (double)mem.total / 1024; + var total_installed_memory = (double) mem.total / 1024; mem_percentage = (mem_usage / total_installed_memory) * 100; // Making RAM history - if (mem_percentage_history.size == history_buffer_size) { + if (mem_percentage_history.size == HISTORY_BUFFER_SIZE) { mem_percentage_history.remove_at (0); } mem_percentage_history.add (mem_percentage); } + } diff --git a/src/Managers/ProcessManager.vala b/src/Managers/ProcessManager.vala index a730f78c..f57b1d5e 100644 --- a/src/Managers/ProcessManager.vala +++ b/src/Managers/ProcessManager.vala @@ -1,5 +1,4 @@ namespace Monitor { - public class ProcessManager { private static GLib.Once instance; public static unowned ProcessManager get_default () { @@ -32,66 +31,63 @@ namespace Monitor { populate_apps_info (); update_processes.begin (); - } - public void populate_apps_info() { - + public void populate_apps_info () { var _apps_info = AppInfo.get_all (); foreach (AppInfo app_info in _apps_info) { + string commandline = (app_info.get_commandline ()); + // debug ("%s\n", commandline); - string commandline = (app_info.get_commandline ()); - // debug ("%s\n", commandline); + // GLib.DesktopAppInfo? dai = info as GLib.DesktopAppInfo; - // GLib.DesktopAppInfo? dai = info as GLib.DesktopAppInfo; - - // if (dai != null) { - // string id = dai.get_string ("X-Flatpak"); - // if (id != null) - // appid_map.insert (id, info); - // } + // if (dai != null) { + // string id = dai.get_string ("X-Flatpak"); + // if (id != null) + // appid_map.insert (id, info); + // } if (commandline == null) continue; - // sanitize_cmd (ref cmd); + // sanitize_cmd (ref cmd); apps_info_list.set (commandline, app_info); } } - // private static void sanitize_cmd(ref string? commandline) { - // if (commandline == null) - // return; + // private static void sanitize_cmd(ref string? commandline) { + // if (commandline == null) + // return; - // // flatpak: parse the command line of the containerized program - // if (commandline.contains("flatpak run")) { - // var index = commandline.index_of ("--command=") + 10; - // commandline = commandline.substring (index); - // } + //// flatpak: parse the command line of the containerized program + // if (commandline.contains("flatpak run")) { + // var index = commandline.index_of ("--command=") + 10; + // commandline = commandline.substring (index); + // } - // // TODO: unify this with the logic in get_full_process_cmd - // // commandline = Process.first_component (commandline); - // // commandline = Path.get_basename (commandline); - // // commandline = Process.sanitize_name (commandline); + //// TODO: unify this with the logic in get_full_process_cmd + //// commandline = Process.first_component (commandline); + //// commandline = Path.get_basename (commandline); + //// commandline = Process.sanitize_name (commandline); - // // Workaround for google-chrome - // if (commandline.contains ("google-chrome-stable")) - // commandline = "chrome"; - // } + //// Workaround for google-chrome + // if (commandline.contains ("google-chrome-stable")) + // commandline = "chrome"; + // } - // public static AppInfo? app_info_for_process (Process p) { - // AppInfo? info = null; + // public static AppInfo? app_info_for_process (Process p) { + // AppInfo? info = null; - // if (p.command != null) - // info = apps_info[p.command]; + // if (p.command != null) + // info = apps_info[p.command]; - // if (info == null && p.app_id != null) - // info = appid_map[p.app_id]; + // if (info == null && p.app_id != null) + // info = appid_map[p.app_id]; - // return info; - // } + // return info; + // } @@ -99,7 +95,7 @@ namespace Monitor { /** * Gets a process by its pid, making sure that it's updated. */ - public Process? get_process (int pid) { + public Process ? get_process (int pid) { // if the process is in the kernel blacklist, we don't want to deal with it. if (kernel_process_blacklist.contains (pid)) { return null; @@ -144,11 +140,11 @@ namespace Monitor { * Gets all new process and adds them */ public async void update_processes () { - /* CPU */ + /* CPU */ GTop.Cpu cpu_data; GTop.get_cpu (out cpu_data); var used = cpu_data.user + cpu_data.nice + cpu_data.sys; - cpu_load = ((double)(used - cpu_last_used)) / (cpu_data.total - cpu_last_total); + cpu_load = ((double) (used - cpu_last_used)) / (cpu_data.total - cpu_last_total); cpu_loads = new double[cpu_data.xcpu_user.length]; var useds = new uint64[cpu_data.xcpu_user.length]; @@ -157,8 +153,8 @@ namespace Monitor { } for (int i = 0; i < cpu_data.xcpu_user.length; i++) { - cpu_loads[i] = ((double)(useds[i] - cpu_last_useds[i])) / - (cpu_data.xcpu_total[i] - cpu_last_totals[i]); + cpu_loads[i] = ((double) (useds[i] - cpu_last_useds[i])) / + (cpu_data.xcpu_total[i] - cpu_last_totals[i]); } var remove_me = new Gee.HashSet (); @@ -179,7 +175,7 @@ namespace Monitor { var uid = Posix.getuid (); GTop.ProcList proclist; var pids = GTop.get_proclist (out proclist, GTop.GLIBTOP_KERN_PROC_UID, uid); - // var pids = GTop.get_proclist (out proclist, GTop.GLIBTOP_KERN_PROC_ALLfla, uid); + // var pids = GTop.get_proclist (out proclist, GTop.GLIBTOP_KERN_PROC_ALLfla, uid); for (int i = 0; i < proclist.number; i++) { int pid = pids[i]; @@ -203,18 +199,18 @@ namespace Monitor { * * returns the created process */ - private Process? add_process (int pid, bool lazy_signal = false) { + private Process ? add_process (int pid, bool lazy_signal = false) { // create the process var process = new Process (pid); // placeholding shortened commandline process.application_name = ProcessUtils.sanitize_commandline (process.command); - + // checking maybe it's an application foreach (var key in apps_info_list.keys) { if (key.contains (process.application_name)) { process.application_name = apps_info_list.get (key).get_name (); - // debug (apps_info_list.get (key).get_icon ().to_string ()); + // debug (apps_info_list.get (key).get_icon ().to_string ()); process.icon = apps_info_list.get (key).get_icon (); } } @@ -248,12 +244,10 @@ namespace Monitor { if (process_list.has_key (pid)) { process_list.unset (pid); process_removed (pid); - } - else if (kernel_process_blacklist.contains (pid)) { + } else if (kernel_process_blacklist.contains (pid)) { kernel_process_blacklist.remove (pid); } } - } } diff --git a/src/Managers/ProcessStructs.vala b/src/Managers/ProcessStructs.vala index 9e1b17fe..97f06889 100644 --- a/src/Managers/ProcessStructs.vala +++ b/src/Managers/ProcessStructs.vala @@ -1,7 +1,6 @@ // For more info look at: http://man7.org/linux/man-pages/man5/proc.5.html public struct Monitor.ProcessIO { - // characters read public uint64 rchar; @@ -26,29 +25,28 @@ public struct Monitor.ProcessIO { } public struct Monitor.ProcessStatusMemory { - - // total program size (pages) (same as VmSize in status) + // total program size (pages) (same as VmSize in status) public uint64 size; - // size of memory portions (pages) (same as VmRSS in status) + // size of memory portions (pages) (same as VmRSS in status) public uint64 resident; - // number of pages that are shared + // number of pages that are shared // (i.e. backed by a file, same as RssFile+RssShmem in status) public uint64 shared; - // number of pages that are 'code' (not including libs; broken, + // number of pages that are 'code' (not including libs; broken, // includes data segment) public uint64 trs; - // number of pages of library (always 0 on 2.6) + // number of pages of library (always 0 on 2.6) public uint64 lrs; - // number of pages of data/stack (including libs; broken, + // number of pages of data/stack (including libs; broken, // includes library text) public uint64 drs; - // number of dirty pages (always 0 on 2.6) + // number of dirty pages (always 0 on 2.6) public uint64 dt; } @@ -62,15 +60,15 @@ public struct Monitor.ProcessStatus { public string comm; // Should contain one of the following value: - // D uninterruptible sleep (usually IO) - // I Idle kernel thread - // R running or runnable (on run queue) - // S interruptible sleep (waiting for an event to complete) - // T stopped by job control signal - // t stopped by debugger during the tracing - // W paging (not valid since the 2.6.xx kernel) - // X dead (should never be seen) - // Z defunct ("zombie") process, terminated but not reaped by its parent + // D uninterruptible sleep (usually IO) + // I Idle kernel thread + // R running or runnable (on run queue) + // S interruptible sleep (waiting for an event to complete) + // T stopped by job control signal + // t stopped by debugger during the tracing + // W paging (not valid since the 2.6.xx kernel) + // X dead (should never be seen) + // Z defunct ("zombie") process, terminated but not reaped by its parent public string state; // The PID of the parent of this process. @@ -83,7 +81,7 @@ public struct Monitor.ProcessStatus { public uint session; // The controlling terminal of the process. - // (The minor device number is contained in + // (The minor device number is contained in // the combination of bits 31 to 20 and 7 to 0; // the major device number is in bits 15 to 8.) public uint tty_nr; @@ -103,5 +101,4 @@ public struct Monitor.ProcessStatus { // The time the process started after system boot. public uint64 starttime; - -} \ No newline at end of file +} diff --git a/src/Managers/ProcessUtils.vala b/src/Managers/ProcessUtils.vala index 58729aa9..b85719fe 100644 --- a/src/Managers/ProcessUtils.vala +++ b/src/Managers/ProcessUtils.vala @@ -1,5 +1,4 @@ public class Monitor.ProcessUtils { - // checks if it is run by shell private static bool is_shell (string chunk) { if ("sh" == chunk || "bash" == chunk || "zsh" == chunk) { @@ -9,9 +8,9 @@ public class Monitor.ProcessUtils { return false; } - public static string sanitize_commandline (string? commandline) { + public static string sanitize_commandline (string ? commandline) { if (commandline == null) return Path.get_basename (""); - + // splitting command; might include many options var splitted_commandline = commandline.split (" "); @@ -23,7 +22,7 @@ public class Monitor.ProcessUtils { return Path.get_basename (splitted_commandline[0]); } - public static string? read_file (string path) { + public static string ? read_file (string path) { var file = File.new_for_path (path); /* make sure that it exists, not an error if it doesn't */ @@ -34,8 +33,8 @@ public class Monitor.ProcessUtils { try { var dis = new DataInputStream (file.read ()); - // Doing this because of cmdline file. - // cmdline is a single line file with each arg seperated by a null character ('\0') + // Doing this because of cmdline file. + // cmdline is a single line file with each arg seperated by a null character ('\0') string line = dis.read_upto ("\0", 1, null); while (line != null) { text.append (line); @@ -51,7 +50,7 @@ public class Monitor.ProcessUtils { } } - public static Icon? get_default_icon () { + public static Icon ? get_default_icon () { try { return Icon.new_for_string ("application-x-executable"); } catch (Error e) { @@ -59,5 +58,4 @@ public class Monitor.ProcessUtils { return null; } } - -} \ No newline at end of file +} diff --git a/src/Models/TreeViewModel.vala b/src/Models/TreeViewModel.vala index d298dcad..eec05072 100644 --- a/src/Models/TreeViewModel.vala +++ b/src/Models/TreeViewModel.vala @@ -28,8 +28,6 @@ public class Monitor.TreeViewModel : Gtk.TreeStore { process_manager.updated.connect (update_model); Idle.add (() => { add_running_processes (); return false; }); - - } private void add_running_processes () { @@ -49,13 +47,13 @@ public class Monitor.TreeViewModel : Gtk.TreeStore { // donno what is going on, but maybe just use a string insteead of Icon ?? // coz it lagz - // string icon_name = process.icon.to_string (); + // string icon_name = process.icon.to_string (); set (iter, Column.NAME, process.application_name, Column.ICON, process.icon.to_string (), Column.PID, process.stat.pid, - -1); + -1); if (process_rows.size < 1) { added_first_row (); } @@ -73,7 +71,7 @@ public class Monitor.TreeViewModel : Gtk.TreeStore { set (iter, Column.CPU, process.cpu_percentage, Column.MEMORY, process.mem_usage, - -1); + -1); } } @@ -91,7 +89,7 @@ public class Monitor.TreeViewModel : Gtk.TreeStore { if (pid > 0) { var process = process_manager.get_process (pid); process.kill (); - info ("Kill:%d",process.stat.pid); + info ("Kill:%d", process.stat.pid); } } @@ -99,7 +97,8 @@ public class Monitor.TreeViewModel : Gtk.TreeStore { if (pid > 0) { var process = process_manager.get_process (pid); process.end (); - info ("End:%d",process.stat.pid); + info ("End:%d", process.stat.pid); } } + } diff --git a/src/Monitor.vala b/src/Monitor.vala index 1e36e212..d6fe129d 100644 --- a/src/Monitor.vala +++ b/src/Monitor.vala @@ -52,7 +52,7 @@ namespace Monitor { var quit_action = new SimpleAction ("quit", null); add_action (quit_action); - set_accels_for_action ("app.quit", {"q"}); + set_accels_for_action ("app.quit", { "q" }); quit_action.activate.connect (() => { if (window != null) { window.destroy (); @@ -67,7 +67,7 @@ namespace Monitor { Gtk.Settings.get_default ().set ("gtk-alternative-sort-arrows", true, null); } - public static int main (string [] args) { + public static int main (string[] args) { // add command line options try { var opt_context = new OptionContext (""); @@ -75,7 +75,7 @@ namespace Monitor { opt_context.add_main_entries (CMD_OPTIONS, null); opt_context.parse (ref args); } catch (OptionError e) { - print ("Error: %s\n", e.message); + print ("Error: %s\n", e.message); print ("Run '%s --help' to see a full list of available command line options.\n\n", args[0]); return 0; } @@ -84,5 +84,6 @@ namespace Monitor { return app.run (args); } + } } diff --git a/src/Resources/CPU.vala b/src/Resources/CPU.vala index 8700a4f7..d27addef 100644 --- a/src/Resources/CPU.vala +++ b/src/Resources/CPU.vala @@ -4,21 +4,21 @@ public class Monitor.CPU : Object { private float load; private TemperatureSensor temperature_sensor; - public string? model_name; - public string? model; - public string? family; - public string? microcode; - public string? cache_size; - public string? flags; - public string? bogomips; - public string? bugs; - public string? address_sizes; + public string ? model_name; + public string ? model; + public string ? family; + public string ? microcode; + public string ? cache_size; + public string ? flags; + public string ? bogomips; + public string ? bugs; + public string ? address_sizes; GTop.Cpu ? cpu; public int percentage { get { - return (int)(Math.round (load * 100)); + return (int) (Math.round (load * 100)); } } @@ -28,7 +28,7 @@ public class Monitor.CPU : Object { public double frequency { get { // Convert kH to GHz - return (double)(_frequency / 1000000); + return (double) (_frequency / 1000000); } } @@ -42,7 +42,7 @@ public class Monitor.CPU : Object { last_used = 0; last_total = 0; - core_list = new Gee.ArrayList (); + core_list = new Gee.ArrayList (); model_name = get_cpu_info (); @@ -50,7 +50,7 @@ public class Monitor.CPU : Object { debug ("Number of cores: %d", (int) get_num_processors ()); for (int i = 0; i < (int) get_num_processors (); i++) { - var core = new Core(i); + var core = new Core (i); core_list.add (core); } @@ -60,19 +60,19 @@ public class Monitor.CPU : Object { } public void update () { - update_percentage(); - update_frequency(); + update_percentage (); + update_frequency (); foreach (var core in core_list) { - core.update(); + core.update (); } } private void update_percentage () { GTop.get_cpu (out cpu); - var used = (float)(cpu.user + cpu.sys + cpu.nice + cpu.irq + cpu.softirq); - var idle = (float)(cpu.idle + cpu.iowait); + var used = (float) (cpu.user + cpu.sys + cpu.nice + cpu.irq + cpu.softirq); + var idle = (float) (cpu.idle + cpu.iowait); var total = used + idle; var diff_used = used - last_used; @@ -87,7 +87,7 @@ public class Monitor.CPU : Object { // From https://github.com/PlugaruT/wingpanel-monitor/blob/edcfea6a31f794aa44da6d8b997378ea1a8d8fa3/src/Services/Cpu.vala#L61-L85 private void update_frequency () { double maxcur = 0; - for (uint cpu_id = 0, isize = (int)get_num_processors (); cpu_id < isize; ++cpu_id) { + for (uint cpu_id = 0, isize = (int) get_num_processors (); cpu_id < isize; ++cpu_id) { string cur_content; try { FileUtils.get_contents ("/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq".printf (cpu_id), out cur_content); @@ -105,11 +105,11 @@ public class Monitor.CPU : Object { } } - _frequency = (double)maxcur; + _frequency = (double) maxcur; } private void parse_cpuinfo () { - unowned GTop.SysInfo? info = GTop.glibtop_get_sysinfo (); + unowned GTop.SysInfo ? info = GTop.glibtop_get_sysinfo (); if (info == null) { warning ("No CPU info"); @@ -132,8 +132,8 @@ public class Monitor.CPU : Object { } // straight from elementary about-plug - private string? get_cpu_info () { - unowned GTop.SysInfo? info = GTop.glibtop_get_sysinfo (); + private string ? get_cpu_info () { + unowned GTop.SysInfo ? info = GTop.glibtop_get_sysinfo (); if (info == null) { return null; @@ -144,7 +144,7 @@ public class Monitor.CPU : Object { for (int i = 0; i < info.ncpu; i++) { unowned GLib.HashTable values = info.cpuinfo[i].values; - string? model = null; + string ? model = null; foreach (var key in KEYS) { model = values.lookup (key); @@ -153,7 +153,7 @@ public class Monitor.CPU : Object { } } - string? core_count = values.lookup ("cpu cores"); + string ? core_count = values.lookup ("cpu cores"); if (core_count != null) { counts.@set (model, int.parse (core_count)); continue; @@ -177,16 +177,16 @@ public class Monitor.CPU : Object { } if (cpu.@value == 2) { - result += _("Dual-Core %s").printf ( (cpu.key)); + result += _("Dual-Core %s").printf ((cpu.key)); } else if (cpu.@value == 4) { - result += _("Quad-Core %s").printf ( (cpu.key)); + result += _("Quad-Core %s").printf ((cpu.key)); } else if (cpu.@value == 6) { - result += _("Hexa-Core %s").printf ( (cpu.key)); + result += _("Hexa-Core %s").printf ((cpu.key)); } else { - result += "%u\u00D7 %s ".printf (cpu.@value, (cpu.key)); + result += "%u\u00D7 %s ".printf (cpu.@value, (cpu.key)); } } - return Utils.Strings.beautify (result); + return Utils.Strings.beautify (result); } } diff --git a/src/Resources/Core.vala b/src/Resources/Core.vala index 1a13113f..b7f626a2 100644 --- a/src/Resources/Core.vala +++ b/src/Resources/Core.vala @@ -1,5 +1,5 @@ namespace Monitor { - //from Monilet + // from Monilet public class Core : GLib.Object { private float last_total; private float last_used; @@ -8,7 +8,9 @@ namespace Monitor { public int number { get; set; } public float percentage_used { - get { return _percentage_used; } + get { + return _percentage_used; + } } public Core (int number) { @@ -25,14 +27,15 @@ namespace Monitor { var difference_used = (float) used - last_used; var difference_total = (float) cpu.xcpu_total[number] - last_total; - var pre_percentage = difference_used.abs () / difference_total.abs (); // calculate the pre percentage + var pre_percentage = difference_used.abs () / difference_total.abs (); // calculate the pre percentage _percentage_used = pre_percentage * 100; last_used = (float) used; last_total = (float) cpu.xcpu_total[number]; - // debug("Core %d: %f%%", number, _percentage_used); + // debug("Core %d: %f%%", number, _percentage_used); } + } } diff --git a/src/Resources/Memory.vala b/src/Resources/Memory.vala index 9ef7f4da..86bce20f 100644 --- a/src/Resources/Memory.vala +++ b/src/Resources/Memory.vala @@ -1,5 +1,4 @@ namespace Monitor { - public class Memory : Object { public double total; public double used; @@ -21,17 +20,18 @@ namespace Monitor { used = 0; } - public Memory () { } + public Memory () { + } public void update () { GTop.get_mem (out mem); - total = (double) (mem.total ); + total = (double) (mem.total); used = (double) mem.user; shared = (double) (mem.shared); buffer = (double) (mem.buffer); cached = (double) (mem.cached); locked = (double) (mem.locked); - } + } } diff --git a/src/Resources/Network.vala b/src/Resources/Network.vala index 272f2978..f4219ecb 100644 --- a/src/Resources/Network.vala +++ b/src/Resources/Network.vala @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020 Tudor Plugaru (https://github.com/PlugaruT/wingpanel-monitor) + * Copyright (c) 2020 Tudor Plugaru, @stsdc * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,66 +21,52 @@ public class Monitor.Network : GLib.Object { - private int _bytes_in; - private int _bytes_in_old; - private bool control; + public int bytes_in; + private int bytes_in_old; - private int _bytes_out; - private int _bytes_out_old; + public int bytes_out; + private int bytes_out_old; - // flag first run - // bc first calculasion is wrong - private bool dumb_flag; + // flag first run + // bc first calculasion is wrong + private bool dumb_flag; - public Network () { - _bytes_in = 0; - _bytes_in_old = 0; - _bytes_out = 0; - _bytes_out_old = 0; - control = false; - dumb_flag = true; - } - - public int[] get_bytes () { - if (control == false) { - control = true; - update_bytes_total (); - } else { - control = false; - } - int[] ret; - ret = {_bytes_out, _bytes_in}; - return ret; - } + public Network () { + bytes_in = 0; + bytes_in_old = 0; + bytes_out = 0; + bytes_out_old = 0; + dumb_flag = true; + } - private void update_bytes_total () { - GTop.NetList netlist; - GTop.NetLoad netload; + public void update () { + GTop.NetList netlist; + GTop.NetLoad netload; - var devices = GTop.get_netlist (out netlist); - var n_bytes_out = 0; - var n_bytes_in = 0; - for (uint j = 0; j < netlist.number; ++j) { - var device = devices[j]; - if (device != "lo" && device.substring (0, 3) != "tun") { - GTop.get_netload (out netload, device); + var devices = GTop.get_netlist (out netlist); + var bytes_out_new = 0; + var bytes_in_new = 0; + for (uint j = 0; j < netlist.number; ++j) { + var device = devices[j]; + if (device != "lo" && device.substring (0, 3) != "tun") { + GTop.get_netload (out netload, device); - n_bytes_out += (int)netload.bytes_out; - n_bytes_in += (int)netload.bytes_in; - } + bytes_out_new += (int) netload.bytes_out; + bytes_in_new += (int) netload.bytes_in; } + } - var bout = (n_bytes_out - _bytes_out_old) / 1; - var bin = (n_bytes_in - _bytes_in_old) / 1; + // bc 2 sec updates + if (!dumb_flag) { + bytes_out = (bytes_out_new - bytes_out_old) / 2; + bytes_in = (bytes_in_new - bytes_in_old) / 2; + } - _bytes_out_old = n_bytes_out; - _bytes_in_old = n_bytes_in; - - if (!dumb_flag) { - _bytes_out = bout; - _bytes_in = bin; - } - dumb_flag = false; + bytes_out_old = bytes_out_new; + bytes_in_old = bytes_in_new; - } + + dumb_flag = false; } + +} diff --git a/src/Resources/Resources.vala b/src/Resources/Resources.vala index ed72eb51..78d04610 100644 --- a/src/Resources/Resources.vala +++ b/src/Resources/Resources.vala @@ -3,30 +3,35 @@ public class Monitor.Resources : Object { public Memory memory; public Swap swap; public Network network; + public Storage storage; construct { memory = new Memory (); cpu = new CPU (); swap = new Swap (); network = new Network (); + storage = new Storage (); } - public void update() { - cpu.update(); - memory.update(); + public void update () { + cpu.update (); + memory.update (); + network.update (); + storage.update (); } + public ResourcesSerialized serialize () { return ResourcesSerialized () { - cpu_percentage = cpu.percentage, - cpu_frequency = cpu.frequency, - cpu_temperature = cpu.temperature, - memory_percentage = memory.percentage, - memory_used = memory.used, - memory_total = memory.total, - swap_percentage = swap.percentage, - swap_used = swap.used, - swap_total = swap.total + cpu_percentage = cpu.percentage, + cpu_frequency = cpu.frequency, + cpu_temperature = cpu.temperature, + memory_percentage = memory.percentage, + memory_used = memory.used, + memory_total = memory.total, + swap_percentage = swap.percentage, + swap_used = swap.used, + swap_total = swap.total }; } -} \ No newline at end of file +} diff --git a/src/Resources/ResourcesSerialized.vala b/src/Resources/ResourcesSerialized.vala index 9785b9b6..af3468d0 100644 --- a/src/Resources/ResourcesSerialized.vala +++ b/src/Resources/ResourcesSerialized.vala @@ -8,4 +8,4 @@ public struct ResourcesSerialized { public int swap_percentage; public double swap_used; public double swap_total; -} \ No newline at end of file +} diff --git a/src/Resources/Storage.vala b/src/Resources/Storage.vala new file mode 100644 index 00000000..87d23065 --- /dev/null +++ b/src/Resources/Storage.vala @@ -0,0 +1,53 @@ +public class Monitor.Storage : GLib.Object { + public int bytes_write; + private ulong sectors_write_old; + + public int bytes_read; + private ulong sectors_read_old; + + // flag first run + // bc first calculasion is wrong + private bool dumb_flag; + + public Storage () { + bytes_write = 0; + sectors_write_old = 0; + bytes_read = 0; + sectors_read_old = 0; + dumb_flag = true; + } + + public void update () { + ulong sectors_read_new = 0; + ulong sectors_write_new = 0; + + try { + string content = null; + FileUtils.get_contents ("/proc/diskstats", out content); + InputStream input_stream = new MemoryInputStream.from_data (content.data, GLib.g_free); + DataInputStream dis = new DataInputStream (input_stream); + string line; + + while ((line = dis.read_line ()) != null) { + string[] reg_split = Regex.split_simple ("[ ]+", line); + if (reg_split[1] == "8" && Regex.match_simple ("sd[a-z]{1}$", reg_split[3])) { + sectors_read_new += ulong.parse (reg_split[6]); + sectors_write_new += ulong.parse (reg_split[10]); + } + } + } catch (Error e) { + warning ("Unable to retrieve storage data."); + } + + // bc 2 sec updates + if (!dumb_flag) { + bytes_read = (int) ((sectors_read_new - sectors_read_old) * 512 / 2); + bytes_write = (int) ((sectors_write_new - sectors_write_old) * 512 / 2); + } + dumb_flag = false; + + sectors_read_old = sectors_read_new; + sectors_write_old = sectors_write_new; + } + +} diff --git a/src/Resources/Swap.vala b/src/Resources/Swap.vala index d1557cdc..dbf52669 100644 --- a/src/Resources/Swap.vala +++ b/src/Resources/Swap.vala @@ -25,4 +25,5 @@ public class Monitor.Swap : Object { total = (double) (swap.total / 1024 / 1024) / 1000; used = (double) (swap.used / 1024 / 1024) / 1000; } + } diff --git a/src/Resources/TemperatureSensor.vala b/src/Resources/TemperatureSensor.vala index bb8136bb..1b8a227c 100644 --- a/src/Resources/TemperatureSensor.vala +++ b/src/Resources/TemperatureSensor.vala @@ -1,9 +1,9 @@ class TemperatureSensor : Object { - private const string hwmon_path = "/sys/class/hwmon"; + private const string HWMON_PATH = "/sys/class/hwmon"; // contains list of paths to files with a temperature values // Intel reports per core temperature, while AMD Ryzen Tdie - public Gee.ArrayList cpu_temp_paths; + public Gee.ArrayList cpu_temp_paths; public double cpu { get { @@ -16,63 +16,61 @@ class TemperatureSensor : Object { } construct { - cpu_temp_paths = new Gee.ArrayList (); + cpu_temp_paths = new Gee.ArrayList (); traverser (); - } - - public TemperatureSensor() { - } + public TemperatureSensor () { + } private void traverser () { try { - Dir hwmon_dir = Dir.open (hwmon_path, 0); + Dir hwmon_dir = Dir.open (HWMON_PATH, 0); string ? hwmonx = null; while ((hwmonx = hwmon_dir.read_name ()) != null) { - string hwmonx_name = Path.build_filename (hwmon_path, hwmonx, "name"); + string hwmonx_name = Path.build_filename (HWMON_PATH, hwmonx, "name"); string sensor_name = open_file (hwmonx_name); // thank u, next - if (sensor_name == "") { continue; } + if (sensor_name == "") continue; if (sensor_name == "coretemp" || sensor_name == "k10temp") { debug ("Found temp. sensor: %s", sensor_name); - Dir hwmonx_dir = Dir.open (Path.build_filename (hwmon_path, hwmonx), 0); + Dir hwmonx_dir = Dir.open (Path.build_filename (HWMON_PATH, hwmonx), 0); string ? hwmonx_prop = null; while ((hwmonx_prop = hwmonx_dir.read_name ()) != null) { - // debug (open_file (hwmonx_name)); + // debug (open_file (hwmonx_name)); if (hwmonx_prop.contains ("temp")) { // AMD stuff // Tdie contains true temperature value, while Tctl contains value for fans // Tctl = Tdie + offset in some processors - if ("Tdie" == open_file (Path.build_filename (hwmon_path, hwmonx, hwmonx_prop))) { - string tempx_input = "temp%c_input".printf(hwmonx_prop[4]); - cpu_temp_paths.add (Path.build_filename (hwmon_path, hwmonx, tempx_input)); - + if ("Tdie" == open_file (Path.build_filename (HWMON_PATH, hwmonx, hwmonx_prop))) { + string tempx_input = "temp%c_input".printf (hwmonx_prop[4]); + cpu_temp_paths.add (Path.build_filename (HWMON_PATH, hwmonx, tempx_input)); + debug (open_file (cpu_temp_paths[0])); - // Intel stuff - // Intel reports per core - } else if (open_file (Path.build_filename (hwmon_path, hwmonx, hwmonx_prop)).contains ("Core")) { - string tempx_input = "temp%c_input".printf(hwmonx_prop[4]); - cpu_temp_paths.add (Path.build_filename (hwmon_path, hwmonx, tempx_input)); + // Intel stuff + // Intel reports per core + } else if (open_file (Path.build_filename (HWMON_PATH, hwmonx, hwmonx_prop)).contains ("Core")) { + string tempx_input = "temp%c_input".printf (hwmonx_prop[4]); + cpu_temp_paths.add (Path.build_filename (HWMON_PATH, hwmonx, tempx_input)); debug (open_file (cpu_temp_paths[0])); } } } - } else if (sensor_name == "amdgpu" ) { + } else if (sensor_name == "amdgpu") { debug ("Found temp. sensor: %s", sensor_name); } else { debug ("Found temp. sensor: %s", sensor_name); } } } catch (FileError e) { - warning (@"Could not open dir: %s", e.message); + warning ("Could not open dir: %s", e.message); } } @@ -80,10 +78,11 @@ class TemperatureSensor : Object { try { string read; FileUtils.get_contents (filename, out read); - return read.replace ("\n",""); + return read.replace ("\n", ""); } catch (FileError e) { warning ("%s", e.message); return ""; } } -} \ No newline at end of file + +} diff --git a/src/Services/DBusServer.vala b/src/Services/DBusServer.vala index d802c75b..ad59278c 100644 --- a/src/Services/DBusServer.vala +++ b/src/Services/DBusServer.vala @@ -20,7 +20,7 @@ public class Monitor.DBusServer : Object { DBUS_NAME, BusNameOwnerFlags.NONE, (connection) => on_bus_aquired (connection), - () => { }, + () => {}, null ); } @@ -41,6 +41,7 @@ public class Monitor.DBusServer : Object { error (e.message); } } + } [DBus (name = "com.github.stsdc.monitor")] diff --git a/src/Services/Shortcuts.vala b/src/Services/Shortcuts.vala index 9474dac6..5abfb5c7 100644 --- a/src/Services/Shortcuts.vala +++ b/src/Services/Shortcuts.vala @@ -1,63 +1,63 @@ -namespace Monitor { - public class Shortcuts : Object { +public class Monitor.Shortcuts : Object { + private MainWindow window; + public bool handled; - private MainWindow window; - public bool handled; - - public Shortcuts (MainWindow window) { this.window = window; } - - public bool handle (Gdk.EventKey e) { - handled = false; - char typed = e.str[0]; + public Shortcuts (MainWindow window) { + this.window = window; + } - if (typed.isalnum () && !window.headerbar.search.is_focus) { - window.headerbar.search.activate_entry (e.str); - handled = true; - } + public bool handle (Gdk.EventKey e) { + handled = false; + char typed = e.str[0]; - if ((e.state & Gdk.ModifierType.CONTROL_MASK) != 0) { - switch (e.keyval) { - case Gdk.Key.f: - window.headerbar.search.activate_entry (); - handled = true; - break; - case Gdk.Key.e: - window.process_view.process_tree_view.end_process (); - handled = true; - break; - case Gdk.Key.k: - window.process_view.process_tree_view.kill_process (); - handled = true; - break; - case Gdk.Key.comma: - handled = true; - break; - case Gdk.Key.period: - handled = true; - break; - default: - break; - } - } + if (typed.isalnum () && !window.headerbar.search.is_focus) { + window.headerbar.search.activate_entry (e.str); + handled = true; + } + if ((e.state & Gdk.ModifierType.CONTROL_MASK) != 0) { switch (e.keyval) { - case Gdk.Key.Return: - window.process_view.process_tree_view.focus_on_first_row (); - handled = true; - break; - case Gdk.Key.Left: - window.process_view.process_tree_view.collapse (); - handled = true; - break; - case Gdk.Key.Right: - window.process_view.process_tree_view.expanded (); - handled = true; - break; - default: - break; + case Gdk.Key.f: + window.headerbar.search.activate_entry (); + handled = true; + break; + case Gdk.Key.e: + window.process_view.process_tree_view.end_process (); + handled = true; + break; + case Gdk.Key.k: + window.process_view.process_tree_view.kill_process (); + handled = true; + break; + case Gdk.Key.comma: + handled = true; + break; + case Gdk.Key.period: + handled = true; + break; + default: + break; } + } - return handled; + switch (e.keyval) { + case Gdk.Key.Return: + window.process_view.process_tree_view.focus_on_first_row (); + handled = true; + break; + case Gdk.Key.Left: + window.process_view.process_tree_view.collapse (); + handled = true; + break; + case Gdk.Key.Right: + window.process_view.process_tree_view.expanded (); + handled = true; + break; + default: + break; } + + return handled; } + } diff --git a/src/Utils.vala b/src/Utils.vala index 628dbaf9..46293ae3 100644 --- a/src/Utils.vala +++ b/src/Utils.vala @@ -1,5 +1,5 @@ namespace Monitor.Utils { - const string NOT_AVAILABLE = (_ ("N/A")); + const string NOT_AVAILABLE = (_("N/A")); const string NO_DATA = "\u2014"; } @@ -16,13 +16,13 @@ public class Monitor.Utils.Strings { const GraphicsReplaceStrings REPLACE_STRINGS[] = { - // { "Mesa DRI ", ""}, - { "[(]R[)]", "®"}, - { "[(]TM[)]", "™"}, - // { "Gallium .* on (AMD .*)", "\\1"}, - // { "(AMD .*) [(].*", "\\1"}, - // { "(AMD [A-Z])(.*)", "\\1\\L\\2\\E"}, - // { "Graphics Controller", "Graphics"}, + // { "Mesa DRI ", ""}, + { "[(]R[)]", "®" }, + { "[(]TM[)]", "™" }, + // { "Gallium .* on (AMD .*)", "\\1"}, + // { "(AMD .*) [(].*", "\\1"}, + // { "(AMD [A-Z])(.*)", "\\1\\L\\2\\E"}, + // { "Graphics Controller", "Graphics"}, }; try { @@ -36,6 +36,7 @@ public class Monitor.Utils.Strings { return pretty; } + } /** @@ -43,7 +44,7 @@ public class Monitor.Utils.Strings { * Author: Laurent Callarec @lcallarec */ public class Monitor.Utils.HumanUnitFormatter { - const string[] SIZE_UNITS = {"B", "KiB", "MiB", "GiB", "TiB"}; + const string[] SIZE_UNITS = { "B", "KiB", "MiB", "GiB", "TiB" }; const double KFACTOR = 1024; /** @@ -53,7 +54,7 @@ public class Monitor.Utils.HumanUnitFormatter { double current_size = double.parse (bytes); string current_size_formatted = bytes.to_string () + HumanUnitFormatter.SIZE_UNITS[0]; - for (int i = 0; i<= HumanUnitFormatter.SIZE_UNITS.length; i++) { + for (int i = 0; i <= HumanUnitFormatter.SIZE_UNITS.length; i++) { if (current_size < HumanUnitFormatter.KFACTOR) { return GLib.Math.round (current_size).to_string () + HumanUnitFormatter.SIZE_UNITS[i]; } @@ -64,25 +65,26 @@ public class Monitor.Utils.HumanUnitFormatter { } public static string double_bytes_to_human (double bytes) { - string units = _ ("B"); + string units = _("B"); // convert to MiB if needed if (bytes > 1024.0) { bytes /= 1024.0; - units = _ ("KiB"); + units = _("KiB"); } // convert to GiB if needed if (bytes > 1024.0) { bytes /= 1024.0; - units = _ ("MiB"); + units = _("MiB"); } if (bytes > 1024.0) { bytes /= 1024.0; - units = _ ("GiB"); + units = _("GiB"); } return "%.1f %s".printf (bytes, units); } + } diff --git a/src/Views/ProcessView/ProcessInfoView/OpenFilesListBox.vala b/src/Views/ProcessView/ProcessInfoView/OpenFilesListBox.vala index 03b17bfd..41ef2978 100644 --- a/src/Views/ProcessView/ProcessInfoView/OpenFilesListBox.vala +++ b/src/Views/ProcessView/ProcessInfoView/OpenFilesListBox.vala @@ -25,20 +25,20 @@ public class Monitor.OpenFilesListBox : Gtk.ScrolledWindow { foreach (var path in process.open_files_paths) { // display only real paths // probably should be done in process class - if (path.substring(0, 1) == "/") { - var row = new OpenFilesListBoxRow (path, path.contains("(deleted)")); + if (path.substring (0, 1) == "/") { + var row = new OpenFilesListBoxRow (path, path.contains ("(deleted)")); listbox.add (row); } } } show_all (); } + } public class Monitor.OpenFilesListBoxRow : Gtk.ListBoxRow { construct { - get_style_context ().add_class ("open_files_list_box_row"); } public OpenFilesListBoxRow (string _text, bool is_deleted) { @@ -56,7 +56,7 @@ public class Monitor.OpenFilesListBoxRow : Gtk.ListBoxRow { icon.tooltip_text = _("Deleted"); text = text.replace ("(deleted)", ""); } - + grid.attach (icon, 0, 0, 1, 1); @@ -66,4 +66,4 @@ public class Monitor.OpenFilesListBoxRow : Gtk.ListBoxRow { add (grid); } -} \ No newline at end of file +} diff --git a/src/Views/ProcessView/ProcessInfoView/Preventor.vala b/src/Views/ProcessView/ProcessInfoView/Preventor.vala index 7979eff8..2b0e10a0 100644 --- a/src/Views/ProcessView/ProcessInfoView/Preventor.vala +++ b/src/Views/ProcessView/ProcessInfoView/Preventor.vala @@ -1,5 +1,4 @@ public class Monitor.Preventor : Gtk.Stack { - private Gtk.Box preventive_action_bar; private Gtk.Label confirmation_label; private Gtk.Button confirm_button; @@ -17,9 +16,9 @@ public class Monitor.Preventor : Gtk.Stack { preventive_action_bar.halign = Gtk.Align.END; - confirmation_label = new Gtk.Label (_ ("Are you sure you want to do this?")); + confirmation_label = new Gtk.Label (_("Are you sure you want to do this?")); confirmation_label.margin_end = 10; - + confirm_button = new Gtk.Button.with_label (_("Yes")); confirm_button.margin_end = 10; confirm_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); @@ -37,22 +36,22 @@ public class Monitor.Preventor : Gtk.Stack { add_named (preventive_action_bar, "preventive_action_bar"); deny_button.clicked.connect (() => { - set_transition_type(Gtk.StackTransitionType.SLIDE_UP); + set_transition_type (Gtk.StackTransitionType.SLIDE_UP); set_visible_child (child_widget); - confirmed(false); + confirmed (false); }); - confirm_button.clicked.connect(() => { - set_transition_type(Gtk.StackTransitionType.SLIDE_UP); + confirm_button.clicked.connect (() => { + set_transition_type (Gtk.StackTransitionType.SLIDE_UP); set_visible_child (child_widget); - confirmed(true); + confirmed (true); }); } public void set_prevention (string confirmation_text) { - set_transition_type(Gtk.StackTransitionType.SLIDE_DOWN); + set_transition_type (Gtk.StackTransitionType.SLIDE_DOWN); confirmation_label.set_text (_(confirmation_text)); set_visible_child (preventive_action_bar); } -} \ No newline at end of file +} diff --git a/src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala b/src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala index 755c321c..5012cf51 100644 --- a/src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala +++ b/src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala @@ -2,8 +2,8 @@ public class Monitor.ProcessInfoCPURAM : Gtk.Grid { private Gtk.Label cpu_label; private Gtk.Label ram_label; - private ProcessChart cpu_chart; - private ProcessChart ram_chart; + private Chart cpu_chart; + private Chart ram_chart; construct { column_spacing = 6; @@ -12,18 +12,16 @@ public class Monitor.ProcessInfoCPURAM : Gtk.Grid { column_homogeneous = true; row_homogeneous = false; - cpu_chart = new ProcessChart (); - ram_chart = new ProcessChart (); + cpu_chart = new Chart (1); + ram_chart = new Chart (1); + cpu_chart.height_request = 60; + ram_chart.height_request = 60; var cpu_graph_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); - cpu_graph_box.get_style_context ().add_class ("graph"); cpu_graph_box.add (cpu_chart); - - var mem_graph_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); - mem_graph_box.get_style_context ().add_class ("graph"); mem_graph_box.add (ram_chart); cpu_label = new Gtk.Label ("CPU: " + Utils.NO_DATA); @@ -42,21 +40,21 @@ public class Monitor.ProcessInfoCPURAM : Gtk.Grid { } public void set_charts_data (Process process) { - cpu_chart.set_data (process.cpu_percentage_history); - ram_chart.set_data (process.mem_percentage_history); + cpu_chart.preset_data (0, process.cpu_percentage_history); + ram_chart.preset_data (0, process.mem_percentage_history); } public void update (Process process) { cpu_label.set_text ((_("CPU: %.1f%%")).printf (process.cpu_percentage)); ram_label.set_text ((_("RAM: %.1f%%")).printf (process.mem_percentage)); - cpu_chart.update(process.cpu_percentage); - ram_chart.update(process.mem_percentage); - + cpu_chart.update (0, process.cpu_percentage); + ram_chart.update (0, process.mem_percentage); } public void clear_graphs () { cpu_chart.clear (); ram_chart.clear (); } -} \ No newline at end of file + +} diff --git a/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala b/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala index 1704d346..b4fd0c48 100644 --- a/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala +++ b/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala @@ -3,6 +3,7 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { public Gtk.Label state; public Gtk.Label application_name; public LabelRoundy pid; + public LabelRoundy ppid; public LabelRoundy pgrp; public LabelRoundy nice; @@ -15,35 +16,37 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { construct { column_spacing = 12; - regex = /(?i:^.*\.(xpm|png)$)/; + /* *INDENT-OFF* */ + regex = /(?i:^.*\.(xpm|png)$)/; // vala-lint=space-before-paren, + /* *INDENT-ON* */ icon = new Gtk.Image.from_icon_name ("application-x-executable", Gtk.IconSize.DIALOG); icon.set_pixel_size (64); icon.valign = Gtk.Align.END; - + state = new Gtk.Label ("?"); state.halign = Gtk.Align.START; state.get_style_context ().add_class ("state_badge"); var icon_container = new Gtk.Fixed (); - icon_container.put (icon, 0, 0); + icon_container.put (icon, 0, 0); icon_container.put (state, -5, 48); - application_name = new Gtk.Label (_ ("N/A")); + application_name = new Gtk.Label (_("N/A")); application_name.get_style_context ().add_class ("h2"); application_name.ellipsize = Pango.EllipsizeMode.END; - application_name.tooltip_text = _ ("N/A"); + application_name.tooltip_text = _("N/A"); application_name.halign = Gtk.Align.START; application_name.valign = Gtk.Align.START; - pid = new LabelRoundy (_ ("PID")); - nice = new LabelRoundy (_ ("NI")); - priority = new LabelRoundy (_ ("PRI")); - num_threads = new LabelRoundy (_ ("THR")); - // ppid = new LabelRoundy (_("PPID")); - // pgrp = new LabelRoundy (_("PGRP")); + pid = new LabelRoundy (_("PID")); + nice = new LabelRoundy (_("NI")); + priority = new LabelRoundy (_("PRI")); + num_threads = new LabelRoundy (_("THR")); + // ppid = new LabelRoundy (_("PPID")); + // pgrp = new LabelRoundy (_("PGRP")); - // TODO: tooltip_text UID + // TODO: tooltip_text UID username = new LabelRoundy (""); var wrapper = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); @@ -53,24 +56,23 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { wrapper.add (num_threads); wrapper.add (username); - attach (icon_container, 0, 0, 1, 2); + attach (icon_container, 0, 0, 1, 2); attach (application_name, 1, 0, 3, 1); - attach (wrapper, 1, 1, 1, 1); - + attach (wrapper, 1, 1, 1, 1); } public void update (Process process) { application_name.set_text (process.application_name); application_name.tooltip_text = process.command; - pid.set_text (process.stat.pid.to_string()); - nice.set_text (process.stat.nice.to_string()); - priority.set_text (process.stat.priority.to_string()); + pid.set_text (process.stat.pid.to_string ()); + nice.set_text (process.stat.nice.to_string ()); + priority.set_text (process.stat.priority.to_string ()); if (process.uid == 0) { username.val.get_style_context ().add_class ("username-root"); username.val.get_style_context ().remove_class ("username-other"); username.val.get_style_context ().remove_class ("username-current"); - } else if (process.uid == (int)Posix.getuid ()) { + } else if (process.uid == (int) Posix.getuid ()) { username.val.get_style_context ().add_class ("username-current"); username.val.get_style_context ().remove_class ("username-other"); username.val.get_style_context ().remove_class ("username-root"); @@ -81,17 +83,17 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { } username.set_text (process.username); - num_threads.set_text (process.stat.num_threads.to_string()); + num_threads.set_text (process.stat.num_threads.to_string ()); state.set_text (process.stat.state); state.tooltip_text = set_state_tooltip (); - num_threads.set_text (process.stat.num_threads.to_string()); + num_threads.set_text (process.stat.num_threads.to_string ()); set_icon (process); } private void set_icon (Process process) { // this construction should be somewhere else var icon_name = process.icon.to_string (); - + if (!regex.match (icon_name)) { icon.set_from_icon_name (icon_name, Gtk.IconSize.DIALOG); } else { @@ -106,22 +108,23 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { private string set_state_tooltip () { switch (state.label) { - case "D": - return _("The app is waiting in an uninterruptible disk sleep"); - case "I": - return _("Idle kernel thread"); - case "R": - return _("The process is running or runnable (on run queue)"); - case "S": - return _("The process is in an interruptible sleep; waiting for an event to complete"); - case "T": - return _("The process is stopped by a job control signal"); - case "t": - return _("The process is stopped stopped by a debugger during the tracing"); - case "Z": - return _("The app is terminated but not reaped by its parent"); - default: - return ""; + case "D": + return _("The app is waiting in an uninterruptible disk sleep"); + case "I": + return _("Idle kernel thread"); + case "R": + return _("The process is running or runnable (on run queue)"); + case "S": + return _("The process is in an interruptible sleep; waiting for an event to complete"); + case "T": + return _("The process is stopped by a job control signal"); + case "t": + return _("The process is stopped stopped by a debugger during the tracing"); + case "Z": + return _("The app is terminated but not reaped by its parent"); + default: + return ""; } } -} \ No newline at end of file + +} diff --git a/src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala b/src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala index c9b2bac3..c1d5f106 100644 --- a/src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala +++ b/src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala @@ -18,7 +18,7 @@ public class Monitor.ProcessInfoIOStats : Gtk.Grid { var opened_files_label = create_label (_("Opened files")); opened_files_label.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL); opened_files_label.margin_top = 24; - + var characters_label = create_label (_("Characters")); characters_label.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL); rchar_label = create_label (_("N/A")); @@ -40,8 +40,8 @@ public class Monitor.ProcessInfoIOStats : Gtk.Grid { cancelled_write_bytes_label = create_label (Utils.NO_DATA); attach (io_label, 0, 1, 1, 1); - attach (create_label_with_icon(read_bytes_label, "go-up-symbolic"), 0, 2, 1, 1); - attach (create_label_with_icon(write_bytes_label, "go-down-symbolic"), 0, 3, 1, 1); + attach (create_label_with_icon (read_bytes_label, "go-up-symbolic"), 0, 2, 1, 1); + attach (create_label_with_icon (write_bytes_label, "go-down-symbolic"), 0, 3, 1, 1); attach (cancelled_write_label, 1, 1, 1, 1); attach (cancelled_write_bytes_label, 1, 2, 1, 1); @@ -52,15 +52,14 @@ public class Monitor.ProcessInfoIOStats : Gtk.Grid { attach (open_files_listbox, 0, 4, 3, 1); } - public ProcessInfoIOStats() { - + public ProcessInfoIOStats () { } public void update (Process process) { - write_bytes_label.set_text (Utils.HumanUnitFormatter.double_bytes_to_human(process.io.write_bytes)); - read_bytes_label.set_text (Utils.HumanUnitFormatter.double_bytes_to_human(process.io.read_bytes)); - cancelled_write_bytes_label.set_text (Utils.HumanUnitFormatter.double_bytes_to_human(process.io.cancelled_write_bytes)); - + write_bytes_label.set_text (Utils.HumanUnitFormatter.double_bytes_to_human (process.io.write_bytes)); + read_bytes_label.set_text (Utils.HumanUnitFormatter.double_bytes_to_human (process.io.read_bytes)); + cancelled_write_bytes_label.set_text (Utils.HumanUnitFormatter.double_bytes_to_human (process.io.cancelled_write_bytes)); + open_files_listbox.update (process); } @@ -85,4 +84,5 @@ public class Monitor.ProcessInfoIOStats : Gtk.Grid { grid.attach (label, 1, 0, 1, 1); return grid; } -} \ No newline at end of file + +} diff --git a/src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala b/src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala index cbfff8d8..23f17d77 100644 --- a/src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala +++ b/src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala @@ -1,9 +1,10 @@ public class Monitor.ProcessInfoView : Gtk.Box { private Process _process; public Process ? process { - get { return _process; } + get { + return _process; + } set { - // remember to disconnect before assigning a new value if (_process != null) { _process.fd_permission_error.disconnect (show_permission_error_infobar); @@ -18,7 +19,6 @@ public class Monitor.ProcessInfoView : Gtk.Box { permission_error_infobar.revealed = false; _process.fd_permission_error.connect (show_permission_error_infobar); - } } public string ? icon_name; @@ -51,10 +51,10 @@ public class Monitor.ProcessInfoView : Gtk.Box { add (grid); - process_info_header = new ProcessInfoHeader(); + process_info_header = new ProcessInfoHeader (); grid.attach (process_info_header, 0, 0, 1, 1); - var sep = new Gtk.Separator(Gtk.Orientation.HORIZONTAL); + var sep = new Gtk.Separator (Gtk.Orientation.HORIZONTAL); sep.margin = 12; grid.attach (sep, 0, 1, 1, 1); @@ -69,15 +69,15 @@ public class Monitor.ProcessInfoView : Gtk.Box { process_action_bar.margin_top = 12; process_action_bar.valign = Gtk.Align.END; process_action_bar.halign = Gtk.Align.END; - + end_process_button = new Gtk.Button.with_label (_("End Process")); end_process_button.margin_end = 10; - end_process_button.tooltip_markup = Granite.markup_accel_tooltip ({"E"}, _("End selected process")); + end_process_button.tooltip_markup = Granite.markup_accel_tooltip ({ "E" }, _("End selected process")); var end_process_button_context = end_process_button.get_style_context (); end_process_button_context.add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION); kill_process_button = new Gtk.Button.with_label (_("Kill Process")); - kill_process_button.tooltip_markup = Granite.markup_accel_tooltip ({"K"}, _("Kill selected process")); + kill_process_button.tooltip_markup = Granite.markup_accel_tooltip ({ "K" }, _("Kill selected process")); var kill_process_button_context = kill_process_button.get_style_context (); kill_process_button_context.add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); @@ -86,28 +86,25 @@ public class Monitor.ProcessInfoView : Gtk.Box { Preventor preventor = new Preventor (process_action_bar, "process_action_bar"); - kill_process_button.clicked.connect(() => { + kill_process_button.clicked.connect (() => { preventor.set_prevention (_("Confirm kill of the process?")); - preventor.confirmed.connect((is_confirmed) => { - if (is_confirmed) process.kill(); // maybe add a toast that process killed + preventor.confirmed.connect ((is_confirmed) => { + if (is_confirmed) process.kill (); // maybe add a toast that process killed }); }); - end_process_button.clicked.connect(() => { + end_process_button.clicked.connect (() => { preventor.set_prevention (_("Confirm end of the process?")); - preventor.confirmed.connect((is_confirmed) => { - if (is_confirmed) process.end(); // maybe add a toast that process ended - }); + preventor.confirmed.connect ((is_confirmed) => { + if (is_confirmed) process.end (); // maybe add a toast that process ended + }); }); grid.attach (preventor, 0, 5, 1, 1); - - - } private void show_permission_error_infobar (string error) { - if (permission_error_infobar.revealed == false) { + if (permission_error_infobar.revealed == false) { permission_error_label.set_text (error); permission_error_infobar.revealed = true; } @@ -118,8 +115,7 @@ public class Monitor.ProcessInfoView : Gtk.Box { process_info_header.update (process); process_info_cpu_ram.update (process); process_info_io_stats.update (process); - - } } -} \ No newline at end of file + +} diff --git a/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala b/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala index 6c650b4d..8cabe02b 100644 --- a/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala +++ b/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala @@ -10,7 +10,9 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { public CPUProcessTreeView (TreeViewModel model) { this.model = model; - regex = /(?i:^.*\.(xpm|png)$)/; + /* *INDENT-OFF* */ + regex = /(?i:^.*\.(xpm|png)$)/; // vala-lint=space-before-paren, + /* *INDENT-ON* */ // setup name column name_column = new Gtk.TreeViewColumn (); @@ -35,7 +37,7 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { var cpu_cell = new Gtk.CellRendererText (); cpu_cell.xalign = 0.5f; - cpu_column = new Gtk.TreeViewColumn.with_attributes (_ ("CPU"), cpu_cell); + cpu_column = new Gtk.TreeViewColumn.with_attributes (_("CPU"), cpu_cell); cpu_column.expand = false; cpu_column.set_cell_data_func (cpu_cell, cpu_usage_cell_layout); cpu_column.alignment = 0.5f; @@ -46,7 +48,7 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { var memory_cell = new Gtk.CellRendererText (); memory_cell.xalign = 0.5f; - memory_column = new Gtk.TreeViewColumn.with_attributes (_ ("Memory"), memory_cell); + memory_column = new Gtk.TreeViewColumn.with_attributes (_("Memory"), memory_cell); memory_column.expand = false; memory_column.set_cell_data_func (memory_cell, memory_usage_cell_layout); memory_column.alignment = 0.5f; @@ -56,7 +58,7 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { // setup PID column var pid_cell = new Gtk.CellRendererText (); pid_cell.xalign = 0.5f; - pid_column = new Gtk.TreeViewColumn.with_attributes (_ ("PID"), pid_cell); + pid_column = new Gtk.TreeViewColumn.with_attributes (_("PID"), pid_cell); pid_column.set_cell_data_func (pid_cell, pid_cell_layout); pid_column.expand = false; pid_column.alignment = 0.5f; @@ -72,17 +74,16 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { model.added_first_row.connect (() => { focus_on_first_row (); }); - + cursor_changed.connect (_cursor_changed); - // model.process_manager.updated.connect (_cursor_changed); + // model.process_manager.updated.connect (_cursor_changed); } public void icon_cell_layout (Gtk.CellLayout cell_layout, Gtk.CellRenderer icon_cell, Gtk.TreeModel model, Gtk.TreeIter iter) { Value icon_name; model.get_value (iter, Column.ICON, out icon_name); - string path = ((string)icon_name); + string path = ((string) icon_name); if (regex.match (path)) { - try { Gdk.Pixbuf icon = new Gdk.Pixbuf.from_file_at_size (path, 16, -1); ((Gtk.CellRendererPixbuf)icon_cell).pixbuf = icon; @@ -112,19 +113,19 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { Value memory_usage_value; model.get_value (iter, Column.MEMORY, out memory_usage_value); int64 memory_usage = memory_usage_value.get_int64 (); - double memory_usage_double = (double)memory_usage; - string units = _ ("KiB"); + double memory_usage_double = (double) memory_usage; + string units = _("KiB"); // convert to MiB if needed if (memory_usage_double > 1024.0) { memory_usage_double /= 1024.0; - units = _ ("MiB"); + units = _("MiB"); } // convert to GiB if needed if (memory_usage_double > 1024.0) { memory_usage_double /= 1024.0; - units = _ ("GiB"); + units = _("GiB"); } // format the double into a string @@ -202,7 +203,8 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { tree_model.get (iter, Column.PID, out pid); Process process = model.process_manager.get_process (pid); process_selected (process); - // debug ("cursor changed"); + // debug ("cursor changed"); } } + } diff --git a/src/Views/ProcessView/ProcessView.vala b/src/Views/ProcessView/ProcessView.vala index 8e37bb92..087d1ea5 100644 --- a/src/Views/ProcessView/ProcessView.vala +++ b/src/Views/ProcessView/ProcessView.vala @@ -1,11 +1,10 @@ public class Monitor.ProcessView : Gtk.Box { public TreeViewModel treeview_model; public CPUProcessTreeView process_tree_view; - + public ProcessInfoView process_info_view; construct { - process_info_view = new ProcessInfoView (); // hide on startup @@ -25,10 +24,10 @@ public class Monitor.ProcessView : Gtk.Box { var paned = new Gtk.Paned (Gtk.Orientation.HORIZONTAL); paned.pack1 (process_tree_view_scrolled, true, false); paned.pack2 (process_info_view, false, false); - // paned.set_min_position (200); + // paned.set_min_position (200); paned.set_position (paned.max_position); paned.set_hexpand (true); - + add (paned); } @@ -40,6 +39,7 @@ public class Monitor.ProcessView : Gtk.Box { public void update () { process_info_view.update (); - treeview_model.process_manager.update_processes.begin(); + treeview_model.process_manager.update_processes.begin (); } -} \ No newline at end of file + +} diff --git a/src/Views/SystemView/SystemCPUInfoPopover.vala b/src/Views/SystemView/SystemCPUInfoPopover.vala index 3fa74028..0631a781 100644 --- a/src/Views/SystemView/SystemCPUInfoPopover.vala +++ b/src/Views/SystemView/SystemCPUInfoPopover.vala @@ -8,41 +8,41 @@ public class Monitor.SystemCPUInfoPopover : Gtk.Popover { grid.margin = 12; grid.column_spacing = 6; - grid.attach (label(_("Model")), 0, 0, 1, 1); - grid.attach (label(_("Family")), 0, 1, 1, 1); - grid.attach (label(_("Microcode ver.")), 0, 2, 1, 1); - grid.attach (label(_("Bogomips")), 0, 3, 1, 1); - grid.attach (label(_("Cache size")), 0, 4, 1, 1); - grid.attach (label(_("Address sizes")), 0, 5, 1, 1); - grid.attach (label(_("Flags")), 0, 6, 1, 1); - grid.attach (label(_("Bugs")), 0, 7, 1, 1); + grid.attach (label (_("Model")), 0, 0, 1, 1); + grid.attach (label (_("Family")), 0, 1, 1, 1); + grid.attach (label (_("Microcode ver.")), 0, 2, 1, 1); + grid.attach (label (_("Bogomips")), 0, 3, 1, 1); + grid.attach (label (_("Cache size")), 0, 4, 1, 1); + grid.attach (label (_("Address sizes")), 0, 5, 1, 1); + grid.attach (label (_("Flags")), 0, 6, 1, 1); + grid.attach (label (_("Bugs")), 0, 7, 1, 1); for (int i; i <= 7; i++) { - grid.attach ( label (":"), 1, i, 1, 1); + grid.attach (label (":"), 1, i, 1, 1); } add (grid); } - public SystemCPUInfoPopover(Gtk.ToggleButton? relative_to, CPU _cpu) { - Object (relative_to : relative_to); + public SystemCPUInfoPopover (Gtk.ToggleButton ? relative_to, CPU _cpu) { + Object (relative_to: relative_to); - closed.connect (() => { relative_to.set_active(false); }); + closed.connect (() => { relative_to.set_active (false); }); cpu = _cpu; - grid.attach (label(cpu.model), 2, 0, 1, 1); - grid.attach (label(cpu.family), 2, 1, 1, 1); - grid.attach (label(cpu.microcode), 2, 2, 1, 1); - grid.attach (label(cpu.bogomips), 2, 3, 1, 1); - grid.attach (label(cpu.cache_size), 2, 4, 1, 1); - grid.attach (label(cpu.address_sizes), 2, 5, 1, 1); - grid.attach (label(cpu.flags), 2, 6, 1, 1); - grid.attach (label(cpu.bugs), 2, 7, 1, 1); + grid.attach (label (cpu.model), 2, 0, 1, 1); + grid.attach (label (cpu.family), 2, 1, 1, 1); + grid.attach (label (cpu.microcode), 2, 2, 1, 1); + grid.attach (label (cpu.bogomips), 2, 3, 1, 1); + grid.attach (label (cpu.cache_size), 2, 4, 1, 1); + grid.attach (label (cpu.address_sizes), 2, 5, 1, 1); + grid.attach (label (cpu.flags), 2, 6, 1, 1); + grid.attach (label (cpu.bugs), 2, 7, 1, 1); } - private Gtk.Label label(string text) { + private Gtk.Label label (string text) { var label = new Gtk.Label (text); label.halign = Gtk.Align.START; label.valign = Gtk.Align.START; @@ -51,4 +51,5 @@ public class Monitor.SystemCPUInfoPopover : Gtk.Popover { return label; } -} \ No newline at end of file + +} diff --git a/src/Views/SystemView/SystemCPUView.vala b/src/Views/SystemView/SystemCPUView.vala index feaf36ad..a49c3892 100644 --- a/src/Views/SystemView/SystemCPUView.vala +++ b/src/Views/SystemView/SystemCPUView.vala @@ -9,11 +9,11 @@ public class Monitor.SystemCPUView : Gtk.Box { private LabelRoundy cpu_temperature_label; private LabelH4 processor_name_label; - // private Gtk.Button view_threads_usage_button; + // private Gtk.Button view_threads_usage_button; private Gtk.Revealer cpu_threads_revealer; - private Gee.ArrayList core_label_list; + private Gee.ArrayList core_label_list; construct { margin = 12; @@ -26,7 +26,7 @@ public class Monitor.SystemCPUView : Gtk.Box { - public SystemCPUView(CPU _cpu) { + public SystemCPUView (CPU _cpu) { cpu = _cpu; cpu_percentage_label = new LabelVertical (_("UTILIZATION")); @@ -45,7 +45,7 @@ public class Monitor.SystemCPUView : Gtk.Box { var processor_info_button = new Gtk.ToggleButton (); processor_info_button.get_style_context ().add_class ("circular"); - // processor_info_button.get_style_context ().add_class ("popup"); + // processor_info_button.get_style_context ().add_class ("popup"); processor_info_button.has_focus = false; var icon = new Gtk.Image (); icon.gicon = new ThemedIcon ("dialog-information"); @@ -61,17 +61,15 @@ public class Monitor.SystemCPUView : Gtk.Box { title_grid.column_spacing = 6; var popover = new SystemCPUInfoPopover (processor_info_button, cpu); - - processor_info_button.clicked.connect(() => { popover.show_all(); }); + + processor_info_button.clicked.connect (() => { popover.show_all (); }); cpu_utilization_chart = new Chart (cpu.core_list.size); var grid_utilization_info = new Gtk.Grid (); - grid_utilization_info.attach (grid_usage_labels(), 0, 0, 1, 1); + grid_utilization_info.attach (grid_usage_labels (), 0, 0, 1, 1); grid_utilization_info.attach (cpu_utilization_chart, 0, 0, 1, 1); - - cpu_frequency_chart = new Chart (1); cpu_frequency_chart.height_request = -1; cpu_frequency_chart.config.y_axis.fixed_max = 5.0; @@ -87,7 +85,7 @@ public class Monitor.SystemCPUView : Gtk.Box { grid_temperature_info.attach (cpu_temperature_chart, 0, 0, 1, 1); - cpu_percentage_label.clicked.connect(() => { + cpu_percentage_label.clicked.connect (() => { cpu_threads_revealer.reveal_child = !(cpu_threads_revealer.child_revealed); if (cpu_threads_revealer.child_revealed) { @@ -109,7 +107,7 @@ public class Monitor.SystemCPUView : Gtk.Box { // Thanks Goncalo var charts_container = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); charts_container.pack_start (grid_utilization_info, true, true, 0); - charts_container.pack_start(smol_charts_container, false, false, 0); + charts_container.pack_start (smol_charts_container, false, false, 0); add (title_grid); add (charts_container); @@ -122,8 +120,8 @@ public class Monitor.SystemCPUView : Gtk.Box { for (int i = 0; i < cpu.core_list.size; i++) { double core_percentage = cpu.core_list[i].percentage_used; - cpu_utilization_chart.update(i, core_percentage); - string percentage_formatted = ("% 3d%%").printf ( (int)core_percentage); + cpu_utilization_chart.update (i, core_percentage); + string percentage_formatted = ("% 3d%%").printf ((int) core_percentage); core_label_list[i].set_text (percentage_formatted); core_label_list[i].get_style_context ().remove_class ("core_badge-mild-warning"); @@ -150,12 +148,11 @@ public class Monitor.SystemCPUView : Gtk.Box { } cpu_percentage_label.set_text ((_("%d%%")).printf (cpu.percentage)); - cpu_frequency_label.set_text (("%.2f %s").printf (cpu.frequency, _ ("GHz"))); - cpu_temperature_label.set_text (("%.2f %s").printf (cpu.temperature, _ ("℃"))); + cpu_frequency_label.set_text (("%.2f %s").printf (cpu.frequency, _("GHz"))); + cpu_temperature_label.set_text (("%.2f %s").printf (cpu.temperature, _("℃"))); } private Gtk.Grid grid_usage_labels () { - Gtk.Grid grid = new Gtk.Grid (); grid.column_spacing = 6; grid.margin = 6; @@ -163,14 +160,14 @@ public class Monitor.SystemCPUView : Gtk.Box { grid.halign = Gtk.Align.START; grid.get_style_context ().add_class ("usage-label-container"); - grid.attach(cpu_percentage_label, 0, 0, 1, 1); - grid.attach(grid_core_labels(), 1, 0, 1, 1); + grid.attach (cpu_percentage_label, 0, 0, 1, 1); + grid.attach (grid_core_labels (), 1, 0, 1, 1); return grid; } private Gtk.Revealer grid_core_labels () { - cpu_threads_revealer = new Gtk.Revealer(); + cpu_threads_revealer = new Gtk.Revealer (); cpu_threads_revealer.margin = 6; cpu_threads_revealer.transition_type = Gtk.RevealerTransitionType.SLIDE_LEFT; cpu_threads_revealer.valign = Gtk.Align.CENTER; @@ -184,10 +181,10 @@ public class Monitor.SystemCPUView : Gtk.Box { var core_label = new Gtk.Label (Utils.NO_DATA); core_label.set_width_chars (4); core_label.get_style_context ().add_class ("core_badge"); - // core_label.set_text (Utils.NO_DATA); + // core_label.set_text (Utils.NO_DATA); core_label_list.add (core_label); - grid.attach(core_label, column, row, 1, 1); + grid.attach (core_label, column, row, 1, 1); row++; if (row > 1) { @@ -199,8 +196,9 @@ public class Monitor.SystemCPUView : Gtk.Box { var threads_label = new Gtk.Label ("THREADS"); threads_label.get_style_context ().add_class ("small-text"); - grid.attach(threads_label, 0, -1, column, 1); + grid.attach (threads_label, 0, -1, column, 1); return cpu_threads_revealer; } -} \ No newline at end of file + +} diff --git a/src/Views/SystemView/SystemMemoryView.vala b/src/Views/SystemView/SystemMemoryView.vala index 8c08ad94..174243de 100644 --- a/src/Views/SystemView/SystemMemoryView.vala +++ b/src/Views/SystemView/SystemMemoryView.vala @@ -20,7 +20,7 @@ public class Monitor.SystemMemoryView : Gtk.Grid { - public SystemMemoryView(Memory _memory) { + public SystemMemoryView (Memory _memory) { memory = _memory; memory_name_label = new LabelH4 (_("Memory")); @@ -29,7 +29,7 @@ public class Monitor.SystemMemoryView : Gtk.Grid { memory_percentage_label.has_tooltip = true; memory_percentage_label.tooltip_text = (_("Show detailed info")); - memory_percentage_label.clicked.connect(() => { + memory_percentage_label.clicked.connect (() => { memory_usage_revealer.reveal_child = !(memory_usage_revealer.child_revealed); if (memory_usage_revealer.child_revealed) { memory_percentage_label.tooltip_text = (_("Show detailed info")); @@ -70,11 +70,10 @@ public class Monitor.SystemMemoryView : Gtk.Grid { attach (memory_name_label, 0, 0, 1, 1); attach (lil_gridy, 0, 1, 1, 1); attach (memory_chart, 0, 1, 2, 2); - } private Gtk.Revealer memory_usage_grid () { - memory_usage_revealer = new Gtk.Revealer(); + memory_usage_revealer = new Gtk.Revealer (); memory_usage_revealer.margin = 6; memory_usage_revealer.transition_type = Gtk.RevealerTransitionType.SLIDE_LEFT; memory_usage_revealer.valign = Gtk.Align.CENTER; @@ -95,17 +94,16 @@ public class Monitor.SystemMemoryView : Gtk.Grid { return memory_usage_revealer; } - public void update () { memory_percentage_label.set_text ((_("%d%%")).printf (memory.percentage)); memory_chart.update (0, memory.percentage); - memory_total_label.set_text ((_("Total: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human(memory.total))); - memory_used_label.set_text ((_("Used: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human(memory.used))); - memory_shared_label.set_text ((_("Shared: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human(memory.shared))); - memory_buffered_label.set_text ((_("Buffered: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human(memory.buffer))); - memory_cached_label.set_text ((_("Cached: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human(memory.cached))); - memory_locked_label.set_text ((_("Locked: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human(memory.locked))); + memory_total_label.set_text ((_("Total: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human (memory.total))); + memory_used_label.set_text ((_("Used: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human (memory.used))); + memory_shared_label.set_text ((_("Shared: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human (memory.shared))); + memory_buffered_label.set_text ((_("Buffered: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human (memory.buffer))); + memory_cached_label.set_text ((_("Cached: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human (memory.cached))); + memory_locked_label.set_text ((_("Locked: %s")).printf (Utils.HumanUnitFormatter.double_bytes_to_human (memory.locked))); } -} \ No newline at end of file +} diff --git a/src/Views/SystemView/SystemNetworkView.vala b/src/Views/SystemView/SystemNetworkView.vala index 71a7faf9..a6d0e8f5 100644 --- a/src/Views/SystemView/SystemNetworkView.vala +++ b/src/Views/SystemView/SystemNetworkView.vala @@ -15,35 +15,43 @@ public class Monitor.SystemNetworkView : Gtk.Grid { public SystemNetworkView (Network _network) { network = _network; - network_name_label = new LabelH4 (_ ("Network")); - network_download_label = new LabelRoundy (_ ("DOWN")); + network_name_label = new LabelH4 (_("Network")); + + network_download_label = new LabelRoundy (_("DOWN")); network_download_label.val.set_width_chars (7); - network_upload_label = new LabelRoundy (_ ("UP")); + network_download_label.set_color ("blue"); + + network_upload_label = new LabelRoundy (_("UP")); network_upload_label.val.set_width_chars (7); + network_upload_label.set_color ("green"); network_chart = new Chart (2); network_chart.config.y_axis.fixed_max = null; + network_chart.set_serie_color(0, { 155/255.0, 219/255.0, 77/255.0, 1.0 }); + network_chart.set_serie_color(1, { 100/255.0, 186/255.0, 255/255.0, 1.0 }); + var labels_grid = new Gtk.Grid (); labels_grid.row_spacing = 6; labels_grid.column_spacing = 6; labels_grid.margin = 6; labels_grid.attach (network_download_label, 0, 0, 1, 1); - labels_grid.attach (network_upload_label, 1, 0, 1, 1); + labels_grid.attach (network_upload_label, 1, 0, 1, 1); attach (network_name_label, 0, 0, 1, 1); - attach (labels_grid, 0, 1, 2, 2); - attach (network_chart, 0, 1, 2, 2); + attach (labels_grid, 0, 1, 2, 2); + attach (network_chart, 0, 1, 2, 2); } public void update () { - double up_bytes = network.get_bytes ()[0] / 2; - double down_bytes = network.get_bytes ()[1] / 2; + double up_bytes = network.bytes_out; + double down_bytes = network.bytes_in; if (up_bytes >= 0 && down_bytes >= 0) { network_download_label.set_text (("%s/s").printf (Utils.HumanUnitFormatter.string_bytes_to_human (down_bytes.to_string ()))); network_upload_label.set_text (("%s/s").printf (Utils.HumanUnitFormatter.string_bytes_to_human (up_bytes.to_string ()))); - network_chart.update (0, up_bytes); + network_chart.update (0, up_bytes); network_chart.update (1, down_bytes); } } -} \ No newline at end of file + +} diff --git a/src/Views/SystemView/SystemStorageView.vala b/src/Views/SystemView/SystemStorageView.vala new file mode 100644 index 00000000..271b64bf --- /dev/null +++ b/src/Views/SystemView/SystemStorageView.vala @@ -0,0 +1,56 @@ +public class Monitor.SystemStorageView : Gtk.Grid { + private Chart storage_chart; + private Storage storage; + + private LabelH4 storage_name_label; + private LabelRoundy storage_read_label; + private LabelRoundy storage_write_label; + + construct { + margin = 12; + column_spacing = 12; + set_vexpand (false); + } + + public SystemStorageView (Storage _storage) { + storage = _storage; + + storage_name_label = new LabelH4 (_("Storage")); + + storage_write_label = new LabelRoundy (_("WRITE")); + storage_write_label.val.set_width_chars (7); + storage_write_label.set_color ("blue"); + + storage_read_label = new LabelRoundy (_("READ")); + storage_read_label.val.set_width_chars (7); + storage_read_label.set_color ("green"); + + storage_chart = new Chart (2); + storage_chart.config.y_axis.fixed_max = null; + storage_chart.set_serie_color(0, { 155/255.0, 219/255.0, 77/255.0, 1.0 }); + storage_chart.set_serie_color(1, { 100/255.0, 186/255.0, 255/255.0, 1.0 }); + + var labels_grid = new Gtk.Grid (); + labels_grid.row_spacing = 6; + labels_grid.column_spacing = 6; + labels_grid.margin = 6; + labels_grid.attach (storage_write_label, 0, 0, 1, 1); + labels_grid.attach (storage_read_label, 1, 0, 1, 1); + + attach (storage_name_label, 0, 0, 1, 1); + attach (labels_grid, 0, 1, 2, 2); + attach (storage_chart, 0, 1, 2, 2); + } + + public void update () { + double up_bytes = storage.bytes_read; + double down_bytes = storage.bytes_write; + if (up_bytes >= 0 && down_bytes >= 0) { + storage_write_label.set_text (("%s/s").printf (Utils.HumanUnitFormatter.string_bytes_to_human (down_bytes.to_string ()))); + storage_read_label.set_text (("%s/s").printf (Utils.HumanUnitFormatter.string_bytes_to_human (up_bytes.to_string ()))); + storage_chart.update (0, up_bytes); + storage_chart.update (1, down_bytes); + } + } + +} diff --git a/src/Views/SystemView/SystemView.vala b/src/Views/SystemView/SystemView.vala index c1dc8bee..e6328e39 100644 --- a/src/Views/SystemView/SystemView.vala +++ b/src/Views/SystemView/SystemView.vala @@ -4,6 +4,7 @@ public class Monitor.SystemView : Gtk.Box { private SystemCPUView cpu_view; private SystemMemoryView memory_view; private SystemNetworkView network_view; + private SystemStorageView storage_view; construct { orientation = Gtk.Orientation.VERTICAL; @@ -16,15 +17,27 @@ public class Monitor.SystemView : Gtk.Box { cpu_view = new SystemCPUView (resources.cpu); memory_view = new SystemMemoryView (resources.memory); network_view = new SystemNetworkView (resources.network); + storage_view = new SystemStorageView (resources.storage); - add (cpu_view); - add (memory_view); - add (network_view); + var scrolled_window = new Gtk.ScrolledWindow (null, null); + var wrapper = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); + wrapper.expand = true; + scrolled_window.add (wrapper); + + + wrapper.add (cpu_view); + wrapper.add (memory_view); + wrapper.add (network_view); + wrapper.add (storage_view); + + add (scrolled_window); } public void update () { - cpu_view.update(); - memory_view.update(); + cpu_view.update (); + memory_view.update (); network_view.update (); + storage_view.update (); } -} \ No newline at end of file + +} diff --git a/src/Widgets/Chart/Chart.vala b/src/Widgets/Chart/Chart.vala index 44b38fc1..389c6f3e 100644 --- a/src/Widgets/Chart/Chart.vala +++ b/src/Widgets/Chart/Chart.vala @@ -27,36 +27,51 @@ public class Monitor.Chart : Gtk.Box { live_chart.expand = true; live_chart.legend.visible = false; live_chart.grid.visible = true; - live_chart.background.main_color = Gdk.RGBA () { - red= 1, green= 1, blue= 1, alpha= 1 - }; //White background - + live_chart.background.color = Gdk.RGBA () { + red = 1, green = 1, blue = 1, alpha = 1 + }; // White background } public Chart (int series_quantity) { for (int i = 0; i < series_quantity; i++) { - var renderer = new LiveChart.SmoothLineArea (new LiveChart.Values(1000)); - var serie = new LiveChart.Serie (("Serie %d").printf(i), renderer); - serie.set_main_color ({ 0.35 + i/20, 0.8, 0.1, 1.0}); + var renderer = new LiveChart.SmoothLineArea (new LiveChart.Values (1000)); + var serie = new LiveChart.Serie (("Serie %d").printf (i), renderer); + serie.line.color = { 0.35 + i / 20, 0.8, 0.1, 1.0 }; live_chart.add_serie (serie); } add (live_chart); } + public void set_serie_color(int serie_number, Gdk.RGBA color) { + try { + live_chart.series[serie_number].line.color = color; + } catch (LiveChart.ChartError e) { + error (e.message); + } + } + public void update (int serie_number, double value) { - live_chart.add_value_by_index (serie_number, value); + try { + live_chart.series[serie_number].add (value); + } catch (LiveChart.ChartError e) { + error (e.message); + } } - public void set_data (int serie_number, Gee.ArrayList history) { + public void preset_data (int serie_number, Gee.ArrayList history) { var refresh_rate_in_ms = 2000; - live_chart.add_unaware_timestamp_collection_by_index(serie_number, history, refresh_rate_in_ms); + try { + live_chart.add_unaware_timestamp_collection_by_index (serie_number, history, refresh_rate_in_ms); + } catch (LiveChart.ChartError e) { + error (e.message); + } } - public void clear () { - // var series = live_chart.series; - // foreach (var serie in series) { - // serie.clear(); - // } + // var series = live_chart.series; + foreach (var serie in live_chart.series) { + serie.clear (); + } } + } diff --git a/src/Widgets/Chart/ProcessChart.vala b/src/Widgets/Chart/ProcessChart.vala deleted file mode 100644 index 045c70b0..00000000 --- a/src/Widgets/Chart/ProcessChart.vala +++ /dev/null @@ -1,57 +0,0 @@ -public class Monitor.ProcessChart : Gtk.Box { - private LiveChart.Serie serie; - private LiveChart.SmoothLineArea renderer; - private LiveChart.Chart chart; - private LiveChart.Config config; - - - construct { - vexpand = true; - height_request = 60; - - config = new LiveChart.Config (); - config.y_axis.unit = "%"; - config.y_axis.tick_interval = 25; - config.y_axis.fixed_max = 100.0; - config.y_axis.labels.visible = false; - config.x_axis.labels.visible = false; - - config.padding = LiveChart.Padding () { - smart = LiveChart.AutoPadding.NONE, - top = 0, - right = 0, - bottom = 0, - left = 0 - }; - - chart = new LiveChart.Chart (config); - chart.expand = true; - chart.legend.visible = false; - chart.grid.visible = false; - chart.background.main_color = Gdk.RGBA () { - red= 1, green= 1, blue= 1, alpha= 1 - }; //White background - - renderer = new LiveChart.SmoothLineArea (new LiveChart.Values(30)); - - serie = new LiveChart.Serie ("CPU 1 usage", renderer); - serie.set_main_color ({ 0.35, 0.8, 0.1, 1.0}); - - chart.add_serie (serie); - - add (chart); - } - - public void update (double value) { - chart.add_value (serie, value); - } - - public new void set_data (Gee.ArrayList history) { - var refresh_rate_is_ms = 2000; //your own refresh rate in milliseconds - chart.add_unaware_timestamp_collection(serie, history, refresh_rate_is_ms); - } - - public void clear () { - serie.clear(); - } -} \ No newline at end of file diff --git a/src/Widgets/Headerbar/Headerbar.vala b/src/Widgets/Headerbar/Headerbar.vala index 5befb993..11068e4f 100644 --- a/src/Widgets/Headerbar/Headerbar.vala +++ b/src/Widgets/Headerbar/Headerbar.vala @@ -1,78 +1,76 @@ -namespace Monitor { +public class Monitor.Headerbar : Gtk.HeaderBar { + private MainWindow window; + private Gtk.Switch show_indicator_switch; + private Gtk.Switch background_switch; - public class Headerbar : Gtk.HeaderBar { - private MainWindow window; - private Gtk.Switch show_indicator_switch; - private Gtk.Switch background_switch; + public Search search; - public Search search; + construct { + show_close_button = true; + has_subtitle = false; + title = _("Monitor"); + } - construct { - show_close_button = true; - has_subtitle = false; - title = _("Monitor"); - } + public Headerbar (MainWindow window) { + this.window = window; - public Headerbar (MainWindow window) { - this.window = window; + var preferences_button = new Gtk.MenuButton (); + preferences_button.has_tooltip = true; + preferences_button.tooltip_text = (_("Settings")); + preferences_button.set_image (new Gtk.Image.from_icon_name ("open-menu", Gtk.IconSize.LARGE_TOOLBAR)); + pack_end (preferences_button); - var preferences_button = new Gtk.MenuButton (); - preferences_button.has_tooltip = true; - preferences_button.tooltip_text = (_("Settings")); - preferences_button.set_image (new Gtk.Image.from_icon_name ("open-menu", Gtk.IconSize.LARGE_TOOLBAR)); - pack_end (preferences_button); + var preferences_grid = new Gtk.Grid (); + preferences_grid.margin = 6; + preferences_grid.row_spacing = 6; + preferences_grid.column_spacing = 12; + preferences_grid.orientation = Gtk.Orientation.VERTICAL; - var preferences_grid = new Gtk.Grid (); - preferences_grid.margin = 6; - preferences_grid.row_spacing = 6; - preferences_grid.column_spacing = 12; - preferences_grid.orientation = Gtk.Orientation.VERTICAL; + var preferences_popover = new Gtk.Popover (null); + preferences_popover.add (preferences_grid); + preferences_button.popover = preferences_popover; - var preferences_popover = new Gtk.Popover (null); - preferences_popover.add (preferences_grid); - preferences_button.popover = preferences_popover; + var indicator_label = new Gtk.Label (_("Show an indicator:")); + indicator_label.halign = Gtk.Align.END; - var indicator_label = new Gtk.Label (_("Show an indicator:")); - indicator_label.halign = Gtk.Align.END; + show_indicator_switch = new Gtk.Switch (); + show_indicator_switch.state = MonitorApp.settings.get_boolean ("indicator-state"); - show_indicator_switch = new Gtk.Switch (); - show_indicator_switch.state = MonitorApp.settings.get_boolean ("indicator-state"); + var background_label = new Gtk.Label (_("Start in background:")); + background_label.halign = Gtk.Align.END; - var background_label = new Gtk.Label (_("Start in background:")); - background_label.halign = Gtk.Align.END; + background_switch = new Gtk.Switch (); + background_switch.state = MonitorApp.settings.get_boolean ("background-state"); + set_background_switch_state (); - background_switch = new Gtk.Switch (); - background_switch.state = MonitorApp.settings.get_boolean ("background-state"); - set_background_switch_state (); + preferences_grid.attach (indicator_label, 0, 0, 1, 1); + preferences_grid.attach (show_indicator_switch, 1, 0, 1, 1); + preferences_grid.attach (background_label, 0, 1, 1, 1); + preferences_grid.attach (background_switch, 1, 1, 1, 1); - preferences_grid.attach (indicator_label, 0, 0, 1, 1); - preferences_grid.attach (show_indicator_switch, 1, 0, 1, 1); - preferences_grid.attach (background_label, 0, 1, 1, 1); - preferences_grid.attach (background_switch, 1, 1, 1, 1); - - preferences_grid.show_all (); - - search = new Search (window); - search.valign = Gtk.Align.CENTER; - pack_start (search); - - show_indicator_switch.notify["active"].connect (() => { - MonitorApp.settings.set_boolean ("indicator-state", show_indicator_switch.state); - window.dbusserver.indicator_state (show_indicator_switch.state); - set_background_switch_state (); - }); - background_switch.notify["active"].connect (() => { - MonitorApp.settings.set_boolean ("background-state", background_switch.state); - set_background_switch_state (); - }); - } + preferences_grid.show_all (); + + search = new Search (window); + search.valign = Gtk.Align.CENTER; + pack_start (search); - private void set_background_switch_state () { - background_switch.sensitive = show_indicator_switch.active; + show_indicator_switch.notify["active"].connect (() => { + MonitorApp.settings.set_boolean ("indicator-state", show_indicator_switch.state); + window.dbusserver.indicator_state (show_indicator_switch.state); + set_background_switch_state (); + }); + background_switch.notify["active"].connect (() => { + MonitorApp.settings.set_boolean ("background-state", background_switch.state); + set_background_switch_state (); + }); + } - if (!show_indicator_switch.active) { - background_switch.state = false; - } + private void set_background_switch_state () { + background_switch.sensitive = show_indicator_switch.active; + + if (!show_indicator_switch.active) { + background_switch.state = false; } } + } diff --git a/src/Widgets/Headerbar/Search.vala b/src/Widgets/Headerbar/Search.vala index 857c8088..ed193c88 100644 --- a/src/Widgets/Headerbar/Search.vala +++ b/src/Widgets/Headerbar/Search.vala @@ -1,93 +1,90 @@ -namespace Monitor { +public class Monitor.Search : Gtk.SearchEntry { + public MainWindow window { get; construct; } + private Gtk.TreeModelFilter filter_model; + private CPUProcessTreeView process_tree_view; - public class Search : Gtk.SearchEntry { - public MainWindow window { get; construct; } - private Gtk.TreeModelFilter filter_model; - private CPUProcessTreeView process_tree_view; - - public Search (MainWindow window) { - Object (window: window); - } - - construct { - this.process_tree_view = window.process_view.process_tree_view; - this.placeholder_text = _("Search Process"); - this.tooltip_markup = Granite.markup_accel_tooltip ({"F"}, _("Type process name or PID to search")); - - filter_model = new Gtk.TreeModelFilter (window.process_view.treeview_model, null); - connect_signal (); - filter_model.set_visible_func(filter_func); - // process_tree_view.set_model (filter_model); - - var sort_model = new Gtk.TreeModelSort.with_model (filter_model); - process_tree_view.set_model (sort_model); - } + public Search (MainWindow window) { + Object (window: window); + } - private void connect_signal () { - this.search_changed.connect (() => { - // collapse tree only when search is focused and changed - if (this.is_focus) { - process_tree_view.collapse_all (); - } + construct { + this.process_tree_view = window.process_view.process_tree_view; + this.placeholder_text = _("Search Process"); + this.tooltip_markup = Granite.markup_accel_tooltip ({ "F" }, _("Type process name or PID to search")); - filter_model.refilter (); + filter_model = new Gtk.TreeModelFilter (window.process_view.treeview_model, null); + connect_signal (); + filter_model.set_visible_func (filter_func); + // process_tree_view.set_model (filter_model); - // focus on child row to avoid the app crashes by clicking "Kill/End Process" buttons in headerbar - process_tree_view.focus_on_child_row (); - this.grab_focus (); + var sort_model = new Gtk.TreeModelSort.with_model (filter_model); + process_tree_view.set_model (sort_model); + } - if (this.text != "") { - this.insert_at_cursor (""); - } - }); - } + private void connect_signal () { + this.search_changed.connect (() => { + // collapse tree only when search is focused and changed + if (this.is_focus) { + process_tree_view.collapse_all (); + } - private bool filter_func (Gtk.TreeModel model, Gtk.TreeIter iter) { - string name_haystack; - int pid_haystack; - bool found = false; - var needle = this.text; + filter_model.refilter (); - // should help with assertation errors, donno - // if (needle == null) return true; + // focus on child row to avoid the app crashes by clicking "Kill/End Process" buttons in headerbar + process_tree_view.focus_on_child_row (); + this.grab_focus (); - if ( needle.length == 0 ) { - return true; + if (this.text != "") { + this.insert_at_cursor (""); } + }); + } - model.get( iter, Column.NAME, out name_haystack, -1 ); - model.get( iter, Column.PID, out pid_haystack, -1 ); + private bool filter_func (Gtk.TreeModel model, Gtk.TreeIter iter) { + string name_haystack; + int pid_haystack; + bool found = false; + var needle = this.text; - // sometimes name_haystack is null - if (name_haystack != null) { - bool name_found = name_haystack.casefold().contains(needle.casefold()) || false; - bool pid_found = pid_haystack.to_string().casefold().contains(needle.casefold()) || false; - found = name_found || pid_found; - } + // should help with assertation errors, donno + // if (needle == null) return true; + if (needle.length == 0) { + return true; + } - Gtk.TreeIter child_iter; - bool child_found = false; + model.get (iter, Column.NAME, out name_haystack, -1); + model.get (iter, Column.PID, out pid_haystack, -1); - if (model.iter_children (out child_iter, iter)) { - do { - child_found = filter_func (model, child_iter); - } while (model.iter_next (ref child_iter) && !child_found); - } + // sometimes name_haystack is null + if (name_haystack != null) { + bool name_found = name_haystack.casefold ().contains (needle.casefold ()) || false; + bool pid_found = pid_haystack.to_string ().casefold ().contains (needle.casefold ()) || false; + found = name_found || pid_found; + } - if (child_found && needle.length > 0) { - process_tree_view.expand_all (); - } - return found || child_found; + Gtk.TreeIter child_iter; + bool child_found = false; + + if (model.iter_children (out child_iter, iter)) { + do { + child_found = filter_func (model, child_iter); + } while (model.iter_next (ref child_iter) && !child_found); } - // reset filter, grab focus and insert the character - public void activate_entry (string search_text = "") { - this.text = ""; - this.search_changed (); - this.insert_at_cursor (search_text); + if (child_found && needle.length > 0) { + process_tree_view.expand_all (); } + return found || child_found; } + + // reset filter, grab focus and insert the character + public void activate_entry (string search_text = "") { + this.text = ""; + this.search_changed (); + this.insert_at_cursor (search_text); + } + } diff --git a/src/Widgets/Labels/LabelH4.vala b/src/Widgets/Labels/LabelH4.vala index 55f1560b..1d272b75 100644 --- a/src/Widgets/Labels/LabelH4.vala +++ b/src/Widgets/Labels/LabelH4.vala @@ -1,5 +1,4 @@ class LabelH4 : Gtk.Label { - construct { get_style_context ().add_class ("h4"); valign = Gtk.Align.START; @@ -11,4 +10,5 @@ class LabelH4 : Gtk.Label { public LabelH4 (string label) { Object (label: label); } -} \ No newline at end of file + +} diff --git a/src/Widgets/Labels/LabelRoundy.vala b/src/Widgets/Labels/LabelRoundy.vala index dd490cdd..49af0598 100644 --- a/src/Widgets/Labels/LabelRoundy.vala +++ b/src/Widgets/Labels/LabelRoundy.vala @@ -1,5 +1,4 @@ public class Monitor.LabelRoundy : Gtk.Fixed { - public Gtk.Label val; public Gtk.Label desc; @@ -10,11 +9,16 @@ public class Monitor.LabelRoundy : Gtk.Fixed { desc = new Gtk.Label (description); desc.get_style_context ().add_class ("small-text"); - put(val, 0, 12); - put(desc, 6, 0); + put (val, 0, 12); + put (desc, 6, 0); + } + + public void set_color (string colorname) { + val.get_style_context ().add_class (colorname); } public void set_text (string text) { val.set_text (text); } -} \ No newline at end of file + +} diff --git a/src/Widgets/Labels/LabelVertical.vala b/src/Widgets/Labels/LabelVertical.vala index f7fa2546..7bd511eb 100644 --- a/src/Widgets/Labels/LabelVertical.vala +++ b/src/Widgets/Labels/LabelVertical.vala @@ -1,5 +1,4 @@ public class Monitor.LabelVertical : Gtk.EventBox { - private Gtk.Grid grid; public signal void clicked (); @@ -23,8 +22,8 @@ public class Monitor.LabelVertical : Gtk.EventBox { desc = new Gtk.Label (description); desc.get_style_context ().add_class ("small-text"); - grid.attach(desc, 0, 0, 1, 1); - grid.attach(val, 0, 1, 1, 1); + grid.attach (desc, 0, 0, 1, 1); + grid.attach (val, 0, 1, 1, 1); add (grid); @@ -34,10 +33,10 @@ public class Monitor.LabelVertical : Gtk.EventBox { clicked (); return false; }); - } public void set_text (string text) { val.set_text (text); } -} \ No newline at end of file + +} diff --git a/src/Widgets/Statusbar/Statusbar.vala b/src/Widgets/Statusbar/Statusbar.vala index 26fa62bd..83b25bc1 100644 --- a/src/Widgets/Statusbar/Statusbar.vala +++ b/src/Widgets/Statusbar/Statusbar.vala @@ -5,13 +5,13 @@ public class Monitor.Statusbar : Gtk.ActionBar { construct { var cpu_icon = new Gtk.Image.from_icon_name ("cpu-symbolic", Gtk.IconSize.SMALL_TOOLBAR); - cpu_icon.tooltip_text = _ ("CPU"); + cpu_icon.tooltip_text = _("CPU"); var ram_icon = new Gtk.Image.from_icon_name ("ram-symbolic", Gtk.IconSize.SMALL_TOOLBAR); - ram_icon.tooltip_text = _ ("Memory"); + ram_icon.tooltip_text = _("Memory"); var swap_icon = new Gtk.Image.from_icon_name ("swap-symbolic", Gtk.IconSize.SMALL_TOOLBAR); - swap_icon.tooltip_text = _ ("Swap"); + swap_icon.tooltip_text = _("Swap"); cpu_usage_label = new Gtk.Label (_("Calculating…")); cpu_usage_label.set_width_chars (4); @@ -41,10 +41,10 @@ public class Monitor.Statusbar : Gtk.ActionBar { cpu_usage_label.set_text (("%d%%").printf (sysres.cpu_percentage)); memory_usage_label.set_text (("%d%%").printf (sysres.memory_percentage)); - string cpu_tooltip_text = ("%.2f %s").printf (sysres.cpu_frequency, _ ("GHz")); + string cpu_tooltip_text = ("%.2f %s").printf (sysres.cpu_frequency, _("GHz")); cpu_usage_label.tooltip_text = cpu_tooltip_text; - string memory_tooltip_text = ("%s / %s").printf (Utils.HumanUnitFormatter.double_bytes_to_human(sysres.memory_used), Utils.HumanUnitFormatter.double_bytes_to_human(sysres.memory_total)); + string memory_tooltip_text = ("%s / %s").printf (Utils.HumanUnitFormatter.double_bytes_to_human (sysres.memory_used), Utils.HumanUnitFormatter.double_bytes_to_human (sysres.memory_total)); memory_usage_label.tooltip_text = memory_tooltip_text; // The total amount of the swap is 0 when it is unavailable @@ -52,10 +52,11 @@ public class Monitor.Statusbar : Gtk.ActionBar { swap_usage_label.set_text ("N/A"); } else { swap_usage_label.set_text (("%d%%").printf (sysres.swap_percentage)); - string swap_tooltip_text = ("%.1f %s / %.1f %s").printf (sysres.swap_used, _ ("GiB"), sysres.swap_total, _ ("GiB")); + string swap_tooltip_text = ("%.1f %s / %.1f %s").printf (sysres.swap_used, _("GiB"), sysres.swap_total, _("GiB")); swap_usage_label.tooltip_text = swap_tooltip_text; } return true; } + } diff --git a/subprojects/live-chart b/subprojects/live-chart index debce440..5f8ddce7 160000 --- a/subprojects/live-chart +++ b/subprojects/live-chart @@ -1 +1 @@ -Subproject commit debce4403230c699756c112794e88dfa9c2aeb8e +Subproject commit 5f8ddce715f6a9130955bc5f08437050265a317c diff --git a/uncrustify.cfg b/uncrustify.cfg index 8d8551a2..0a941cdc 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -1,1434 +1,2807 @@ -# Uncrustify 0.59 +# Uncrustify-0.69.0_f # # General options # -# The type of line endings -newlines = auto # auto/lf/crlf/cr +# The type of line endings. +# +# Default: auto +newlines = auto # lf/crlf/cr/auto + +# The original size of tabs in the input. +# +# Default: 8 +input_tab_size = 8 # unsigned number -# The original size of tabs in the input -input_tab_size = 4 # number +# The size of tabs in the output (only used if align_with_tabs=true). +# +# Default: 8 +output_tab_size = 4 # unsigned number -# The size of tabs in the output (only used if align_with_tabs=true) -output_tab_size = 4 # number +# The ASCII value of the string escape char, usually 92 (\) or (Pawn) 94 (^). +# +# Default: 92 +string_escape_char = 92 # unsigned number -# The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn) -string_escape_char = 92 # number +# Alternate string escape char (usually only used for Pawn). +# Only works right before the quote char. +string_escape_char2 = 0 # unsigned number -# Alternate string escape char for Pawn. Only works right before the quote char. -string_escape_char2 = 0 # number +# Replace tab characters found in string literals with the escape sequence \t +# instead. +string_replace_tab_chars = false # true/false -# Allow interpreting '>=' and '>>=' as part of a template in 'void f(list>=val);'. -# If true (default), 'assert(x<0 && y>=3)' will be broken. +# Allow interpreting '>=' and '>>=' as part of a template in code like +# 'void f(list>=val);'. If true, 'assert(x<0 && y>=3)' will be broken. # Improvements to template detection may make this option obsolete. -tok_split_gte = false # false/true +tok_split_gte = false # true/false + +# Specify the marker used in comments to disable processing of part of the +# file. +# +# Default: *INDENT-OFF* +disable_processing_cmt = " *INDENT-OFF*" # string -# Control what to do with the UTF-8 BOM (recommed 'remove') -utf8_bom = ignore # ignore/add/remove/force +# Specify the marker used in comments to (re)enable processing in a file. +# +# Default: *INDENT-ON* +enable_processing_cmt = " *INDENT-ON*" # string -# If the file only contains chars between 128 and 255 and is not UTF-8, then output as UTF-8 -utf8_byte = false # false/true +# Enable parsing of digraphs. +enable_digraphs = false # true/false -# Force the output encoding to UTF-8 -utf8_force = false # false/true +# Add or remove the UTF-8 BOM (recommend 'remove'). +utf8_bom = ignore # ignore/add/remove/force + +# If the file contains bytes with values between 128 and 255, but is not +# UTF-8, then output as UTF-8. +utf8_byte = false # true/false + +# Force the output encoding to UTF-8. +utf8_force = false # true/false # -# Indenting +# Spacing options # -# The number of columns to indent per level. -# Usually 2, 3, 4, or 8. -indent_columns = 4 # number +# Add or remove space around non-assignment symbolic operators ('+', '/', '%', +# '<<', and so forth). +sp_arith = force # ignore/add/remove/force -# The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. -# For FreeBSD, this is set to 4. -indent_continue = 0 # number +# Add or remove space around arithmetic operators '+' and '-'. +# +# Overrides sp_arith. +sp_arith_additive = ignore # ignore/add/remove/force -# How to use tabs when indenting code -# 0=spaces only -# 1=indent with tabs to brace level, align with spaces -# 2=indent and align with tabs, using spaces when not on a tabstop -indent_with_tabs = 0 # number +# Add or remove space around assignment operator '=', '+=', etc. +sp_assign = force # ignore/add/remove/force -# Comments that are not a brace level are indented with tabs on a tabstop. -# Requires indent_with_tabs=2. If false, will use spaces. -indent_cmt_with_tabs = false # false/true +# Add or remove space around '=' in C++11 lambda capture specifications. +# +# Overrides sp_assign. +sp_cpp_lambda_assign = force # ignore/add/remove/force -# Whether to indent strings broken by '\' so that they line up -indent_align_string = false # false/true +# Add or remove space after the capture specification in C++11 lambda. +sp_cpp_lambda_paren = force # ignore/add/remove/force -# The number of spaces to indent multi-line XML strings. -# Requires indent_align_string=True -indent_xml_string = 0 # number +# Add or remove space around assignment operator '=' in a prototype. +# +# If set to ignore, use sp_assign. +sp_assign_default = force # ignore/add/remove/force -# Spaces to indent '{' from level -indent_brace = 0 # number +# Add or remove space before assignment operator '=', '+=', etc. +# +# Overrides sp_assign. +sp_before_assign = force # ignore/add/remove/force -# Whether braces are indented to the body level -indent_braces = false # false/true +# Add or remove space after assignment operator '=', '+=', etc. +# +# Overrides sp_assign. +sp_after_assign = force # ignore/add/remove/force -# Disabled indenting function braces if indent_braces is true -indent_braces_no_func = true # false/true +# Add or remove space in 'NS_ENUM ('. +sp_enum_paren = ignore # ignore/add/remove/force -# Disabled indenting class braces if indent_braces is true -indent_braces_no_class = true # false/true +# Add or remove space around assignment '=' in enum. +sp_enum_assign = force # ignore/add/remove/force -# Disabled indenting struct braces if indent_braces is true -indent_braces_no_struct = true # false/true +# Add or remove space before assignment '=' in enum. +# +# Overrides sp_enum_assign. +sp_enum_before_assign = ignore # ignore/add/remove/force -# Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. -indent_brace_parent = false # false/true +# Add or remove space after assignment '=' in enum. +# +# Overrides sp_enum_assign. +sp_enum_after_assign = force # ignore/add/remove/force + +# Add or remove space around assignment ':' in enum. +sp_enum_colon = ignore # ignore/add/remove/force -# Whether the 'namespace' body is indented -indent_namespace = true # false/true +# Add or remove space around preprocessor '##' concatenation operator. +# +# Default: add +sp_pp_concat = add # ignore/add/remove/force -# The number of spaces to indent a namespace block -indent_namespace_level = 0 # number +# Add or remove space after preprocessor '#' stringify operator. +# Also affects the '#@' charizing operator. +sp_pp_stringify = ignore # ignore/add/remove/force -# If the body of the namespace is longer than this number, it won't be indented. -# Requires indent_namespace=true. Default=0 (no limit) -indent_namespace_limit = 0 # number +# Add or remove space before preprocessor '#' stringify operator +# as in '#define x(y) L#y'. +sp_before_pp_stringify = ignore # ignore/add/remove/force -# Whether the 'extern "C"' body is indented -indent_extern = false # false/true +# Add or remove space around boolean operators '&&' and '||'. +sp_bool = force # ignore/add/remove/force -# Whether the 'class' body is indented -indent_class = true # false/true +# Add or remove space around compare operator '<', '>', '==', etc. +sp_compare = force # ignore/add/remove/force -# Whether to indent the stuff after a leading class colon -indent_class_colon = false # false/true +# Add or remove space inside '(' and ')'. +sp_inside_paren = remove # ignore/add/remove/force -# Additional indenting for constructor initializer list -indent_ctor_init = 0 # number +# Add or remove space between nested parentheses, i.e. '((' vs. ') )'. +sp_paren_paren = remove # ignore/add/remove/force -# False=treat 'else\nif' as 'else if' for indenting purposes -# True=indent the 'if' one level -indent_else_if = false # false/true +# Add or remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. +sp_cparen_oparen = remove # ignore/add/remove/force -# Amount to indent variable declarations after a open brace. neg=relative, pos=absolute -indent_var_def_blk = 0 # number +# Whether to balance spaces inside nested parentheses. +sp_balance_nested_parens = false # true/false -# Indent continued variable declarations instead of aligning. -indent_var_def_cont = false # false/true +# Add or remove space between ')' and '{'. +sp_paren_brace = force # ignore/add/remove/force -# True: indent continued function call parameters one indent level -# False: align parameters under the open paren -indent_func_call_param = false # false/true +# Add or remove space between nested braces, i.e. '{{' vs '{ {'. +sp_brace_brace = ignore # ignore/add/remove/force -# Same as indent_func_call_param, but for function defs -indent_func_def_param = false # false/true +# Add or remove space before pointer star '*'. +sp_before_ptr_star = force # ignore/add/remove/force -# Same as indent_func_call_param, but for function protos -indent_func_proto_param = false # false/true +# Add or remove space before pointer star '*' that isn't followed by a +# variable name. If set to 'ignore', sp_before_ptr_star is used instead. +sp_before_unnamed_ptr_star = force # ignore/add/remove/force -# Same as indent_func_call_param, but for class declarations -indent_func_class_param = false # false/true +# Add or remove space between pointer stars '*'. +sp_between_ptr_star = force # ignore/add/remove/force -# Same as indent_func_call_param, but for class variable constructors -indent_func_ctor_var_param = false # false/true +# Add or remove space after pointer star '*', if followed by a word. +sp_after_ptr_star = force # ignore/add/remove/force -# Same as indent_func_call_param, but for templates -indent_template_param = false # false/true +# Add or remove space after pointer caret '^', if followed by a word. +sp_after_ptr_block_caret = ignore # ignore/add/remove/force -# Double the indent for indent_func_xxx_param options -indent_func_param_double = false # false/true +# Add or remove space after pointer star '*', if followed by a qualifier. +sp_after_ptr_star_qualifier = ignore # ignore/add/remove/force -# Indentation column for standalone 'const' function decl/proto qualifier -indent_func_const = 0 # number +# Add or remove space after a pointer star '*', if followed by a function +# prototype or function definition. +sp_after_ptr_star_func = force # ignore/add/remove/force -# Indentation column for standalone 'throw' function decl/proto qualifier -indent_func_throw = 0 # number +# Add or remove space after a pointer star '*', if followed by an open +# parenthesis, as in 'void* (*)(). +sp_ptr_star_paren = force # ignore/add/remove/force -# The number of spaces to indent a continued '->' or '.' -# Usually set to 0, 1, or indent_columns. -indent_member = 0 # number +# Add or remove space before a pointer star '*', if followed by a function +# prototype or function definition. +sp_before_ptr_star_func = force # ignore/add/remove/force -# Spaces to indent single line ('//') comments on lines before code -indent_sing_line_comments = 0 # number +# Add or remove space before a reference sign '&'. +sp_before_byref = force # ignore/add/remove/force -# If set, will indent trailing single line ('//') comments relative -# to the code instead of trying to keep the same absolute column -indent_relative_single_line_comments = false # false/true +# Add or remove space before a reference sign '&' that isn't followed by a +# variable name. If set to 'ignore', sp_before_byref is used instead. +sp_before_unnamed_byref = ignore # ignore/add/remove/force -# Spaces to indent 'case' from 'switch' -# Usually 0 or indent_columns. -indent_switch_case = 0 # number +# Add or remove space after reference sign '&', if followed by a word. +sp_after_byref = ignore # ignore/add/remove/force -# Spaces to shift the 'case' line, without affecting any other lines -# Usually 0. -indent_case_shift = 0 # number +# Add or remove space after a reference sign '&', if followed by a function +# prototype or function definition. +sp_after_byref_func = remove # ignore/add/remove/force -# Spaces to indent '{' from 'case'. -# By default, the brace will appear under the 'c' in case. -# Usually set to 0 or indent_columns. -indent_case_brace = 0 # number +# Add or remove space before a reference sign '&', if followed by a function +# prototype or function definition. +sp_before_byref_func = force # ignore/add/remove/force -# Whether to indent comments found in first column -indent_col1_comment = false # false/true +# Add or remove space between type and word. +# +# Default: force +sp_after_type = force # ignore/add/remove/force -# How to indent goto labels -# >0 : absolute column where 1 is the leftmost column -# <=0 : subtract from brace indent -indent_label = 1 # number +# Add or remove space between 'decltype(...)' and word. +sp_after_decltype = ignore # ignore/add/remove/force -# Same as indent_label, but for access specifiers that are followed by a colon -indent_access_spec = 1 # number +# (D) Add or remove space before the parenthesis in the D constructs +# 'template Foo(' and 'class Foo('. +sp_before_template_paren = ignore # ignore/add/remove/force -# Indent the code after an access specifier by one level. -# If set, this option forces 'indent_access_spec=0' -indent_access_spec_body = false # false/true +# Add or remove space between 'template' and '<'. +# If set to ignore, sp_before_angle is used. +sp_template_angle = remove # ignore/add/remove/force -# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended) -indent_paren_nl = false # false/true +# Add or remove space before '<'. +sp_before_angle = remove # ignore/add/remove/force -# Controls the indent of a close paren after a newline. -# 0: Indent to body level -# 1: Align under the open paren -# 2: Indent to the brace level -indent_paren_close = 0 # number +# Add or remove space inside '<' and '>'. +sp_inside_angle = remove # ignore/add/remove/force -# Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren -indent_comma_paren = false # false/true +# Add or remove space inside '<>'. +sp_inside_angle_empty = ignore # ignore/add/remove/force -# Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren -indent_bool_paren = false # false/true +# Add or remove space between '>' and ':'. +sp_angle_colon = ignore # ignore/add/remove/force -# If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones -indent_first_bool_expr = false # false/true +# Add or remove space after '<>'. +sp_after_angle = remove # ignore/add/remove/force -# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended) -indent_square_nl = false # false/true +# Add or remove space between '>' and '(' as found in 'new List(foo);'. +sp_angle_paren = force # ignore/add/remove/force -# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies -indent_preserve_sql = false # false/true +# Add or remove space between '>' and '()' as found in 'new List();'. +sp_angle_paren_empty = ignore # ignore/add/remove/force -# Align continued statements at the '='. Default=True -# If FALSE or the '=' is followed by a newline, the next line is indent one tab. -indent_align_assign = true # false/true +# Add or remove space between '>' and a word as in 'List m;' or +# 'template static ...'. +sp_angle_word = force # ignore/add/remove/force +# Add or remove space between '>' and '>' in '>>' (template stuff). # -# Spacing options +# Default: add +sp_angle_shift = add # ignore/add/remove/force + +# (C++11) Permit removal of the space between '>>' in 'foo >'. Note +# that sp_angle_shift cannot remove the space without this option. +sp_permit_cpp11_shift = false # true/false + +# Add or remove space before '(' of control statements ('if', 'for', 'switch', +# 'while', etc.). +sp_before_sparen = force # ignore/add/remove/force + +# Add or remove space inside '(' and ')' of control statements. +sp_inside_sparen = remove # ignore/add/remove/force + +# Add or remove space after '(' of control statements. # +# Overrides sp_inside_sparen. +sp_inside_sparen_open = ignore # ignore/add/remove/force -# Add or remove space around arithmetic operator '+', '-', '/', '*', etc -sp_arith = ignore # ignore/add/remove/force +# Add or remove space before ')' of control statements. +# +# Overrides sp_inside_sparen. +sp_inside_sparen_close = ignore # ignore/add/remove/force -# Add or remove space around assignment operator '=', '+=', etc -sp_assign = ignore # ignore/add/remove/force +# Add or remove space after ')' of control statements. +sp_after_sparen = remove # ignore/add/remove/force -# Add or remove space around assignment operator '=' in a prototype -sp_assign_default = ignore # ignore/add/remove/force +# Add or remove space between ')' and '{' of of control statements. +sp_sparen_brace = force # ignore/add/remove/force -# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign. -sp_before_assign = ignore # ignore/add/remove/force +# (D) Add or remove space between 'invariant' and '('. +sp_invariant_paren = ignore # ignore/add/remove/force -# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign. -sp_after_assign = ignore # ignore/add/remove/force +# (D) Add or remove space after the ')' in 'invariant (C) c'. +sp_after_invariant_paren = ignore # ignore/add/remove/force -# Add or remove space around assignment '=' in enum -sp_enum_assign = ignore # ignore/add/remove/force +# Add or remove space before empty statement ';' on 'if', 'for' and 'while'. +sp_special_semi = remove # ignore/add/remove/force -# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign. -sp_enum_before_assign = ignore # ignore/add/remove/force +# Add or remove space before ';'. +# +# Default: remove +sp_before_semi = remove # ignore/add/remove/force -# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign. -sp_enum_after_assign = ignore # ignore/add/remove/force +# Add or remove space before ';' in non-empty 'for' statements. +sp_before_semi_for = remove # ignore/add/remove/force -# Add or remove space around preprocessor '##' concatenation operator. Default=Add -sp_pp_concat = add # ignore/add/remove/force +# Add or remove space before a semicolon of an empty part of a for statement. +sp_before_semi_for_empty = remove # ignore/add/remove/force -# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. Default=Add -sp_pp_stringify = add # ignore/add/remove/force +# Add or remove space after ';', except when followed by a comment. +# +# Default: add +sp_after_semi = add # ignore/add/remove/force -# Add or remove space around boolean operators '&&' and '||' -sp_bool = ignore # ignore/add/remove/force +# Add or remove space after ';' in non-empty 'for' statements. +# +# Default: force +sp_after_semi_for = force # ignore/add/remove/force -# Add or remove space around compare operator '<', '>', '==', etc -sp_compare = ignore # ignore/add/remove/force +# Add or remove space after the final semicolon of an empty part of a for +# statement, as in 'for ( ; ; )'. +sp_after_semi_for_empty = force # ignore/add/remove/force -# Add or remove space inside '(' and ')' -sp_inside_paren = remove # ignore/add/remove/force +# Add or remove space before '[' (except '[]'). +sp_before_square = remove # ignore/add/remove/force -# Add or remove space between nested parens -sp_paren_paren = ignore # ignore/add/remove/force +# Add or remove space before '[]'. +sp_before_squares = remove # ignore/add/remove/force -# Whether to balance spaces inside nested parens -sp_balance_nested_parens = false # false/true +# Add or remove space before C++17 structured bindings. +sp_cpp_before_struct_binding = ignore # ignore/add/remove/force -# Add or remove space between ')' and '{' -sp_paren_brace = add # ignore/add/remove/force +# Add or remove space inside a non-empty '[' and ']'. +sp_inside_square = remove # ignore/add/remove/force -# Add or remove space before pointer star '*' -sp_before_ptr_star = ignore # ignore/add/remove/force +# (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and +# ']'. If set to ignore, sp_inside_square is used. +sp_inside_square_oc_array = ignore # ignore/add/remove/force -# Add or remove space before pointer star '*' that isn't followed by a variable name -# If set to 'ignore', sp_before_ptr_star is used instead. -sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force +# Add or remove space after ',', i.e. 'a,b' vs. 'a, b'. +sp_after_comma = force # ignore/add/remove/force -# Add or remove space between pointer stars '*' -sp_between_ptr_star = ignore # ignore/add/remove/force +# Add or remove space before ','. +# +# Default: remove +sp_before_comma = remove # ignore/add/remove/force -# Add or remove space after pointer star '*', if followed by a word. -sp_after_ptr_star = ignore # ignore/add/remove/force +# (C#) Add or remove space between ',' and ']' in multidimensional array type +# like 'int[,,]'. +sp_after_mdatype_commas = ignore # ignore/add/remove/force -# Add or remove space after a pointer star '*', if followed by a func proto/def. -sp_after_ptr_star_func = ignore # ignore/add/remove/force +# (C#) Add or remove space between '[' and ',' in multidimensional array type +# like 'int[,,]'. +sp_before_mdatype_commas = ignore # ignore/add/remove/force -# Add or remove space before a pointer star '*', if followed by a func proto/def. -sp_before_ptr_star_func = ignore # ignore/add/remove/force +# (C#) Add or remove space between ',' in multidimensional array type +# like 'int[,,]'. +sp_between_mdatype_commas = ignore # ignore/add/remove/force -# Add or remove space before a reference sign '&' -sp_before_byref = ignore # ignore/add/remove/force +# Add or remove space between an open parenthesis and comma, +# i.e. '(,' vs. '( ,'. +# +# Default: force +sp_paren_comma = force # ignore/add/remove/force -# Add or remove space before a reference sign '&' that isn't followed by a variable name -# If set to 'ignore', sp_before_byref is used instead. -sp_before_unnamed_byref = ignore # ignore/add/remove/force +# Add or remove space before the variadic '...' when preceded by a +# non-punctuator. +sp_before_ellipsis = remove # ignore/add/remove/force -# Add or remove space after reference sign '&', if followed by a word. -sp_after_byref = ignore # ignore/add/remove/force +# Add or remove space between a type and '...'. +sp_type_ellipsis = ignore # ignore/add/remove/force -# Add or remove space after a reference sign '&', if followed by a func proto/def. -sp_after_byref_func = ignore # ignore/add/remove/force +# (D) Add or remove space between a type and '?'. +sp_type_question = ignore # ignore/add/remove/force -# Add or remove space before a reference sign '&', if followed by a func proto/def. -sp_before_byref_func = ignore # ignore/add/remove/force +# Add or remove space between ')' and '...'. +sp_paren_ellipsis = ignore # ignore/add/remove/force -# Add or remove space between type and word. Default=Force -sp_after_type = force # ignore/add/remove/force +# Add or remove space between ')' and a qualifier such as 'const'. +sp_paren_qualifier = ignore # ignore/add/remove/force -# Add or remove space in 'template <' vs 'template<'. -# If set to ignore, sp_before_angle is used. -sp_template_angle = ignore # ignore/add/remove/force +# Add or remove space between ')' and 'noexcept'. +sp_paren_noexcept = ignore # ignore/add/remove/force -# Add or remove space before '<>' -sp_before_angle = ignore # ignore/add/remove/force +# Add or remove space after class ':'. +sp_after_class_colon = force # ignore/add/remove/force -# Add or remove space inside '<' and '>' -sp_inside_angle = ignore # ignore/add/remove/force +# Add or remove space before class ':'. +sp_before_class_colon = force # ignore/add/remove/force -# Add or remove space after '<>' -sp_after_angle = ignore # ignore/add/remove/force +# Add or remove space after class constructor ':'. +sp_after_constr_colon = ignore # ignore/add/remove/force -# Add or remove space between '<>' and '(' as found in 'new List();' -sp_angle_paren = ignore # ignore/add/remove/force +# Add or remove space before class constructor ':'. +sp_before_constr_colon = ignore # ignore/add/remove/force -# Add or remove space between '<>' and a word as in 'List m;' -sp_angle_word = ignore # ignore/add/remove/force +# Add or remove space before case ':'. +# +# Default: remove +sp_before_case_colon = remove # ignore/add/remove/force -# Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add -sp_angle_shift = add # ignore/add/remove/force +# Add or remove space between 'operator' and operator sign. +sp_after_operator = force # ignore/add/remove/force -# Add or remove space before '(' of 'if', 'for', 'switch', and 'while' -sp_before_sparen = add # ignore/add/remove/force +# Add or remove space between the operator symbol and the open parenthesis, as +# in 'operator ++('. +sp_after_operator_sym = ignore # ignore/add/remove/force -# Add or remove space inside if-condition '(' and ')' -sp_inside_sparen = ignore # ignore/add/remove/force +# Overrides sp_after_operator_sym when the operator has no arguments, as in +# 'operator *()'. +sp_after_operator_sym_empty = ignore # ignore/add/remove/force -# Add or remove space before if-condition ')'. Overrides sp_inside_sparen. -sp_inside_sparen_close = ignore # ignore/add/remove/force +# Add or remove space after C/D cast, i.e. 'cast(int)a' vs. 'cast(int) a' or +# '(int)a' vs. '(int) a'. +sp_after_cast = force # ignore/add/remove/force -# Add or remove space after ')' of 'if', 'for', 'switch', and 'while' -sp_after_sparen = ignore # ignore/add/remove/force +# Add or remove spaces inside cast parentheses. +sp_inside_paren_cast = remove # ignore/add/remove/force -# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while' -sp_sparen_brace = ignore # ignore/add/remove/force +# Add or remove space between the type and open parenthesis in a C++ cast, +# i.e. 'int(exp)' vs. 'int (exp)'. +sp_cpp_cast_paren = ignore # ignore/add/remove/force -# Add or remove space between 'invariant' and '(' in the D language. -sp_invariant_paren = ignore # ignore/add/remove/force +# Add or remove space between 'sizeof' and '('. +sp_sizeof_paren = force # ignore/add/remove/force -# Add or remove space after the ')' in 'invariant (C) c' in the D language. -sp_after_invariant_paren = ignore # ignore/add/remove/force +# Add or remove space between 'sizeof' and '...'. +sp_sizeof_ellipsis = ignore # ignore/add/remove/force -# Add or remove space before empty statement ';' on 'if', 'for' and 'while' -sp_special_semi = ignore # ignore/add/remove/force +# Add or remove space between 'sizeof...' and '('. +sp_sizeof_ellipsis_paren = ignore # ignore/add/remove/force -# Add or remove space before ';'. Default=Remove -sp_before_semi = remove # ignore/add/remove/force +# Add or remove space between 'decltype' and '('. +sp_decltype_paren = ignore # ignore/add/remove/force -# Add or remove space before ';' in non-empty 'for' statements -sp_before_semi_for = ignore # ignore/add/remove/force +# (Pawn) Add or remove space after the tag keyword. +sp_after_tag = ignore # ignore/add/remove/force -# Add or remove space before a semicolon of an empty part of a for statement. -sp_before_semi_for_empty = ignore # ignore/add/remove/force +# Add or remove space inside enum '{' and '}'. +sp_inside_braces_enum = force # ignore/add/remove/force -# Add or remove space after ';', except when followed by a comment. Default=Add -sp_after_semi = add # ignore/add/remove/force +# Add or remove space inside struct/union '{' and '}'. +sp_inside_braces_struct = force # ignore/add/remove/force -# Add or remove space after ';' in non-empty 'for' statements. Default=Force -sp_after_semi_for = force # ignore/add/remove/force +# (OC) Add or remove space inside Objective-C boxed dictionary '{' and '}' +sp_inside_braces_oc_dict = ignore # ignore/add/remove/force -# Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; ). -sp_after_semi_for_empty = ignore # ignore/add/remove/force +# Add or remove space after open brace in an unnamed temporary +# direct-list-initialization. +sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force -# Add or remove space before '[' (except '[]') -sp_before_square = ignore # ignore/add/remove/force +# Add or remove space before close brace in an unnamed temporary +# direct-list-initialization. +sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force -# Add or remove space before '[]' -sp_before_squares = ignore # ignore/add/remove/force +# Add or remove space inside an unnamed temporary direct-list-initialization. +sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force -# Add or remove space inside a non-empty '[' and ']' -sp_inside_square = ignore # ignore/add/remove/force +# Add or remove space inside '{' and '}'. +sp_inside_braces = force # ignore/add/remove/force -# Add or remove space after ',' -sp_after_comma = ignore # ignore/add/remove/force +# Add or remove space inside '{}'. +sp_inside_braces_empty = remove # ignore/add/remove/force -# Add or remove space before ',' -sp_before_comma = remove # ignore/add/remove/force +# Add or remove space between return type and function name. A minimum of 1 +# is forced except for pointer return types. +sp_type_func = remove # ignore/add/remove/force -# Add or remove space between an open paren and comma: '(,' vs '( ,' -sp_paren_comma = force # ignore/add/remove/force +# Add or remove space between type and open brace of an unnamed temporary +# direct-list-initialization. +sp_type_brace_init_lst = ignore # ignore/add/remove/force -# Add or remove space before the variadic '...' when preceded by a non-punctuator -sp_before_ellipsis = ignore # ignore/add/remove/force +# Add or remove space between function name and '(' on function declaration. +sp_func_proto_paren = force # ignore/add/remove/force -# Add or remove space after class ':' -sp_after_class_colon = ignore # ignore/add/remove/force +# Add or remove space between function name and '()' on function declaration +# without parameters. +sp_func_proto_paren_empty = ignore # ignore/add/remove/force -# Add or remove space before class ':' -sp_before_class_colon = ignore # ignore/add/remove/force +# Add or remove space between function name and '(' on function definition. +sp_func_def_paren = force # ignore/add/remove/force -# Add or remove space before case ':'. Default=Remove -sp_before_case_colon = add # ignore/add/remove/force +# Add or remove space between function name and '()' on function definition +# without parameters. +sp_func_def_paren_empty = ignore # ignore/add/remove/force -# Add or remove space between 'operator' and operator sign -sp_after_operator = ignore # ignore/add/remove/force +# Add or remove space inside empty function '()'. +sp_inside_fparens = remove # ignore/add/remove/force -# Add or remove space between the operator symbol and the open paren, as in 'operator ++(' -sp_after_operator_sym = ignore # ignore/add/remove/force +# Add or remove space inside function '(' and ')'. +sp_inside_fparen = remove # ignore/add/remove/force -# Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a' -sp_after_cast = remove # ignore/add/remove/force +# Add or remove space inside the first parentheses in a function type, as in +# 'void (*x)(...)'. +sp_inside_tparen = remove # ignore/add/remove/force -# Add or remove spaces inside cast parens -sp_inside_paren_cast = ignore # ignore/add/remove/force +# Add or remove space between the ')' and '(' in a function type, as in +# 'void (*x)(...)'. +sp_after_tparen_close = remove # ignore/add/remove/force -# Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)' -sp_cpp_cast_paren = add # ignore/add/remove/force +# Add or remove space between ']' and '(' when part of a function call. +sp_square_fparen = remove # ignore/add/remove/force -# Add or remove space between 'sizeof' and '(' -sp_sizeof_paren = add # ignore/add/remove/force +# Add or remove space between ')' and '{' of function. +sp_fparen_brace = force # ignore/add/remove/force -# Add or remove space after the tag keyword (Pawn) -sp_after_tag = ignore # ignore/add/remove/force +# Add or remove space between ')' and '{' of s function call in object +# initialization. +# +# Overrides sp_fparen_brace. +sp_fparen_brace_initializer = ignore # ignore/add/remove/force -# Add or remove space inside enum '{' and '}' -sp_inside_braces_enum = add # ignore/add/remove/force +# (Java) Add or remove space between ')' and '{{' of double brace initializer. +sp_fparen_dbrace = ignore # ignore/add/remove/force -# Add or remove space inside struct/union '{' and '}' -sp_inside_braces_struct = ignore # ignore/add/remove/force +# Add or remove space between function name and '(' on function calls. +sp_func_call_paren = force # ignore/add/remove/force -# Add or remove space inside '{' and '}' -sp_inside_braces = ignore # ignore/add/remove/force +# Add or remove space between function name and '()' on function calls without +# parameters. If set to 'ignore' (the default), sp_func_call_paren is used. +sp_func_call_paren_empty = force # ignore/add/remove/force -# Add or remove space inside '{}' -sp_inside_braces_empty = add # ignore/add/remove/force +# Add or remove space between the user function name and '(' on function +# calls. You need to set a keyword to be a user function in the config file, +# like: +# set func_call_user tr _ i18n +sp_func_call_user_paren = ignore # ignore/add/remove/force -# Add or remove space between return type and function name -# A minimum of 1 is forced except for pointer return types. -sp_type_func = ignore # ignore/add/remove/force +# Add or remove space inside user function '(' and ')'. +sp_func_call_user_inside_fparen = ignore # ignore/add/remove/force -# Add or remove space between function name and '(' on function declaration -sp_func_proto_paren = add # ignore/add/remove/force +# Add or remove space between nested parentheses with user functions, +# i.e. '((' vs. '( ('. +sp_func_call_user_paren_paren = ignore # ignore/add/remove/force -# Add or remove space between function name and '(' on function definition -sp_func_def_paren = add # ignore/add/remove/force +# Add or remove space between a constructor/destructor and the open +# parenthesis. +sp_func_class_paren = force # ignore/add/remove/force -# Add or remove space inside empty function '()' -sp_inside_fparens = remove # ignore/add/remove/force +# Add or remove space between a constructor without parameters or destructor +# and '()'. +sp_func_class_paren_empty = ignore # ignore/add/remove/force -# Add or remove space inside function '(' and ')' -sp_inside_fparen = remove # ignore/add/remove/force +# Add or remove space between 'return' and '('. +sp_return_paren = force # ignore/add/remove/force -# Add or remove space between ']' and '(' when part of a function call. -sp_square_fparen = ignore # ignore/add/remove/force +# Add or remove space between 'return' and '{'. +sp_return_brace = ignore # ignore/add/remove/force -# Add or remove space between ')' and '{' of function -sp_fparen_brace = add # ignore/add/remove/force +# Add or remove space between '__attribute__' and '('. +sp_attribute_paren = remove # ignore/add/remove/force -# Add or remove space between function name and '(' on function calls -sp_func_call_paren = add # ignore/add/remove/force +# Add or remove space between 'defined' and '(' in '#if defined (FOO)'. +sp_defined_paren = force # ignore/add/remove/force -# Add or remove space between function name and '()' on function calls without parameters. -# If set to 'ignore' (the default), sp_func_call_paren is used. -sp_func_call_paren_empty = ignore # ignore/add/remove/force +# Add or remove space between 'throw' and '(' in 'throw (something)'. +sp_throw_paren = force # ignore/add/remove/force -# Add or remove space between the user function name and '(' on function calls -# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. -sp_func_call_user_paren = ignore # ignore/add/remove/force +# Add or remove space between 'throw' and anything other than '(' as in +# '@throw [...];'. +sp_after_throw = force # ignore/add/remove/force -# Add or remove space between a constructor/destructor and the open paren -sp_func_class_paren = ignore # ignore/add/remove/force +# Add or remove space between 'catch' and '(' in 'catch (something) { }'. +# If set to ignore, sp_before_sparen is used. +sp_catch_paren = force # ignore/add/remove/force -# Add or remove space between 'return' and '(' -sp_return_paren = add # ignore/add/remove/force +# (OC) Add or remove space between '@catch' and '(' +# in '@catch (something) { }'. If set to ignore, sp_catch_paren is used. +sp_oc_catch_paren = ignore # ignore/add/remove/force -# Add or remove space between '__attribute__' and '(' -sp_attribute_paren = ignore # ignore/add/remove/force +# (OC) Add or remove space between class name and '(' +# in '@interface className(categoryName):BaseClass' +sp_oc_classname_paren = ignore # ignore/add/remove/force -# Add or remove space between 'defined' and '(' in '#if defined (FOO)' -sp_defined_paren = ignore # ignore/add/remove/force +# (D) Add or remove space between 'version' and '(' +# in 'version (something) { }'. If set to ignore, sp_before_sparen is used. +sp_version_paren = ignore # ignore/add/remove/force -# Add or remove space between 'throw' and '(' in 'throw (something)' -sp_throw_paren = ignore # ignore/add/remove/force +# (D) Add or remove space between 'scope' and '(' +# in 'scope (something) { }'. If set to ignore, sp_before_sparen is used. +sp_scope_paren = ignore # ignore/add/remove/force -# Add or remove space between 'catch' and '(' in 'catch (something) { }' -# If set to ignore, sp_before_sparen is used. -sp_catch_paren = ignore # ignore/add/remove/force +# Add or remove space between 'super' and '(' in 'super (something)'. +# +# Default: remove +sp_super_paren = remove # ignore/add/remove/force -# Add or remove space between 'version' and '(' in 'version (something) { }' (D language) -# If set to ignore, sp_before_sparen is used. -sp_version_paren = ignore # ignore/add/remove/force +# Add or remove space between 'this' and '(' in 'this (something)'. +# +# Default: remove +sp_this_paren = remove # ignore/add/remove/force -# Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language) -# If set to ignore, sp_before_sparen is used. -sp_scope_paren = ignore # ignore/add/remove/force +# Add or remove space between a macro name and its definition. +sp_macro = ignore # ignore/add/remove/force -# Add or remove space between macro and value -sp_macro = ignore # ignore/add/remove/force +# Add or remove space between a macro function ')' and its definition. +sp_macro_func = ignore # ignore/add/remove/force -# Add or remove space between macro function ')' and value -sp_macro_func = add # ignore/add/remove/force +# Add or remove space between 'else' and '{' if on the same line. +sp_else_brace = force # ignore/add/remove/force -# Add or remove space between 'else' and '{' if on the same line -sp_else_brace = add # ignore/add/remove/force +# Add or remove space between '}' and 'else' if on the same line. +sp_brace_else = force # ignore/add/remove/force -# Add or remove space between '}' and 'else' if on the same line -sp_brace_else = add # ignore/add/remove/force +# Add or remove space between '}' and the name of a typedef on the same line. +sp_brace_typedef = force # ignore/add/remove/force -# Add or remove space between '}' and the name of a typedef on the same line -sp_brace_typedef = add # ignore/add/remove/force +# Add or remove space before the '{' of a 'catch' statement, if the '{' and +# 'catch' are on the same line, as in 'catch (decl) {'. +sp_catch_brace = force # ignore/add/remove/force -# Add or remove space between 'catch' and '{' if on the same line -sp_catch_brace = add # ignore/add/remove/force +# (OC) Add or remove space before the '{' of a '@catch' statement, if the '{' +# and '@catch' are on the same line, as in '@catch (decl) {'. +# If set to ignore, sp_catch_brace is used. +sp_oc_catch_brace = ignore # ignore/add/remove/force -# Add or remove space between '}' and 'catch' if on the same line -sp_brace_catch = add # ignore/add/remove/force +# Add or remove space between '}' and 'catch' if on the same line. +sp_brace_catch = force # ignore/add/remove/force -# Add or remove space between 'finally' and '{' if on the same line -sp_finally_brace = add # ignore/add/remove/force +# (OC) Add or remove space between '}' and '@catch' if on the same line. +# If set to ignore, sp_brace_catch is used. +sp_oc_brace_catch = ignore # ignore/add/remove/force -# Add or remove space between '}' and 'finally' if on the same line -sp_brace_finally = add # ignore/add/remove/force +# Add or remove space between 'finally' and '{' if on the same line. +sp_finally_brace = force # ignore/add/remove/force -# Add or remove space between 'try' and '{' if on the same line -sp_try_brace = add # ignore/add/remove/force +# Add or remove space between '}' and 'finally' if on the same line. +sp_brace_finally = force # ignore/add/remove/force -# Add or remove space between get/set and '{' if on the same line -sp_getset_brace = add # ignore/add/remove/force +# Add or remove space between 'try' and '{' if on the same line. +sp_try_brace = force # ignore/add/remove/force -# Add or remove space before the '::' operator -sp_before_dc = ignore # ignore/add/remove/force +# Add or remove space between get/set and '{' if on the same line. +sp_getset_brace = force # ignore/add/remove/force -# Add or remove space after the '::' operator -sp_after_dc = ignore # ignore/add/remove/force +# Add or remove space between a variable and '{' for C++ uniform +# initialization. +# +# Default: add +sp_word_brace = add # ignore/add/remove/force -# Add or remove around the D named array initializer ':' operator -sp_d_array_colon = ignore # ignore/add/remove/force +# Add or remove space between a variable and '{' for a namespace. +# +# Default: add +sp_word_brace_ns = add # ignore/add/remove/force -# Add or remove space after the '!' (not) operator. Default=Remove -sp_not = remove # ignore/add/remove/force +# Add or remove space before the '::' operator. +sp_before_dc = remove # ignore/add/remove/force -# Add or remove space after the '~' (invert) operator. Default=Remove -sp_inv = remove # ignore/add/remove/force +# Add or remove space after the '::' operator. +sp_after_dc = remove # ignore/add/remove/force -# Add or remove space after the '&' (address-of) operator. Default=Remove -# This does not affect the spacing after a '&' that is part of a type. -sp_addr = remove # ignore/add/remove/force +# (D) Add or remove around the D named array initializer ':' operator. +sp_d_array_colon = ignore # ignore/add/remove/force -# Add or remove space around the '.' or '->' operators. Default=Remove -sp_member = remove # ignore/add/remove/force +# Add or remove space after the '!' (not) unary operator. +# +# Default: remove +sp_not = remove # ignore/add/remove/force -# Add or remove space after the '*' (dereference) operator. Default=Remove -# This does not affect the spacing after a '*' that is part of a type. -sp_deref = remove # ignore/add/remove/force +# Add or remove space after the '~' (invert) unary operator. +# +# Default: remove +sp_inv = remove # ignore/add/remove/force -# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove -sp_sign = remove # ignore/add/remove/force +# Add or remove space after the '&' (address-of) unary operator. This does not +# affect the spacing after a '&' that is part of a type. +# +# Default: remove +sp_addr = remove # ignore/add/remove/force -# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove -sp_incdec = remove # ignore/add/remove/force +# Add or remove space around the '.' or '->' operators. +# +# Default: remove +sp_member = remove # ignore/add/remove/force -# Add or remove space before a backslash-newline at the end of a line. Default=Add -sp_before_nl_cont = add # ignore/add/remove/force +# Add or remove space after the '*' (dereference) unary operator. This does +# not affect the spacing after a '*' that is part of a type. +# +# Default: remove +sp_deref = remove # ignore/add/remove/force -# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;' -sp_after_oc_scope = ignore # ignore/add/remove/force +# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. +# +# Default: remove +sp_sign = remove # ignore/add/remove/force -# Add or remove space after the colon in message specs -# '-(int) f:(int) x;' vs '-(int) f: (int) x;' -sp_after_oc_colon = ignore # ignore/add/remove/force +# Add or remove space between '++' and '--' the word to which it is being +# applied, as in '(--x)' or 'y++;'. +# +# Default: remove +sp_incdec = remove # ignore/add/remove/force -# Add or remove space before the colon in message specs -# '-(int) f: (int) x;' vs '-(int) f : (int) x;' -sp_before_oc_colon = ignore # ignore/add/remove/force +# Add or remove space before a backslash-newline at the end of a line. +# +# Default: add +sp_before_nl_cont = add # ignore/add/remove/force -# Add or remove space after the colon in message specs -# '[object setValue:1];' vs '[object setValue: 1];' -sp_after_send_oc_colon = ignore # ignore/add/remove/force +# (OC) Add or remove space after the scope '+' or '-', as in '-(void) foo;' +# or '+(int) bar;'. +sp_after_oc_scope = ignore # ignore/add/remove/force -# Add or remove space before the colon in message specs -# '[object setValue:1];' vs '[object setValue :1];' -sp_before_send_oc_colon = ignore # ignore/add/remove/force +# (OC) Add or remove space after the colon in message specs, +# i.e. '-(int) f:(int) x;' vs. '-(int) f: (int) x;'. +sp_after_oc_colon = ignore # ignore/add/remove/force -# Add or remove space after the (type) in message specs -# '-(int)f: (int) x;' vs '-(int)f: (int)x;' -sp_after_oc_type = ignore # ignore/add/remove/force +# (OC) Add or remove space before the colon in message specs, +# i.e. '-(int) f: (int) x;' vs. '-(int) f : (int) x;'. +sp_before_oc_colon = ignore # ignore/add/remove/force -# Add or remove space after the first (type) in message specs -# '-(int) f:(int)x;' vs '-(int)f:(int)x;' -sp_after_oc_return_type = ignore # ignore/add/remove/force +# (OC) Add or remove space after the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};'. +sp_after_oc_dict_colon = ignore # ignore/add/remove/force -# Add or remove space between '@selector' and '(' -# '@selector(msgName)' vs '@selector (msgName)' -# Also applies to @protocol() constructs -sp_after_oc_at_sel = ignore # ignore/add/remove/force +# (OC) Add or remove space before the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};'. +sp_before_oc_dict_colon = ignore # ignore/add/remove/force -# Add or remove space between '@selector(x)' and the following word -# '@selector(foo) a:' vs '@selector(foo)a:' -sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force +# (OC) Add or remove space after the colon in message specs, +# i.e. '[object setValue:1];' vs. '[object setValue: 1];'. +sp_after_send_oc_colon = ignore # ignore/add/remove/force -# Add or remove space inside '@selector' parens -# '@selector(foo)' vs '@selector( foo )' -# Also applies to @protocol() constructs -sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force +# (OC) Add or remove space before the colon in message specs, +# i.e. '[object setValue:1];' vs. '[object setValue :1];'. +sp_before_send_oc_colon = ignore # ignore/add/remove/force -# Add or remove space before a block pointer caret -# '^int (int arg){...}' vs. ' ^int (int arg){...}' -sp_before_oc_block_caret = ignore # ignore/add/remove/force +# (OC) Add or remove space after the (type) in message specs, +# i.e. '-(int)f: (int) x;' vs. '-(int)f: (int)x;'. +sp_after_oc_type = ignore # ignore/add/remove/force -# Add or remove space after a block pointer caret -# '^int (int arg){...}' vs. '^ int (int arg){...}' -sp_after_oc_block_caret = ignore # ignore/add/remove/force +# (OC) Add or remove space after the first (type) in message specs, +# i.e. '-(int) f:(int)x;' vs. '-(int)f:(int)x;'. +sp_after_oc_return_type = ignore # ignore/add/remove/force -# Add or remove space around the ':' in 'b ? t : f' -sp_cond_colon = add # ignore/add/remove/force +# (OC) Add or remove space between '@selector' and '(', +# i.e. '@selector(msgName)' vs. '@selector (msgName)'. +# Also applies to '@protocol()' constructs. +sp_after_oc_at_sel = ignore # ignore/add/remove/force -# Add or remove space around the '?' in 'b ? t : f' -sp_cond_question = add # ignore/add/remove/force +# (OC) Add or remove space between '@selector(x)' and the following word, +# i.e. '@selector(foo) a:' vs. '@selector(foo)a:'. +sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force -# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here. -sp_case_label = ignore # ignore/add/remove/force +# (OC) Add or remove space inside '@selector' parentheses, +# i.e. '@selector(foo)' vs. '@selector( foo )'. +# Also applies to '@protocol()' constructs. +sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force -# Control the space around the D '..' operator. -sp_range = ignore # ignore/add/remove/force +# (OC) Add or remove space before a block pointer caret, +# i.e. '^int (int arg){...}' vs. ' ^int (int arg){...}'. +sp_before_oc_block_caret = ignore # ignore/add/remove/force -# Control the space after the opening of a C++ comment '// A' vs '//A' -sp_cmt_cpp_start = ignore # ignore/add/remove/force +# (OC) Add or remove space after a block pointer caret, +# i.e. '^int (int arg){...}' vs. '^ int (int arg){...}'. +sp_after_oc_block_caret = ignore # ignore/add/remove/force -# Controls the spaces between #else or #endif and a trailing comment -sp_endif_cmt = ignore # ignore/add/remove/force +# (OC) Add or remove space between the receiver and selector in a message, +# as in '[receiver selector ...]'. +sp_after_oc_msg_receiver = ignore # ignore/add/remove/force -# Controls the spaces after 'new', 'delete', and 'delete[]' -sp_after_new = ignore # ignore/add/remove/force +# (OC) Add or remove space after '@property'. +sp_after_oc_property = ignore # ignore/add/remove/force -# Controls the spaces before a trailing or embedded comment -sp_before_tr_emb_cmt = ignore # ignore/add/remove/force +# (OC) Add or remove space between '@synchronized' and the open parenthesis, +# i.e. '@synchronized(foo)' vs. '@synchronized (foo)'. +sp_after_oc_synchronized = ignore # ignore/add/remove/force -# Number of spaces before a trailing or embedded comment -sp_num_before_tr_emb_cmt = 0 # number +# Add or remove space around the ':' in 'b ? t : f'. +sp_cond_colon = force # ignore/add/remove/force +# Add or remove space before the ':' in 'b ? t : f'. # -# Code alignment (not left column spaces/tabs) +# Overrides sp_cond_colon. +sp_cond_colon_before = force # ignore/add/remove/force + +# Add or remove space after the ':' in 'b ? t : f'. # +# Overrides sp_cond_colon. +sp_cond_colon_after = force # ignore/add/remove/force -# Whether to keep non-indenting tabs -align_keep_tabs = false # false/true +# Add or remove space around the '?' in 'b ? t : f'. +sp_cond_question = force # ignore/add/remove/force -# Whether to use tabs for aligning -align_with_tabs = false # false/true +# Add or remove space before the '?' in 'b ? t : f'. +# +# Overrides sp_cond_question. +sp_cond_question_before = force # ignore/add/remove/force -# Whether to bump out to the next tab when aligning -align_on_tabstop = false # false/true +# Add or remove space after the '?' in 'b ? t : f'. +# +# Overrides sp_cond_question. +sp_cond_question_after = force # ignore/add/remove/force -# Whether to left-align numbers -align_number_left = false # false/true +# In the abbreviated ternary form '(a ?: b)', add or remove space between '?' +# and ':'. +# +# Overrides all other sp_cond_* options. +sp_cond_ternary_short = force # ignore/add/remove/force -# Align variable definitions in prototypes and functions -align_func_params = true # false/true +# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make +# sense here. +sp_case_label = force # ignore/add/remove/force -# Align parameters in single-line functions that have the same name. -# The function names must already be aligned with each other. -align_same_func_call_params = true # false/true +# (D) Add or remove space around the D '..' operator. +sp_range = ignore # ignore/add/remove/force -# The span for aligning variable definitions (0=don't align) -align_var_def_span = 0 # number +# Add or remove space after ':' in a Java/C++11 range-based 'for', +# as in 'for (Type var : expr)'. +sp_after_for_colon = ignore # ignore/add/remove/force -# How to align the star in variable definitions. -# 0=Part of the type 'void * foo;' -# 1=Part of the variable 'void *foo;' -# 2=Dangling 'void *foo;' -align_var_def_star_style = 0 # number +# Add or remove space before ':' in a Java/C++11 range-based 'for', +# as in 'for (Type var : expr)'. +sp_before_for_colon = ignore # ignore/add/remove/force -# How to align the '&' in variable definitions. -# 0=Part of the type -# 1=Part of the variable -# 2=Dangling -align_var_def_amp_style = 0 # number +# (D) Add or remove space between 'extern' and '(' as in 'extern (C)'. +sp_extern_paren = ignore # ignore/add/remove/force -# The threshold for aligning variable definitions (0=no limit) -align_var_def_thresh = 0 # number +# Add or remove space after the opening of a C++ comment, +# i.e. '// A' vs. '//A'. +sp_cmt_cpp_start = force # ignore/add/remove/force -# The gap for aligning variable definitions -align_var_def_gap = 0 # number +# If true, space is added with sp_cmt_cpp_start will be added after doxygen +# sequences like '///', '///<', '//!' and '//!<'. +sp_cmt_cpp_doxygen = false # true/false -# Whether to align the colon in struct bit fields -align_var_def_colon = false # false/true +# If true, space is added with sp_cmt_cpp_start will be added after Qt +# translator or meta-data comments like '//:', '//=', and '//~'. +sp_cmt_cpp_qttr = false # true/false -# Whether to align any attribute after the variable name -align_var_def_attribute = false # false/true +# Add or remove space between #else or #endif and a trailing comment. +sp_endif_cmt = remove # ignore/add/remove/force -# Whether to align inline struct/enum/union variable definitions -align_var_def_inline = false # false/true +# Add or remove space after 'new', 'delete' and 'delete[]'. +sp_after_new = force # ignore/add/remove/force -# The span for aligning on '=' in assignments (0=don't align) -align_assign_span = 0 # number +# Add or remove space between 'new' and '(' in 'new()'. +sp_between_new_paren = ignore # ignore/add/remove/force -# The threshold for aligning on '=' in assignments (0=no limit) -align_assign_thresh = 0 # number +# Add or remove space between ')' and type in 'new(foo) BAR'. +sp_after_newop_paren = ignore # ignore/add/remove/force -# The span for aligning on '=' in enums (0=don't align) -align_enum_equ_span = 0 # number +# Add or remove space inside parenthesis of the new operator +# as in 'new(foo) BAR'. +sp_inside_newop_paren = ignore # ignore/add/remove/force -# The threshold for aligning on '=' in enums (0=no limit) -align_enum_equ_thresh = 0 # number +# Add or remove space after the open parenthesis of the new operator, +# as in 'new(foo) BAR'. +# +# Overrides sp_inside_newop_paren. +sp_inside_newop_paren_open = ignore # ignore/add/remove/force -# The span for aligning struct/union (0=don't align) -align_var_struct_span = 0 # number +# Add or remove space before the close parenthesis of the new operator, +# as in 'new(foo) BAR'. +# +# Overrides sp_inside_newop_paren. +sp_inside_newop_paren_close = ignore # ignore/add/remove/force -# The threshold for aligning struct/union member definitions (0=no limit) -align_var_struct_thresh = 0 # number +# Add or remove space before a trailing or embedded comment. +sp_before_tr_emb_cmt = force # ignore/add/remove/force -# The gap for aligning struct/union member definitions -align_var_struct_gap = 0 # number +# Number of spaces before a trailing or embedded comment. +sp_num_before_tr_emb_cmt = 0 # unsigned number -# The span for aligning struct initializer values (0=don't align) -align_struct_init_span = 0 # number +# (Java) Add or remove space between an annotation and the open parenthesis. +sp_annotation_paren = ignore # ignore/add/remove/force -# The minimum space between the type and the synonym of a typedef -align_typedef_gap = 0 # number +# If true, vbrace tokens are dropped to the previous token and skipped. +sp_skip_vbrace_tokens = false # true/false -# The span for aligning single-line typedefs (0=don't align) -align_typedef_span = 0 # number +# Add or remove space after 'noexcept'. +sp_after_noexcept = ignore # ignore/add/remove/force -# How to align typedef'd functions with other typedefs -# 0: Don't mix them at all -# 1: align the open paren with the types -# 2: align the function type name with the other type names -align_typedef_func = 0 # number +# Add or remove space after '_'. +sp_vala_after_translation = remove # ignore/add/remove/force -# Controls the positioning of the '*' in typedefs. Just try it. -# 0: Align on typedef type, ignore '*' -# 1: The '*' is part of type name: typedef int *pint; -# 2: The '*' is part of the type, but dangling: typedef int *pint; -align_typedef_star_style = 0 # number +# If true, a is inserted after #define. +force_tab_after_define = false # true/false -# Controls the positioning of the '&' in typedefs. Just try it. -# 0: Align on typedef type, ignore '&' -# 1: The '&' is part of type name: typedef int &pint; -# 2: The '&' is part of the type, but dangling: typedef int &pint; -align_typedef_amp_style = 0 # number +# +# Indenting options +# -# The span for aligning comments that end lines (0=don't align) -align_right_cmt_span = 0 # number +# The number of columns to indent per level. Usually 2, 3, 4, or 8. +# +# Default: 8 +indent_columns = 4 # unsigned number -# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment -align_right_cmt_mix = false # false/true +# The continuation indent. If non-zero, this overrides the indent of '(', '[' +# and '=' continuation indents. Negative values are OK; negative value is +# absolute and not increased for each '(' or '[' level. +# +# For FreeBSD, this is set to 4. +indent_continue = 0 # number -# If a trailing comment is more than this number of columns away from the text it follows, -# it will qualify for being aligned. This has to be > 0 to do anything. -align_right_cmt_gap = 0 # number +# The continuation indent, only for class header line(s). If non-zero, this +# overrides the indent of 'class' continuation indents. +indent_continue_class_head = 0 # unsigned number -# Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore) -align_right_cmt_at_col = 0 # number +# Whether to indent empty lines (i.e. lines which contain only spaces before +# the newline character). +indent_single_newlines = false # true/false -# The span for aligning function prototypes (0=don't align) -align_func_proto_span = 0 # number +# The continuation indent for func_*_param if they are true. If non-zero, this +# overrides the indent. +indent_param = 0 # unsigned number -# Minimum gap between the return type and the function name. -align_func_proto_gap = 0 # number +# How to use tabs when indenting code. +# +# 0: Spaces only +# 1: Indent with tabs to brace level, align with spaces (default) +# 2: Indent and align with tabs, using spaces when not on a tabstop +# +# Default: 1 +indent_with_tabs = 0 # unsigned number + +# Whether to indent comments that are not at a brace level with tabs on a +# tabstop. Requires indent_with_tabs=2. If false, will use spaces. +indent_cmt_with_tabs = false # true/false -# Align function protos on the 'operator' keyword instead of what follows -align_on_operator = false # false/true +# Whether to indent strings broken by '\' so that they line up. +indent_align_string = false # true/false -# Whether to mix aligning prototype and variable declarations. -# If true, align_var_def_XXX options are used instead of align_func_proto_XXX options. -align_mix_var_proto = false # false/true +# The number of spaces to indent multi-line XML strings. +# Requires indent_align_string=true. +indent_xml_string = 0 # unsigned number -# Align single-line functions with function prototypes, uses align_func_proto_span -align_single_line_func = false # false/true +# Spaces to indent '{' from level. +indent_brace = 0 # unsigned number -# Aligning the open brace of single-line functions. -# Requires align_single_line_func=true, uses align_func_proto_span -align_single_line_brace = false # false/true +# Whether braces are indented to the body level. +indent_braces = false # true/false -# Gap for align_single_line_brace. -align_single_line_brace_gap = 0 # number +# Whether to disable indenting function braces if indent_braces=true. +indent_braces_no_func = false # true/false + +# Whether to disable indenting class braces if indent_braces=true. +indent_braces_no_class = false # true/false + +# Whether to disable indenting struct braces if indent_braces=true. +indent_braces_no_struct = false # true/false + +# Whether to indent based on the size of the brace parent, +# i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. +indent_brace_parent = false # true/false + +# Whether to indent based on the open parenthesis instead of the open brace +# in '({\n'. +indent_paren_open_brace = false # true/false + +# (C#) Whether to indent the brace of a C# delegate by another level. +indent_cs_delegate_brace = false # true/false + +# (C#) Whether to indent a C# delegate (to handle delegates with no brace) by +# another level. +indent_cs_delegate_body = false # true/false + +# Whether to indent the body of a 'namespace'. +indent_namespace = true # true/false + +# Whether to indent only the first namespace, and not any nested namespaces. +# Requires indent_namespace=true. +indent_namespace_single_indent = false # true/false + +# The number of spaces to indent a namespace block. +# If set to zero, use the value indent_columns +indent_namespace_level = 0 # unsigned number + +# If the body of the namespace is longer than this number, it won't be +# indented. Requires indent_namespace=true. 0 means no limit. +indent_namespace_limit = 0 # unsigned number + +# Whether the 'extern "C"' body is indented. +indent_extern = false # true/false + +# Whether the 'class' body is indented. +indent_class = true # true/false + +# Whether to indent the stuff after a leading base class colon. +indent_class_colon = false # true/false + +# Whether to indent based on a class colon instead of the stuff after the +# colon. Requires indent_class_colon=true. +indent_class_on_colon = false # true/false + +# Whether to indent the stuff after a leading class initializer colon. +indent_constr_colon = false # true/false + +# Virtual indent from the ':' for member initializers. +# +# Default: 2 +indent_ctor_init_leading = 2 # unsigned number + +# Additional indent for constructor initializer list. +# Negative values decrease indent down to the first column. +indent_ctor_init = 0 # number + +# Whether to indent 'if' following 'else' as a new block under the 'else'. +# If false, 'else\nif' is treated as 'else if' for indenting purposes. +indent_else_if = false # true/false + +# Amount to indent variable declarations after a open brace. +# +# <0: Relative +# >=0: Absolute +indent_var_def_blk = 0 # number + +# Whether to indent continued variable declarations instead of aligning. +indent_var_def_cont = false # true/false + +# Whether to indent continued shift expressions ('<<' and '>>') instead of +# aligning. Set align_left_shift=false when enabling this. +indent_shift = false # true/false + +# Whether to force indentation of function definitions to start in column 1. +indent_func_def_force_col1 = false # true/false + +# Whether to indent continued function call parameters one indent level, +# rather than aligning parameters under the open parenthesis. +indent_func_call_param = false # true/false + +# Same as indent_func_call_param, but for function definitions. +indent_func_def_param = false # true/false + +# Same as indent_func_call_param, but for function prototypes. +indent_func_proto_param = false # true/false + +# Same as indent_func_call_param, but for class declarations. +indent_func_class_param = false # true/false + +# Same as indent_func_call_param, but for class variable constructors. +indent_func_ctor_var_param = false # true/false + +# Same as indent_func_call_param, but for template parameter lists. +indent_template_param = false # true/false + +# Double the indent for indent_func_xxx_param options. +# Use both values of the options indent_columns and indent_param. +indent_func_param_double = false # true/false + +# Indentation column for standalone 'const' qualifier on a function +# prototype. +indent_func_const = 0 # unsigned number + +# Indentation column for standalone 'throw' qualifier on a function +# prototype. +indent_func_throw = 0 # unsigned number -# The span for aligning ObjC msg spec (0=don't align) -align_oc_msg_spec_span = 0 # number +# The number of spaces to indent a continued '->' or '.'. +# Usually set to 0, 1, or indent_columns. +indent_member = 1 # unsigned number + +# Whether lines broken at '.' or '->' should be indented by a single indent. +# The indent_member option will not be effective if this is set to true. +indent_member_single = false # true/false + +# Spaces to indent single line ('//') comments on lines before code. +indent_sing_line_comments = 0 # unsigned number + +# Whether to indent trailing single line ('//') comments relative to the code +# instead of trying to keep the same absolute column. +indent_relative_single_line_comments = false # true/false + +# Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns. +indent_switch_case = 0 # unsigned number + +# Whether to indent preprocessor statements inside of switch statements. +# +# Default: true +indent_switch_pp = true # true/false + +# Spaces to shift the 'case' line, without affecting any other lines. +# Usually 0. +indent_case_shift = 0 # unsigned number + +# Spaces to indent '{' from 'case'. By default, the brace will appear under +# the 'c' in case. Usually set to 0 or indent_columns. Negative values are OK. +indent_case_brace = 0 # number + +# Whether to indent comments found in first column. +indent_col1_comment = false # true/false + +# Whether to indent multi string literal in first column. +indent_col1_multi_string_literal = false # true/false + +# How to indent goto labels. +# +# >0: Absolute column where 1 is the leftmost column +# <=0: Subtract from brace indent +# +# Default: 1 +indent_label = 1 # number + +# Same as indent_label, but for access specifiers that are followed by a +# colon. +# +# Default: 1 +indent_access_spec = 1 # number + +# Whether to indent the code after an access specifier by one level. +# If true, this option forces 'indent_access_spec=0'. +indent_access_spec_body = false # true/false + +# If an open parenthesis is followed by a newline, whether to indent the next +# line so that it lines up after the open parenthesis (not recommended). +indent_paren_nl = false # true/false + +# How to indent a close parenthesis after a newline. +# +# 0: Indent to body level (default) +# 1: Align under the open parenthesis +# 2: Indent to the brace level +indent_paren_close = 0 # unsigned number + +# Whether to indent the open parenthesis of a function definition, +# if the parenthesis is on its own line. +indent_paren_after_func_def = false # true/false + +# Whether to indent the open parenthesis of a function declaration, +# if the parenthesis is on its own line. +indent_paren_after_func_decl = false # true/false + +# Whether to indent the open parenthesis of a function call, +# if the parenthesis is on its own line. +indent_paren_after_func_call = false # true/false + +# Whether to indent a comma when inside a parenthesis. +# If true, aligns under the open parenthesis. +indent_comma_paren = false # true/false + +# Whether to indent a Boolean operator when inside a parenthesis. +# If true, aligns under the open parenthesis. +indent_bool_paren = false # true/false + +# Whether to indent a semicolon when inside a for parenthesis. +# If true, aligns under the open for parenthesis. +indent_semicolon_for_paren = false # true/false + +# Whether to align the first expression to following ones +# if indent_bool_paren=true. +indent_first_bool_expr = false # true/false -# Whether to align macros wrapped with a backslash and a newline. -# This will not work right if the macro contains a multi-line comment. -align_nl_cont = false # false/true +# Whether to align the first expression to following ones +# if indent_semicolon_for_paren=true. +indent_first_for_expr = false # true/false -# The minimum space between label and value of a preprocessor define -align_pp_define_gap = 0 # number +# If an open square is followed by a newline, whether to indent the next line +# so that it lines up after the open square (not recommended). +indent_square_nl = false # true/false -# The span for aligning on '#define' bodies (0=don't align) -align_pp_define_span = 0 # number +# (ESQL/C) Whether to preserve the relative indent of 'EXEC SQL' bodies. +indent_preserve_sql = false # true/false -# Align lines that start with '<<' with previous '<<'. Default=true -align_left_shift = true # false/true +# Whether to align continued statements at the '='. If false or if the '=' is +# followed by a newline, the next line is indent one tab. +# +# Default: true +indent_align_assign = true # true/false + +# Whether to align continued statements at the '('. If false or the '(' is +# followed by a newline, the next line indent is one tab. +# +# Default: true +indent_align_paren = true # true/false + +# (OC) Whether to indent Objective-C blocks at brace level instead of usual +# rules. +indent_oc_block = false # true/false -# Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) -align_oc_msg_colon_span = 0 # number +# (OC) Indent for Objective-C blocks in a message relative to the parameter +# name. +# +# =0: Use indent_oc_block rules +# >0: Use specified number of spaces to indent +indent_oc_block_msg = 0 # unsigned number -# Aligning parameters in an Obj-C '+' or '-' declaration on the ':' -align_oc_decl_colon = false # false/true +# (OC) Minimum indent for subsequent parameters +indent_oc_msg_colon = 0 # unsigned number + +# (OC) Whether to prioritize aligning with initial colon (and stripping spaces +# from lines, if necessary). +# +# Default: true +indent_oc_msg_prioritize_first_colon = true # true/false + +# (OC) Whether to indent blocks the way that Xcode does by default +# (from the keyword if the parameter is on its own line; otherwise, from the +# previous indentation level). Requires indent_oc_block_msg=true. +indent_oc_block_msg_xcode_style = true # true/false + +# (OC) Whether to indent blocks from where the brace is, relative to a +# message keyword. Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_keyword = true # true/false + +# (OC) Whether to indent blocks from where the brace is, relative to a message +# colon. Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_colon = true # true/false + +# (OC) Whether to indent blocks from where the block caret is. +# Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_caret = true # true/false + +# (OC) Whether to indent blocks from where the brace caret is. +# Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_brace = true # true/false + +# When indenting after virtual brace open and newline add further spaces to +# reach this minimum indent. +indent_min_vbrace_open = 0 # unsigned number + +# Whether to add further spaces after regular indent to reach next tabstop +# when identing after virtual brace open and newline. +indent_vbrace_open_on_tabstop = false # true/false + +# How to indent after a brace followed by another token (not a newline). +# true: indent all contained lines to match the token +# false: indent all contained lines to match the brace +# +# Default: true +indent_token_after_brace = true # true/false + +# Whether to indent the body of a C++11 lambda. +indent_cpp_lambda_body = false # true/false + +# (C#) Whether to indent a 'using' block if no braces are used. +# +# Default: true +indent_using_block = true # true/false + +# How to indent the continuation of ternary operator. +# +# 0: Off (default) +# 1: When the `if_false` is a continuation, indent it under `if_false` +# 2: When the `:` is a continuation, indent it under `?` +indent_ternary_operator = 0 # unsigned number + +# If true, the indentation of the chunks after a `return new` sequence will be set at return indentation column. +indent_off_after_return_new = false # true/false + +# If true, the tokens after return are indented with regular single indentation. By default (false) the indentation is after the return token. +indent_single_after_return = false # true/false + +# Whether to ignore indent and alignment for 'asm' blocks (i.e. assume they +# have their own indentation). +indent_ignore_asm_block = false # true/false # # Newline adding and removing options # -# Whether to collapse empty blocks between '{' and '}' -nl_collapse_empty_body = false # false/true +# Whether to collapse empty blocks between '{' and '}'. +nl_collapse_empty_body = false # true/false + +# Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'. +nl_assign_leave_one_liners = true # true/false + +# Don't split one-line braced statements inside a 'class xx { }' body. +nl_class_leave_one_liners = false # true/false + +# Don't split one-line enums, as in 'enum foo { BAR = 15 };' +nl_enum_leave_one_liners = false # true/false + +# Don't split one-line get or set functions. +nl_getset_leave_one_liners = false # true/false + +# (C#) Don't split one-line property get or set functions. +nl_cs_property_leave_one_liners = false # true/false -# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };' -nl_assign_leave_one_liners = false # false/true +# Don't split one-line function definitions, as in 'int foo() { return 0; }'. +nl_func_leave_one_liners = false # true/false -# Don't split one-line braced statements inside a class xx { } body -nl_class_leave_one_liners = false # false/true +# Don't split one-line C++11 lambdas, as in '[]() { return 0; }'. +nl_cpp_lambda_leave_one_liners = false # true/false -# Don't split one-line enums: 'enum foo { BAR = 15 };' -nl_enum_leave_one_liners = false # false/true +# Don't split one-line if/else statements, as in 'if(...) b++;'. +nl_if_leave_one_liners = false # true/false -# Don't split one-line get or set functions -nl_getset_leave_one_liners = false # false/true +# Don't split one-line while statements, as in 'while(...) b++;'. +nl_while_leave_one_liners = false # true/false -# Don't split one-line function definitions - 'int foo() { return 0; }' -nl_func_leave_one_liners = false # false/true +# Don't split one-line for statements, as in 'for(...) b++;'. +nl_for_leave_one_liners = false # true/false -# Don't split one-line if/else statements - 'if(a) b++;' -nl_if_leave_one_liners = false # false/true +# (OC) Don't split one-line Objective-C messages. +nl_oc_msg_leave_one_liner = false # true/false -# Add or remove newlines at the start of the file -nl_start_of_file = ignore # ignore/add/remove/force +# (OC) Add or remove newline between method declaration and '{'. +nl_oc_mdef_brace = ignore # ignore/add/remove/force -# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force' -nl_start_of_file_min = 0 # number +# (OC) Add or remove newline between Objective-C block signature and '{'. +nl_oc_block_brace = ignore # ignore/add/remove/force -# Add or remove newline at the end of the file -nl_end_of_file = ignore # ignore/add/remove/force +# (OC) Add or remove newline between '@interface' and '{'. +nl_oc_interface_brace = ignore # ignore/add/remove/force -# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force') -nl_end_of_file_min = 0 # number +# (OC) Add or remove newline between '@implementation' and '{'. +nl_oc_implementation_brace = ignore # ignore/add/remove/force -# Add or remove newline between '=' and '{' -nl_assign_brace = ignore # ignore/add/remove/force +# Add or remove newlines at the start of the file. +nl_start_of_file = ignore # ignore/add/remove/force -# Add or remove newline between '=' and '[' (D only) -nl_assign_square = ignore # ignore/add/remove/force +# The minimum number of newlines at the start of the file (only used if +# nl_start_of_file is 'add' or 'force'). +nl_start_of_file_min = 0 # unsigned number -# Add or remove newline after '= [' (D only). Will also affect the newline before the ']' -nl_after_square_assign = ignore # ignore/add/remove/force +# Add or remove newline at the end of the file. +nl_end_of_file = add # ignore/add/remove/force -# The number of blank lines after a block of variable definitions at the top of a function body. -# 0=no change (default) -nl_func_var_def_blk = 0 # number +# The minimum number of newlines at the end of the file (only used if +# nl_end_of_file is 'add' or 'force'). +nl_end_of_file_min = 1 # unsigned number -# Add or remove newline between a function call's ')' and '{', as in: -# list_for_each(item, &list) { } -nl_fcall_brace = ignore # ignore/add/remove/force +# Add or remove newline between '=' and '{'. +nl_assign_brace = ignore # ignore/add/remove/force -# Add or remove newline between 'enum' and '{' -nl_enum_brace = ignore # ignore/add/remove/force +# (D) Add or remove newline between '=' and '['. +nl_assign_square = ignore # ignore/add/remove/force -# Add or remove newline between 'struct and '{' -nl_struct_brace = ignore # ignore/add/remove/force +# Add or remove newline between '[]' and '{'. +nl_tsquare_brace = ignore # ignore/add/remove/force -# Add or remove newline between 'union' and '{' -nl_union_brace = ignore # ignore/add/remove/force +# (D) Add or remove newline after '= ['. Will also affect the newline before +# the ']'. +nl_after_square_assign = ignore # ignore/add/remove/force -# Add or remove newline between 'if' and '{' -nl_if_brace = remove # ignore/add/remove/force +# Add or remove newline between a function call's ')' and '{', as in +# 'list_for_each(item, &list) { }'. +nl_fcall_brace = ignore # ignore/add/remove/force -# Add or remove newline between '}' and 'else' -nl_brace_else = remove # ignore/add/remove/force +# Add or remove newline between 'enum' and '{'. +nl_enum_brace = remove # ignore/add/remove/force -# Add or remove newline between 'else if' and '{' -# If set to ignore, nl_if_brace is used instead -nl_elseif_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'enum' and 'class'. +nl_enum_class = ignore # ignore/add/remove/force -# Add or remove newline between 'else' and '{' -nl_else_brace = remove # ignore/add/remove/force +# Add or remove newline between 'enum class' and the identifier. +nl_enum_class_identifier = ignore # ignore/add/remove/force -# Add or remove newline between 'else' and 'if' -nl_else_if = ignore # ignore/add/remove/force +# Add or remove newline between 'enum class' type and ':'. +nl_enum_identifier_colon = ignore # ignore/add/remove/force -# Add or remove newline between '}' and 'finally' -nl_brace_finally = remove # ignore/add/remove/force +# Add or remove newline between 'enum class identifier :' and type. +nl_enum_colon_type = ignore # ignore/add/remove/force -# Add or remove newline between 'finally' and '{' -nl_finally_brace = remove # ignore/add/remove/force +# Add or remove newline between 'struct and '{'. +nl_struct_brace = remove # ignore/add/remove/force -# Add or remove newline between 'try' and '{' -nl_try_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'union' and '{'. +nl_union_brace = remove # ignore/add/remove/force -# Add or remove newline between get/set and '{' -nl_getset_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'if' and '{'. +nl_if_brace = remove # ignore/add/remove/force -# Add or remove newline between 'for' and '{' -nl_for_brace = ignore # ignore/add/remove/force +# Add or remove newline between '}' and 'else'. +nl_brace_else = remove # ignore/add/remove/force -# Add or remove newline between 'catch' and '{' -nl_catch_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'else if' and '{'. If set to ignore, +# nl_if_brace is used instead. +nl_elseif_brace = remove # ignore/add/remove/force -# Add or remove newline between '}' and 'catch' -nl_brace_catch = ignore # ignore/add/remove/force +# Add or remove newline between 'else' and '{'. +nl_else_brace = remove # ignore/add/remove/force -# Add or remove newline between 'while' and '{' -nl_while_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'else' and 'if'. +nl_else_if = remove # ignore/add/remove/force -# Add or remove newline between 'using' and '{' -nl_using_brace = ignore # ignore/add/remove/force +# Add or remove newline before 'if'/'else if' closing parenthesis. +nl_before_if_closing_paren = ignore # ignore/add/remove/force -# Add or remove newline between two open or close braces. -# Due to general newline/brace handling, REMOVE may not work. -nl_brace_brace = ignore # ignore/add/remove/force +# Add or remove newline between '}' and 'finally'. +nl_brace_finally = remove # ignore/add/remove/force -# Add or remove newline between 'do' and '{' -nl_do_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'finally' and '{'. +nl_finally_brace = remove # ignore/add/remove/force -# Add or remove newline between '}' and 'while' of 'do' statement -nl_brace_while = ignore # ignore/add/remove/force +# Add or remove newline between 'try' and '{'. +nl_try_brace = remove # ignore/add/remove/force -# Add or remove newline between 'switch' and '{' -nl_switch_brace = ignore # ignore/add/remove/force +# Add or remove newline between get/set and '{'. +nl_getset_brace = remove # ignore/add/remove/force -# Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc. -# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace. -nl_multi_line_cond = false # false/true +# Add or remove newline between 'for' and '{'. +nl_for_brace = remove # ignore/add/remove/force + +# Add or remove newline before the '{' of a 'catch' statement, as in +# 'catch (decl) {'. +nl_catch_brace = remove # ignore/add/remove/force + +# (OC) Add or remove newline before the '{' of a '@catch' statement, as in +# '@catch (decl) {'. If set to ignore, nl_catch_brace is used. +nl_oc_catch_brace = ignore # ignore/add/remove/force + +# Add or remove newline between '}' and 'catch'. +nl_brace_catch = remove # ignore/add/remove/force + +# (OC) Add or remove newline between '}' and '@catch'. If set to ignore, +# nl_brace_catch is used. +nl_oc_brace_catch = ignore # ignore/add/remove/force + +# Add or remove newline between '}' and ']'. +nl_brace_square = remove # ignore/add/remove/force + +# Add or remove newline between '}' and ')' in a function invocation. +nl_brace_fparen = remove # ignore/add/remove/force + +# Add or remove newline between 'while' and '{'. +nl_while_brace = remove # ignore/add/remove/force + +# (D) Add or remove newline between 'scope (x)' and '{'. +nl_scope_brace = ignore # ignore/add/remove/force + +# (D) Add or remove newline between 'unittest' and '{'. +nl_unittest_brace = ignore # ignore/add/remove/force + +# (D) Add or remove newline between 'version (x)' and '{'. +nl_version_brace = ignore # ignore/add/remove/force + +# (C#) Add or remove newline between 'using' and '{'. +nl_using_brace = remove # ignore/add/remove/force + +# Add or remove newline between two open or close braces. Due to general +# newline/brace handling, REMOVE may not work. +nl_brace_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'do' and '{'. +nl_do_brace = remove # ignore/add/remove/force + +# Add or remove newline between '}' and 'while' of 'do' statement. +nl_brace_while = remove # ignore/add/remove/force + +# Add or remove newline between 'switch' and '{'. +nl_switch_brace = remove # ignore/add/remove/force + +# Add or remove newline between 'synchronized' and '{'. +nl_synchronized_brace = ignore # ignore/add/remove/force + +# Add a newline between ')' and '{' if the ')' is on a different line than the +# if/for/etc. +# +# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch and +# nl_catch_brace. +nl_multi_line_cond = false # true/false # Force a newline in a define after the macro name for multi-line defines. -nl_multi_line_define = false # false/true +nl_multi_line_define = false # true/false -# Whether to put a newline before 'case' statement -nl_before_case = false # false/true +# Whether to add a newline before 'case', and a blank line before a 'case' +# statement that follows a ';' or '}'. +nl_before_case = false # true/false -# Add or remove newline between ')' and 'throw' -nl_before_throw = ignore # ignore/add/remove/force +# Whether to add a newline after a 'case' statement. +nl_after_case = false # true/false -# Whether to put a newline after 'case' statement -nl_after_case = false # false/true +# Add or remove newline between a case ':' and '{'. +# +# Overrides nl_after_case. +nl_case_colon_brace = ignore # ignore/add/remove/force -# Add or remove a newline between a case ':' and '{'. Overrides nl_after_case. -nl_case_colon_brace = ignore # ignore/add/remove/force +# Add or remove newline between ')' and 'throw'. +nl_before_throw = remove # ignore/add/remove/force -# Newline between namespace and { -nl_namespace_brace = remove # ignore/add/remove/force +# Add or remove newline between 'namespace' and '{'. +nl_namespace_brace = remove # ignore/add/remove/force # Add or remove newline between 'template<>' and whatever follows. -nl_template_class = ignore # ignore/add/remove/force +nl_template_class = ignore # ignore/add/remove/force + +# Add or remove newline between 'class' and '{'. +nl_class_brace = remove # ignore/add/remove/force + +# Add or remove newline before or after (depending on pos_class_comma, +# may not be IGNORE) each',' in the base class list. +nl_class_init_args = remove # ignore/add/remove/force + +# Add or remove newline after each ',' in the constructor member +# initialization. Related to nl_constr_colon, pos_constr_colon and +# pos_constr_comma. +nl_constr_init_args = ignore # ignore/add/remove/force -# Add or remove newline between 'class' and '{' -nl_class_brace = remove # ignore/add/remove/force +# Add or remove newline before first element, after comma, and after last +# element, in 'enum'. +nl_enum_own_lines = ignore # ignore/add/remove/force -# Add or remove newline after each ',' in the constructor member initialization -nl_class_init_args = ignore # ignore/add/remove/force +# Add or remove newline between return type and function name in a function +# definition. +nl_func_type_name = remove # ignore/add/remove/force -# Add or remove newline between return type and function name in a function definition -nl_func_type_name = ignore # ignore/add/remove/force +# Add or remove newline between return type and function name inside a class +# definition. If set to ignore, nl_func_type_name or nl_func_proto_type_name +# is used instead. +nl_func_type_name_class = remove # ignore/add/remove/force -# Add or remove newline between return type and function name inside a class {} -# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore. -nl_func_type_name_class = ignore # ignore/add/remove/force +# Add or remove newline between class specification and '::' +# in 'void A::f() { }'. Only appears in separate member implementation (does +# not appear with in-line implementation). +nl_func_class_scope = ignore # ignore/add/remove/force -# Add or remove newline between function scope and name in a definition -# Controls the newline after '::' in 'void A::f() { }' -nl_func_scope_name = ignore # ignore/add/remove/force +# Add or remove newline between function scope and name, as in +# 'void A :: f() { }'. +nl_func_scope_name = ignore # ignore/add/remove/force -# Add or remove newline between return type and function name in a prototype -nl_func_proto_type_name = ignore # ignore/add/remove/force +# Add or remove newline between return type and function name in a prototype. +nl_func_proto_type_name = remove # ignore/add/remove/force -# Add or remove newline between a function name and the opening '(' -nl_func_paren = remove # ignore/add/remove/force +# Add or remove newline between a function name and the opening '(' in the +# declaration. +nl_func_paren = remove # ignore/add/remove/force -# Add or remove newline between a function name and the opening '(' in the definition -nl_func_def_paren = remove # ignore/add/remove/force +# Overrides nl_func_paren for functions with no parameters. +nl_func_paren_empty = ignore # ignore/add/remove/force -# Add or remove newline after '(' in a function declaration -nl_func_decl_start = ignore # ignore/add/remove/force +# Add or remove newline between a function name and the opening '(' in the +# definition. +nl_func_def_paren = remove # ignore/add/remove/force -# Add or remove newline after '(' in a function definition -nl_func_def_start = ignore # ignore/add/remove/force +# Overrides nl_func_def_paren for functions with no parameters. +nl_func_def_paren_empty = ignore # ignore/add/remove/force + +# Add or remove newline between a function name and the opening '(' in the +# call. +nl_func_call_paren = ignore # ignore/add/remove/force + +# Overrides nl_func_call_paren for functions with no parameters. +nl_func_call_paren_empty = ignore # ignore/add/remove/force + +# Add or remove newline after '(' in a function declaration. +nl_func_decl_start = remove # ignore/add/remove/force + +# Add or remove newline after '(' in a function definition. +nl_func_def_start = remove # ignore/add/remove/force # Overrides nl_func_decl_start when there is only one parameter. -nl_func_decl_start_single = ignore # ignore/add/remove/force +nl_func_decl_start_single = ignore # ignore/add/remove/force # Overrides nl_func_def_start when there is only one parameter. -nl_func_def_start_single = ignore # ignore/add/remove/force +nl_func_def_start_single = ignore # ignore/add/remove/force + +# Whether to add a newline after '(' in a function declaration if '(' and ')' +# are in different lines. If false, nl_func_decl_start is used instead. +nl_func_decl_start_multi_line = false # true/false + +# Whether to add a newline after '(' in a function definition if '(' and ')' +# are in different lines. If false, nl_func_def_start is used instead. +nl_func_def_start_multi_line = false # true/false + +# Add or remove newline after each ',' in a function declaration. +nl_func_decl_args = ignore # ignore/add/remove/force -# Add or remove newline after each ',' in a function declaration -nl_func_decl_args = ignore # ignore/add/remove/force +# Add or remove newline after each ',' in a function definition. +nl_func_def_args = ignore # ignore/add/remove/force -# Add or remove newline after each ',' in a function definition -nl_func_def_args = ignore # ignore/add/remove/force +# Whether to add a newline after each ',' in a function declaration if '(' +# and ')' are in different lines. If false, nl_func_decl_args is used instead. +nl_func_decl_args_multi_line = false # true/false -# Add or remove newline before the ')' in a function declaration -nl_func_decl_end = ignore # ignore/add/remove/force +# Whether to add a newline after each ',' in a function definition if '(' +# and ')' are in different lines. If false, nl_func_def_args is used instead. +nl_func_def_args_multi_line = false # true/false -# Add or remove newline before the ')' in a function definition -nl_func_def_end = ignore # ignore/add/remove/force +# Add or remove newline before the ')' in a function declaration. +nl_func_decl_end = remove # ignore/add/remove/force + +# Add or remove newline before the ')' in a function definition. +nl_func_def_end = remove # ignore/add/remove/force # Overrides nl_func_decl_end when there is only one parameter. -nl_func_decl_end_single = ignore # ignore/add/remove/force +nl_func_decl_end_single = ignore # ignore/add/remove/force # Overrides nl_func_def_end when there is only one parameter. -nl_func_def_end_single = ignore # ignore/add/remove/force +nl_func_def_end_single = ignore # ignore/add/remove/force + +# Whether to add a newline before ')' in a function declaration if '(' and ')' +# are in different lines. If false, nl_func_decl_end is used instead. +nl_func_decl_end_multi_line = false # true/false + +# Whether to add a newline before ')' in a function definition if '(' and ')' +# are in different lines. If false, nl_func_def_end is used instead. +nl_func_def_end_multi_line = false # true/false # Add or remove newline between '()' in a function declaration. -nl_func_decl_empty = ignore # ignore/add/remove/force +nl_func_decl_empty = remove # ignore/add/remove/force # Add or remove newline between '()' in a function definition. -nl_func_def_empty = ignore # ignore/add/remove/force +nl_func_def_empty = remove # ignore/add/remove/force + +# Add or remove newline between '()' in a function call. +nl_func_call_empty = ignore # ignore/add/remove/force + +# Whether to add a newline after '(' in a function call, +# has preference over nl_func_call_start_multi_line. +nl_func_call_start = ignore # ignore/add/remove/force + +# Whether to add a newline after '(' in a function call if '(' and ')' are in +# different lines. +nl_func_call_start_multi_line = false # true/false + +# Whether to add a newline after each ',' in a function call if '(' and ')' +# are in different lines. +nl_func_call_args_multi_line = false # true/false + +# Whether to add a newline before ')' in a function call if '(' and ')' are in +# different lines. +nl_func_call_end_multi_line = false # true/false + +# (OC) Whether to put each Objective-C message parameter on a separate line. +# See nl_oc_msg_leave_one_liner. +nl_oc_msg_args = false # true/false + +# Add or remove newline between function signature and '{'. +nl_fdef_brace = remove # ignore/add/remove/force + +# Add or remove newline between function signature and '{', +# if signature ends with ')'. Overrides nl_fdef_brace. +nl_fdef_brace_cond = ignore # ignore/add/remove/force + +# Add or remove newline between C++11 lambda signature and '{'. +nl_cpp_ldef_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'return' and the return expression. +nl_return_expr = remove # ignore/add/remove/force + +# Whether to add a newline after semicolons, except in 'for' statements. +nl_after_semicolon = false # true/false -# Add or remove newline between function signature and '{' -nl_fdef_brace = remove # ignore/add/remove/force +# (Java) Add or remove newline between the ')' and '{{' of the double brace +# initializer. +nl_paren_dbrace_open = ignore # ignore/add/remove/force -# Whether to put a newline after 'return' statement -nl_after_return = false # false/true +# Whether to add a newline after the type in an unnamed temporary +# direct-list-initialization. +nl_type_brace_init_lst = ignore # ignore/add/remove/force -# Add or remove a newline between the return keyword and return expression. -nl_return_expr = ignore # ignore/add/remove/force +# Whether to add a newline after the open brace in an unnamed temporary +# direct-list-initialization. +nl_type_brace_init_lst_open = ignore # ignore/add/remove/force -# Whether to put a newline after semicolons, except in 'for' statements -nl_after_semicolon = false # false/true +# Whether to add a newline before the close brace in an unnamed temporary +# direct-list-initialization. +nl_type_brace_init_lst_close = ignore # ignore/add/remove/force -# Whether to put a newline after brace open. -# This also adds a newline before the matching brace close. -nl_after_brace_open = false # false/true +# Whether to add a newline after '{'. This also adds a newline before the +# matching '}'. +nl_after_brace_open = false # true/false -# If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is -# placed between the open brace and a trailing single-line comment. -nl_after_brace_open_cmt = false # false/true +# Whether to add a newline between the open brace and a trailing single-line +# comment. Requires nl_after_brace_open=true. +nl_after_brace_open_cmt = false # true/false -# Whether to put a newline after a virtual brace open with a non-empty body. +# Whether to add a newline after a virtual brace open with a non-empty body. # These occur in un-braced if/while/do/for statement bodies. -nl_after_vbrace_open = false # false/true +nl_after_vbrace_open = false # true/false -# Whether to put a newline after a virtual brace open with an empty body. +# Whether to add a newline after a virtual brace open with an empty body. # These occur in un-braced if/while/do/for statement bodies. -nl_after_vbrace_open_empty = false # false/true +nl_after_vbrace_open_empty = false # true/false -# Whether to put a newline after a brace close. -# Does not apply if followed by a necessary ';'. -nl_after_brace_close = false # false/true +# Whether to add a newline after '}'. Does not apply if followed by a +# necessary ';'. +nl_after_brace_close = false # true/false -# Whether to put a newline after a virtual brace close. -# Would add a newline before return in: 'if (foo) a++; return;' -nl_after_vbrace_close = false # false/true +# Whether to add a newline after a virtual brace close, +# as in 'if (foo) a++; return;'. +nl_after_vbrace_close = false # true/false -# Whether to alter newlines in '#define' macros -nl_define_macro = false # false/true +# Add or remove newline between the close brace and identifier, +# as in 'struct { int a; } b;'. Affects enumerations, unions and +# structures. If set to ignore, uses nl_after_brace_close. +nl_brace_struct_var = ignore # ignore/add/remove/force -# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif' -nl_squeeze_ifdef = false # false/true +# Whether to alter newlines in '#define' macros. +nl_define_macro = false # true/false -# Add or remove blank line before 'if' -nl_before_if = ignore # ignore/add/remove/force +# Whether to alter newlines between consecutive parenthesis closes. The number +# of closing parentheses in a line will depend on respective open parenthesis +# lines. +nl_squeeze_paren_close = false # true/false -# Add or remove blank line after 'if' statement -nl_after_if = ignore # ignore/add/remove/force +# Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and +# '#endif'. Does not affect top-level #ifdefs. +nl_squeeze_ifdef = false # true/false -# Add or remove blank line before 'for' -nl_before_for = ignore # ignore/add/remove/force +# Makes the nl_squeeze_ifdef option affect the top-level #ifdefs as well. +nl_squeeze_ifdef_top_level = false # true/false -# Add or remove blank line after 'for' statement -nl_after_for = ignore # ignore/add/remove/force +# Add or remove blank line before 'if'. +nl_before_if = ignore # ignore/add/remove/force -# Add or remove blank line before 'while' -nl_before_while = ignore # ignore/add/remove/force +# Add or remove blank line after 'if' statement. Add/Force work only if the +# next token is not a closing brace. +nl_after_if = ignore # ignore/add/remove/force -# Add or remove blank line after 'while' statement -nl_after_while = ignore # ignore/add/remove/force +# Add or remove blank line before 'for'. +nl_before_for = ignore # ignore/add/remove/force -# Add or remove blank line before 'switch' -nl_before_switch = ignore # ignore/add/remove/force +# Add or remove blank line after 'for' statement. +nl_after_for = ignore # ignore/add/remove/force -# Add or remove blank line after 'switch' statement -nl_after_switch = ignore # ignore/add/remove/force +# Add or remove blank line before 'while'. +nl_before_while = ignore # ignore/add/remove/force -# Add or remove blank line before 'do' -nl_before_do = ignore # ignore/add/remove/force +# Add or remove blank line after 'while' statement. +nl_after_while = ignore # ignore/add/remove/force -# Add or remove blank line after 'do/while' statement -nl_after_do = ignore # ignore/add/remove/force +# Add or remove blank line before 'switch'. +nl_before_switch = ignore # ignore/add/remove/force -# Whether to double-space commented-entries in struct/enum -nl_ds_struct_enum_cmt = false # false/true +# Add or remove blank line after 'switch' statement. +nl_after_switch = ignore # ignore/add/remove/force -# Whether to double-space before the close brace of a struct/union/enum -# (lower priority than 'eat_blanks_before_close_brace') -nl_ds_struct_enum_close_brace = false # false/true +# Add or remove blank line before 'synchronized'. +nl_before_synchronized = ignore # ignore/add/remove/force -# Add or remove a newline around a class colon. -# Related to pos_class_colon, nl_class_init_args, and pos_comma. -nl_class_colon = ignore # ignore/add/remove/force +# Add or remove blank line after 'synchronized' statement. +nl_after_synchronized = ignore # ignore/add/remove/force -# Change simple unbraced if statements into a one-liner -# 'if(b)\n i++;' => 'if(b) i++;' -nl_create_if_one_liner = false # false/true +# Add or remove blank line before 'do'. +nl_before_do = ignore # ignore/add/remove/force -# Change simple unbraced for statements into a one-liner -# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);' -nl_create_for_one_liner = false # false/true +# Add or remove blank line after 'do/while' statement. +nl_after_do = ignore # ignore/add/remove/force -# Change simple unbraced while statements into a one-liner -# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);' -nl_create_while_one_liner = false # false/true +# Whether to put a blank line before 'return' statements, unless after an open +# brace. +nl_before_return = false # true/false -# -# Positioning options -# +# Whether to put a blank line after 'return' statements, unless followed by a +# close brace. +nl_after_return = false # true/false + +# Whether to double-space commented-entries in 'struct'/'union'/'enum'. +nl_ds_struct_enum_cmt = false # true/false + +# Whether to force a newline before '}' of a 'struct'/'union'/'enum'. +# (Lower priority than eat_blanks_before_close_brace.) +nl_ds_struct_enum_close_brace = false # true/false + +# Add or remove newline before or after (depending on pos_class_colon) a class +# colon, as in 'class Foo : public Bar'. +nl_class_colon = ignore # ignore/add/remove/force + +# Add or remove newline around a class constructor colon. The exact position +# depends on nl_constr_init_args, pos_constr_colon and pos_constr_comma. +nl_constr_colon = ignore # ignore/add/remove/force -# The position of arithmetic operators in wrapped expressions -pos_arith = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to collapse a two-line namespace, like 'namespace foo\n{ decl; }' +# into a single line. If true, prevents other brace newline rules from turning +# such code into four lines. +nl_namespace_two_to_one_liner = false # true/false -# The position of assignment in wrapped expressions. -# Do not affect '=' followed by '{' -pos_assign = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to remove a newline in simple unbraced if statements, turning them +# into one-liners, as in 'if(b)\n i++;' => 'if(b) i++;'. +nl_create_if_one_liner = false # true/false -# The position of boolean operators in wrapped expressions -pos_bool = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to remove a newline in simple unbraced for statements, turning them +# into one-liners, as in 'for (...)\n stmt;' => 'for (...) stmt;'. +nl_create_for_one_liner = false # true/false -# The position of comparison operators in wrapped expressions -pos_compare = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to remove a newline in simple unbraced while statements, turning +# them into one-liners, as in 'while (expr)\n stmt;' => 'while (expr) stmt;'. +nl_create_while_one_liner = false # true/false -# The position of conditional (b ? t : f) operators in wrapped expressions -pos_conditional = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to collapse a function definition whose body (not counting braces) +# is only one line so that the entire definition (prototype, braces, body) is +# a single line. +nl_create_func_def_one_liner = false # true/false -# The position of the comma in wrapped expressions -pos_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to split one-line simple unbraced if statements into two lines by +# adding a newline, as in 'if(b) i++;'. +nl_split_if_one_liner = false # true/false -# The position of the comma in the constructor initialization list -pos_class_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to split one-line simple unbraced for statements into two lines by +# adding a newline, as in 'for (...) stmt;'. +nl_split_for_one_liner = false # true/false -# The position of colons between constructor and member initialization -pos_class_colon = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +# Whether to split one-line simple unbraced while statements into two lines by +# adding a newline, as in 'while (expr) stmt;'. +nl_split_while_one_liner = false # true/false # -# Line Splitting options +# Blank line options # -# Try to limit code width to N number of columns -code_width = 0 # number +# The maximum number of consecutive newlines (3 = 2 blank lines). +nl_max = 0 # unsigned number + +# The maximum number of consecutive newlines in a function. +nl_max_blank_in_func = 0 # unsigned number + +# The number of newlines before a function prototype. +nl_before_func_body_proto = 0 # unsigned number + +# The number of newlines before a multi-line function definition. +nl_before_func_body_def = 0 # unsigned number + +# The number of newlines before a class constructor/destructor prototype. +nl_before_func_class_proto = 0 # unsigned number + +# The number of newlines before a class constructor/destructor definition. +nl_before_func_class_def = 0 # unsigned number + +# The number of newlines after a function prototype. +nl_after_func_proto = 0 # unsigned number -# Whether to fully split long 'for' statements at semi-colons -ls_for_split_full = false # false/true +# The number of newlines after a function prototype, if not followed by +# another function prototype. +nl_after_func_proto_group = 2 # unsigned number -# Whether to fully split long function protos/calls at commas -ls_func_split_full = false # false/true +# The number of newlines after a class constructor/destructor prototype. +nl_after_func_class_proto = 0 # unsigned number +# The number of newlines after a class constructor/destructor prototype, +# if not followed by another constructor/destructor prototype. +nl_after_func_class_proto_group = 0 # unsigned number + +# Whether one-line method definitions inside a class body should be treated +# as if they were prototypes for the purposes of adding newlines. # -# Blank line options +# Requires nl_class_leave_one_liners=true. Overrides nl_before_func_body_def +# and nl_before_func_class_def for one-liners. +nl_class_leave_one_liner_groups = false # true/false + +# The number of newlines after '}' of a multi-line function body. +nl_after_func_body = 2 # unsigned number + +# The number of newlines after '}' of a multi-line function body in a class +# declaration. Also affects class constructors/destructors. # +# Overrides nl_after_func_body. +nl_after_func_body_class = 2 # unsigned number -# The maximum consecutive newlines -nl_max = 0 # number +# The number of newlines after '}' of a single line function body. Also +# affects class constructors/destructors. +# +# Overrides nl_after_func_body and nl_after_func_body_class. +nl_after_func_body_one_liner = 0 # unsigned number -# The number of newlines after a function prototype, if followed by another function prototype -nl_after_func_proto = 0 # number +# The number of blank lines after a block of variable definitions at the top +# of a function body. +# +# 0 = No change (default). +nl_func_var_def_blk = 0 # unsigned number -# The number of newlines after a function prototype, if not followed by another function prototype -nl_after_func_proto_group = 0 # number +# The number of newlines before a block of typedefs. If nl_after_access_spec +# is non-zero, that option takes precedence. +# +# 0 = No change (default). +nl_typedef_blk_start = 0 # unsigned number -# The number of newlines after '}' of a multi-line function body -nl_after_func_body = 0 # number +# The number of newlines after a block of typedefs. +# +# 0 = No change (default). +nl_typedef_blk_end = 0 # unsigned number -# The number of newlines after '}' of a multi-line function body in a class declaration -nl_after_func_body_class = 0 # number +# The maximum number of consecutive newlines within a block of typedefs. +# +# 0 = No change (default). +nl_typedef_blk_in = 0 # unsigned number + +# The number of newlines before a block of variable definitions not at the top +# of a function body. If nl_after_access_spec is non-zero, that option takes +# precedence. +# +# 0 = No change (default). +nl_var_def_blk_start = 0 # unsigned number -# The number of newlines after '}' of a single line function body -nl_after_func_body_one_liner = 0 # number +# The number of newlines after a block of variable definitions not at the top +# of a function body. +# +# 0 = No change (default). +nl_var_def_blk_end = 0 # unsigned number + +# The maximum number of consecutive newlines within a block of variable +# definitions. +# +# 0 = No change (default). +nl_var_def_blk_in = 0 # unsigned number # The minimum number of newlines before a multi-line comment. # Doesn't apply if after a brace open or another multi-line comment. -nl_before_block_comment = 0 # number +nl_before_block_comment = 0 # unsigned number # The minimum number of newlines before a single-line C comment. # Doesn't apply if after a brace open or other single-line C comments. -nl_before_c_comment = 0 # number +nl_before_c_comment = 0 # unsigned number # The minimum number of newlines before a CPP comment. # Doesn't apply if after a brace open or other CPP comments. -nl_before_cpp_comment = 0 # number +nl_before_cpp_comment = 0 # unsigned number # Whether to force a newline after a multi-line comment. -nl_after_multiline_comment = false # false/true +nl_after_multiline_comment = false # true/false -# The number of newlines after '}' or ';' of a struct/enum/union definition -nl_after_struct = 0 # number +# Whether to force a newline after a label's colon. +nl_after_label_colon = false # true/false -# The number of newlines after '}' or ';' of a class definition -nl_after_class = 0 # number +# The number of newlines after '}' or ';' of a struct/enum/union definition. +nl_after_struct = 0 # unsigned number -# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. -# Will not change the newline count if after a brace open. -# 0 = No change. -nl_before_access_spec = 0 # number +# The number of newlines before a class definition. +nl_before_class = 0 # unsigned number -# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. -# 0 = No change. -nl_after_access_spec = 0 # number +# The number of newlines after '}' or ';' of a class definition. +nl_after_class = 0 # unsigned number -# The number of newlines between a function def and the function comment. -# 0 = No change. -nl_comment_func_def = 0 # number +# The number of newlines before an access specifier label. This also includes +# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count +# if after a brace open. +# +# 0 = No change (default). +nl_before_access_spec = 0 # unsigned number -# The number of newlines after a try-catch-finally block that isn't followed by a brace close. -# 0 = No change. -nl_after_try_catch_finally = 0 # number +# The number of newlines after an access specifier label. This also includes +# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count +# if after a brace open. +# +# 0 = No change (default). +# +# Overrides nl_typedef_blk_start and nl_var_def_blk_start. +nl_after_access_spec = 0 # unsigned number -# The number of newlines before and after a property, indexer or event decl. -# 0 = No change. -nl_around_cs_property = 0 # number +# The number of newlines between a function definition and the function +# comment, as in '// comment\n void foo() {...}'. +# +# 0 = No change (default). +nl_comment_func_def = 0 # unsigned number -# The number of newlines between the get/set/add/remove handlers in C#. -# 0 = No change. -nl_between_get_set = 0 # number +# The number of newlines after a try-catch-finally block that isn't followed +# by a brace close. +# +# 0 = No change (default). +nl_after_try_catch_finally = 0 # unsigned number -# Add or remove newline between C# property and the '{' -nl_property_brace = ignore # ignore/add/remove/force +# (C#) The number of newlines before and after a property, indexer or event +# declaration. +# +# 0 = No change (default). +nl_around_cs_property = 0 # unsigned number -# Whether to remove blank lines after '{' -eat_blanks_after_open_brace = true # false/true +# (C#) The number of newlines between the get/set/add/remove handlers. +# +# 0 = No change (default). +nl_between_get_set = 0 # unsigned number -# Whether to remove blank lines before '}' -eat_blanks_before_close_brace = true # false/true +# (C#) Add or remove newline between property and the '{'. +nl_property_brace = ignore # ignore/add/remove/force +# The number of newlines after '{' of a namespace. This also adds newlines +# before the matching '}'. # -# Code modifying options (non-whitespace) +# 0 = Apply eat_blanks_after_open_brace or eat_blanks_before_close_brace if +# applicable, otherwise no change. # +# Overrides eat_blanks_after_open_brace and eat_blanks_before_close_brace. +nl_inside_namespace = 0 # unsigned number -# Add or remove braces on single-line 'do' statement -mod_full_brace_do = ignore # ignore/add/remove/force +# Whether to remove blank lines after '{'. +eat_blanks_after_open_brace = false # true/false -# Add or remove braces on single-line 'for' statement -mod_full_brace_for = ignore # ignore/add/remove/force +# Whether to remove blank lines before '}'. +eat_blanks_before_close_brace = false # true/false -# Add or remove braces on single-line function definitions. (Pawn) -mod_full_brace_function = ignore # ignore/add/remove/force +# How aggressively to remove extra newlines not in preprocessor. +# +# 0: No change (default) +# 1: Remove most newlines not handled by other config +# 2: Remove all newlines and reformat completely by config +nl_remove_extra_newlines = 0 # unsigned number -# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. -mod_full_brace_if = ignore # ignore/add/remove/force +# (Java) Add or remove newline after an annotation statement. Only affects +# annotations that are after a newline. +nl_after_annotation = ignore # ignore/add/remove/force -# Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. -# If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. -mod_full_brace_if_chain = false # false/true +# (Java) Add or remove newline between two annotations. +nl_between_annotation = ignore # ignore/add/remove/force -# Don't remove braces around statements that span N newlines -mod_full_brace_nl = 0 # number +# +# Positioning options +# + +# The position of arithmetic operators in wrapped expressions. +pos_arith = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of assignment in wrapped expressions. Do not affect '=' +# followed by '{'. +pos_assign = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of Boolean operators in wrapped expressions. +pos_bool = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of comparison operators in wrapped expressions. +pos_compare = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of conditional operators, as in the '?' and ':' of +# 'expr ? stmt : stmt', in wrapped expressions. +pos_conditional = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in wrapped expressions. +pos_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in enum entries. +pos_enum_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in the base class list if there is more than one +# line. Affects nl_class_init_args. +pos_class_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of the comma in the constructor initialization list. +# Related to nl_constr_colon, nl_constr_init_args and pos_constr_colon. +pos_constr_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of trailing/leading class colon, between class and base class +# list. Affects nl_class_colon. +pos_class_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# The position of colons between constructor and member initialization. +# Related to nl_constr_colon, nl_constr_init_args and pos_constr_comma. +pos_constr_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force + +# +# Line splitting options +# + +# Try to limit code width to N columns. +code_width = 0 # unsigned number + +# Whether to fully split long 'for' statements at semi-colons. +ls_for_split_full = false # true/false + +# Whether to fully split long function prototypes/calls at commas. +# The option ls_code_width has priority over the option ls_func_split_full. +ls_func_split_full = false # true/false + +# Whether to split lines as close to code_width as possible and ignore some +# groupings. +# The option ls_code_width has priority over the option ls_func_split_full. +ls_code_width = false # true/false + +# +# Code alignment options (not left column spaces/tabs) +# + +# Whether to keep non-indenting tabs. +align_keep_tabs = false # true/false + +# Whether to use tabs for aligning. +align_with_tabs = false # true/false + +# Whether to bump out to the next tab when aligning. +align_on_tabstop = false # true/false + +# Whether to right-align numbers. +align_number_right = false # true/false + +# Whether to keep whitespace not required for alignment. +align_keep_extra_space = true # true/false + +# Whether to align variable definitions in prototypes and functions. +align_func_params = false # true/false + +# The span for aligning parameter definitions in function on parameter name. +# +# 0 = Don't align (default). +align_func_params_span = 0 # unsigned number + +# The threshold for aligning function parameter definitions. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_func_params_thresh = 0 # number + +# The gap for aligning function parameter definitions. +align_func_params_gap = 0 # unsigned number + +# The span for aligning constructor value. +# +# 0 = Don't align (default). +align_constr_value_span = 0 # unsigned number + +# The threshold for aligning constructor value. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_constr_value_thresh = 0 # number + +# The gap for aligning constructor value. +align_constr_value_gap = 0 # unsigned number + +# Whether to align parameters in single-line functions that have the same +# name. The function names must already be aligned with each other. +align_same_func_call_params = false # true/false + +# The span for aligning function-call parameters for single line functions. +# +# 0 = Don't align (default). +align_same_func_call_params_span = 0 # unsigned number + +# The threshold for aligning function-call parameters for single line +# functions. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_same_func_call_params_thresh = 0 # number + +# The span for aligning variable definitions. +# +# 0 = Don't align (default). +align_var_def_span = 0 # unsigned number + +# How to consider (or treat) the '*' in the alignment of variable definitions. +# +# 0: Part of the type 'void * foo;' (default) +# 1: Part of the variable 'void *foo;' +# 2: Dangling 'void *foo;' +# Dangling: the '*' will not be taken into account when aligning. +align_var_def_star_style = 0 # unsigned number + +# How to consider (or treat) the '&' in the alignment of variable definitions. +# +# 0: Part of the type 'long & foo;' (default) +# 1: Part of the variable 'long &foo;' +# 2: Dangling 'long &foo;' +# Dangling: the '&' will not be taken into account when aligning. +align_var_def_amp_style = 0 # unsigned number + +# The threshold for aligning variable definitions. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_var_def_thresh = 0 # number + +# The gap for aligning variable definitions. +align_var_def_gap = 0 # unsigned number + +# Whether to align the colon in struct bit fields. +align_var_def_colon = false # true/false + +# The gap for aligning the colon in struct bit fields. +align_var_def_colon_gap = 0 # unsigned number + +# Whether to align any attribute after the variable name. +align_var_def_attribute = false # true/false + +# Whether to align inline struct/enum/union variable definitions. +align_var_def_inline = false # true/false + +# The span for aligning on '=' in assignments. +# +# 0 = Don't align (default). +align_assign_span = 0 # unsigned number + +# The span for aligning on '=' in function prototype modifier. +# +# 0 = Don't align (default). +align_assign_func_proto_span = 0 # unsigned number + +# The threshold for aligning on '=' in assignments. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_assign_thresh = 0 # number + +# How to apply align_assign_span to function declaration "assignments", i.e. +# 'virtual void foo() = 0' or '~foo() = {default|delete}'. +# +# 0: Align with other assignments (default) +# 1: Align with each other, ignoring regular assignments +# 2: Don't align +align_assign_decl_func = 0 # unsigned number + +# The span for aligning on '=' in enums. +# +# 0 = Don't align (default). +align_enum_equ_span = 0 # unsigned number + +# The threshold for aligning on '=' in enums. +# Use a negative number for absolute thresholds. +# +# 0 = no limit (default). +align_enum_equ_thresh = 0 # number + +# The span for aligning class member definitions. +# +# 0 = Don't align (default). +align_var_class_span = 0 # unsigned number + +# The threshold for aligning class member definitions. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_var_class_thresh = 0 # number + +# The gap for aligning class member definitions. +align_var_class_gap = 0 # unsigned number + +# The span for aligning struct/union member definitions. +# +# 0 = Don't align (default). +align_var_struct_span = 0 # unsigned number + +# The threshold for aligning struct/union member definitions. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_var_struct_thresh = 0 # number + +# The gap for aligning struct/union member definitions. +align_var_struct_gap = 0 # unsigned number + +# The span for aligning struct initializer values. +# +# 0 = Don't align (default). +align_struct_init_span = 0 # unsigned number + +# The span for aligning single-line typedefs. +# +# 0 = Don't align (default). +align_typedef_span = 0 # unsigned number + +# The minimum space between the type and the synonym of a typedef. +align_typedef_gap = 0 # unsigned number + +# How to align typedef'd functions with other typedefs. +# +# 0: Don't mix them at all (default) +# 1: Align the open parenthesis with the types +# 2: Align the function type name with the other type names +align_typedef_func = 0 # unsigned number + +# How to consider (or treat) the '*' in the alignment of typedefs. +# +# 0: Part of the typedef type, 'typedef int * pint;' (default) +# 1: Part of type name: 'typedef int *pint;' +# 2: Dangling: 'typedef int *pint;' +# Dangling: the '*' will not be taken into account when aligning. +align_typedef_star_style = 0 # unsigned number + +# How to consider (or treat) the '&' in the alignment of typedefs. +# +# 0: Part of the typedef type, 'typedef int & intref;' (default) +# 1: Part of type name: 'typedef int &intref;' +# 2: Dangling: 'typedef int &intref;' +# Dangling: the '&' will not be taken into account when aligning. +align_typedef_amp_style = 0 # unsigned number + +# The span for aligning comments that end lines. +# +# 0 = Don't align (default). +align_right_cmt_span = 0 # unsigned number -# Add or remove braces on single-line 'while' statement -mod_full_brace_while = ignore # ignore/add/remove/force +# Minimum number of columns between preceding text and a trailing comment in +# order for the comment to qualify for being aligned. Must be non-zero to have +# an effect. +align_right_cmt_gap = 0 # unsigned number -# Add or remove braces on single-line 'using ()' statement -mod_full_brace_using = ignore # ignore/add/remove/force +# If aligning comments, whether to mix with comments after '}' and #endif with +# less than three spaces before the comment. +align_right_cmt_mix = false # true/false -# Add or remove unnecessary paren on 'return' statement -mod_paren_on_return = ignore # ignore/add/remove/force +# Whether to only align trailing comments that are at the same brace level. +align_right_cmt_same_level = false # true/false -# Whether to change optional semicolons to real semicolons -mod_pawn_semicolon = false # false/true +# Minimum column at which to align trailing comments. Comments which are +# aligned beyond this column, but which can be aligned in a lesser column, +# may be "pulled in". +# +# 0 = Ignore (default). +align_right_cmt_at_col = 0 # unsigned number -# Add parens on 'while' and 'if' statement around bools -mod_full_paren_if_bool = false # false/true +# The span for aligning function prototypes. +# +# 0 = Don't align (default). +align_func_proto_span = 0 # unsigned number -# Whether to remove superfluous semicolons -mod_remove_extra_semicolon = false # false/true +# The threshold for aligning function prototypes. +# Use a negative number for absolute thresholds. +# +# 0 = No limit (default). +align_func_proto_thresh = 0 # number -# If a function body exceeds the specified number of newlines and doesn't have a comment after -# the close brace, a comment will be added. -mod_add_long_function_closebrace_comment = 0 # number +# Minimum gap between the return type and the function name. +align_func_proto_gap = 0 # unsigned number -# If a switch body exceeds the specified number of newlines and doesn't have a comment after -# the close brace, a comment will be added. -mod_add_long_switch_closebrace_comment = 0 # number +# Whether to align function prototypes on the 'operator' keyword instead of +# what follows. +align_on_operator = false # true/false -# If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after -# the #endif, a comment will be added. -mod_add_long_ifdef_endif_comment = 0 # number +# Whether to mix aligning prototype and variable declarations. If true, +# align_var_def_XXX options are used instead of align_func_proto_XXX options. +align_mix_var_proto = false # true/false -# If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after -# the #else, a comment will be added. -mod_add_long_ifdef_else_comment = 0 # number +# Whether to align single-line functions with function prototypes. +# Uses align_func_proto_span. +align_single_line_func = false # true/false -# If TRUE, will sort consecutive single-line 'import' statements [Java, D] -mod_sort_import = false # false/true +# Whether to align the open brace of single-line functions. +# Requires align_single_line_func=true. Uses align_func_proto_span. +align_single_line_brace = false # true/false -# If TRUE, will sort consecutive single-line 'using' statements [C#] -mod_sort_using = false # false/true +# Gap for align_single_line_brace. +align_single_line_brace_gap = 0 # unsigned number -# If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C] -# This is generally a bad idea, as it may break your code. -mod_sort_include = false # false/true +# (OC) The span for aligning Objective-C message specifications. +# +# 0 = Don't align (default). +align_oc_msg_spec_span = 0 # unsigned number -# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace. -mod_move_case_break = false # false/true +# Whether to align macros wrapped with a backslash and a newline. This will +# not work right if the macro contains a multi-line comment. +align_nl_cont = false # true/false -# Will add or remove the braces around a fully braced case statement. -# Will only remove the braces if there are no variable declarations in the block. -mod_case_brace = ignore # ignore/add/remove/force +# Whether to align macro functions and variables together. +align_pp_define_together = false # true/false -# If TRUE, it will remove a void 'return;' that appears as the last statement in a function. -mod_remove_empty_return = false # false/true +# The span for aligning on '#define' bodies. +# +# =0: Don't align (default) +# >0: Number of lines (including comments) between blocks +align_pp_define_span = 0 # unsigned number +# The minimum space between label and value of a preprocessor define. +align_pp_define_gap = 0 # unsigned number + +# Whether to align lines that start with '<<' with previous '<<'. # -# Comment modifications +# Default: true +align_left_shift = true # true/false + +# Whether to align text after 'asm volatile ()' colons. +align_asm_colon = false # true/false + +# (OC) Span for aligning parameters in an Objective-C message call +# on the ':'. # +# 0 = Don't align. +align_oc_msg_colon_span = 0 # unsigned number -# Try to wrap comments at cmt_width columns -cmt_width = 0 # number +# (OC) Whether to always align with the first parameter, even if it is too +# short. +align_oc_msg_colon_first = false # true/false -# Set the comment reflow mode (default: 0) -# 0: no reflowing (apart from the line wrapping due to cmt_width) -# 1: no touching at all -# 2: full reflow -cmt_reflow_mode = 0 # number +# (OC) Whether to align parameters in an Objective-C '+' or '-' declaration +# on the ':'. +align_oc_decl_colon = false # true/false -# If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars. -# Default is true. -cmt_indent_multi = true # false/true +# +# Comment modification options +# -# Whether to group c-comments that look like they are in a block -cmt_c_group = false # false/true +# Try to wrap comments at N columns. +cmt_width = 0 # unsigned number -# Whether to put an empty '/*' on the first line of the combined c-comment -cmt_c_nl_start = false # false/true +# How to reflow comments. +# +# 0: No reflowing (apart from the line wrapping due to cmt_width) (default) +# 1: No touching at all +# 2: Full reflow +cmt_reflow_mode = 0 # unsigned number -# Whether to put a newline before the closing '*/' of the combined c-comment -cmt_c_nl_end = false # false/true +# Whether to convert all tabs to spaces in comments. If false, tabs in +# comments are left alone, unless used for indenting. +cmt_convert_tab_to_spaces = false # true/false -# Whether to group cpp-comments that look like they are in a block -cmt_cpp_group = false # false/true +# Whether to apply changes to multi-line comments, including cmt_width, +# keyword substitution and leading chars. +# +# Default: true +cmt_indent_multi = true # true/false + +# Whether to group c-comments that look like they are in a block. +cmt_c_group = false # true/false + +# Whether to put an empty '/*' on the first line of the combined c-comment. +cmt_c_nl_start = false # true/false + +# Whether to add a newline before the closing '*/' of the combined c-comment. +cmt_c_nl_end = false # true/false + +# Whether to change cpp-comments into c-comments. +cmt_cpp_to_c = false # true/false + +# Whether to group cpp-comments that look like they are in a block. Only +# meaningful if cmt_cpp_to_c=true. +cmt_cpp_group = false # true/false # Whether to put an empty '/*' on the first line of the combined cpp-comment -cmt_cpp_nl_start = false # false/true +# when converting to a c-comment. +# +# Requires cmt_cpp_to_c=true and cmt_cpp_group=true. +cmt_cpp_nl_start = false # true/false + +# Whether to add a newline before the closing '*/' of the combined cpp-comment +# when converting to a c-comment. +# +# Requires cmt_cpp_to_c=true and cmt_cpp_group=true. +cmt_cpp_nl_end = false # true/false + +# Whether to put a star on subsequent comment lines. +cmt_star_cont = false # true/false + +# The number of spaces to insert at the start of subsequent comment lines. +cmt_sp_before_star_cont = 0 # unsigned number + +# The number of spaces to insert after the star on subsequent comment lines. +cmt_sp_after_star_cont = 0 # unsigned number + +# For multi-line comments with a '*' lead, remove leading spaces if the first +# and last lines of the comment are the same length. +# +# Default: true +cmt_multi_check_last = true # true/false + +# For multi-line comments with a '*' lead, remove leading spaces if the first +# and last lines of the comment are the same length AND if the length is +# bigger as the first_len minimum. +# +# Default: 4 +cmt_multi_first_len_minimum = 4 # unsigned number + +# Path to a file that contains text to insert at the beginning of a file if +# the file doesn't start with a C/C++ comment. If the inserted text contains +# '$(filename)', that will be replaced with the current file's name. +cmt_insert_file_header = "" # string + +# Path to a file that contains text to insert at the end of a file if the +# file doesn't end with a C/C++ comment. If the inserted text contains +# '$(filename)', that will be replaced with the current file's name. +cmt_insert_file_footer = "" # string + +# Path to a file that contains text to insert before a function definition if +# the function isn't preceded by a C/C++ comment. If the inserted text +# contains '$(function)', '$(javaparam)' or '$(fclass)', these will be +# replaced with, respectively, the name of the function, the javadoc '@param' +# and '@return' stuff, or the name of the class to which the member function +# belongs. +cmt_insert_func_header = "" # string + +# Path to a file that contains text to insert before a class if the class +# isn't preceded by a C/C++ comment. If the inserted text contains '$(class)', +# that will be replaced with the class name. +cmt_insert_class_header = "" # string + +# Path to a file that contains text to insert before an Objective-C message +# specification, if the method isn't preceded by a C/C++ comment. If the +# inserted text contains '$(message)' or '$(javaparam)', these will be +# replaced with, respectively, the name of the function, or the javadoc +# '@param' and '@return' stuff. +cmt_insert_oc_msg_header = "" # string + +# Whether a comment should be inserted if a preprocessor is encountered when +# stepping backwards from a function name. +# +# Applies to cmt_insert_oc_msg_header, cmt_insert_func_header and +# cmt_insert_class_header. +cmt_insert_before_preproc = false # true/false -# Whether to put a newline before the closing '*/' of the combined cpp-comment -cmt_cpp_nl_end = false # false/true +# Whether a comment should be inserted if a function is declared inline to a +# class definition. +# +# Applies to cmt_insert_func_header. +# +# Default: true +cmt_insert_before_inlines = true # true/false -# Whether to change cpp-comments into c-comments -cmt_cpp_to_c = false # false/true +# Whether a comment should be inserted if the function is a class constructor +# or destructor. +# +# Applies to cmt_insert_func_header. +cmt_insert_before_ctor_dtor = false # true/false -# Whether to put a star on subsequent comment lines -cmt_star_cont = false # false/true +# +# Code modifying options (non-whitespace) +# -# The number of spaces to insert at the start of subsequent comment lines -cmt_sp_before_star_cont = 0 # number +# Add or remove braces on a single-line 'do' statement. +mod_full_brace_do = ignore # ignore/add/remove/force -# The number of spaces to insert after the star on subsequent comment lines -cmt_sp_after_star_cont = 0 # number +# Add or remove braces on a single-line 'for' statement. +mod_full_brace_for = ignore # ignore/add/remove/force -# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of -# the comment are the same length. Default=True -cmt_multi_check_last = true # false/true +# (Pawn) Add or remove braces on a single-line function definition. +mod_full_brace_function = ignore # ignore/add/remove/force -# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment. -# Will substitute $(filename) with the current file's name. -cmt_insert_file_header = "" # string +# Add or remove braces on a single-line 'if' statement. Braces will not be +# removed if the braced statement contains an 'else'. +mod_full_brace_if = ignore # ignore/add/remove/force -# The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment. -# Will substitute $(filename) with the current file's name. -cmt_insert_file_footer = "" # string +# Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either +# have, or do not have, braces. If true, braces will be added if any block +# needs braces, and will only be removed if they can be removed from all +# blocks. +# +# Overrides mod_full_brace_if. +mod_full_brace_if_chain = false # true/false -# The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment. -# Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff. -# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... } -cmt_insert_func_header = "" # string +# Whether to add braces to all blocks of an 'if'/'else if'/'else' chain. +# If true, mod_full_brace_if_chain will only remove braces from an 'if' that +# does not have an 'else if' or 'else'. +mod_full_brace_if_chain_only = false # true/false -# The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment. -# Will substitute $(class) with the class name. -cmt_insert_class_header = "" # string +# Add or remove braces on single-line 'while' statement. +mod_full_brace_while = ignore # ignore/add/remove/force -# The filename that contains text to insert before a Obj-C message specification if the method isn't preceeded with a C/C++ comment. -# Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff. -cmt_insert_oc_msg_header = "" # string +# Add or remove braces on single-line 'using ()' statement. +mod_full_brace_using = ignore # ignore/add/remove/force -# If a preprocessor is encountered when stepping backwards from a function name, then -# this option decides whether the comment should be inserted. -# Affects cmt_insert_oc_msg_header, cmt_insert_func_header and cmt_insert_class_header. -cmt_insert_before_preproc = false # false/true +# Don't remove braces around statements that span N newlines +mod_full_brace_nl = 0 # unsigned number + +# Whether to prevent removal of braces from 'if'/'for'/'while'/etc. blocks +# which span multiple lines. +# +# Affects: +# mod_full_brace_for +# mod_full_brace_if +# mod_full_brace_if_chain +# mod_full_brace_if_chain_only +# mod_full_brace_while +# mod_full_brace_using +# +# Does not affect: +# mod_full_brace_do +# mod_full_brace_function +mod_full_brace_nl_block_rem_mlcond = false # true/false + +# Add or remove unnecessary parenthesis on 'return' statement. +mod_paren_on_return = ignore # ignore/add/remove/force + +# (Pawn) Whether to change optional semicolons to real semicolons. +mod_pawn_semicolon = false # true/false + +# Whether to fully parenthesize Boolean expressions in 'while' and 'if' +# statement, as in 'if (a && b > c)' => 'if (a && (b > c))'. +mod_full_paren_if_bool = false # true/false + +# Whether to remove superfluous semicolons. +mod_remove_extra_semicolon = false # true/false + +# If a function body exceeds the specified number of newlines and doesn't have +# a comment after the close brace, a comment will be added. +mod_add_long_function_closebrace_comment = 0 # unsigned number + +# If a namespace body exceeds the specified number of newlines and doesn't +# have a comment after the close brace, a comment will be added. +mod_add_long_namespace_closebrace_comment = 0 # unsigned number + +# If a class body exceeds the specified number of newlines and doesn't have a +# comment after the close brace, a comment will be added. +mod_add_long_class_closebrace_comment = 0 # unsigned number + +# If a switch body exceeds the specified number of newlines and doesn't have a +# comment after the close brace, a comment will be added. +mod_add_long_switch_closebrace_comment = 0 # unsigned number + +# If an #ifdef body exceeds the specified number of newlines and doesn't have +# a comment after the #endif, a comment will be added. +mod_add_long_ifdef_endif_comment = 0 # unsigned number + +# If an #ifdef or #else body exceeds the specified number of newlines and +# doesn't have a comment after the #else, a comment will be added. +mod_add_long_ifdef_else_comment = 0 # unsigned number + +# Whether to sort consecutive single-line 'import' statements. +mod_sort_import = false # true/false + +# (C#) Whether to sort consecutive single-line 'using' statements. +mod_sort_using = false # true/false + +# Whether to sort consecutive single-line '#include' statements (C/C++) and +# '#import' statements (Objective-C). Be aware that this has the potential to +# break your code if your includes/imports have ordering dependencies. +mod_sort_include = false # true/false + +# Whether to move a 'break' that appears after a fully braced 'case' before +# the close brace, as in 'case X: { ... } break;' => 'case X: { ... break; }'. +mod_move_case_break = false # true/false + +# Add or remove braces around a fully braced case statement. Will only remove +# braces if there are no variable declarations in the block. +mod_case_brace = ignore # ignore/add/remove/force + +# Whether to remove a void 'return;' that appears as the last statement in a +# function. +mod_remove_empty_return = false # true/false + +# Add or remove the comma after the last value of an enumeration. +mod_enum_last_comma = ignore # ignore/add/remove/force + +# (OC) Whether to organize the properties. If true, properties will be +# rearranged according to the mod_sort_oc_property_*_weight factors. +mod_sort_oc_properties = false # true/false + +# (OC) Weight of a class property modifier. +mod_sort_oc_property_class_weight = 0 # number + +# (OC) Weight of 'atomic' and 'nonatomic'. +mod_sort_oc_property_thread_safe_weight = 0 # number + +# (OC) Weight of 'readwrite' when organizing properties. +mod_sort_oc_property_readwrite_weight = 0 # number + +# (OC) Weight of a reference type specifier ('retain', 'copy', 'assign', +# 'weak', 'strong') when organizing properties. +mod_sort_oc_property_reference_weight = 0 # number + +# (OC) Weight of getter type ('getter=') when organizing properties. +mod_sort_oc_property_getter_weight = 0 # number + +# (OC) Weight of setter type ('setter=') when organizing properties. +mod_sort_oc_property_setter_weight = 0 # number + +# (OC) Weight of nullability type ('nullable', 'nonnull', 'null_unspecified', +# 'null_resettable') when organizing properties. +mod_sort_oc_property_nullability_weight = 0 # number # # Preprocessor options # -# Control indent of preprocessors inside #if blocks at brace level 0 -pp_indent = ignore # ignore/add/remove/force +# Add or remove indentation of preprocessor directives inside #if blocks +# at brace level 0 (file-level). +pp_indent = ignore # ignore/add/remove/force + +# Whether to indent #if/#else/#endif at the brace level. If false, these are +# indented from column 1. +pp_indent_at_level = false # true/false -# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false) -pp_indent_at_level = false # false/true +# Specifies the number of columns to indent preprocessors per level +# at brace level 0 (file-level). If pp_indent_at_level=false, also specifies +# the number of columns to indent preprocessors per level +# at brace level > 0 (function-level). +# +# Default: 1 +pp_indent_count = 1 # unsigned number -# If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1. -pp_indent_count = 1 # number +# Add or remove space after # based on pp_level of #if blocks. +pp_space = ignore # ignore/add/remove/force -# Add or remove space after # based on pp_level of #if blocks -pp_space = ignore # ignore/add/remove/force +# Sets the number of spaces per level added with pp_space. +pp_space_count = 0 # unsigned number -# Sets the number of spaces added with pp_space -pp_space_count = 0 # number +# The indent for '#region' and '#endregion' in C# and '#pragma region' in +# C/C++. Negative values decrease indent down to the first column. +pp_indent_region = 0 # number -# The indent for #region and #endregion in C# and '#pragma region' in C/C++ -pp_indent_region = 0 # number +# Whether to indent the code between #region and #endregion. +pp_region_indent_code = false # true/false -# Whether to indent the code between #region and #endregion -pp_region_indent_code = false # false/true +# If pp_indent_at_level=true, sets the indent for #if, #else and #endif when +# not at file-level. Negative values decrease indent down to the first column. +# +# =0: Indent preprocessors using output_tab_size +# >0: Column at which all preprocessors will be indented +pp_indent_if = 0 # number -# If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level -pp_indent_if = 0 # number +# Whether to indent the code between #if, #else and #endif. +pp_if_indent_code = false # true/false -# Control whether to indent the code between #if, #else and #endif when not at file-level -pp_if_indent_code = false # false/true +# Whether to indent '#define' at the brace level. If false, these are +# indented from column 1. +pp_define_at_level = false # true/false + +# Whether to ignore the '#define' body while formatting. +pp_ignore_define_body = false # true/false + +# Whether to indent case statements between #if, #else, and #endif. +# Only applies to the indent of the preprocesser that the case statements +# directly inside of. +# +# Default: true +pp_indent_case = true # true/false -# Whether to indent '#define' at the brace level (true) or from column 1 (false) -pp_define_at_level = false # false/true +# Whether to indent whole function definitions between #if, #else, and #endif. +# Only applies to the indent of the preprocesser that the function definition +# is directly inside of. +# +# Default: true +pp_indent_func_def = true # true/false + +# Whether to indent extern C blocks between #if, #else, and #endif. +# Only applies to the indent of the preprocesser that the extern block is +# directly inside of. +# +# Default: true +pp_indent_extern = true # true/false + +# Whether to indent braces directly inside #if, #else, and #endif. +# Only applies to the indent of the preprocesser that the braces are directly +# inside of. +# +# Default: true +pp_indent_brace = true # true/false + +# +# Sort includes options +# + +# The regex for include category with priority 0. +include_category_0 = "" # string + +# The regex for include category with priority 1. +include_category_1 = "" # string + +# The regex for include category with priority 2. +include_category_2 = "" # string + +# +# Use or Do not Use options +# -# You can force a token to be a type with the 'type' option. -# Example: -# type myfoo1 myfoo2 +# true: indent_func_call_param will be used (default) +# false: indent_func_call_param will NOT be used +# +# Default: true +use_indent_func_call_param = true # true/false + +# The value of the indentation for a continuation line is calculated +# differently if the statement is: +# - a declaration: your case with QString fileName ... +# - an assignment: your case with pSettings = new QSettings( ... +# +# At the second case the indentation value might be used twice: +# - at the assignment +# - at the function call (if present) +# +# To prevent the double use of the indentation value, use this option with the +# value 'true'. +# +# true: indent_continue will be used only once +# false: indent_continue will be used every time (default) +use_indent_continue_only_once = false # true/false + +# The value might be used twice: +# - at the assignment +# - at the opening brace +# +# To prevent the double use of the indentation value, use this option with the +# value 'true'. +# +# true: indentation will be used only once +# false: indentation will be used every time (default) +indent_cpp_lambda_only_once = false # true/false + +# Whether to apply special formatting for Qt SIGNAL/SLOT macros. Essentially, +# this tries to format these so that they match Qt's normalized form (i.e. the +# result of QMetaObject::normalizedSignature), which can slightly improve the +# performance of the QObject::connect call, rather than how they would +# otherwise be formatted. +# +# See options_for_QT.cpp for details. +# +# Default: true +use_options_overriding_for_qt_macros = true # true/false + +# +# Warn levels - 1: error, 2: warning (default), 3: note +# + +# (C#) Warning is given if doing tab-to-\t replacement and we have found one +# in a C# verbatim string literal. +# +# Default: 2 +warn_level_tabs_found_in_verbatim_string_literals = 2 # unsigned number + +# Meaning of the settings: +# Ignore - do not do any changes +# Add - makes sure there is 1 or more space/brace/newline/etc +# Force - makes sure there is exactly 1 space/brace/newline/etc, +# behaves like Add in some contexts +# Remove - removes space/brace/newline/etc +# +# +# - Token(s) can be treated as specific type(s) with the 'set' option: +# `set tokenType tokenString [tokenString...]` +# +# Example: +# `set BOOL __AND__ __OR__` +# +# tokenTypes are defined in src/token_enum.h, use them without the +# 'CT_' prefix: 'CT_BOOL' => 'BOOL' +# +# +# - Token(s) can be treated as type(s) with the 'type' option. +# `type tokenString [tokenString...]` +# +# Example: +# `type int c_uint_8 Rectangle` +# +# This can also be achieved with `set TYPE int c_uint_8 Rectangle` +# +# +# To embed whitespace in tokenStrings use the '\' escape character, or quote +# the tokenStrings. These quotes are supported: "'` +# +# +# - Support for the auto detection of languages through the file ending can be +# added using the 'file_ext' command. +# `file_ext langType langString [langString..]` +# +# Example: +# `file_ext CPP .ch .cxx .cpp.in` # -# You can create custom macro-based indentation using macro-open, -# macro-else and macro-close. -# Example: -# macro-open BEGIN_TEMPLATE_MESSAGE_MAP -# macro-open BEGIN_MESSAGE_MAP -# macro-close END_MESSAGE_MAP +# langTypes are defined in uncrusify_types.h in the lang_flag_e enum, use +# them without the 'LANG_' prefix: 'LANG_CPP' => 'CPP' # -# You can assign any keyword to any type with the set option. -# set func_call_user _ N_ # -# The full syntax description of all custom definition config entries -# is shown below: +# - Custom macro-based indentation can be set up using 'macro-open', +# 'macro-else' and 'macro-close'. +# `(macro-open | macro-else | macro-close) tokenString` # -# define custom tokens as: -# - embed whitespace in token using '' escape character, or -# put token in quotes -# - these: ' " and ` are recognized as quote delimiters +# Example: +# `macro-open BEGIN_TEMPLATE_MESSAGE_MAP` +# `macro-open BEGIN_MESSAGE_MAP` +# `macro-close END_MESSAGE_MAP` # -# type token1 token2 token3 ... -# ^ optionally specify multiple tokens on a single line -# define def_token output_token -# ^ output_token is optional, then NULL is assumed -# macro-open token -# macro-close token -# macro-else token -# set id token1 token2 ... -# ^ optionally specify multiple tokens on a single line -# ^ id is one of the names in token_enum.h sans the CT_ prefix, -# e.g. PP_PRAGMA # -# all tokens are separated by any mix of ',' commas, '=' equal signs -# and whitespace (space, tab) +# option(s) with 'not default' value: 151 #