From f7c48f9a0010854fb0da8cf2a002ce84356f8e3e Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Mon, 29 Jun 2015 04:01:21 +0200 Subject: [PATCH] added some widgets to awesome --- .config/awesome/rc.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 82ac56ed..b774c57e 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -11,6 +11,7 @@ local beautiful = require("beautiful") local naughty = require("naughty") local menubar = require("menubar") require('naughty') +vicious = require("vicious") -- {{{ Error handling -- Check if awesome encountered an error during startup and fell back to @@ -100,6 +101,23 @@ for s = 1, screen.count() do end -- }}} +-- Initialize widgets + +local batwidget = wibox.widget.textbox() +vicious.register(batwidget, vicious.widgets.bat, "BAT: $1C | ", 20, "BAT0" ) + +local thermalwidget = wibox.widget.textbox() +vicious.register(thermalwidget, vicious.widgets.thermal, "CPU: $1C | ", 20, "thermal_zone0" ) + +cpuwidget = awful.widget.graph() +-- Graph properties +cpuwidget:set_width(50) +cpuwidget:set_background_color("#222222") +cpuwidget:set_color({ type = "linear", from = { 0, 0 }, to = { 10,0 }, stops = { {0, "#FF5656"}, {0.5, "#88A175"}, + {1, "#AECF96" }}}) + -- Register widget + vicious.register(cpuwidget, vicious.widgets.cpu, "$1") + -- {{{ Menu -- Create a laucher widget and a main menu @@ -251,6 +269,9 @@ for s = 1, screen.count() do -- Widgets that are aligned to the right local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(batwidget) + right_layout:add(thermalwidget) + right_layout:add(cpuwidget) if s == 1 then right_layout:add(wibox.widget.systray()) end right_layout:add(mytextclock) right_layout:add(mylayoutbox[s])