sync/i3/run.sh

24 lines
1011 B
Bash
Raw Normal View History

#!/bin/zsh
if [ "$1" = "lock" ];then
2015-03-12 16:54:37 -04:00
#synclient TouchpadOff=1
MOUSE=$(xinput list | grep Mouse | sed -e 's/.*id=//' | cut -f 1)
TRACK=$(xinput list | grep 'TouchPad' | sed -e 's/.*id=//' | cut -f 1)
xinput set-prop $MOUSE "Device Enabled" 0
xinput set-prop $TRACK "Device Enabled" 0
2015-03-13 20:50:40 -04:00
while [ ! "$PASSWORD" = "a" ];do export PASSWORD=$(echo|dmenu -sb \#1c1c1c -nb \#121212 -f -p Locked);done
2015-03-12 16:54:37 -04:00
xinput set-prop $MOUSE "Device Enabled" 1
xinput set-prop $TRACK "Device Enabled" 1
#synclient TouchpadOff=0
fi
if [ "$1" = "pass" ];then
2015-03-13 20:50:40 -04:00
pass -c $(ls ~/.password-store/*/*|cut -b-37 --complement|dmenu -sb \#1c1c1c -nb \#121212 -f -l 5|sed -e 's/\.gpg//')
fi
if [ "$1" = "screensaver" ];then
cat /tmp/noss||i3lock -di `shuf -n1 -e ~/.i3/wall/*`
fi
if [ "$1" = "wall" ];then
#if [[ -d ~/.i3/wallOM ]];then feh --bg-scale "`shuf -n1 -e ~/.i3/wallOM/*`";else feh --bg-scale "`shuf -n1 -e ~/.i3/wall/*`";fi;
feh --bg-scale "$(shuf -n1 -e ~/.i3/wallOM/*)"
#feh --bg-scale ~/.i3/wall/fbfKNDk.png
fi