diff options
| -rw-r--r-- | .fvwm2rc | 2 | ||||
| -rw-r--r-- | .stalonetrayrc | 11 | ||||
| -rwxr-xr-x | bin/status2 | 27 |
3 files changed, 39 insertions, 1 deletions
@@ -42,7 +42,7 @@ AddToFunc "StartFunction" + I Test (Init) Exec stalonetray + I Test (Init) Exec nm-applet + I Exec status2 -#+ "I" Module FvwmPager 0 0 ++ I Module FvwmPager 0 0 #+ "I" Exec dunst #+ "I" Exec xsetroot -solid rgb:3/4/5 #+ "I" Exec setxkbmap fr diff --git a/.stalonetrayrc b/.stalonetrayrc new file mode 100644 index 0000000..97b8f37 --- /dev/null +++ b/.stalonetrayrc @@ -0,0 +1,11 @@ +# ~/.stalonetrayrc +background "#103040" +#geometry 1x1-510-0 +geometry 1x1-590-0 +grow_gravity NE +icon_gravity NE +icon_size 24 +# kludges fix_window_pos,force_icons_size +window_layer bottom +window_strut none +#dockapp_mode wmaker diff --git a/bin/status2 b/bin/status2 new file mode 100755 index 0000000..a6233a9 --- /dev/null +++ b/bin/status2 @@ -0,0 +1,27 @@ +#!/bin/sh + +ip() { + while read -r w1 w2 w3; do + [ $w1 = /32 ] && [ $w2 = host ] && [ $ip != 127.0.0.1 ] && break + ip=$w2 + done < /proc/net/fib_trie +} + +power() { + while read -r line; do + case $line in POWER_SUPPLY_CAPACITY*) power=${line#*=}% && break;; esac + done < /sys/class/power_supply/BAT0/uevent +} + +status() { + power + ip + sound="$(pamixer --get-volume-human)" + clock="$(date +'%a %d %b %H:%M')" +} + +while true; do + status && echo "$ip , power $power , sound $sound , $clock" + sleep 17 +done | +root-tail -g '500x20-80-0' -fn '-*-terminus-bold-r-*-*-14-*-*-*-*-*-*-*' --color grey70 - |
