From e8dc4dcabc2abf871cb695896deb12963da2cac5 Mon Sep 17 00:00:00 2001 From: shadeyg56 Date: Mon, 20 Feb 2023 23:35:11 -0600 Subject: [PATCH] Squashed commit of the following: commit e2eaffc32b382f67f97d2e25858b5b5a4abffeae Author: shadeyg56 Date: Mon Feb 20 23:08:57 2023 -0600 move text to be inline with menu commit e1dae9d9de25f13c51dd983f5b4b0fbdf1bf0349 Author: shadeyg56 Date: Sun Feb 19 17:50:26 2023 -0600 move distro info to top of system stats box commit 959405bedc52dce14f5fd70d2fcd5fbee57e59a5 Author: shadeyg56 Date: Sun Feb 19 17:49:15 2023 -0600 fix app name on GNOME commit 346093dfce6ce0bfa1954ed3bb6f5364250d05b7 Author: shadeyg56 Date: Sun Feb 19 17:01:03 2023 -0600 fix snap dependencies commit ec7e087b343f33af7a92b190ed666845dab60f20 Merge: 32b6e63 9912f9d Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com> Date: Mon Feb 13 14:11:21 2023 -0600 Merge branch 'AdnanHodzic:master' into gui commit 32b6e632830fe8a7c3a3ce601ef2ba5b254572d7 Author: shadeyg56 Date: Mon Feb 13 14:10:34 2023 -0600 increase MenuButton size commit 12a2cda82a5f56bfbb532c893d822341e9b2d7cb Author: shadeyg56 Date: Sun Feb 12 23:35:33 2023 -0600 set app icon commit d170d07e866644bcb662bf342530c497390f0303 Author: shadeyg56 Date: Sun Feb 12 23:35:15 2023 -0600 remove unused pixbuf commit 993333fb5aad448103e24e38bc85fb04e7e4dd0c Author: shadeyg56 Date: Sun Feb 12 22:43:56 2023 -0600 fix MenuButton icon commit d1b8bd74caab2cf216bf40bdfc35ef3520e891c7 Author: shadeyg56 Date: Sun Feb 12 17:19:32 2023 -0600 add icon commit 13f43fa0c7d59b2405bac688119690d01a7ec019 Author: shadeyg56 Date: Sun Feb 12 17:19:10 2023 -0600 add pkexec policy and change wrapper for gui commit 4ddbb9c6667aa97bb7cd242fb4a376e061c9b308 Author: shadeyg56 Date: Sun Feb 12 14:09:35 2023 -0600 add icon to destop entry and about dialog commit 4379024adab282fcdb58a7091df2a6adf833e700 Author: shadeyg56 Date: Tue Feb 7 19:06:59 2023 -0600 add removal of gui and desktop entry commit 42693703324762418a7f810f04a3d77803afa236 Author: shadeyg56 Date: Mon Feb 6 23:28:44 2023 -0600 CPU stats refresh and style stuff commit 7149db72c0bb39af57ceccb16df8e9164c77fae3 Author: shadeyg56 Date: Mon Feb 6 23:10:29 2023 -0600 daemon detection, daemon install/removal, and layout stuff commit f7e03c9bcc2e2578703807ceeb7a652903571b71 Author: shadeyg56 Date: Sun Feb 5 19:26:42 2023 -0600 improve AboutDialog Please enter the commit message for your changes. Lines starting commit cb8cfe7b3194273dea229fe550fdf66cd6af82fa Author: shadeyg56 Date: Sun Feb 5 18:28:19 2023 -0600 add dropdown menu and (not completed) about dialog commit ade1fed790f2ebbaae4e92ce8879ab812c9b2850 Author: shadeyg56 Date: Sun Feb 5 15:57:17 2023 -0600 actually fix css commit 67c8c97bcf2f2f408431bc162c38dee5c278ed0b Author: shadeyg56 Date: Sun Feb 5 15:54:47 2023 -0600 fix css commit bd3feae38824764155d31ccd6debc1fcf18830da Author: shadeyg56 Date: Sun Feb 5 00:42:52 2023 -0600 add desktop entry for gui commit 5426a6a443c90a9d65b858ae1951219898cba332 Author: shadeyg56 Date: Sun Feb 5 00:33:08 2023 -0600 add gui to install file, update required packages, and create wrapper script commit 84124dfa605b930b3722ed852486cbe11c254092 Author: shadeyg56 Date: Sat Feb 4 23:28:24 2023 -0600 create system tray commit 7b0d46d8ddafdeff9006a1ad10ccd99c24b9eb1e Author: shadeyg56 Date: Sat Feb 4 23:28:01 2023 -0600 small changes to layout commit cd51ea317085ac6ea5b4918ef057ad4c19a71640 Author: shadeyg56 Date: Sat Feb 4 00:44:08 2023 -0600 css styling support commit 136b449febece04c036b72b4a14ccceb422f62dd Author: shadeyg56 Date: Sat Feb 4 00:14:52 2023 -0600 several improvements commit f9f7170391e1abc1499b7d5ae93327999e013730 Merge: 242a8d0 8f343df Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com> Date: Fri Feb 3 22:44:01 2023 -0600 Merge branch 'AdnanHodzic:master' into gui commit 242a8d0401d1ffd00c982aa731c04ef7ea726fee Merge: f50b982 dadfae0 Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com> Date: Fri Feb 3 14:19:01 2023 -0600 Merge branch 'AdnanHodzic:master' into gui commit f50b9829e5438bb96ded73775668fa048fcd3951 Merge: a98225e 69ef913 Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com> Date: Thu Feb 2 18:19:10 2023 -0600 Merge branch 'AdnanHodzic:master' into gui commit a98225e7280802c2fb09a9a52a40f7e55b26b3b1 Author: shadeyg56 Date: Thu Feb 2 18:18:43 2023 -0600 Revert "basic GUI" This reverts commit d2610c921b7209fde7d7be13f187510631cc33b3. commit 9606472fdbbff6dd551cd291b37349df17098d2e Author: shadeyg56 Date: Thu Feb 2 18:13:41 2023 -0600 basic gui commit d2610c921b7209fde7d7be13f187510631cc33b3 Author: shadeyg56 Date: Thu Feb 2 17:47:55 2023 -0600 basic GUI commit bdbe12018b380ed70f100729c9ea3732ba24f572 Author: shadeyg56 Date: Thu Feb 2 15:21:42 2023 -0600 rename folder commit 31095c472e4af734a3a601f804787de89ad47964 Author: shadeyg56 Date: Wed Jan 25 23:39:52 2023 -0600 add tray --- auto_cpufreq/gui/app.py | 16 +++++++++------- auto_cpufreq/gui/objects.py | 3 ++- scripts/auto-cpufreq-gtk.desktop | 1 + snap/snapcraft.yaml | 2 ++ 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/auto_cpufreq/gui/app.py b/auto_cpufreq/gui/app.py index b671891..4eec8cd 100644 --- a/auto_cpufreq/gui/app.py +++ b/auto_cpufreq/gui/app.py @@ -27,21 +27,22 @@ class MyWindow(Gtk.Window): self.build() def main(self): - # main VBOX - self.vbox_top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - self.vbox_top.set_valign(Gtk.Align.CENTER) - self.vbox_top.set_halign(Gtk.Align.CENTER) - self.add(self.vbox_top) + # self.vbox_top = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + # self.vbox_top.set_valign(Gtk.Align.CENTER) + # self.vbox_top.set_halign(Gtk.Align.CENTER) + #self.add(self.vbox_top) + # Main HBOX self.hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=HBOX_PADDING) self.systemstats = SystemStatsLabel() self.hbox.pack_start(self.systemstats, False, False, 0) + self.add(self.hbox) self.vbox_right = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=20) self.menu = DropDownMenu(self) - self.vbox_top.pack_start(self.menu, False, False, 0) + self.hbox.pack_end(self.menu, False, False, 0) self.currentgovernor = CurrentGovernorBox() self.vbox_right.pack_start(self.currentgovernor, False, False, 0) @@ -50,7 +51,7 @@ class MyWindow(Gtk.Window): self.cpufreqstats = CPUFreqStatsLabel() self.vbox_right.pack_start(self.cpufreqstats, False, False, 0) - self.hbox.pack_start(self.vbox_right, True, True, 0) + self.hbox.pack_start(self.vbox_right, False, False, 0) self.vbox_top.pack_start(self.hbox, False, False, 0) @@ -84,4 +85,5 @@ class MyWindow(Gtk.Window): win = MyWindow() win.connect("destroy", Gtk.main_quit) win.show_all() +GLib.set_application_name("auto-cpufreq") Gtk.main() \ No newline at end of file diff --git a/auto_cpufreq/gui/objects.py b/auto_cpufreq/gui/objects.py index 9c9b8fd..cb398a2 100644 --- a/auto_cpufreq/gui/objects.py +++ b/auto_cpufreq/gui/objects.py @@ -112,8 +112,8 @@ class SystemStatsLabel(Gtk.Label): old_stdout = sys.stdout text = StringIO() sys.stdout = text - sysinfo() distro_info() + sysinfo() self.set_label(text.getvalue()) sys.stdout = old_stdout @@ -139,6 +139,7 @@ class DropDownMenu(Gtk.MenuButton): def __init__(self, parent): super().__init__() self.set_halign(Gtk.Align.END) + self.set_valign(Gtk.Align.START) self.image = Gtk.Image.new_from_icon_name("open-menu-symbolic", Gtk.IconSize.LARGE_TOOLBAR) self.add(self.image) self.menu = self.build_menu(parent) diff --git a/scripts/auto-cpufreq-gtk.desktop b/scripts/auto-cpufreq-gtk.desktop index 6201b1f..bbe928f 100644 --- a/scripts/auto-cpufreq-gtk.desktop +++ b/scripts/auto-cpufreq-gtk.desktop @@ -4,4 +4,5 @@ Exec=auto-cpufreq-gtk Type=Application Terminal=false Icon=auto-cpufreq +StartupWMClass=App.py Categories=System; \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9a26f35..6075c44 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -23,6 +23,8 @@ parts: build-packages: - gcc - python3-dev + - libgirepository1.0-dev + - libcairo2-dev stage-packages: - coreutils - dmidecode