diff options
author | streetturtle <streetturtle@gmail.com> | 2018-01-20 21:52:20 -0500 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2018-01-20 21:52:20 -0500 |
commit | dcd6f6269018c6d5f3257c77a69624cf76fcc5d2 (patch) | |
tree | 1dbc560052c844f11a0f40a973b46e59a8d4a66a | |
parent | 86657f00894d3badbca6a52331db7d0f43c2709c (diff) |
remove network widget
-rw-r--r-- | network-widget/network.lua | 27 | ||||
-rwxr-xr-x | network-widget/networkio.sh | 7 |
2 files changed, 0 insertions, 34 deletions
diff --git a/network-widget/network.lua b/network-widget/network.lua deleted file mode 100644 index 898be24..0000000 --- a/network-widget/network.lua +++ /dev/null @@ -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) diff --git a/network-widget/networkio.sh b/network-widget/networkio.sh deleted file mode 100755 index db3d774..0000000 --- a/network-widget/networkio.sh +++ /dev/null @@ -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}" |