You are not logged in.

#1 2013-09-03 08:07:07

stozi
Member
Registered: 2010-03-02
Posts: 149

[SOLVED] openbox netctl connection status pipe-menu?

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

#2 2013-09-03 08:32:24

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [SOLVED] openbox netctl connection status pipe-menu?

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

#3 2013-09-03 10:22:39

stozi
Member
Registered: 2010-03-02
Posts: 149

Re: [SOLVED] openbox netctl connection status pipe-menu?

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

Board footer

Powered by FluxBB