Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.32k stars 689 forks source link

[Feature] Option to Execute Command Upon Entering State #1512

Open WammKD opened 2 years ago

WammKD commented 2 years ago

As the title denotes, you could designate a command to run for when the state switches to a particular state; it would run once and that would be it until it switches to a different state (assuming the config. file has any command set for said new state).

I'm thinking this could be useful in, say, the battery module to execute a notification to dunst when entering state full or even run a command to suspend when entering the state critical.

I'm assuming it wouldn't involve much more as waybar has to keep track of the state, anyway, so it's just executing a user command along with changing the icon, etc. but I always could be mistaken.

fbuetler commented 1 year ago

I'm thinking this could be useful in, say, the battery module to execute a notification to dunst when entering state full or even run a command to suspend when entering the state critical.

I was looking for exactly the same feature.

bhepple commented 1 year ago

me too!

simonvanderveldt commented 1 year ago

This sounds like a duplicate of https://github.com/Alexays/Waybar/issues/670