diff --git a/.xinitrc b/.xinitrc index 1782da4..9291689 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,12 +1,28 @@ #!/bin/sh # keyboard -numlockx +numlockx & # display xrandr \ - --output HDMI1 --auto --primary -feh --bg-fill "$XDG_CONFIG_HOME/wallpapers/monerochan.png" --no-fehbg + --output HDMI1 --auto --primary & +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 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & # arch @@ -17,13 +33,4 @@ redshift & dunst & 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 diff --git a/bin/crypto b/bin/crypto index c46ecf8..dd6c84a 100755 Binary files a/bin/crypto and b/bin/crypto differ diff --git a/bin/lock b/bin/lock deleted file mode 100755 index 8ba88c9..0000000 --- a/bin/lock +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -i3lock -ftni "$XDG_CONFIG_HOME/wallpapers/lock.png"