Fix swaylock config
This commit is contained in:
@ -26,7 +26,6 @@ xwayland enable
|
|||||||
### Output configuration
|
### Output configuration
|
||||||
#
|
#
|
||||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||||
#output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
|
||||||
output * bg ~/.config/sway/background.png fill
|
output * bg ~/.config/sway/background.png fill
|
||||||
|
|
||||||
# Window decoration
|
# Window decoration
|
||||||
@ -53,9 +52,9 @@ exec mako
|
|||||||
# Example configuration:
|
# Example configuration:
|
||||||
#
|
#
|
||||||
exec swayidle -w \
|
exec swayidle -w \
|
||||||
timeout 300 'swaylock -f -c 000000' \
|
timeout 300 'swaylock-cool -f' \
|
||||||
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||||
before-sleep 'swaylock -f -c 000000'
|
before-sleep 'swaylock-cool -f'
|
||||||
|
|
||||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||||
# your displays after another 300 seconds, and turn your screens back on when
|
# your displays after another 300 seconds, and turn your screens back on when
|
||||||
@ -92,6 +91,9 @@ input * {
|
|||||||
# Start your launcher
|
# Start your launcher
|
||||||
bindsym $mod+d exec $menu
|
bindsym $mod+d exec $menu
|
||||||
|
|
||||||
|
# Lock the screen
|
||||||
|
bindsym $mod+Shift+Plus exec "swaylock-cool -f"
|
||||||
|
|
||||||
# Drag floating windows by holding down $mod and left mouse button.
|
# Drag floating windows by holding down $mod and left mouse button.
|
||||||
# Resize them with right mouse button + $mod.
|
# Resize them with right mouse button + $mod.
|
||||||
# Despite the name, also works for non-floating windows.
|
# Despite the name, also works for non-floating windows.
|
||||||
|
|||||||
39
tree/.config/sway/swaylock.config
Normal file
39
tree/.config/sway/swaylock.config
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
ignore-empty-password
|
||||||
|
font=Ubuntu
|
||||||
|
|
||||||
|
indicator-idle-visible
|
||||||
|
indicator-radius=240
|
||||||
|
indicator-thickness=20
|
||||||
|
indicator-caps-lock
|
||||||
|
|
||||||
|
key-hl-color=880033
|
||||||
|
|
||||||
|
separator-color=00000000
|
||||||
|
|
||||||
|
inside-color=00000099
|
||||||
|
inside-clear-color=ffd20400
|
||||||
|
inside-caps-lock-color=009ddc00
|
||||||
|
inside-ver-color=d9d8d800
|
||||||
|
inside-wrong-color=ee2e2400
|
||||||
|
|
||||||
|
ring-color=231f20D9
|
||||||
|
ring-clear-color=231f20D9
|
||||||
|
ring-caps-lock-color=231f20D9
|
||||||
|
ring-ver-color=231f20D9
|
||||||
|
ring-wrong-color=231f20D9
|
||||||
|
|
||||||
|
line-color=00000000
|
||||||
|
line-clear-color=ffd204FF
|
||||||
|
line-caps-lock-color=009ddcFF
|
||||||
|
line-ver-color=d9d8d8FF
|
||||||
|
line-wrong-color=ee2e24FF
|
||||||
|
|
||||||
|
text-clear-color=ffd20400
|
||||||
|
text-ver-color=d9d8d800
|
||||||
|
text-wrong-color=ee2e2400
|
||||||
|
|
||||||
|
bs-hl-color=ee2e24FF
|
||||||
|
caps-lock-key-hl-color=ffd204FF
|
||||||
|
caps-lock-bs-hl-color=ee2e24FF
|
||||||
|
disable-caps-lock-text
|
||||||
|
text-caps-lock-color=009ddc
|
||||||
29
tree/.local/bin/swaylock-cool
Executable file
29
tree/.local/bin/swaylock-cool
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
BLUR_FACTOR=64;
|
||||||
|
|
||||||
|
OPTIONAL_CMDS=("convert" "python3" "grim")
|
||||||
|
|
||||||
|
for CMD in $OPTIONAL_CMDS; do
|
||||||
|
if ! command -v "$CMD" &> /dev/null
|
||||||
|
then
|
||||||
|
echo "$CMD could not be found, falling back to basic mode."
|
||||||
|
|
||||||
|
swaylock --config ~/.config/sway/swaylock.config --color 302f3b $@
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
FILE="$(mktemp)"
|
||||||
|
FILE_RAW="$FILE.raw.jpg"
|
||||||
|
FILE="$FILE.jpg"
|
||||||
|
|
||||||
|
UPSCALE="$(python3 -c "print(100*$BLUR_FACTOR, end='')")%"
|
||||||
|
DOWNSCALE="$(python3 -c "print(100/$BLUR_FACTOR, end='')")%"
|
||||||
|
|
||||||
|
grim "$FILE_RAW"
|
||||||
|
|
||||||
|
convert -scale $DOWNSCALE -scale $UPSCALE "$FILE_RAW" "$FILE"
|
||||||
|
|
||||||
|
swaylock --config ~/.config/sway/swaylock.config --image "$FILE" $@
|
||||||
Reference in New Issue
Block a user