From 638bd2037fdcd39a04b7cf3b3ae33a0323f1eb22 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Wed, 8 Feb 2017 14:16:12 +0100 Subject: [PATCH] lain: new commit --- lain | 2 +- rc.lua.template | 2 +- themes/blackburn/theme.lua | 14 +++++++------- themes/copland/theme.lua | 14 +++++++------- themes/dremora/theme.lua | 14 +++++++------- themes/holo/theme.lua | 18 +++++++++--------- themes/multicolor/theme.lua | 22 +++++++++++----------- themes/powerarrow-darker/theme.lua | 22 +++++++++++----------- themes/rainbow/theme.lua | 12 ++++++------ themes/steamburn/theme.lua | 20 ++++++++++---------- themes/vertex/theme.lua | 12 ++++++------ 11 files changed, 76 insertions(+), 76 deletions(-) diff --git a/lain b/lain index 33223f2..c77cc08 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit 33223f2816470636c45b280c77b9da57d5fb9d4b +Subproject commit c77cc085d180d8d95b2f99aa953a7fb31f1932f8 diff --git a/rc.lua.template b/rc.lua.template index 08ded6f..a98aff5 100644 --- a/rc.lua.template +++ b/rc.lua.template @@ -348,7 +348,7 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "z", function () awful.screen.focused().quake:toggle() end), -- Widgets popups - awful.key({ altkey, }, "c", function () lain.widgets.calendar.show(7) end), + awful.key({ altkey, }, "c", function () lain.widget.calendar.show(7) end), awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end), awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end), diff --git a/themes/blackburn/theme.lua b/themes/blackburn/theme.lua index e558336..fc6c3eb 100644 --- a/themes/blackburn/theme.lua +++ b/themes/blackburn/theme.lua @@ -81,7 +81,7 @@ local mytextclock = wibox.widget.textclock(" %H:%M ") mytextclock.font = theme.font -- Calendar -lain.widgets.calendar({ +lain.widget.calendar({ attach_to = { mytextclock }, notification_preset = { font = "Misc Tamsyn 11", @@ -91,7 +91,7 @@ lain.widgets.calendar({ --[[ Mail IMAP check -- commented because it needs to be set before use -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -112,7 +112,7 @@ local mail = lain.widgets.imap({ --]] -- MPD -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function() mpd_notification_preset.fg = white artist = mpd_now.artist .. " " @@ -131,7 +131,7 @@ theme.mpd = lain.widgets.mpd({ }) -- /home fs -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ partition = "/home", options = "--exclude-type=tmpfs", notification_preset = { fg = white, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, @@ -149,7 +149,7 @@ theme.fs = lain.widgets.fs({ }) -- Battery -local bat = lain.widgets.bat({ +local bat = lain.widget.bat({ settings = function() bat_header = " Bat " bat_p = bat_now.perc .. " " @@ -158,7 +158,7 @@ local bat = lain.widgets.bat({ }) -- ALSA volume -theme.volume = lain.widgets.alsa({ +theme.volume = lain.widget.alsa({ --togglechannel = "IEC958,3", settings = function() header = " Vol " @@ -175,7 +175,7 @@ theme.volume = lain.widgets.alsa({ }) -- Weather -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) settings = function() units = math.floor(weather_now["main"]["temp"]) diff --git a/themes/copland/theme.lua b/themes/copland/theme.lua index aa22b36..8dcba18 100644 --- a/themes/copland/theme.lua +++ b/themes/copland/theme.lua @@ -98,7 +98,7 @@ local mytextclock = wibox.widget.textclock(" %H:%M mytextclock.font = theme.font -- Calendar -lain.widgets.calendar({ +lain.widget.calendar({ attach_to = { mytextclock }, notification_preset = { font = "Tamzen 11", @@ -109,7 +109,7 @@ lain.widgets.calendar({ --[[ Mail IMAP check -- commented because it needs to be set before use -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -130,7 +130,7 @@ local mail = lain.widgets.imap({ -- MPD local mpdicon = wibox.widget.imagebox() -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function() if mpd_now.state == "play" then title = mpd_now.title @@ -165,7 +165,7 @@ local batbar = wibox.widget { ticks_size = 6, widget = wibox.widget.progressbar, } -local batupd = lain.widgets.bat({ +local batupd = lain.widget.bat({ settings = function() if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end @@ -213,7 +213,7 @@ local fsbar = wibox.widget { ticks_size = 6, widget = wibox.widget.progressbar, } -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ partition = "/home", options = "--exclude-type=tmpfs", notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Tamzen 10.5" }, @@ -231,7 +231,7 @@ local fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4) -- ALSA volume bar local volicon = wibox.widget.imagebox(theme.vol) -theme.volume = lain.widgets.alsabar({ +theme.volume = lain.widget.alsabar({ width = 59, border_width = 0, ticks = true, ticks_size = 6, notification_preset = { font = theme.font }, --togglechannel = "IEC958,3", @@ -278,7 +278,7 @@ local volumebg = wibox.container.background(theme.volume.bar, "#474747", gears.s local volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4) -- Weather -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) }) diff --git a/themes/dremora/theme.lua b/themes/dremora/theme.lua index 28fefd6..aae73cb 100644 --- a/themes/dremora/theme.lua +++ b/themes/dremora/theme.lua @@ -82,7 +82,7 @@ local mytextclock = wibox.widget.textclock(markup(gray, " %a") mytextclock.font = theme.font -- Calendar -lain.widgets.calendar({ +lain.widget.calendar({ attach_to = { mytextclock }, notification_preset = { font = "Misc Tamsyn 11", @@ -92,7 +92,7 @@ lain.widgets.calendar({ --[[ Mail IMAP check -- commented because it needs to be set before use -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -113,7 +113,7 @@ local mail = lain.widgets.imap({ --]] -- MPD -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function() mpd_notification_preset.fg = white artist = mpd_now.artist .. " " @@ -132,7 +132,7 @@ theme.mpd = lain.widgets.mpd({ }) -- /home fs -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ partition = "/home", options = "--exclude-type=tmpfs", notification_preset = { fg = white, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, @@ -150,7 +150,7 @@ theme.fs = lain.widgets.fs({ }) -- Battery -local bat = lain.widgets.bat({ +local bat = lain.widget.bat({ settings = function() bat_header = " Bat " bat_p = bat_now.perc .. " " @@ -159,7 +159,7 @@ local bat = lain.widgets.bat({ }) -- ALSA volume -theme.volume = lain.widgets.alsa({ +theme.volume = lain.widget.alsa({ --togglechannel = "IEC958,3", settings = function() header = " Vol " @@ -176,7 +176,7 @@ theme.volume = lain.widgets.alsa({ }) -- Weather -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) notification_preset = { fg = white } }) diff --git a/themes/holo/theme.lua b/themes/holo/theme.lua index 83c70e4..61fa26d 100644 --- a/themes/holo/theme.lua +++ b/themes/holo/theme.lua @@ -111,7 +111,7 @@ local mytextcalendar = wibox.widget.textclock(markup.fontfg(theme.font, "#FFFFFF local calendar_icon = wibox.widget.imagebox(theme.calendar) local calbg = wibox.container.background(mytextcalendar, theme.bg_focus, gears.shape.rectangle) local calendarwidget = wibox.container.margin(calbg, 0, 0, 5, 5) -lain.widgets.calendar({ +lain.widget.calendar({ attach_to = { mytextclock, mytextcalendar }, notification_preset = { fg = "#FFFFFF", @@ -123,7 +123,7 @@ lain.widgets.calendar({ --[[ Mail IMAP check -- commented because it needs to be set before use -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -150,7 +150,7 @@ local next_icon = wibox.widget.imagebox(theme.nex) local stop_icon = wibox.widget.imagebox(theme.stop) local pause_icon = wibox.widget.imagebox(theme.pause) local play_pause_icon = wibox.widget.imagebox(theme.play) -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function () if mpd_now.state == "play" then mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower) @@ -201,7 +201,7 @@ end))) -- Battery --[[ -local bat = lain.widgets.bat({ +local bat = lain.widget.bat({ settings = function() bat_header = " Bat " bat_p = bat_now.perc .. " " @@ -214,13 +214,13 @@ local bat = lain.widgets.bat({ --]] -- -- fs -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ options = "--exclude-type=tmpfs", notification_preset = { bg = theme.bg_normal, font = "Monospace 9, " }, }) -- ALSA volume bar -theme.volume = lain.widgets.alsabar({ +theme.volume = lain.widget.alsabar({ notification_preset = { font = "Monospace 9"}, --togglechannel = "IEC958,3", width = 80, height = 10, border_width = 0, @@ -237,7 +237,7 @@ volumewidget = wibox.container.margin(volumewidget, 0, 0, 5, 5) -- CPU local cpu_icon = wibox.widget.imagebox(theme.cpu) -local cpu = lain.widgets.cpu({ +local cpu = lain.widget.cpu({ settings = function() widget:set_markup(space3 .. markup.font(theme.font, "CPU " .. cpu_now.usage .. "% ") .. markup.font("Roboto 5", " ")) @@ -249,7 +249,7 @@ local cpuwidget = wibox.container.margin(cpubg, 0, 0, 5, 5) -- Net local netdown_icon = wibox.widget.imagebox(theme.net_down) local netup_icon = wibox.widget.imagebox(theme.net_up) -local net = lain.widgets.net({ +local net = lain.widget.net({ settings = function() widget:set_markup(markup.font("Roboto 1", " ") .. markup.font(theme.font, net_now.received .. " - " .. net_now.sent) .. markup.font("Roboto 2", " ")) @@ -259,7 +259,7 @@ local netbg = wibox.container.background(net.widget, theme.bg_focus, gears.shape local networkwidget = wibox.container.margin(netbg, 0, 0, 5, 5) -- Weather -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) notification_preset = { font = "Monospace 9", position = "bottom_right" }, }) diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index 6b737af..3c5393c 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -100,7 +100,7 @@ local mytextclock = wibox.widget.textclock(markup("#7788af", "%A %d %B ") .. mar mytextclock.font = theme.font -- Calendar -theme.cal = lain.widgets.calendar({ +theme.cal = lain.widget.calendar({ attach_to = { mytextclock }, notification_preset = { font = "xos4 Terminus 10", @@ -111,7 +111,7 @@ theme.cal = lain.widgets.calendar({ -- Weather local weathericon = wibox.widget.imagebox(theme.widget_weather) -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal }, weather_na_markup = markup.fontfg(theme.font, "#eca4c4", "N/A "), @@ -124,7 +124,7 @@ theme.weather = lain.widgets.weather({ -- / fs local fsicon = wibox.widget.imagebox(theme.widget_fs) -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ options = "--exclude-type=tmpfs", notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal }, settings = function() @@ -135,7 +135,7 @@ theme.fs = lain.widgets.fs({ --[[ Mail IMAP check -- commented because it needs to be set before use local mailicon = wibox.widget.imagebox() -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -157,7 +157,7 @@ local mail = lain.widgets.imap({ -- CPU local cpuicon = wibox.widget.imagebox(theme.widget_cpu) -local cpu = lain.widgets.cpu({ +local cpu = lain.widget.cpu({ settings = function() widget:set_markup(markup.fontfg(theme.font, "#e33a6e", cpu_now.usage .. "% ")) end @@ -165,7 +165,7 @@ local cpu = lain.widgets.cpu({ -- Coretemp local tempicon = wibox.widget.imagebox(theme.widget_temp) -local temp = lain.widgets.temp({ +local temp = lain.widget.temp({ settings = function() widget:set_markup(markup.fontfg(theme.font, "#f1af5f", coretemp_now .. "°C ")) end @@ -173,7 +173,7 @@ local temp = lain.widgets.temp({ -- Battery local baticon = wibox.widget.imagebox(theme.widget_batt) -local bat = lain.widgets.bat({ +local bat = lain.widget.bat({ settings = function() if bat_now.perc ~= "N/A" then bat_now.perc = bat_now.perc .. "%" @@ -188,7 +188,7 @@ local bat = lain.widgets.bat({ -- ALSA volume local volicon = wibox.widget.imagebox(theme.widget_vol) -theme.volume = lain.widgets.alsa({ +theme.volume = lain.widget.alsa({ settings = function() if volume_now.status == "off" then volume_now.level = volume_now.level .. "M" @@ -202,7 +202,7 @@ theme.volume = lain.widgets.alsa({ local netdownicon = wibox.widget.imagebox(theme.widget_netdown) local netdowninfo = wibox.widget.textbox() local netupicon = wibox.widget.imagebox(theme.widget_netup) -local netupinfo = lain.widgets.net({ +local netupinfo = lain.widget.net({ settings = function() if iface ~= "network off" and string.match(theme.weather.widget.text, "N/A") @@ -217,7 +217,7 @@ local netupinfo = lain.widgets.net({ -- MEM local memicon = wibox.widget.imagebox(theme.widget_mem) -local memory = lain.widgets.mem({ +local memory = lain.widget.mem({ settings = function() widget:set_markup(markup.fontfg(theme.font, "#e0da37", mem_now.used .. "M ")) end @@ -225,7 +225,7 @@ local memory = lain.widgets.mem({ -- MPD local mpdicon = wibox.widget.imagebox() -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function() mpd_notification_preset = { text = string.format("%s [%s] - %s\n%s", mpd_now.artist, diff --git a/themes/powerarrow-darker/theme.lua b/themes/powerarrow-darker/theme.lua index c18a4da..a074c34 100644 --- a/themes/powerarrow-darker/theme.lua +++ b/themes/powerarrow-darker/theme.lua @@ -92,7 +92,7 @@ local separators = lain.util.separators -- Textclock local clockicon = wibox.widget.imagebox(theme.widget_clock) -local clock = lain.widgets.abase({ +local clock = lain.widget.watch({ timeout = 60, cmd = " date +'%a %d %b %R'", settings = function() @@ -101,7 +101,7 @@ local clock = lain.widgets.abase({ }) -- Calendar -theme.cal = lain.widgets.calendar({ +theme.cal = lain.widget.calendar({ attach_to = { clock.widget }, notification_preset = { font = "xos4 Terminus 10", @@ -114,7 +114,7 @@ theme.cal = lain.widgets.calendar({ local mailicon = wibox.widget.imagebox(theme.widget_mail) --[[ commented because it needs to be set before use mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end))) -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -134,7 +134,7 @@ local mail = lain.widgets.imap({ -- MPD local mpdicon = wibox.widget.imagebox(theme.widget_music) mpdicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end))) -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function() if mpd_now.state == "play" then artist = " " .. mpd_now.artist .. " " @@ -155,7 +155,7 @@ theme.mpd = lain.widgets.mpd({ -- MEM local memicon = wibox.widget.imagebox(theme.widget_mem) -local mem = lain.widgets.mem({ +local mem = lain.widget.mem({ settings = function() widget:set_markup(markup.font(theme.font, " " .. mem_now.used .. "MB ")) end @@ -163,7 +163,7 @@ local mem = lain.widgets.mem({ -- CPU local cpuicon = wibox.widget.imagebox(theme.widget_cpu) -local cpu = lain.widgets.cpu({ +local cpu = lain.widget.cpu({ settings = function() widget:set_markup(markup.font(theme.font, " " .. cpu_now.usage .. "% ")) end @@ -171,7 +171,7 @@ local cpu = lain.widgets.cpu({ -- Coretemp local tempicon = wibox.widget.imagebox(theme.widget_temp) -local temp = lain.widgets.temp({ +local temp = lain.widget.temp({ settings = function() widget:set_markup(markup.font(theme.font, " " .. coretemp_now .. "°C ")) end @@ -179,7 +179,7 @@ local temp = lain.widgets.temp({ -- / fs local fsicon = wibox.widget.imagebox(theme.widget_hdd) -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ options = "--exclude-type=tmpfs", notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "xos4 Terminus 10" }, settings = function() @@ -189,7 +189,7 @@ theme.fs = lain.widgets.fs({ -- Battery local baticon = wibox.widget.imagebox(theme.widget_battery) -local bat = lain.widgets.bat({ +local bat = lain.widget.bat({ settings = function() if bat_now.status ~= "N/A" then if bat_now.ac_status == 1 then @@ -213,7 +213,7 @@ local bat = lain.widgets.bat({ -- ALSA volume local volicon = wibox.widget.imagebox(theme.widget_vol) -theme.volume = lain.widgets.alsa({ +theme.volume = lain.widget.alsa({ settings = function() if volume_now.status == "off" then volicon:set_image(theme.widget_vol_mute) @@ -231,7 +231,7 @@ theme.volume = lain.widgets.alsa({ -- Net local neticon = wibox.widget.imagebox(theme.widget_net) -local net = lain.widgets.net({ +local net = lain.widget.net({ settings = function() widget:set_markup(markup.font(theme.font, markup("#7AC82E", " " .. net_now.received) diff --git a/themes/rainbow/theme.lua b/themes/rainbow/theme.lua index d92a1a5..f369ea9 100644 --- a/themes/rainbow/theme.lua +++ b/themes/rainbow/theme.lua @@ -91,7 +91,7 @@ local mytextclock = wibox.widget.textclock(markup(white, " %H:%M ")) mytextclock.font = theme.font -- Calendar -lain.widgets.calendar({ +lain.widget.calendar({ attach_to = { mytextclock }, notification_preset = { font = "Misc Tamsyn 11", @@ -102,7 +102,7 @@ lain.widgets.calendar({ --[[ Mail IMAP check -- commented because it needs to be set before use -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -124,7 +124,7 @@ local mail = lain.widgets.imap({ ]] -- MPD -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function() mpd_notification_preset.fg = white @@ -144,7 +144,7 @@ theme.mpd = lain.widgets.mpd({ }) -- /home fs -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ partition = "/home", options = "--exclude-type=tmpfs", notification_preset = { fg = white, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, @@ -162,7 +162,7 @@ theme.fs = lain.widgets.fs({ }) -- ALSA volume bar -theme.volume = lain.widgets.alsabar({ +theme.volume = lain.widget.alsabar({ ticks = true, width = 67, notification_preset = { font = theme.font } }) @@ -193,7 +193,7 @@ local volumebg = wibox.container.background(theme.volume.bar, "#585858", gears.s local volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5) -- Weather -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) notification_preset = { font = theme.font, fg = white } }) diff --git a/themes/steamburn/theme.lua b/themes/steamburn/theme.lua index d0ee24e..caec2e4 100644 --- a/themes/steamburn/theme.lua +++ b/themes/steamburn/theme.lua @@ -84,7 +84,7 @@ local mytextclock = wibox.widget.textclock(" %H:%M ") mytextclock.font = theme.font -- Calendar -lain.widgets.calendar({ +lain.widget.calendar({ attach_to = { mytextclock }, notification_preset = { font = "Misc Tamsyn 11", @@ -95,7 +95,7 @@ lain.widgets.calendar({ --[[ Mail IMAP check -- commented because it needs to be set before use -local mail = lain.widgets.imap({ +local mail = lain.widget.imap({ timeout = 180, server = "server", mail = "mail", @@ -115,7 +115,7 @@ local mail = lain.widgets.imap({ --]] -- MPD -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ settings = function() artist = mpd_now.artist .. " " title = mpd_now.title .. " " @@ -133,28 +133,28 @@ theme.mpd = lain.widgets.mpd({ }) -- CPU -local cpu = lain.widgets.sysload({ +local cpu = lain.widget.sysload({ settings = function() widget:set_markup(markup.font(theme.font, markup(gray, " Cpu ") .. load_1 .. " ")) end }) -- MEM -local mem = lain.widgets.mem({ +local mem = lain.widget.mem({ settings = function() widget:set_markup(markup.font(theme.font, markup(gray, " Mem ") .. mem_now.used .. " ")) end }) -- /home fs -theme.fs = lain.widgets.fs({ +theme.fs = lain.widget.fs({ options = "--exclude-type=tmpfs", partition = "/home", notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" }, }) -- Battery -local bat = lain.widgets.bat({ +local bat = lain.widget.bat({ settings = function() bat_perc = bat_now.perc if bat_now.ac_status == 1 then bat_perc = "Plug" end @@ -163,7 +163,7 @@ local bat = lain.widgets.bat({ }) -- Net checker -local net = lain.widgets.net({ +local net = lain.widget.net({ settings = function() if net_now.state == "up" then net_state = "On" else net_state = "Off" end @@ -172,7 +172,7 @@ local net = lain.widgets.net({ }) -- ALSA volume -theme.volume = lain.widgets.alsa({ +theme.volume = lain.widget.alsa({ settings = function() header = " Vol " vlevel = volume_now.level @@ -188,7 +188,7 @@ theme.volume = lain.widgets.alsa({ }) -- Weather -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) }) diff --git a/themes/vertex/theme.lua b/themes/vertex/theme.lua index 943f0a3..48bcb1a 100644 --- a/themes/vertex/theme.lua +++ b/themes/vertex/theme.lua @@ -111,7 +111,7 @@ local markup = lain.util.markup --os.setlocale(os.getenv("LANG")) -- to localize the clock local mytextclock = wibox.widget.textclock(markup("#FFFFFF", "%a %d %b, %H:%M")) mytextclock.font = theme.font -lain.widgets.calendar({ +lain.widget.calendar({ attach_to = { mytextclock }, notification_preset = { fg = "#FFFFFF", @@ -134,7 +134,7 @@ battooltip.timeout = 0 battooltip:set_shape(function(cr, width, height) gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 35) end) -local bat = lain.widgets.bat({ +local bat = lain.widget.bat({ settings = function() local index, perc = "bat", tonumber(bat_now.perc) or 0 @@ -162,7 +162,7 @@ local bat = lain.widgets.bat({ }) -- MPD -theme.mpd = lain.widgets.mpd({ +theme.mpd = lain.widget.mpd({ music_dir = "/mnt/storage/Downloads/Music", settings = function() if mpd_now.state == "play" then @@ -182,7 +182,7 @@ theme.mpd = lain.widgets.mpd({ -- ALSA volume local volicon = wibox.widget.imagebox() -theme.volume = lain.widgets.alsabar({ +theme.volume = lain.widget.alsabar({ togglechannel = "IEC958,3", notification_preset = { font = "Monospace 12", fg = theme.fg_normal }, settings = function() @@ -240,7 +240,7 @@ wifitooltip.timeout = 0 wifitooltip:set_shape(function(cr, width, height) gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 120) end) -local mywifisig = lain.widgets.abase({ +local mywifisig = lain.widget.watch({ cmd = { awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" }, settings = function() local carrier, perc = output:match("(%d)-(%d+)") @@ -269,7 +269,7 @@ local mywifisig = lain.widgets.abase({ wificon:connect_signal("button::press", function() awful.spawn(string.format("%s -e wavemon", awful.util.terminal)) end) -- Weather -theme.weather = lain.widgets.weather({ +theme.weather = lain.widget.weather({ city_id = 2643743, -- placeholder (London) notification_preset = { font = "Monospace 10" }, settings = function()