diff options
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/caffeine | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/.local/bin/caffeine b/.local/bin/caffeine index 4407544..014ee7d 100755 --- a/.local/bin/caffeine +++ b/.local/bin/caffeine @@ -55,7 +55,7 @@ caf_time() { dep_check "$menu" - printf "1\n3\n5\n10\n15\n30" | "$menu" -p " sleep after " + printf "1m\n3m\n5m\n10m\n15m\n30m" | "$menu" -p " sleep after " } drink() @@ -71,9 +71,10 @@ drink() disp="$(wlr-randr | grep -om1 '^[^ ]*')" swayidle \ - timeout "$(($1 - 5))" "brightnessctl --save; brightnessctl set 10%-" \ + timeout "$(($1 - 10))" "brightnessctl --save; brightnessctl set 10%-" \ resume "brightnessctl --restore" \ - timeout "$1" "wlr-randr --output ${disp} --off; swaylock" \ + timeout "$(($1 - 5))" "swaylock" \ + timeout "$1" "wlr-randr --output ${disp} --off" \ resume "wlr-randr --output ${disp} --on --adaptive-sync enabled" & echo $! > "$cfpid" |