From 1e89c4be94ebcab880f78ed499835334efcee4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw?= <6031763+stsdc@users.noreply.github.com> Date: Thu, 23 Sep 2021 20:50:37 +0200 Subject: [PATCH] Release 0.10.0 (#243) --- README.md | 2 - data/com.github.stsdc.monitor.appdata.xml.in | 7 +- data/css.gresource.xml | 3 +- data/dark.css | 166 ++++++++++++++ data/{Application.css => light.css} | 4 +- debian/changelog | 214 ------------------- debian/compat | 1 - debian/control | 21 -- debian/copyright | 7 - debian/rules | 15 -- debian/source/format | 1 - meson.build | 2 +- src/Monitor.vala | 34 ++- 13 files changed, 208 insertions(+), 269 deletions(-) create mode 100644 data/dark.css rename data/{Application.css => light.css} (98%) delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100755 debian/rules delete mode 100644 debian/source/format diff --git a/README.md b/README.md index 2915e63d..85fa185a 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,9 @@ * valac * libgtk-3-dev * libgranite-dev (>= 5.2.0) -* libbamf3-dev * libwnck-3-dev * libgtop2-dev * libwingpanel-2.0-dev -* libxml2-utils * meson ### Clone, Build & Install diff --git a/data/com.github.stsdc.monitor.appdata.xml.in b/data/com.github.stsdc.monitor.appdata.xml.in index 5c762b60..8044e3a9 100644 --- a/data/com.github.stsdc.monitor.appdata.xml.in +++ b/data/com.github.stsdc.monitor.appdata.xml.in @@ -28,11 +28,16 @@ https://github.com/stsdc/monitor/issues + +​ +​

Adds dark theme 🌚

+​
+​

Uses Wingpanel v3; New *.deb package maintainer: Kristopher Ives

-​
+​

🐛 Should fix empty Indicator. Please reboot after installation ⚡️

diff --git a/data/css.gresource.xml b/data/css.gresource.xml index 63daa2e3..587bd47f 100644 --- a/data/css.gresource.xml +++ b/data/css.gresource.xml @@ -1,6 +1,7 @@ - Application.css + light.css + dark.css \ No newline at end of file diff --git a/data/dark.css b/data/dark.css new file mode 100644 index 00000000..30538d9d --- /dev/null +++ b/data/dark.css @@ -0,0 +1,166 @@ +.roundy-label, +.roundy-label:hover, +.roundy-label:selected, +.roundy-label:selected:focus, +.roundy-label:hover:selected { + background-image: none; + background-color: @SILVER_900; + box-shadow: none; + color: alpha(@text_color, 0.7); + font-weight: 700; + border-radius: 10px; + padding: 0 6px; + margin: 0 3px; + 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, +.vertical-label:selected:focus, +.vertical-label:hover:selected { + +} */ + +.label-vertical { + +} + +.label-vertical-val { + color: @text_color, 1; + font-size: 30px; + font-weight: 200; + /* padding: 0 6px; + margin: 0 3px; */ + border-width: 0; +} + +.usage-label-container { + border: 1px solid @SILVER_900; + border-radius: 3px; + background-color: alpha(@SILVER_900, 0.5); + } + +.username-current { + background-color: @SILVER_900; + color: alpha(@text_color, 0.7); +} + +.username-other { + background-color: @BANANA_300; + color: #381F00; +} + +.username-root { + background-color: @STRAWBERRY_300; + color: @SILVER_100; +} + +.state_badge, +.state_badge:hover, +.state_badge:selected, +.state_badge:selected:focus, +.state_badge:hover:selected { + background-image: none; + background-color: @BLUEBERRY_500; + box-shadow: none; + color: white; + font-weight: 700; + border-radius: 10px; + padding: 0 6px; + margin: 0 3px; + border-width: 0; +} + +.core_badge { + background-color: @SILVER_900; + border-radius: 8px; + padding-right: 4px; + padding-left:2px; + font-size: 10px; + color: @text_color; + border: 1px solid @SILVER_700; +} + +.core_badge-mild-warning { + background-color: alpha(@BANANA_900, 0.7); + color: @BANANA_300; + border: 1px solid alpha(@BANANA_700, 0.7); +} + +.core_badge-strong-warning { + background-color: alpha(@ORANGE_900, 0.7); + color: @ORANGE_300; + border: 1px solid alpha(@ORANGE_700, 0.7); +} + +.core_badge-critical-warning { + background-color: @STRAWBERRY_900; + color: @STRAWBERRY_100; + border: 1px solid @STRAWBERRY_700; +} + +.command_wrapper { + background-color: #fdf6e3; + border-radius: 3px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.20); + padding: 5px; +} + +.command text { + background-color: #fdf6e3; +} +.command { + font-family: monospace; +} + +.small-text { + color: @SILVER_500; + font-weight:bold; + font-size:9px; +} + +.graph { + border: 1px @SILVER_900 solid; + border-radius: 6px + +} + +.open_files_list_box_wrapper { + border: 1px @SILVER_900 solid; +} + +.open_files_list_box { + +} +.open_files_list_box_row { + border-bottom: 1px @SILVER_900 solid; +} + +.open_files_list_box_row label { + font-family: monospace; + /* background-color: @SILVER_300; */ + padding: 6px 2px 2px; + border-radius: 4px; +} + +.open_files_list_box_row image { + color: @SILVER_700; + margin: 6px; +} + +.bold { + font-weight: bold; +} + +.text-secondary { + color: @SILVER_700; +} \ No newline at end of file diff --git a/data/Application.css b/data/light.css similarity index 98% rename from data/Application.css rename to data/light.css index 7e700375..6e711947 100644 --- a/data/Application.css +++ b/data/light.css @@ -35,9 +35,9 @@ } .label-vertical-val { - color: alpha(@text_color, 1); + color: @text_color, 1; font-size: 30px; - font-weight: 100; + font-weight: 200; /* padding: 0 6px; margin: 0 3px; */ border-width: 0; diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 548ddb17..00000000 --- a/debian/changelog +++ /dev/null @@ -1,214 +0,0 @@ -com.github.stsdc.monitor (0.8.0) bionic; urgency=low - - * System resources tab - --- Stanisław Dac Sun, 19 Jul 2020 00:30:43 +0200 - -com.github.stsdc.monitor (0.7.3) bionic; urgency=low - - * Added tooltips to process state label (Ryo Nakano) - * Small bugfix - --- Stanisław Dac Mon, 22 Jun 2020 20:21:37 +0200 - -com.github.stsdc.monitor (0.7.2) bionic; urgency=low - - * Fix sorting arrows - * Update Russian translation (camellan) - * Add Turkish translation (Harun Yasar) - * Use newest version of live-chart (Laurent Callarec) ← Check his lib for creating charts, it's amazing! - --- Stanisław Dac Sat, 15 Apr 2020 21:01:15 +0200 - -com.github.stsdc.monitor (0.7.0) bionic; urgency=low - - * Detailed process info in sidebar - * CPU frequency in tooltip (Ryo Nakano) - --- Stanisław Dac Sat, 11 Apr 2020 21:01:15 +0200 - -com.github.stsdc.monitor (0.6.2) bionic; urgency=low - - * Bugfix (potential) of crushes and high CPU usage - * Update German translation (Carsten Dietrich) - --- Stanisław Dac Sat, 21 Dec 2019 14:06:37 +0100 - -com.github.stsdc.monitor (0.6.1) bionic; urgency=low - - * Update Portuguese translation (Hugo Carvalho) - * Update French translation (Nathan Bonnemains and Skeudwenn) - * Fix: Don't show swap percentage when it's not available (Ryo Nakano) - --- Stanisław Dac Wed, 13 Nov 2019 21:18:52 +0100 - -com.github.stsdc.monitor (0.6.0) bionic; urgency=low - - * Update Italian translation (Mirko Brombin) - * Show swap usage (Ryo Nakano) - * Update Russian translation (camellan) - * Code refactoring (Ryo Nakano) - * Update Japanese translation (Ryo Nakano) - --- Stanisław Dac Tue, 29 Oct 2019 17:48:02 +0100 - -com.github.stsdc.monitor (0.5.0) bionic; urgency=low - - * Fix contents of the window are not shown (Ryo Nakano) - * Fix no row is still selected when indicator options are enabled (Ryo Nakano) - * Fix the app crashes by clicking the "End/Kill Process" buttons when no process is selected (Ryo Nakano) - * Added buttons to either "kill" or "end" a process. (Evan Buss) - * Change screenshot to English (Christopher Crouse) - * Update Russian translation (camellan) - * Check if the default display is a X11 display (Hannes Schulze) - * Update German translation (J0Ar) - * Update Spanish translation (Mario Rodrigo) - --- Stanisław Dac Fri, 07 Jun 2019 11:03:57 +0200 - -com.github.stsdc.monitor (0.4.4) bionic; urgency=low - - * Add start-in-background option to UI - --- Stanisław Dac Fri, 12 Apr 2019 18:17:34 +0200 - -com.github.stsdc.monitor (0.4.3) bionic; urgency=low - - * Add start-in-background command line option - * Add Italian and Portuguese translations - * Update Dutch, French and Spanish translations - * Fix Japanese translation - --- Stanisław Dac Wed, 03 Apr 2019 20:23:01 +0200 - -com.github.stsdc.monitor (0.4.2) bionic; urgency=low - - * Minor bug fix - * Make End process button red - * Add Japanese translation - --- Stanisław Dac Mon, 11 Mar 2019 21:06:18 +0100 - -com.github.stsdc.monitor (0.4.1) bionic; urgency=low - - * Add CPU and RAM icons - * Update Polish and Russian translation - * Fix bug, that caused hanging - --- Stanisław Dac Wed, 20 Feb 2019 00:42:22 +0100 - -com.github.stsdc.monitor (0.4.0) bionic; urgency=low - - * Add Monitor indicator - * Add missing extra French translations - * Fix: if icon missing for the process, icon is taken from previous process - * Fix: search erases my input while I'm typing - * Fix POTFILES - --- Stanisław Dac Thu, 31 Jan 2019 23:24:10 +0100 - -com.github.stsdc.monitor (0.3.7) xenial; urgency=low - - * Update French translation - --- Stanisław Dac Wed, 23 Jan 2019 17:44:15 +0100 - -com.github.stsdc.monitor (0.3.6) xenial; urgency=low - - * New icon - * Quit the app with Ctrl+Q - --- Stanisław Dac Fri, 23 Nov 2018 16:25:58 +0100 - -com.github.stsdc.monitor (0.3.5) xenial; urgency=low - - * Fix showing icon for some apps - * Pressing Enter focuses on process list - * Filtering: process will be highlighted if its group has no other processes - --- Stanisław Dac Sat, 20 Jan 2018 14:01:21 +0100 - -com.github.stsdc.monitor (0.3.2) xenial; urgency=low - - * Ukrainian translation - * French translation - * Lithuanian translation - * German translation - * Spanish translation - - -- Stanisław Dac Tue, 28 Nov 2017 18:17:00 +0100 - -com.github.stsdc.monitor (0.3.1) xenial; urgency=low - - * Added Russian translation - - -- Stanisław Dac Tue, 05 Sep 2017 19:16:05 +0200 - -com.github.stsdc.monitor (0.3.0) xenial; urgency=low - - * A few bugs fixed - * Added Dutch and Polish translation - * Added shortcuts (CTRL + E to end process, arrows to navigate in tree) - * Added statusbar showing CPU and RAM usage - - -- Stanisław Dac Tue, 05 Sep 2017 12:20:33 +0200 - -com.github.stsdc.monitor (0.2.10) xenial; urgency=low - - * Update screenshot. - - -- Stanisław Dac Sun, 20 Aug 2017 21:32:56 +0200 - -com.github.stsdc.monitor (0.2.9) xenial; urgency=low - - * Fixed bugs. - - -- Stanisław Dac Sun, 20 Aug 2017 14:40:56 +0200 - -com.github.stsdc.monitor (0.2.8) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Sun, 20 Aug 2017 14:40:56 +0200 - -com.github.stsdc.monitor (0.2.7) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Sun, 20 Aug 2017 12:41:59 +0200 - -com.github.stsdc.monitor (0.2.6) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Fri, 18 Aug 2017 23:55:29 +0200 - -com.github.stsdc.monitor (0.2.5) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Fri, 18 Aug 2017 18:11:55 +0200 - -com.github.stsdc.monitor (0.2.4) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Fri, 18 Aug 2017 16:48:40 +0200 - -com.github.stsdc.monitor (0.2.3) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Fri, 18 Aug 2017 16:30:09 +0200 - -com.github.stsdc.monitor (0.2.2) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Fri, 18 Aug 2017 16:23:15 +0200 - -com.github.stsdc.monitor (0.2.0) xenial; urgency=low - - * Initial Release. - - -- Stanisław Dac Fri, 18 Aug 2017 12:25:26 +0200 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec635144..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control deleted file mode 100644 index 629b491d..00000000 --- a/debian/control +++ /dev/null @@ -1,21 +0,0 @@ -Source: com.github.stsdc.monitor -Section: util -Priority: extra -Maintainer: Kristopher Ives -Build-Depends: meson, - appstream, - debhelper (>= 9), - libgtk-3-dev, - libglib2.0-dev, - valac (>= 0.26), - libgranite-dev (>= 5.2.0), - libbamf3-dev, - libwnck-3-dev, - libgtop2-dev, - libwingpanel-3.0-dev -Standards-Version: 4.1.1 - -Package: com.github.stsdc.monitor -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} -Description: Manage processes and monitor system resources. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index ef41df84..00000000 --- a/debian/copyright +++ /dev/null @@ -1,7 +0,0 @@ -Format: http://dep.debian.net/deps/dep5 -Upstream-Name: com.github.stsdc.monitor -Source: https://github.com/stsdc/monitor - -Files: * -Copyright: 2017 Stanisław Dac -License: GPL-3.0 \ No newline at end of file diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 42f77bd8..00000000 --- a/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ - -override_dh_auto_test: diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 89ae9db8..00000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/meson.build b/meson.build index 9352d286..80f7c26f 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('com.github.stsdc.monitor', 'vala', 'c', version: '0.9.5') +project('com.github.stsdc.monitor', 'vala', 'c', version: '0.10.0') # these are Meson modules gnome = import('gnome') diff --git a/src/Monitor.vala b/src/Monitor.vala index 7988a332..bfad9531 100644 --- a/src/Monitor.vala +++ b/src/Monitor.vala @@ -34,6 +34,37 @@ namespace Monitor { return; } + var granite_settings = Granite.Settings.get_default (); + var gtk_settings = Gtk.Settings.get_default (); + + bool is_dark = granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK; + gtk_settings.gtk_application_prefer_dark_theme = is_dark; + + + var provider = new Gtk.CssProvider (); + + if (is_dark) { + provider.load_from_resource ("/com/github/stsdc/monitor/dark.css"); + } else { + provider.load_from_resource ("/com/github/stsdc/monitor/light.css"); + } + + Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + + // We listen to changes in Granite.Settings and update our app if the user changes their preference + granite_settings.notify["prefers-color-scheme"].connect (() => { + is_dark = granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK; + gtk_settings.gtk_application_prefer_dark_theme = is_dark; + + if (is_dark) { + provider.load_from_resource ("/com/github/stsdc/monitor/dark.css"); + } else { + provider.load_from_resource ("/com/github/stsdc/monitor/light.css"); + } + }); + + + window = new MainWindow (this); // start in background with indicator @@ -74,9 +105,6 @@ namespace Monitor { } }); - var provider = new Gtk.CssProvider (); - provider.load_from_resource ("/com/github/stsdc/monitor/Application.css"); - Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); // Controls the direction of the sort indicators Gtk.Settings.get_default ().set ("gtk-alternative-sort-arrows", true, null);