Octopus is growing :p
This commit is contained in:
parent
2d6b46adf4
commit
7ac638392a
3 changed files with 43 additions and 19 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
#OCTOPUS=~/Programmation/Utils/octopus.sh
|
||||||
#This octopus handles all the actions like volume up, refresh status bar, etc..
|
#This octopus handles all the actions like volume up, refresh status bar, etc..
|
||||||
|
|
||||||
if [ $# -lt 1 ]
|
if [ $# -lt 1 ]
|
||||||
|
@ -19,7 +20,7 @@ case $1 in
|
||||||
amixer -q set Master 5%- unmute
|
amixer -q set Master 5%- unmute
|
||||||
;;
|
;;
|
||||||
"mute")
|
"mute")
|
||||||
amixer -q set Master toogle
|
amixer -q set Master toggle
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
$0 refresh
|
$0 refresh
|
||||||
|
@ -45,13 +46,30 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"refresh")
|
"refresh")
|
||||||
# blah blah
|
DATE=`date +"%F, %H:%M:%S - %s"`
|
||||||
echo "blah!"
|
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")
|
"wallpaper")
|
||||||
# blah blah
|
~/Pictures/wallpapers/chooseWP.sh &
|
||||||
echo "changing the wallpaper!"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"init-all")
|
||||||
|
|
||||||
|
xrandr | grep "VGA1 disconnected" > /dev/null
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
$0 monitor laptop
|
||||||
|
else
|
||||||
|
$0 monitor extern
|
||||||
|
fi
|
||||||
|
|
||||||
|
$0 wallpaper
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# vim: ts=4
|
||||||
|
|
18
bashrc
18
bashrc
|
@ -88,10 +88,20 @@ alias makew='make'
|
||||||
|
|
||||||
alias BSI2='cd ~/Documents/UniGE/BSI2*/'
|
alias BSI2='cd ~/Documents/UniGE/BSI2*/'
|
||||||
|
|
||||||
MONITOR_PATH=~/Programmation/Utils/monitor.sh
|
OCTOPUS=~/Programmation/Utils/octopus.sh
|
||||||
alias dual='$MONITOR_PATH dual'
|
alias dual='$OCTOPUS monitor dual'
|
||||||
alias laptop='$MONITOR_PATH laptop'
|
alias laptop='$OCTOPUS monitor laptop'
|
||||||
alias extern='$MONITOR_PATH extern'
|
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'
|
#alias 'make celan'='make clean'
|
||||||
|
|
||||||
|
|
16
xinitrc
16
xinitrc
|
@ -13,22 +13,18 @@ fi
|
||||||
|
|
||||||
#DWM
|
#DWM
|
||||||
|
|
||||||
#First, choose the wallpaper (important, isn't it ? :p)
|
export PATH=~/Programmation/Utils/:$PATH
|
||||||
~/Pictures/wallpapers/chooseWP.sh &
|
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
$OCTOPUS init-all
|
||||||
|
|
||||||
#Java
|
#Java
|
||||||
wmname LG3D
|
wmname LG3D
|
||||||
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
DATE=`date +"%F, %H:%M:%S - %s"`
|
$OCTOPUS refresh
|
||||||
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"
|
|
||||||
sleep 2
|
sleep 2
|
||||||
done &
|
done &
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue