fix swayidle
This commit is contained in:
parent
a5c383ed14
commit
468a0d2850
|
@ -18,7 +18,7 @@ let
|
||||||
systemctl suspend
|
systemctl suspend
|
||||||
'';
|
'';
|
||||||
_sway_idle_toggle = pkgs.writeShellScriptBin "_sway_idle_toggle" ''
|
_sway_idle_toggle = pkgs.writeShellScriptBin "_sway_idle_toggle" ''
|
||||||
if pidof swayidle > /dev/null; then
|
if systemctl --user status swayidle > /dev/null; then
|
||||||
systemctl --user stop swayidle.service
|
systemctl --user stop swayidle.service
|
||||||
else
|
else
|
||||||
systemctl --user start swayidle.service
|
systemctl --user start swayidle.service
|
||||||
|
|
|
@ -88,7 +88,7 @@ in {
|
||||||
"sway/language" = { format = "{short} {variant}"; };
|
"sway/language" = { format = "{short} {variant}"; };
|
||||||
"custom/caffeine" = {
|
"custom/caffeine" = {
|
||||||
format = "{}";
|
format = "{}";
|
||||||
exec = "pidof swayidle > /dev/null && echo 鈴 || echo ";
|
exec = "systemctl --user status swayidle > /dev/null && echo 鈴 || echo ";
|
||||||
on-click = "_sway_idle_toggle";
|
on-click = "_sway_idle_toggle";
|
||||||
interval = 1;
|
interval = 1;
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
|
|
Loading…
Reference in a new issue