From: Samir Benmendil Date: Mon, 17 Jun 2013 08:04:19 +0000 (+0200) Subject: Merge branch 'master' of tardis:/dotfiles X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/e724e4d7cf44ecd4b3f706678fa14f5bfe9b0879?hp=36f1d2d21da432e2a705426c798a5176bb9abe50 Merge branch 'master' of tardis:/dotfiles Conflicts: awesome/topbar.lua --- diff --git a/awesome/topbar.lua b/awesome/topbar.lua index 5f50ec8..587bfc4 100644 --- a/awesome/topbar.lua +++ b/awesome/topbar.lua @@ -6,8 +6,9 @@ local wibox = require("wibox") -- my widgets local volume_widget = require("widgets/volume_widget") +local battery_widget = { } if utils.host == "chronos" then - local battery_widget = require("widgets/battery_widget") + battery_widget = require("widgets/battery_widget") end local network_widget = require("widgets/network_widget") diff --git a/awesome/widgets/network_widget.lua b/awesome/widgets/network_widget.lua index 59ebeec..36c72e7 100644 --- a/awesome/widgets/network_widget.lua +++ b/awesome/widgets/network_widget.lua @@ -1,11 +1,13 @@ local wibox = require("wibox") local vicious = require("vicious") -local naughty = require("naughty") -local beautiful = require("beautiful") -local pairs = pairs +local utils = require("utils") module("network_widget") +local intf = "" +if utils.host == "chronos" then intf = "wlp3s0" end +if utils.host == "shada" then intf = "enp3s0" end + local function netclosure(intf) return function (_, args) local up_mb = args["{"..intf.." up_kb}"] @@ -15,6 +17,6 @@ local function netclosure(intf) end network_widget = wibox.widget.textbox() -vicious.register(network_widget, vicious.widgets.net, netclosure("enp3s0"), 1) +vicious.register(network_widget, vicious.widgets.net, netclosure(intf), 1) return network_widget