Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

[feature] power management button

Open piu130 opened this issue 6 years ago • 6 comments

Cool project :) Would be nice to have a power management button.

On click the button would change to more buttons like  power off,  suspend,  back, etc. (like clock button changes from time to date).

On click any of this buttons the corresponding action is be executed systemctl poweroff, systemctl suspend, etc.

piu130 avatar Mar 02 '19 06:03 piu130

As an additional idea, there could be an option to hide the idle_inhibitor module in the power management module. It is a very useful module, but I don't use it that often.

hoellen avatar Mar 19 '19 14:03 hoellen

in the interim this is what i've been using:

"custom/power":{ "format":"", "on-click":"swaynag -t warning -m 'Power Menu Options' -b 'Logout' 'swaymsg exit' -b 'Suspend' 'swaymsg exec systemctl suspend' -b 'shutdown' 'systemctl shutdown'" },

updated to reflect some feedback from this post: https://old.reddit.com/r/swaywm/comments/d0uo7g/disable_swaynag_window_after_exiting_suspend/

dlasky avatar Apr 18 '19 03:04 dlasky

I see an opportunity to have something more generic: a button that when clicked gets replaced by multiple buttons (in a vertical menu?). This way, user can customize power-off command (we don't hardcode the logic for systemd or else)

This gets even better if buttons and their actions can be generated by a script: we then get easy-to-build wifi-managers, clipboard-managers, application-launchers-menus (and powerbuttons). I know I'm not entitled to a gift-wish-list to santa though...

Arnaudv6 avatar Jun 13 '20 08:06 Arnaudv6

keyboard layout also* #66 ... and I just saw #676 : is it what you're building, @Alexays?

Arnaudv6 avatar Jun 13 '20 08:06 Arnaudv6

You can easily do those things yourself, either use wlogout and

    "custom/wlogout": {
        "format": "",
        "interval": "once",
        "on-click": "wlogout -c 5 -r 5 -p layer-shell",
    }

or simply use wofi in dmenu mode and create a small script.

chronically-late avatar Apr 26 '21 13:04 chronically-late

It would be cool if added

ignamartinoli avatar May 18 '22 00:05 ignamartinoli

A much needed module that should be fairly easy to implement.

criptixo avatar Oct 24 '23 05:10 criptixo

@chron-isch just wandering I tried adding that to my config and nothing shows, I added white text color and all. here is my dot files: https://github.com/TNTRedstone/waybar-dots

TNTRedstone avatar Nov 10 '23 19:11 TNTRedstone

As of #2574, group drawers have been implemented and one of the demos on my video available on that PR is a power management menu. Although it works by mouse hover rather than clicking, I believe it resolves this issue without the need of implementing a new module.

What do y'all think?

CC: @Alexays

Syndelis avatar Mar 19 '24 11:03 Syndelis