Add Swaylock config
This commit is contained in:
parent
47bc116e02
commit
84b401983b
3 changed files with 53 additions and 0 deletions
18
etc/skel/.config/swaylock/config
Normal file
18
etc/skel/.config/swaylock/config
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
indicator-caps-lock
|
||||||
|
indicator-idle-visible
|
||||||
|
ignore-empty-password
|
||||||
|
show-failed-attempts
|
||||||
|
show-keyboard-layout
|
||||||
|
font=Noto Sans
|
||||||
|
color=24273a
|
||||||
|
inside-color=363a4f
|
||||||
|
inside-ver-color=8bd5ca
|
||||||
|
inside-clear-color=cad3f5
|
||||||
|
inside-wrong-color=ed8796
|
||||||
|
inside-caps-lock-color=181926
|
||||||
|
key-hl-color=a6da95
|
||||||
|
ring-color=c6a0f6
|
||||||
|
ring-ver-color=7dc4e4
|
||||||
|
ring-wrong-color=ee99a0
|
||||||
|
ring-clear-color=8aadf4
|
||||||
|
ring-caps-lock-color=f5a97f
|
17
etc/skel/.config/swaylock/lock.sh
Executable file
17
etc/skel/.config/swaylock/lock.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script takes a screenshot of current output and adds a blur and vignette to it
|
||||||
|
|
||||||
|
cd /tmp
|
||||||
|
grim screen.png
|
||||||
|
|
||||||
|
# Delete existing image
|
||||||
|
rm screen-out.png
|
||||||
|
|
||||||
|
#Adds a blur and vignette
|
||||||
|
ffmpeg -i screen.png -vf "gblur=sigma=10, vignette=PI/5" -c:a copy screen-out.png
|
||||||
|
|
||||||
|
#Uses output image with Swaylock
|
||||||
|
swaylock \
|
||||||
|
--image screen-out.png \
|
||||||
|
--daemonize
|
|
@ -50,6 +50,24 @@ set $pulseaudio $term_float pulsemixer
|
||||||
# calendar application
|
# calendar application
|
||||||
set $calendar $term_float calcurse
|
set $calendar $term_float calcurse
|
||||||
|
|
||||||
|
### Idle configuration
|
||||||
|
# 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
|
||||||
|
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||||
|
#
|
||||||
|
set $lock ~/.config/swaylock/lock.sh
|
||||||
|
set $idle_timeout 240
|
||||||
|
set $locking_timeout 300
|
||||||
|
set $screen_timeout 600
|
||||||
|
set $idle swayidle -w \
|
||||||
|
timeout $idle_timeout 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)' \
|
||||||
|
timeout $locking_timeout $lock \
|
||||||
|
timeout $screen_timeout 'swaymsg "output * power off"' \
|
||||||
|
resume 'swaymsg "output * power on"' \
|
||||||
|
before-sleep 'playerctl pause' \
|
||||||
|
before-sleep $lock \
|
||||||
|
lock $lock &
|
||||||
|
|
||||||
# workspace names
|
# workspace names
|
||||||
set $ws1 number 1
|
set $ws1 number 1
|
||||||
set $ws2 number 2
|
set $ws2 number 2
|
||||||
|
|
Loading…
Add table
Reference in a new issue