sync/i3/run.sh

24 lines
991 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-04-19 11:14:16 -04:00
while [ ! "$PASSWORD" = "a" ];do export PASSWORD=$((rofi -dmenu $(i3-color-rofi))</dev/null);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-04-13 08:12:43 -04:00
pass -c $(ls ~/.password-store/*/*|cut -b-37 --complement|rofi -dmenu $(i3-color-rofi)|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