Add swaylock-effects lock via lock.sh with fallback
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
opts=$' Lock\n Logout\n Suspend\n Reboot\n Shutdown'
|
||||
choice=$(printf '%s' "$opts" | rofi -dmenu -i -p "Power" -theme ~/.config/rofi/catppuccin.rasi -theme-str 'window {width: 300px;} listview {lines: 5;} entry {enabled: false;}')
|
||||
case "$choice" in
|
||||
*Lock) swaylock -f ;;
|
||||
*Lock) ~/.config/sway/lock.sh ;;
|
||||
*Logout) swaymsg exit ;;
|
||||
*Suspend) systemctl suspend ;;
|
||||
*Reboot) systemctl reboot ;;
|
||||
|
||||
@@ -28,7 +28,7 @@ client.background $base
|
||||
# Autostart
|
||||
exec_always sh -c 'pkill -x dunst; exec dunst'
|
||||
exec_always sh -c 'pkill -x nm-applet; exec nm-applet --indicator'
|
||||
bindsym $mod+Shift+x exec swaylock -f
|
||||
bindsym $mod+Shift+x exec ~/.config/sway/lock.sh
|
||||
|
||||
# Touchpad
|
||||
input type:touchpad {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
pkill -x swayidle
|
||||
exec swayidle -w \
|
||||
timeout 300 'swaylock -f' \
|
||||
timeout 300 "$HOME/.config/sway/lock.sh" \
|
||||
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
before-sleep 'swaylock -f'
|
||||
before-sleep "$HOME/.config/sway/lock.sh"
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Lock with swaylock-effects (blur + clock) if installed, else plain swaylock.
|
||||
pgrep -x swaylock >/dev/null && exit 0
|
||||
fx=$HOME/.local/bin/swaylock-effects
|
||||
if [ -x "$fx" ]; then
|
||||
exec "$fx" -f -C "$HOME/.config/swaylock/config-effects"
|
||||
fi
|
||||
exec swaylock -f
|
||||
@@ -0,0 +1,33 @@
|
||||
# Used only by swaylock-effects (see sway/lock.sh); stock swaylock reads ./config
|
||||
screenshots
|
||||
effect-blur=9x5
|
||||
effect-vignette=0.5:0.5
|
||||
fade-in=0.25
|
||||
clock
|
||||
timestr=%H:%M
|
||||
datestr=%A, %d %B
|
||||
indicator
|
||||
indicator-radius=100
|
||||
indicator-thickness=5
|
||||
indicator-caps-lock
|
||||
font=JetBrains Mono
|
||||
inside-color=0c0c0c88
|
||||
inside-clear-color=0c0c0c88
|
||||
inside-ver-color=0c0c0c88
|
||||
inside-wrong-color=0c0c0c88
|
||||
ring-color=e8e8e8
|
||||
ring-clear-color=8c8c8c
|
||||
ring-ver-color=ffffff
|
||||
ring-wrong-color=ff5c5c
|
||||
line-color=00000000
|
||||
line-clear-color=00000000
|
||||
line-ver-color=00000000
|
||||
line-wrong-color=00000000
|
||||
separator-color=00000000
|
||||
key-hl-color=ffffff
|
||||
bs-hl-color=ff5c5c
|
||||
text-color=e8e8e8
|
||||
text-clear-color=e8e8e8
|
||||
text-ver-color=e8e8e8
|
||||
text-wrong-color=ff5c5c
|
||||
show-failed-attempts
|
||||
Reference in New Issue
Block a user