From 2d6b46adf4b132961fcce518ccc07d920df28abc Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 11 Jun 2013 22:39:53 +0200 Subject: [PATCH] Octopus utility --- .gitignore | 1 + Utils/octopus.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ bashrc | 3 +++ install.sh | 1 + xinitrc | 3 +++ 5 files changed, 65 insertions(+) create mode 100644 .gitignore create mode 100755 Utils/octopus.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/Utils/octopus.sh b/Utils/octopus.sh new file mode 100755 index 0000000..4d6416b --- /dev/null +++ b/Utils/octopus.sh @@ -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 diff --git a/bashrc b/bashrc index d056182..c90b0bd 100644 --- a/bashrc +++ b/bashrc @@ -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' diff --git a/install.sh b/install.sh index c34bebb..9abba1d 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/xinitrc b/xinitrc index 5ea6ba0..cadb59b 100644 --- a/xinitrc +++ b/xinitrc @@ -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"`