remove network widget
This commit is contained in:
parent
86657f0089
commit
dcd6f62690
|
@ -1,27 +0,0 @@
|
|||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local watch = require("awful.widget.watch")
|
||||
|
||||
local NETWORK_DEVICE = "/home/pmakhov/.config/awesome/awesome-wm-widgets/network-widget/networkio.sh"
|
||||
|
||||
net_widget = wibox.widget {
|
||||
font = "Play 9",
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
local rspeed_prev = 0;
|
||||
local tspeed_prev = 0;
|
||||
|
||||
watch(NETWORK_DEVICE, 1,
|
||||
function(widget, stdout, _, _, _)
|
||||
local r, t = string.match(stdout, '(%d+);(%d+)')
|
||||
|
||||
local rspeed = r - rspeed_prev
|
||||
local tspeed = t - tspeed_prev
|
||||
|
||||
rspeed_prev = r
|
||||
tspeed_prev = t
|
||||
|
||||
widget:set_text(rspeed)
|
||||
end,
|
||||
net_widget)
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
ACTIVE_INTERFACE="$(ip -o link show | awk '$9~/UP/{sub(":","",$2);print $2}')"
|
||||
|
||||
IO="$(cat /proc/net/dev | grep ${ACTIVE_INTERFACE} | sed "s/.*://" | awk '{printf $1";"$9}')"
|
||||
|
||||
echo "${IO}"
|
Loading…
Reference in New Issue