ftpfct and audio control
This commit is contained in:
parent
d2df6b316e
commit
58e0bfe30f
6 changed files with 42 additions and 3 deletions
|
@ -8,6 +8,8 @@ FANFILE=/proc/acpi/ibm/fan
|
|||
|
||||
ACPI='acpi -V'
|
||||
|
||||
REFRESH=10
|
||||
|
||||
function set_fan
|
||||
{
|
||||
echo "level $1" | sudo tee $FANFILE > /dev/null
|
||||
|
@ -32,24 +34,30 @@ while true; do
|
|||
xsetroot PROC PROBLEM
|
||||
set_fan full_speed
|
||||
echo "full speed"
|
||||
REFRESH=10
|
||||
elif [ $TEMP -lt 46 ]; then
|
||||
set_fan 0
|
||||
echo "lt 46"
|
||||
REFRESH=10
|
||||
elif [ $TEMP -lt 56 ]; then
|
||||
set_fan 1
|
||||
echo "lt 56"
|
||||
REFRESH=5
|
||||
elif [ $TEMP -lt 66 ]; then
|
||||
set_fan 2
|
||||
echo "lt 66"
|
||||
REFRESH=4
|
||||
elif [ $TEMP -lt 70 ]; then
|
||||
set_fan 5
|
||||
echo "lt 66"
|
||||
REFRESH=3
|
||||
else
|
||||
set_fan full-speed
|
||||
echo "full speed"
|
||||
REFRESH=2
|
||||
fi;
|
||||
|
||||
sleep 10
|
||||
sleep $REFRESH
|
||||
|
||||
done
|
||||
|
||||
|
|
|
@ -26,6 +26,22 @@ case $1 in
|
|||
$0 refresh
|
||||
;;
|
||||
|
||||
"audio")
|
||||
case $2 in
|
||||
"toggle")
|
||||
mpc toggle
|
||||
;;
|
||||
"next")
|
||||
mpc next
|
||||
;;
|
||||
"prev")
|
||||
mpc prev
|
||||
;;
|
||||
esac
|
||||
$0 refresh
|
||||
;;
|
||||
|
||||
|
||||
"monitor")
|
||||
case $2 in
|
||||
"extern")
|
||||
|
@ -64,13 +80,14 @@ case $1 in
|
|||
#BATT=$( acpi -b | sed 's/.*[charg.|], \([0-9]*\)%.*/\1/gi' )
|
||||
VOLUME=`amixer get Master | tail -n 2 | head -n 1 | cut -d' ' -f7`
|
||||
## VOLUME=`amixer get Master | grep '\[' | cut -d' ' -f6`
|
||||
SONG=`mpc | head -n 1 | cut -d. -f1`
|
||||
|
||||
MEMFREE=`awk '/MemFree/ {printf( "%.0f", $2 / 1024 )}' /proc/meminfo`
|
||||
MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo`
|
||||
MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc`
|
||||
BEAT_TIME=`beat -v`
|
||||
|
||||
xsetroot -name "Vol $VOLUME :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE (@$BEAT_TIME)"
|
||||
xsetroot -name "Vol $VOLUME :: [$SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE (@$BEAT_TIME)"
|
||||
;;
|
||||
|
||||
"wallpaper")
|
||||
|
|
|
@ -85,6 +85,9 @@ static const char *volup[] = {"octopus.sh", "vol", "up", NULL};
|
|||
static const char *voldown[] = {"octopus.sh", "vol", "down", NULL};
|
||||
static const char *volmute[] = {"octopus.sh", "vol", "mute", NULL};
|
||||
static const char *lockcmd[] = {"octopus.sh", "lock", NULL};
|
||||
static const char *audioplay[] = {"octopus.sh", "audio", "toggle", NULL};
|
||||
static const char *audionext[] = {"octopus.sh", "audio", "next", NULL};
|
||||
static const char *audioprev[] = {"octopus.sh", "audio", "prev", NULL};
|
||||
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
|
@ -116,9 +119,13 @@ static Key keys[] = {
|
|||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = volup } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = voldown } },
|
||||
{ 0, XF86XK_AudioMute, spawn, { .v = volmute } },
|
||||
{ 0, XF86XK_AudioPlay, spawn, { .v = audioplay } },
|
||||
{ 0, XF86XK_AudioPrev, spawn, { .v = audioprev } },
|
||||
{ 0, XF86XK_AudioNext, spawn, { .v = audionext } },
|
||||
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
|
|
|
@ -21,7 +21,6 @@ set my_aei_smtp_pass=`~/.mutt/unlock-passC.sh aei_smtp`
|
|||
set my_aei_imap_pass=`~/.mutt/unlock-passC.sh aei_imap`
|
||||
|
||||
|
||||
|
||||
### MOTS DE PASSE
|
||||
###source "~/.mutt/unlock-pass.sh |"
|
||||
|
||||
|
@ -117,6 +116,7 @@ set alias_file=~/.mutt/alias
|
|||
set sort_alias = alias
|
||||
set reverse_alias = yes
|
||||
source $alias_file
|
||||
set query_command="~/.mutt/grep_ldap.sh '%s'"
|
||||
|
||||
set date_format="%y-%m-%d %T"
|
||||
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
|
||||
|
|
|
@ -20,3 +20,5 @@ foo
|
|||
baz
|
||||
quux
|
||||
mutex
|
||||
batchs
|
||||
csv
|
||||
|
|
5
xinitrc
5
xinitrc
|
@ -34,6 +34,11 @@ $OCTOPUS init-all 1>&2 /dev/shm/Octopus_logs &
|
|||
$OCTOPUS init-wifi 1>&2 /dev/shm/Octopus_logs &
|
||||
ftpfct.sh >/dev/null &
|
||||
|
||||
ps aux | grep mpd | grep -v grep
|
||||
if [ $? -eq 1 ]; then
|
||||
mpd &
|
||||
fi;
|
||||
|
||||
while true; do
|
||||
$OCTOPUS refresh
|
||||
sleep 50
|
||||
|
|
Loading…
Reference in a new issue