-
-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gtk Application for auto-cpufreq #486
Conversation
commit ec7e087 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 32b6e63 Author: shadeyg56 <shadeyg56@gmail.com> Date: Mon Feb 13 14:10:34 2023 -0600 increase MenuButton size commit 12a2cda Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 23:35:33 2023 -0600 set app icon commit d170d07 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 23:35:15 2023 -0600 remove unused pixbuf commit 993333f Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 22:43:56 2023 -0600 fix MenuButton icon commit d1b8bd7 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 17:19:32 2023 -0600 add icon commit 13f43fa Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 17:19:10 2023 -0600 add pkexec policy and change wrapper for gui commit 4ddbb9c Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 14:09:35 2023 -0600 add icon to destop entry and about dialog commit 9912f9d Author: Siddharth Kumar Jha <101443068+siddharthkumarjha@users.noreply.github.com> Date: Sun Feb 12 12:55:14 2023 +0530 Update Readme for issue of auto-cpufreq not autostarting on AUR (AdnanHodzic#485) * Updated Readme for issue auto-cpufreq not autostarting Added solution to issue AdnanHodzic#463 * Fixed minor errors * Fixed auto-cpufreq.serivce Typo * Reprashed text as per suggestion commit 4379024 Author: shadeyg56 <shadeyg56@gmail.com> Date: Tue Feb 7 19:06:59 2023 -0600 add removal of gui and desktop entry commit 4269370 Author: shadeyg56 <shadeyg56@gmail.com> Date: Mon Feb 6 23:28:44 2023 -0600 CPU stats refresh and style stuff commit 7149db7 Author: shadeyg56 <shadeyg56@gmail.com> Date: Mon Feb 6 23:10:29 2023 -0600 daemon detection, daemon install/removal, and layout stuff commit f7e03c9 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 19:26:42 2023 -0600 improve AboutDialog Please enter the commit message for your changes. Lines starting commit cb8cfe7 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 18:28:19 2023 -0600 add dropdown menu and (not completed) about dialog commit ade1fed Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 15:57:17 2023 -0600 actually fix css commit 67c8c97 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 15:54:47 2023 -0600 fix css commit c65eac3 Author: Adnan Hodzic <adnan@hodzic.org> Date: Sun Feb 5 09:29:19 2023 +0100 Update readme, install psutil lib for power_helper commit bd3feae Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 00:42:52 2023 -0600 add desktop entry for gui commit 5426a6a Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 00:33:08 2023 -0600 add gui to install file, update required packages, and create wrapper script commit 84124df Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 23:28:24 2023 -0600 create system tray commit 7b0d46d Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 23:28:01 2023 -0600 small changes to layout commit cd51ea3 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 00:44:08 2023 -0600 css styling support commit 136b449 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 00:14:52 2023 -0600 several improvements commit f9f7170 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 8f343df Merge: dadfae0 b38919f Author: shadeyg56 <31134255+shadeyg56@users.noreply.github.com> Date: Fri Feb 3 14:54:11 2023 -0600 Merge pull request AdnanHodzic#481 from shadeyg56/master Fix uncaught error in checking for snap commit b38919f Author: shadeyg56 <shadeyg56@gmail.com> Date: Fri Feb 3 14:48:01 2023 -0600 fix uncaught error in checking for snap commit 242a8d0 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 dadfae0 Author: Adnan Hodzic <adnan@hodzic.org> Date: Fri Feb 3 20:02:03 2023 +0100 Update README with new config options commit 471611d Author: Adnan Hodzic <adnan@hodzic.org> Date: Fri Feb 3 18:44:33 2023 +0100 Remove GNOME Power Profiles Daemon performance install commit f574257 Author: Adnan Hodzic <adnan@hodzic.org> Date: Fri Feb 3 18:32:04 2023 +0100 Remove install_performance flag commit 04b8783 Author: Adnan Hodzic <adnan@hodzic.org> Date: Fri Feb 3 17:52:20 2023 +0100 Snap tag 2.0-beta + governor_override improvements commit fe21ddf Author: Adnan Hodzic <adnan@hodzic.org> Date: Fri Feb 3 17:28:12 2023 +0100 Working governor override on Snap package commit f50b982 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 a98225e Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 18:18:43 2023 -0600 Revert "basic GUI" This reverts commit d2610c9. commit 9606472 Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 18:13:41 2023 -0600 basic gui commit d2610c9 Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 17:47:55 2023 -0600 basic GUI commit bdbe120 Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 15:21:42 2023 -0600 rename folder commit 31095c4 Author: shadeyg56 <shadeyg56@gmail.com> Date: Wed Jan 25 23:39:52 2023 -0600 add tray
I am just curious, but would it be possible to have two separate branches where one is for command line users and the other is for GTK GUI users. So we can avoid the bloat? |
I considered that but many well-known applications have both CLI and GUI. Also the difference in separating them would be negligible. I don't think it's worth complicating things and having to manage 2 release versions. |
Great stuff, here's my initial feedback: Password prompt: After Then on next screen "auto-cpufreq daemon is not running. Please click the install button" that's when I would pop the "root password" dialog. But even that's not too much of a problem, my problem is that each time I close auto-cpufreq GUI, and it goes back to run in background and I run the auto-cpufreq icon, that same password prompt will pop up. There are ways to disable this prompt, but I doubt that people will go thru this trouble to do this ... hence is there a way to avoid asking/prompting for password since it's not really needed, as Same thing is after I click on auto-cpufreq, again same dialog will pop up, and I think some people might be bothered by this. I'm one of them. Dash icon is not really visible. I use GNOME (dark mode by default) on Wayland, and auto hide my dash, so when it shows up (it's bit transparent) on a green background you can barely see it. We might need to increase it when it's in the dash ... Can we try using the other whiter version of icon for dash? Although I see it's pulled up from the icon (desktop entry itself), so the answer is probably no. When I search for it, or when I click on "burger bar" it looks great. We need to figure out how to make it more visible ... On hover Dash icon == App.py Let's fix this to auto-cpufreq. Have same output as Pull contents bit higher can contents be brought up higher to the window title, or is burger bar blocking it from going higher? |
So the root password is required because both the governor override and daemon install/removal require it, however, it can be done differently. Instead of having it now where it prompts for a password upon opening the app, it could prompt for a password every time you try to perform a root action like you were saying I considered this but didn't know if it would be annoying for the user to enter their password every time they want to override or remove the override, but perhaps it would be better that way. Let me know your thoughts Regarding the dash icon, I was having issues with GTK wanting to show the icon unless I scaled it down. I'll see if I can fix this. I currently use a window manager only, so I don't have a dash, but I'll try to test in a DE.
ah, since I don't have a dash, I didn't even know this way a thing. I'll look into changing this as well
Sounds good
I can shift the text up to be in-line with the menu button. Wasn't sure how it would look, but I'll give it a try and see if it looks ok Thanks for taking a look |
@shadeyg56 let me know privately if I can help with any of how it looks like in a DE. I also just ran to build a snap package out of it to see if we would need to request any additional permissions for GTK/GUI part. But running |
I don't use snap so I can't confirm this, but there was a Python requirement added to That could be the issue. I'm not familiar with how we would add those to Snapcraft |
@shadeyg56 could you please make following two packages
This will help successfully build the snap package and make it installable, however the icon won't show up for some reason, hence I'm asking about this myself on Snapcraft forums so let's see what they say. |
commit e2eaffc Author: shadeyg56 <shadeyg56@gmail.com> Date: Mon Feb 20 23:08:57 2023 -0600 move text to be inline with menu commit e1dae9d Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 19 17:50:26 2023 -0600 move distro info to top of system stats box commit 959405b Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 19 17:49:15 2023 -0600 fix app name on GNOME commit 346093d Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 19 17:01:03 2023 -0600 fix snap dependencies commit ec7e087 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 32b6e63 Author: shadeyg56 <shadeyg56@gmail.com> Date: Mon Feb 13 14:10:34 2023 -0600 increase MenuButton size commit 12a2cda Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 23:35:33 2023 -0600 set app icon commit d170d07 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 23:35:15 2023 -0600 remove unused pixbuf commit 993333f Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 22:43:56 2023 -0600 fix MenuButton icon commit d1b8bd7 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 17:19:32 2023 -0600 add icon commit 13f43fa Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 17:19:10 2023 -0600 add pkexec policy and change wrapper for gui commit 4ddbb9c Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 12 14:09:35 2023 -0600 add icon to destop entry and about dialog commit 4379024 Author: shadeyg56 <shadeyg56@gmail.com> Date: Tue Feb 7 19:06:59 2023 -0600 add removal of gui and desktop entry commit 4269370 Author: shadeyg56 <shadeyg56@gmail.com> Date: Mon Feb 6 23:28:44 2023 -0600 CPU stats refresh and style stuff commit 7149db7 Author: shadeyg56 <shadeyg56@gmail.com> Date: Mon Feb 6 23:10:29 2023 -0600 daemon detection, daemon install/removal, and layout stuff commit f7e03c9 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 19:26:42 2023 -0600 improve AboutDialog Please enter the commit message for your changes. Lines starting commit cb8cfe7 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 18:28:19 2023 -0600 add dropdown menu and (not completed) about dialog commit ade1fed Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 15:57:17 2023 -0600 actually fix css commit 67c8c97 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 15:54:47 2023 -0600 fix css commit bd3feae Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 00:42:52 2023 -0600 add desktop entry for gui commit 5426a6a Author: shadeyg56 <shadeyg56@gmail.com> Date: Sun Feb 5 00:33:08 2023 -0600 add gui to install file, update required packages, and create wrapper script commit 84124df Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 23:28:24 2023 -0600 create system tray commit 7b0d46d Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 23:28:01 2023 -0600 small changes to layout commit cd51ea3 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 00:44:08 2023 -0600 css styling support commit 136b449 Author: shadeyg56 <shadeyg56@gmail.com> Date: Sat Feb 4 00:14:52 2023 -0600 several improvements commit f9f7170 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 242a8d0 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 f50b982 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 a98225e Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 18:18:43 2023 -0600 Revert "basic GUI" This reverts commit d2610c9. commit 9606472 Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 18:13:41 2023 -0600 basic gui commit d2610c9 Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 17:47:55 2023 -0600 basic GUI commit bdbe120 Author: shadeyg56 <shadeyg56@gmail.com> Date: Thu Feb 2 15:21:42 2023 -0600 rename folder commit 31095c4 Author: shadeyg56 <shadeyg56@gmail.com> Date: Wed Jan 25 23:39:52 2023 -0600 add tray
Ok so I pushed all of the changes. Here's how it looks now Also, I installed GNOME and was not able to reproduce the fuzzy icon. Not sure what the issue is
You never said what you wanted me to do regarding the password prompt so I haven't changed it yet. |
Changes look great, but I wasn't able to verify them. Because now after This is what output of auto-cpufreq-gtk (what icon entry call will exec) looks like when I run it in terminal:
Apparently has something to do with running GUI app as a root .... You don't have this problem? Also from code POV, let's rename
Maybe it's an issue since Ubuntu has it's own "dash to dock" which is built on of GNOME Shell one. I'll try to replicate as part of "vanilla" GNOME dash, once I have it working again.
Let's have GNOME Shell only ask for password (display prompt), when the password is needed. Example 1: when auto-cpufreq icon is just clicked, there's no need to ask for password. If I click on "install daemon" button then it should ask me for password. Example 2: when auto-cpufreq icon is clicked after daemon is installed, there's no need for password prompt, so let's eliminate need to ask for it. As even In a nutshell, let's only ask for the password when password is needed, now it needs a password as I click on the icon. |
Fixed in commit 3a4fd1d
As of commit 3a8eaaf, it will only ask for password upon daemon install, remove, or governor override. |
Looking great! Also, icon is not showing up in dash anymore, and it's still being printed as "app.py". |
Summary of what needs to be done for this PR to be merged with
|
We're back in business after a long hiatus. Several commits have been pushed to fix the issues addressed above. @AdnanHodzic please test the snap package and let me know how it goes. |
|
@shadeyg56 regarding point 4, I made changes that add the Snap icon, could you please enable |
@AdnanHodzic it should already be enabled |
Agreed to merge the changes and make subsequent changes as part of new PR. |
Alright, this PR is for the Gtk GUI I have been working on.
I have tested it on Hyprland (Wayland) and Cinnamon (X11) to make sure that it works on both desktop servers
I will quickly go over the features
The theme, font, etc, will follow the user-defined config in `/etc/gtk-3.0/settings.ini', so the user can easily customize it based on their own preference
Features
--force
flagThat's about it. The GUI can be run via the desktop entry (auto-cpufreq) or with the new command
auto-cpufreq-gtk
.Please note UI/UX design is very much not my thing. If anybody has any recommendations regarding the style of the app, feel free to comment or make changes. The window for the app is not resizeable due to the fact that the majority of it is composed of text which cannot be easily resized on the fly.
I'm also open to more ideas for features!