feat: proper screen saver / lock screen
This commit is contained in:
parent
0124f169c3
commit
5a424e9592
31
.xinitrc
31
.xinitrc
@ -1,12 +1,28 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# keyboard
|
# keyboard
|
||||||
numlockx
|
numlockx &
|
||||||
|
|
||||||
# display
|
# display
|
||||||
xrandr \
|
xrandr \
|
||||||
--output HDMI1 --auto --primary
|
--output HDMI1 --auto --primary &
|
||||||
feh --bg-fill "$XDG_CONFIG_HOME/wallpapers/monerochan.png" --no-fehbg
|
feh --bg-fill "$XDG_CONFIG_HOME/wallpapers/monerochan.png" --no-fehbg &
|
||||||
|
(
|
||||||
|
lockimg="$XDG_CONFIG_HOME/wallpapers/lock.png"
|
||||||
|
|
||||||
|
# desktop
|
||||||
|
stimeout=1800
|
||||||
|
# laptop
|
||||||
|
ls -d /sys/class/power_supply/BAT*/ > /dev/null 2>&1 && stimeout=300
|
||||||
|
|
||||||
|
cycle=15 # lock 15 sec after stimeout
|
||||||
|
dpms="$((stimeout + cycle + 1))" # turn off screen 1 sec after lock
|
||||||
|
|
||||||
|
xss-lock -n "feh --fullscreen $lockimg" -- "i3lock -ftni $lockimg"
|
||||||
|
xset s "$stimeout" "$cycle"
|
||||||
|
xset dpms "$dpms" "$dpms" "$dpms"
|
||||||
|
) &
|
||||||
|
|
||||||
|
|
||||||
# startup
|
# startup
|
||||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & # arch
|
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & # arch
|
||||||
@ -17,13 +33,4 @@ redshift &
|
|||||||
dunst &
|
dunst &
|
||||||
sbar &
|
sbar &
|
||||||
|
|
||||||
xss-lock -- lock &
|
|
||||||
if ls -d /sys/class/power_supply/BAT*/ > /dev/null 2>&1; then
|
|
||||||
xset dpms 300 300 300 # Turn of the screen after 5 min
|
|
||||||
xset s 315 # Lock Screen after 15 secs later
|
|
||||||
else
|
|
||||||
xset dpms 1800 1800 1800 # Turn of the screen after 30 min
|
|
||||||
xset s 1815 # Lock Screen 15 sec later
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec dbus-launch dwm
|
exec dbus-launch dwm
|
||||||
|
BIN
bin/crypto
BIN
bin/crypto
Binary file not shown.
Loading…
Reference in New Issue
Block a user