From a0131235274d4b6e6de63cf237434699037b6e4f Mon Sep 17 00:00:00 2001 From: Luca CPZ Date: Mon, 17 Sep 2018 21:35:27 +0200 Subject: [PATCH] fs widget disabled by default; #235 --- rc.lua.template | 2 +- themes/blackburn/theme.lua | 11 ++++++----- themes/copland/theme.lua | 14 ++++++++------ themes/dremora/theme.lua | 12 +++++++----- themes/holo/theme.lua | 12 +++++++----- themes/multicolor/theme.lua | 14 ++++++++------ themes/powerarrow-dark/theme.lua | 8 +++++--- themes/powerarrow/theme.lua | 14 ++++++++------ themes/rainbow/theme.lua | 14 ++++++++------ themes/steamburn/theme.lua | 10 ++++++---- 10 files changed, 64 insertions(+), 47 deletions(-) diff --git a/rc.lua.template b/rc.lua.template index dc726fb..faa8270 100644 --- a/rc.lua.template +++ b/rc.lua.template @@ -383,7 +383,7 @@ globalkeys = my_table.join( {description = "dropdown application", group = "launcher"}), -- Widgets popups - awful.key({ altkey, }, "c", function () beautiful.cal.show(7) end, + awful.key({ altkey, }, "c", function () if beautiful.cal then beautiful.cal.show(7) end end, {description = "show calendar", group = "widgets"}), awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end, {description = "show filesystem", group = "widgets"}), diff --git a/themes/blackburn/theme.lua b/themes/blackburn/theme.lua index f2e9f52..69fbd65 100644 --- a/themes/blackburn/theme.lua +++ b/themes/blackburn/theme.lua @@ -88,11 +88,12 @@ theme.cal = lain.widget.cal({ font = "Misc Tamsyn 11", fg = theme.fg_normal, bg = theme.bg_normal -}}) + } +}) -- Mail IMAP check --[[ commented because it needs to be set before use -local mail = lain.widget.imap({ +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -132,7 +133,7 @@ theme.mpd = lain.widget.mpd({ }) -- /home fs ---[[ commented because it uses +--[[ commented because it needs Gio/Glib >= 2.54 theme.fs = lain.widget.fs({ notification_preset = { fg = white, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, settings = function() @@ -257,10 +258,10 @@ function theme.at_screen_connect(s) wibox.widget.systray(), first, theme.mpd.widget, - --mail.widget, + --theme.mail.widget, theme.weather.icon, theme.weather.widget, - theme.fs.widget, + --theme.fs.widget, bat, theme.volume.widget, mytextclock, diff --git a/themes/copland/theme.lua b/themes/copland/theme.lua index 9d444a5..5192853 100644 --- a/themes/copland/theme.lua +++ b/themes/copland/theme.lua @@ -108,9 +108,9 @@ theme.cal = lain.widget.cal({ } }) ---[[ Mail IMAP check --- commented because it needs to be set before use -local mail = lain.widget.imap({ +-- Mail IMAP check +--[[ commented because it needs to be set before use +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -202,6 +202,7 @@ local batbg = wibox.container.background(batbar, "#474747", gears.shape.rectangl local batwidget = wibox.container.margin(batbg, 2, 7, 4, 4) -- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 local fsicon = wibox.widget.imagebox(theme.disk) local fsbar = wibox.widget { forced_height = 1, @@ -227,6 +228,7 @@ theme.fs = lain.widget.fs { } local fsbg = wibox.container.background(fsbar, "#474747", gears.shape.rectangle) local fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4) +--]] -- ALSA volume bar local volicon = wibox.widget.imagebox(theme.vol) @@ -349,14 +351,14 @@ function theme.at_screen_connect(s) layout = wibox.layout.fixed.horizontal, wibox.widget.systray(), small_spr, - --mail.widget, + --theme.mail.widget, mpdicon, theme.mpd.widget, baticon, batwidget, bar_spr, - fsicon, - fswidget, + --fsicon, + --fswidget, bar_spr, volicon, volumewidget, diff --git a/themes/dremora/theme.lua b/themes/dremora/theme.lua index a85d712..f04a3cb 100644 --- a/themes/dremora/theme.lua +++ b/themes/dremora/theme.lua @@ -91,9 +91,9 @@ theme.cal = lain.widget.cal({ bg = theme.bg_normal }}) ---[[ Mail IMAP check --- commented because it needs to be set before use -local mail = lain.widget.imap({ +-- Mail IMAP check +--[[ commented because it needs to be set before use +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -133,6 +133,7 @@ theme.mpd = lain.widget.mpd({ }) -- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 theme.fs = lain.widget.fs({ notification_preset = { fg = white, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, settings = function() @@ -147,6 +148,7 @@ theme.fs = lain.widget.fs({ widget:set_markup(markup.font(theme.font, markup(gray, fs_header) .. markup(white, fs_p))) end }) +--]] -- Battery local bat = lain.widget.bat({ @@ -237,8 +239,8 @@ function theme.at_screen_connect(s) wibox.widget.systray(), first, theme.mpd.widget, - --mail.widget, - theme.fs.widget, + --theme.mail.widget, + --theme.fs.widget, bat.widget, theme.volume.widget, mytextclock, diff --git a/themes/holo/theme.lua b/themes/holo/theme.lua index 3a630be..7f43155 100644 --- a/themes/holo/theme.lua +++ b/themes/holo/theme.lua @@ -122,9 +122,9 @@ theme.cal = lain.widget.cal({ } }) ---[[ Mail IMAP check --- commented because it needs to be set before use -local mail = lain.widget.imap({ +-- Mail IMAP check +--[[ commented because it needs to be set before use +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -212,10 +212,12 @@ local bat = lain.widget.bat({ end }) --- fs +-- / fs +--[[ commented because it needs Gio/Glib >= 2.54 theme.fs = lain.widget.fs({ notification_preset = { bg = theme.bg_normal, font = "Monospace 9" }, }) +--]] -- ALSA volume bar theme.volume = lain.widget.alsabar({ @@ -335,7 +337,7 @@ function theme.at_screen_connect(s) { -- Right widgets layout = wibox.layout.fixed.horizontal, wibox.widget.systray(), - --mail.widget, + --theme.mail.widget, --bat.widget, spr_right, musicwidget, diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index 604cca0..c657bf3 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -122,6 +122,7 @@ theme.weather = lain.widget.weather({ }) -- / fs +--[[ commented because it needs Gio/Glib >= 2.54 local fsicon = wibox.widget.imagebox(theme.widget_fs) theme.fs = lain.widget.fs({ notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal }, @@ -129,11 +130,12 @@ theme.fs = lain.widget.fs({ widget:set_markup(markup.fontfg(theme.font, "#80d9d8", string.format("%.1f", fs_now["/"].used) .. "% ")) end }) +--]] ---[[ Mail IMAP check --- commented because it needs to be set before use +-- Mail IMAP check +--[[ commented because it needs to be set before use local mailicon = wibox.widget.imagebox() -local mail = lain.widget.imap({ +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -298,7 +300,7 @@ function theme.at_screen_connect(s) layout = wibox.layout.fixed.horizontal, wibox.widget.systray(), --mailicon, - --mail.widget, + --theme.mail.widget, netdownicon, netdowninfo, netupicon, @@ -309,8 +311,8 @@ function theme.at_screen_connect(s) memory.widget, cpuicon, cpu.widget, - fsicon, - theme.fs.widget, + --fsicon, + --theme.fs.widget, weathericon, theme.weather.widget, tempicon, diff --git a/themes/powerarrow-dark/theme.lua b/themes/powerarrow-dark/theme.lua index 56ec547..c6b41e5 100644 --- a/themes/powerarrow-dark/theme.lua +++ b/themes/powerarrow-dark/theme.lua @@ -113,7 +113,7 @@ theme.cal = lain.widget.cal({ local mailicon = wibox.widget.imagebox(theme.widget_mail) --[[ commented because it needs to be set before use mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) -local mail = lain.widget.imap({ +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -192,12 +192,14 @@ local temp = lain.widget.temp({ -- / fs local fsicon = wibox.widget.imagebox(theme.widget_hdd) +--[[ commented because it needs Gio/Glib >= 2.54 theme.fs = lain.widget.fs({ notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "xos4 Terminus 10" }, settings = function() widget:set_markup(markup.font(theme.font, " " .. fs_now["/"].percentage .. "% ")) end }) +--]] -- Battery local baticon = wibox.widget.imagebox(theme.widget_battery) @@ -313,7 +315,7 @@ function theme.at_screen_connect(s) theme.volume.widget, arrl_ld, wibox.container.background(mailicon, theme.bg_focus), - --wibox.container.background(mail.widget, theme.bg_focus), + --wibox.container.background(theme.mail.widget, theme.bg_focus), arrl_dl, memicon, mem.widget, @@ -325,7 +327,7 @@ function theme.at_screen_connect(s) temp.widget, arrl_ld, wibox.container.background(fsicon, theme.bg_focus), - wibox.container.background(theme.fs.widget, theme.bg_focus), + --wibox.container.background(theme.fs.widget, theme.bg_focus), arrl_dl, baticon, bat.widget, diff --git a/themes/powerarrow/theme.lua b/themes/powerarrow/theme.lua index 9430156..7b656cc 100644 --- a/themes/powerarrow/theme.lua +++ b/themes/powerarrow/theme.lua @@ -131,10 +131,10 @@ local scissors = wibox.widget.imagebox(theme.widget_scissors) scissors:buttons(my_table.join(awful.button({}, 1, function() awful.spawn.with_shell("xsel | xsel -i -b") end))) -- Mail IMAP check -local mailicon = wibox.widget.imagebox(theme.widget_mail) --[[ commented because it needs to be set before use +local mailicon = wibox.widget.imagebox(theme.widget_mail) mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) -local mail = lain.widget.imap({ +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -228,6 +228,7 @@ local tempicon = wibox.widget.imagebox(theme.widget_temp) -- / fs local fsicon = wibox.widget.imagebox(theme.widget_hdd) +--[[ commented because it needs Gio/Glib >= 2.54 theme.fs = lain.widget.fs({ notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "xos4 Terminus 10" }, settings = function() @@ -235,6 +236,7 @@ theme.fs = lain.widget.fs({ widget:set_markup(markup.font(theme.font, fsp)) end }) +--]] -- Battery local baticon = wibox.widget.imagebox(theme.widget_battery) @@ -345,18 +347,18 @@ function theme.at_screen_connect(s) --[[ using shapes pl(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "#343434"), pl(task, "#343434"), - --pl(wibox.widget { mailicon, mail and mail.widget, layout = wibox.layout.align.horizontal }, "#343434"), + --pl(wibox.widget { mailicon, mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, "#343434"), pl(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, "#777E76"), pl(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, "#4B696D"), pl(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, "#4B3B51"), - pl(wibox.widget { fsicon, theme.fs.widget, layout = wibox.layout.align.horizontal }, "#CB755B"), + --pl(wibox.widget { fsicon, fs and fs.widget, layout = wibox.layout.align.horizontal }, "#CB755B"), pl(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, "#8DAA9A"), pl(wibox.widget { neticon, net.widget, layout = wibox.layout.align.horizontal }, "#C0C0A2"), pl(binclock.widget, "#777E76"), --]] -- using separators arrow(theme.bg_normal, "#343434"), - wibox.container.background(wibox.container.margin(wibox.widget { mailicon, mail and mail.widget, layout = wibox.layout.align.horizontal }, 4, 7), "#343434"), + wibox.container.background(wibox.container.margin(wibox.widget { mailicon, theme.mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, 4, 7), "#343434"), arrow("#343434", theme.bg_normal), wibox.container.background(wibox.container.margin(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, 3, 6), theme.bg_focus), arrow(theme.bg_normal, "#343434"), @@ -368,7 +370,7 @@ function theme.at_screen_connect(s) arrow("#4B696D", "#4B3B51"), wibox.container.background(wibox.container.margin(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, 4, 4), "#4B3B51"), arrow("#4B3B51", "#CB755B"), - wibox.container.background(wibox.container.margin(wibox.widget { fsicon, theme.fs.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#CB755B"), + wibox.container.background(wibox.container.margin(wibox.widget { fsicon, fs and fs.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#CB755B"), arrow("#CB755B", "#8DAA9A"), wibox.container.background(wibox.container.margin(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#8DAA9A"), arrow("#8DAA9A", "#C0C0A2"), diff --git a/themes/rainbow/theme.lua b/themes/rainbow/theme.lua index fd2635f..31caee2 100644 --- a/themes/rainbow/theme.lua +++ b/themes/rainbow/theme.lua @@ -101,9 +101,9 @@ theme.cal = lain.widget.cal({ } }) ---[[ Mail IMAP check --- commented because it needs to be set before use -local mail = lain.widget.imap({ +-- Mail IMAP check +--[[ commented because it needs to be set before use +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -122,7 +122,7 @@ local mail = lain.widget.imap({ widget:set_markup(markup.font(theme.font, markup(gray, mail) .. markup(white, count))) end }) -]] +--]] -- MPD theme.mpd = lain.widget.mpd({ @@ -145,6 +145,7 @@ theme.mpd = lain.widget.mpd({ }) -- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 theme.fs = lain.widget.fs({ notification_preset = { fg = white, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, settings = function() @@ -158,6 +159,7 @@ theme.fs = lain.widget.fs({ widget:set_markup(markup.font(theme.font, markup(gray, fs_header) .. markup(white, fs_p))) end }) +--]] -- ALSA volume bar theme.volume = lain.widget.alsabar({ @@ -261,8 +263,8 @@ function theme.at_screen_connect(s) wibox.widget.systray(), spr, theme.mpd.widget, - --mail.widget, - theme.fs.widget, + --theme.mail.widget, + --theme.fs.widget, volumewidget, mytextclock, }, diff --git a/themes/steamburn/theme.lua b/themes/steamburn/theme.lua index 015af92..c2b6a0a 100644 --- a/themes/steamburn/theme.lua +++ b/themes/steamburn/theme.lua @@ -94,9 +94,9 @@ theme.cal = lain.widget.cal({ } }) ---[[ Mail IMAP check --- commented because it needs to be set before use -local mail = lain.widget.imap({ +-- Mail IMAP check +--[[ commented because it needs to be set before use +theme.mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -148,10 +148,12 @@ local mem = lain.widget.mem({ }) -- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 theme.fs = lain.widget.fs({ partition = "/home", notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, }) +--]] -- Battery local bat = lain.widget.bat({ @@ -257,7 +259,7 @@ function theme.at_screen_connect(s) wibox.widget.systray(), spr, theme.mpd.widget, - --mail.widget, + --theme.mail.widget, cpu.widget, mem.widget, bat.widget,