From 55c720528f8b7d2978554e673d3c008daf1c08c0 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Tue, 12 Feb 2019 21:29:45 -0200 Subject: [PATCH] Powerarrow: Added brightness widget (not set by default) --- themes/powerarrow/icons/brightness.png | Bin 0 -> 1166 bytes themes/powerarrow/theme.lua | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 themes/powerarrow/icons/brightness.png diff --git a/themes/powerarrow/icons/brightness.png b/themes/powerarrow/icons/brightness.png new file mode 100644 index 0000000000000000000000000000000000000000..030d5249819ef552491bcd25eefe5f3ccff06007 GIT binary patch literal 1166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkEbHUgGKN%Kn&%N1TgW!fo|p1_l;sPZ!4!3qeK!miNCw+6OWC|Np-{ z2$SSQpaxLLfdP;`6NHiYa5#1DWt4I}}i9Y7e$PJ_y!7{UUQgaJlI#&1AH zZ9u;9zkmN2fiyQr4$3wLGTT6EKw<;|(4a#=3mIS@PK8)Z6t*Um;)9DHIDPx2jbDD<1G&o6)z4*} HQ$iB}cLmjy literal 0 HcmV?d00001 diff --git a/themes/powerarrow/theme.lua b/themes/powerarrow/theme.lua index 15dcf55..d93b4c5 100644 --- a/themes/powerarrow/theme.lua +++ b/themes/powerarrow/theme.lua @@ -57,6 +57,7 @@ theme.widget_ac = theme.dir .. "/icons/ac.png" theme.widget_battery = theme.dir .. "/icons/battery.png" theme.widget_battery_low = theme.dir .. "/icons/battery_low.png" theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.png" +theme.widget_brightness = theme.dir .. "/icons/brightness.png" theme.widget_mem = theme.dir .. "/icons/mem.png" theme.widget_cpu = theme.dir .. "/icons/cpu.png" theme.widget_temp = theme.dir .. "/icons/temp.png" @@ -270,6 +271,16 @@ local net = lain.widget.net({ end }) +-- Brigtness +local brighticon = wibox.widget.imagebox(theme.widget_brightness) +-- If you use xbacklight, comment the line with "light -G" and uncomment the line bellow +-- local brightwidget = awful.widget.watch('xbacklight -get', 0, +local brightwidget = awful.widget.watch('light -G', 0, + function(widget, stdout, stderr, exitreason, exitcode) + local brightness_level = tonumber(string.format("%.0f", stdout)) + widget:set_markup(markup.font(theme.font, " " .. brightness_level .. "%")) +end) + -- Separators local arrow = separators.arrow_left