You are not logged in.
Conky is nicely displaying my wifi connection strength, but I would like to have this in an openbox pipe menu and get rid of Conky. Sorry but I couldn't pick up any clues on how to write the needed script from .conkyrc or the wikis. Thanks very much for any help.
Last edited by stozi (2013-09-03 10:23:13)
Offline
I guess you can read the strength from /proc/net/wireless.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Thanks very much, here's my pipe-menu:
#!/bin/bash
now=$(</sys/class/power_supply/BAT0/charge_now)
full=$(</sys/class/power_supply/BAT0/charge_full)
Date=$(date '+%R %a %x')
Wifi=$(awk 'NR==3 {print $3}' /proc/net/wireless)
Batt=$(awk '{ printf("%.2f\n", $1/$2 * 100) }' <<< "$now $full")
echo "<openbox_pipe_menu>"
echo "<separator label=\"$Date\"/>"
echo "<separator />"
echo "<item label=\"Wifi: $Wifi%\"/>"
echo "<item label=\"Batt: $Batt%\"/>"
echo "</openbox_pipe_menu>"Last edited by stozi (2013-09-05 09:09:24)
Offline