summaryrefslogtreecommitdiff
path: root/awesome
diff options
context:
space:
mode:
Diffstat (limited to 'awesome')
-rw-r--r--awesome/rc.lua29
1 files changed, 22 insertions, 7 deletions
diff --git a/awesome/rc.lua b/awesome/rc.lua
index 5ea23c3..661ea2a 100644
--- a/awesome/rc.lua
+++ b/awesome/rc.lua
@@ -144,7 +144,7 @@ function create_bat_widget()
io.close(fd)
end
function bat_string(widget, state)
- local charge = ' 🔋' .. state[2] .. '% '
+ local charge = state[2] .. '%'
if state[2] < 10 then
charge = '<span background="' .. beautiful.bg_urgent .. '">' .. charge .. '</span>'
end
@@ -152,7 +152,12 @@ function create_bat_widget()
end
local text = wibox.widget.textbox()
vicious.register(text, vicious.widgets.bat, bat_string, 60, bat_name)
- return text
+ return wibox.widget {
+ wibox.widget.textbox("🔋"),
+ text,
+ spacing = 5,
+ layout = wibox.layout.fixed.horizontal
+ }
end
local batwidget = create_bat_widget()
@@ -167,8 +172,9 @@ function create_cpu_widget()
graph:set_width(50)
vicious.register(graph, vicious.widgets.cpu, "$1", 2)
return wibox.widget {
- wibox.widget.textbox(" CPU "),
+ wibox.widget.textbox("CPU"),
wibox.container.mirror(graph, { horizontal = true }),
+ spacing = 5,
layout = wibox.layout.fixed.horizontal
}
end
@@ -189,13 +195,24 @@ function create_mem_widget()
layout = wibox.container.rotate
}
return wibox.widget {
- wibox.widget.textbox(" Mem "),
+ wibox.widget.textbox("Mem"),
rotated_bar,
+ spacing = 5,
layout = wibox.layout.fixed.horizontal
}
end
local memwidget = create_mem_widget()
+local info_widgets = wibox.widget {
+ wibox.widget.textbox(),
+ cpuwidget,
+ memwidget,
+ batwidget,
+ wibox.widget.textbox(),
+ spacing = 5,
+ layout = wibox.layout.fixed.horizontal
+}
+
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
awful.button({ }, 1, function(t) t:view_only() end),
@@ -301,9 +318,7 @@ awful.screen.connect_for_each_screen(function(s)
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
--mykeyboardlayout,
- cpuwidget,
- memwidget,
- batwidget,
+ info_widgets,
s.mylayoutbox,
wibox.widget.systray(),
mytextclock,