diff --git a/.xinitrc b/.xinitrc index 4ff71dc..d636e95 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,14 +1,27 @@ #!/bin/sh # keyboard -numlockx +numlockx & # display -xrandr \ - --output eDP-1 --auto --primary \ - --output DisplayPort-1-1 --auto --pos 1920x0 \ - --output DisplayPort-1-2 --auto --pos 3840x0 -feh --bg-fill "$XDG_CONFIG_HOME/wallpapers/monerochan.png" --no-fehbg +xrandr \ + --output eDP-1 --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 @@ -19,13 +32,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"