sway: use caffeinated instead of disabling swayidle
This commit is contained in:
parent
9f4328a73a
commit
cc6110dcac
7 changed files with 57 additions and 18 deletions
|
@ -154,6 +154,7 @@ in
|
|||
wl-clipboard
|
||||
wtype
|
||||
wl-crosshair
|
||||
caffeinated
|
||||
|
||||
grim
|
||||
satty
|
||||
|
|
|
@ -19,7 +19,7 @@ let
|
|||
'';
|
||||
_suspend = pkgs.writeShellScriptBin "_suspend" ''
|
||||
${pkgs.sway}/bin/swaymsg mode default
|
||||
systemctl --user start swayidle.service
|
||||
pkill caffeinated || true
|
||||
systemctl suspend
|
||||
'';
|
||||
|
||||
|
@ -143,7 +143,7 @@ let
|
|||
|
||||
system_binds = {
|
||||
"--locked Ctrl+${mod}+z" = "exec ${_suspend}/bin/_suspend";
|
||||
"${mod}+Alt+c" = "exec ${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
|
||||
"${mod}+Alt+c" = "exec pkill caffeinated || exec caffeinated";
|
||||
};
|
||||
|
||||
screenshot_binds = {
|
||||
|
|
|
@ -3,12 +3,10 @@
|
|||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.my)
|
||||
key
|
||||
theme
|
||||
accent
|
||||
font
|
||||
|
@ -170,8 +168,8 @@ in
|
|||
};
|
||||
"custom/caffeine" = {
|
||||
format = "{}";
|
||||
exec = "systemctl --user status swayidle > /dev/null && echo || echo ";
|
||||
on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
|
||||
exec = "pgrep caffeinated > /dev/null && echo '' || echo '' ";
|
||||
on-click = "pkill caffeinated || exec caffeinated";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue