Merge branch 'user/okmans/screensaver/improvements' into 'master'
Improvements in running screensaver See merge request tile-os/tileos-settings-sway!15
This commit is contained in:
commit
307f026e9d
5 changed files with 17 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"label": "Lock",
|
"label": "Lock",
|
||||||
"exec": "swaymsg exec ~/.config/swaylock/lock.sh",
|
"exec": "swaymsg exec /usr/share/sway/scripts/lock.sh",
|
||||||
"icon": "system-lock-screen"
|
"icon": "system-lock-screen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
timeout 240 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)'
|
timeout 240 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)'
|
||||||
timeout 300 ~/.config/swaylock/lock.sh
|
timeout 300 '/usr/share/sway/scripts/lock.sh'
|
||||||
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
|
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
|
||||||
timeout 900 'systemctl suspend'
|
timeout 900 'systemctl suspend'
|
||||||
before-sleep 'playerctl pause'
|
before-sleep 'playerctl pause'
|
||||||
before-sleep ~/.config/swaylock/lock.sh
|
before-sleep '/usr/share/sway/scripts/lock.sh'
|
||||||
lock ~/.config/swaylock/lock.sh
|
lock '/usr/share/sway/scripts/lock.sh'
|
||||||
|
|
|
@ -125,5 +125,8 @@ set $calendar_daemon 'calcurse --daemon'
|
||||||
# Notifications from Swappy
|
# Notifications from Swappy
|
||||||
set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh'
|
set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh'
|
||||||
|
|
||||||
|
# Start a screensaver
|
||||||
|
set $lock '/usr/share/sway/scripts/lock.sh'
|
||||||
|
|
||||||
# Toggle shortcuts inhibition mode for the current focused window
|
# Toggle shortcuts inhibition mode for the current focused window
|
||||||
set $toggle_shorcuts_inhibitor 'swaymsg "seat - shortcuts_inhibitor toggle"'
|
set $toggle_shorcuts_inhibitor 'swaymsg "seat - shortcuts_inhibitor toggle"'
|
||||||
|
|
10
usr/share/sway/scripts/lock.sh
Executable file
10
usr/share/sway/scripts/lock.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
USER_SCRIPT="$HOME/.config/swaylock/lock.sh"
|
||||||
|
GLOB_SCRIPT="/usr/share/sway/scripts/swaylock.sh"
|
||||||
|
|
||||||
|
if [[ -x "$USER_SCRIPT" ]]; then
|
||||||
|
"$USER_SCRIPT"
|
||||||
|
else
|
||||||
|
"$GLOB_SCRIPT"
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue