Open dotaxis opened 1 month ago
Is this meant to prevent hypridle from triggering?
Reason I ask is that matcha isn't easily installable as a package. You have to build it yourself from what I understand. So if we plan to integrate with swayidle or hypridle, we can do so without matcha and handle inhibiting rules.
Is this meant to prevent hypridle from triggering?
Yes
Reason I ask is that matcha isn't easily installable as a package. You have to build it yourself from what I understand. So if we plan to integrate with swayidle or hypridle, we can do so without matcha and handle inhibiting rules.
Even a script that kills/launches hypridle would be fine.
I'm just struggling to make the icon/widget properly reflect the state of that which is why I made the feature request. The only reason I suggested matcha is that it already exists and has the ability to run as a daemon. It also does so in a way that uses wayland protocols rather than dbus which is neat but not that important to me.
A solution would be to add an option where we can define commands that return a label (as in waybar)
So we could do something like if pidof ...; then ... else ...
in bash and dynamically change the button label
@dotaxis
you can use something like this
#!/usr/bin/env bash
check_idle(){
pid=$(pgrep hypridle)
if [[ "$pid" == "" ]]; then echo 'stopped'; else echo 'running'; fi
}
toggle(){
pkill hypridle || hypridle&
}
if [[ "$1" == "toggle" ]]; then
toggle
else
check_idle
fi
I know how to write a bash script that toggles hypridle.
I want a widget that has a different icon depending on whether it is running or not.
I guess you have to wait till we have something like user custom modules which is what I have been looking forward to. I did have a rough implementation for the idle inhibitor with the above script but it still lacks proper testing
It would be amazing to be able to make custom modules
Is your feature request related to a problem? Please describe. Waybar has an idle inhibitor widget which is very nice when on Zoom meetings or watching videos. AGS does not have an equivalent.
Describe the solution you'd like I would very much like to see the ability to replace one of the buttons in the dashboard with one that toggles idle inhibiting with matcha
Describe alternatives you've considered A widget that goes along the top bar is fine too but I'd really like it in the dashboard
Additional context This is kind of what I'm hoping to have, with an icon that reflects whether the inhibitor is active or not