Octopus utility

This commit is contained in:
Frank Villaro-Dixon 2013-06-11 22:39:53 +02:00
parent 16e8ae4790
commit 2d6b46adf4
5 changed files with 65 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.swp

57
Utils/octopus.sh Executable file
View file

@ -0,0 +1,57 @@
#!/bin/bash
#This octopus handles all the actions like volume up, refresh status bar, etc..
if [ $# -lt 1 ]
then
echo "Usage : $0 [volup|voldown|refresh|...]"
exit
fi
case $1 in
"vol"|"volume")
case $2 in
"up")
amixer -q set Master 5%+ unmute
;;
"down")
amixer -q set Master 5%- unmute
;;
"mute")
amixer -q set Master toogle
;;
esac
$0 refresh
;;
"monitor")
case $2 in
"extern")
xrandr --output LVDS1 --off \
--output VGA1 --auto --rotate normal
;;
"laptop")
xrandr --output LVDS1 --auto --rotate normal \
--output VGA1 --off
;;
"dual")
xrandr --output LVDS1 --auto --rotate normal \
--output VGA1 --auto --rotate normal \
--right-of LVDS1
;;
esac
$0 wallpaper
;;
"refresh")
# blah blah
echo "blah!"
;;
"wallpaper")
# blah blah
echo "changing the wallpaper!"
;;
esac

3
bashrc
View file

@ -1,6 +1,9 @@
#####POUR PAS S'ECRIRE DESSUS
shopt -s checkwinsize
#Launch startx when login
[[ -z $DISPLAY && $XDG_VTNR -le 4 ]] && exec startx
shopt -s histappend
PROMPT_COMMAND='history -a'

View file

@ -41,3 +41,4 @@ ln -s $WAI/Utils/monitor.sh ./monitor.sh
ln -s $WAI/Utils/monitorOff.sh ./monitorOff.sh
ln -s $WAI/Utils/track.sh ./track.sh
ln -s $WAI/Utils/blink.sh ./blink.sh
ln -s $WAI/Utils/octopus.sh ./octopus.sh

View file

@ -16,6 +16,9 @@ fi
#First, choose the wallpaper (important, isn't it ? :p)
~/Pictures/wallpapers/chooseWP.sh &
#Java
wmname LG3D
while true; do
DATE=`date +"%F, %H:%M:%S - %s"`