Octopus is growing :p

This commit is contained in:
Frank Villaro-Dixon 2013-06-11 23:26:08 +02:00
parent 2d6b46adf4
commit 7ac638392a
3 changed files with 43 additions and 19 deletions

View file

@ -1,5 +1,6 @@
#!/bin/bash
#OCTOPUS=~/Programmation/Utils/octopus.sh
#This octopus handles all the actions like volume up, refresh status bar, etc..
if [ $# -lt 1 ]
@ -19,7 +20,7 @@ case $1 in
amixer -q set Master 5%- unmute
;;
"mute")
amixer -q set Master toogle
amixer -q set Master toggle
;;
esac
$0 refresh
@ -45,13 +46,30 @@ case $1 in
;;
"refresh")
# blah blah
echo "blah!"
DATE=`date +"%F, %H:%M:%S - %s"`
BATT=$( acpi -b | sed 's/.*[charg.|], \([0-9]*\)%.*/\1/gi' )
VOLUME=`amixer get Master | tail -n 2 | head -n 1 | cut -d' ' -f7`
MEM=`awk '/MemTotal/ {printf( "%.0fMb", $2 / 1024 )}' /proc/meminfo`
xsetroot -name "$VOLUME :: $MEM :: $BATT :: $DATE"
;;
"wallpaper")
# blah blah
echo "changing the wallpaper!"
~/Pictures/wallpapers/chooseWP.sh &
;;
"init-all")
xrandr | grep "VGA1 disconnected" > /dev/null
if [ $? -eq 0 ]
then
$0 monitor laptop
else
$0 monitor extern
fi
$0 wallpaper
esac
# vim: ts=4

18
bashrc
View file

@ -88,10 +88,20 @@ alias makew='make'
alias BSI2='cd ~/Documents/UniGE/BSI2*/'
MONITOR_PATH=~/Programmation/Utils/monitor.sh
alias dual='$MONITOR_PATH dual'
alias laptop='$MONITOR_PATH laptop'
alias extern='$MONITOR_PATH extern'
OCTOPUS=~/Programmation/Utils/octopus.sh
alias dual='$OCTOPUS monitor dual'
alias laptop='$OCTOPUS monitor laptop'
alias extern='$OCTOPUS monitor extern'
alias volup='$OCTOPUS volume up'
alias voldown='$OCTOPUS volume down'
alias volmute='$OCTOPUS volume mute'
#MONITOR_PATH=~/Programmation/Utils/monitor.sh
#alias dual='$MONITOR_PATH dual'
#alias laptop='$MONITOR_PATH laptop'
#alias extern='$MONITOR_PATH extern'
#alias 'make celan'='make clean'

16
xinitrc
View file

@ -13,22 +13,18 @@ fi
#DWM
#First, choose the wallpaper (important, isn't it ? :p)
~/Pictures/wallpapers/chooseWP.sh &
export PATH=~/Programmation/Utils/:$PATH
source ~/.bashrc
$OCTOPUS init-all
#Java
wmname LG3D
while true; do
DATE=`date +"%F, %H:%M:%S - %s"`
BATT=$( acpi -b | sed 's/.*[charg.|], \([0-9]*\)%.*/\1/gi' )
# STATUS=$( acpi -b | sed 's/.*: \([a-zA-Z]*\),.*/\1/gi' )
VOLUME=`amixer get Master | tail -n 2 | head -n 1 | cut -d' ' -f7`
MEM=`awk '/MemTotal/ {printf( "%.0fMb", $2 / 1024 )}' /proc/meminfo`
xsetroot -name "$VOLUME :: $MEM :: $BATT :: $DATE"
$OCTOPUS refresh
sleep 2
done &