fs widget disabled by default; #235

This commit is contained in:
Luca CPZ 2018-09-17 21:35:27 +02:00
parent 398a658a7d
commit a013123527
10 changed files with 64 additions and 47 deletions

View File

@ -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"}),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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"),

View File

@ -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,
},

View File

@ -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,