-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: Configurable power menu using libadwaita widgets #108
Comments
Would using libadwaita imply that you can't theme them with GTK themes? If so, then I'd prefer using regular GTK widgets as the default, with libadwaita as a separate compile-time/config option. The other points sound good, although I fail to see why the number of options would be dynamic. There should be just suspend, hibernate, hybrid sleep, reboot and shutdown, right? |
I need to test that. Adw has CSS and stuff like that so I think its possible. One thing I really like is the significantly better looking widgets.
I am not sure what you are implying here...
Note This is a draft of the config format, the merged format may be different Hardcoded templates (useful for handling specifics of each command better) [widget.power_menu]
template = "auto_detect" # default if not specified
# or
template = "systemd" Or fully custom [[widget.power_menu.commands]]
title = "Reboot"
command = ["reboot"]
confirm = true
[[widget.power_menu.commands]]
title = "Shutdown"
command = ["poweroff"]
confirm = true |
Also a note on the different types of sleep. Hibernate requires swap which may not be available on some systems. I hope there is a way to detect support for it without running the command so it can be hidden from the list automatically. |
Okay, got your points about why the options are dynamic. Makes sense why it might be better as a vertical list. Also, nice to see that libadwaita can be themed. I also agree that they generally look better. |
I am a little stuck on implementing alerts as a confirmation system. They just show up as a separate window on startup and it will cause problems on cage. Besides, it should not even be appearing on launch in the first place. So I guess I will just substitute the alert with something else... Also getting more busy in the following days so I may not finish this any time soon. |
What about using popups instead? Would that work?
No problem, it's FOSS, we are not entitled to your time. I've taken breaks spanning months 😝. |
Hmm, there's different types of dialogs? I might look into that later. |
What I meant was use something like this instead of a dialog: https://docs.gtk.org/gtk4/class.Popover.html. |
Yeah, most likely this is the way. Btw, I am recalling the way alerts worked on GNOME and it seems they were separate windows and the compositor made them stick in a particular spot. Which is a bad idea in this case because of fullscreen and cage. |
This can start chiping away at implementing #46. I am creating this issue for discussions on the feature set.
Move the power menu into a Gnome panel looking button. Something like the below, but it would be an icon button that would pop up options just for rebooting, etc.
Additionally, something I really wanted to add to regreet is more options than just the two reboot and shutdown, I sometimes need to suspend the system while logged out and I sometimes need to boot into firmware (systemd-specific, maybe there is a generic linuxy way).
Having a dynamic amount of menu options is not easy in the current layout and a list would make more sense.
Add a confirmation pop-up before actions are taken. This should be optional and only required for destructive actions such as rebooting, suspend should not trigger it. The pop-up may have a timer attached to it to automatically confirm the action after say a minute.
TODO
The text was updated successfully, but these errors were encountered: