sync/i3/run.sh
2015-03-12 16:54:37 -04:00

24 lines
959 B
Bash
Executable File

#!/bin/zsh
if [ "$1" = "lock" ];then
#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
while [ ! "$PASSWORD" = "a" ];do export PASSWORD=$(echo|dmenu -f -p Locked);done
xinput set-prop $MOUSE "Device Enabled" 1
xinput set-prop $TRACK "Device Enabled" 1
#synclient TouchpadOff=0
fi
if [ "$1" = "pass" ];then
pass -c $(ls ~/.password-store/*/*|cut -b-37 --complement|dmenu -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