Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #start or kill, and check is on trayer
- CheckIfTrayerIsOn=$(ps -A | grep trayer)
- case $1 in
- start)
- if [$CheckIfTrayerIsOn -eq ""]
- then
- case $2 in
- 2)
- width=4
- ;;
- #You may want to add more options but that's up to you
- *)
- width=2
- ;;
- esac
- trayer --edge bottom --align right --width $width & exit
- else
- exit
- fi
- ;;
- stop)
- pkill trayer
- ;;
- *)
- echo "Don't forget the input"
- exit 1
- esac
Advertisement
Add Comment
Please, Sign In to add comment