From 5b13c8aef5e98d86b50f60fa07fdaeb124cc0c2d Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Thu, 5 Jan 2017 14:05:15 +0100 Subject: [PATCH] copland: deprecations removed; lain: new commit --- lain | 2 +- rc.lua.blackburn | 6 +- rc.lua.copland | 152 +++++++++++++++-------------- rc.lua.multicolor | 2 +- themes/blackburn/theme.lua | 2 +- themes/copland/icons/widget_bg.png | Bin 204 -> 0 bytes themes/copland/theme.lua | 3 +- themes/dremora/theme.lua | 2 +- themes/holo/theme.lua | 2 +- themes/multicolor/theme.lua | 2 +- themes/powerarrow-darker/theme.lua | 2 +- themes/rainbow/theme.lua | 2 +- themes/steamburn/theme.lua | 2 +- 13 files changed, 91 insertions(+), 88 deletions(-) delete mode 100644 themes/copland/icons/widget_bg.png diff --git a/lain b/lain index 301faf5..1bd178f 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit 301faf5370d045e94c9c344acb0fdac84a2f25a6 +Subproject commit 1bd178f68757099e6c9ccde1992ca5d519ccb8e5 diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 716e399..9a46579 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -113,7 +113,7 @@ markup = lain.util.markup gray = "#9E9C9A" -- Textclock -mytextclock = awful.widget.textclock(" %H:%M ") +mytextclock = wibox.widget.textclock(" %H:%M ") -- Calendar lain.widgets.calendar.attach(mytextclock) @@ -345,7 +345,7 @@ root.buttons(awful.util.table.join( globalkeys = awful.util.table.join( -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "P", function() os.execute(os.getenv("HOME") .. "/screenshot") end), + awful.key({ altkey }, "P", function() os.execute("screenshot") end), -- Hotkeys awful.key({ modkey, }, "s", hotkeys_popup.show_help, @@ -532,7 +532,7 @@ globalkeys = awful.util.table.join( -- User programs awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), + awful.key({ modkey }, "e", function () awful.util.spawn(gui_editor) end), awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), --[[ Default diff --git a/rc.lua.copland b/rc.lua.copland index 9901277..aa78cc6 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -15,6 +15,7 @@ local beautiful = require("beautiful") local naughty = require("naughty") local lain = require("lain") local eminent = require("eminent") +local shape = require("gears.shape") --local menubar = require("menubar") local hotkeys_popup = require("awful.hotkeys_popup").widget -- }}} @@ -64,7 +65,6 @@ modkey = "Mod4" altkey = "Mod1" terminal = "urxvtc" or "xterm" editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor -- user defined browser = "firefox" @@ -101,17 +101,19 @@ end -- {{{ Menu myawesomemenu = { - { "hotkeys", function() return false, hotkeys_popup.show_help end}, - { "manual", terminal .. " -e man awesome" }, - { "edit config", editor_cmd .. " " .. awesome.conffile }, - { "restart", awesome.restart }, - { "quit", function() awesome.quit() end} + { "hotkeys", function() return false, hotkeys_popup.show_help end }, + { "manual", terminal .. " -e man awesome" }, + { "edit config", string.format("%s -e %s %s", terminal, editor, awesome.conffile) }, + { "restart", awesome.restart }, + { "quit", function() awesome.quit() end } } -mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, - { "applications", require("freedesktop").menu.build() }, - { "open terminal", terminal }, - } - }) +mymainmenu = awful.menu({ + items = { + { "awesome", myawesomemenu, beautiful.awesome_icon }, + { "applications", require("freedesktop").menu.build() }, + { "open terminal", terminal }, + } +}) --menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it -- }}} @@ -175,15 +177,17 @@ mpdwidget = lain.widgets.mpd({ -- Battery baticon = wibox.widget.imagebox(beautiful.bat) -batbar = awful.widget.progressbar() -batbar:set_color(beautiful.fg_normal) -batbar:set_width(55) -batbar:set_ticks(true) -batbar:set_ticks_size(6) -batbar:set_background_color(beautiful.bg_normal) -batmargin = wibox.layout.margin(batbar, 2, 7) -batmargin:set_top(6) -batmargin:set_bottom(6) +batbar = wibox.widget { + forced_height = 1, + forced_width = 59, + color = beautiful.fg_normal, + background_color = beautiful.bg_normal, + margins = 1, + paddings = 1, + ticks = true, + ticks_size = 6, + widget = wibox.widget.progressbar, +} batupd = lain.widgets.bat({ settings = function() if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end @@ -216,59 +220,60 @@ batupd = lain.widgets.bat({ batbar:set_value(bat_now.perc / 100) end }) -batwidget = wibox.widget.background(batmargin) -batwidget:set_bgimage(beautiful.widget_bg) +batbg = wibox.container.background(batbar, "#474747", shape.rectangle) +batwidget = wibox.container.margin(batbg, 2, 7, 4, 4) -- /home fs -diskicon = wibox.widget.imagebox(beautiful.disk) -diskbar = awful.widget.progressbar() -diskbar:set_color(beautiful.fg_normal) -diskbar:set_width(55) -diskbar:set_ticks(true) -diskbar:set_ticks_size(6) -diskbar:set_background_color(beautiful.bg_normal) -diskmargin = wibox.layout.margin(diskbar, 2, 7) -diskmargin:set_top(6) -diskmargin:set_bottom(6) +fsicon = wibox.widget.imagebox(beautiful.disk) +fsbar = wibox.widget { + forced_height = 1, + forced_width = 59, + color = beautiful.fg_normal, + background_color = beautiful.bg_normal, + margins = 1, + paddings = 1, + ticks = true, + ticks_size = 6, + widget = wibox.widget.progressbar, +} fshome = lain.widgets.fs({ partition = "/home", settings = function() if fs_now.used < 90 then - diskbar:set_color(beautiful.fg_normal) + fsbar:set_color(beautiful.fg_normal) else - diskbar:set_color("#EB8F8F") + fsbar:set_color("#EB8F8F") end - diskbar:set_value(fs_now.used / 100) + fsbar:set_value(fs_now.used / 100) end }) -diskwidget = wibox.widget.background(diskmargin) -diskwidget:set_bgimage(beautiful.widget_bg) +fsbg = wibox.container.background(fsbar, "#474747", shape.rectangle) +fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4) -- ALSA volume bar volicon = wibox.widget.imagebox(beautiful.vol) -volume = lain.widgets.alsabar({width = 55, ticks = true, ticks_size = 6, step = "2%", -settings = function() - if volume_now.status == "off" then - volicon:set_image(beautiful.vol_mute) - elseif volume_now.level == 0 then - volicon:set_image(beautiful.vol_no) - elseif volume_now.level <= 50 then - volicon:set_image(beautiful.vol_low) - else - volicon:set_image(beautiful.vol) - end -end, -colors = -{ - background = beautiful.bg_normal, - mute = red, - unmute = beautiful.fg_normal -}}) -volmargin = wibox.layout.margin(volume.bar, 2, 7) -volmargin:set_top(6) -volmargin:set_bottom(6) -volumewidget = wibox.widget.background(volmargin) -volumewidget:set_bgimage(beautiful.widget_bg) +volume = lain.widgets.alsabar({ + width = 59, border_width = 0, ticks = true, ticks_size = 6, step = "2%", + --togglechannel = "IEC958,3", + settings = function() + if volume_now.status == "off" then + volicon:set_image(beautiful.vol_mute) + elseif volume_now.level == 0 then + volicon:set_image(beautiful.vol_no) + elseif volume_now.level <= 50 then + volicon:set_image(beautiful.vol_low) + else + volicon:set_image(beautiful.vol) + end + end, + colors = { + background = beautiful.bg_normal, + mute = red, + unmute = beautiful.fg_normal + } +}) +volumebg = wibox.container.background(volume.bar, "#474747", shape.rectangle) +volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4) -- Weather myweather = lain.widgets.weather({ @@ -279,7 +284,6 @@ myweather = lain.widgets.weather({ spr = wibox.widget.textbox(' ') small_spr = wibox.widget.textbox(' ') bar_spr = wibox.widget.textbox(' ' .. markup("#333333", "|") .. ' ') - -- Create a wibox for each screen and add it local taglist_buttons = awful.util.table.join( awful.button({ }, 1, function(t) t:view_only() end), @@ -396,8 +400,8 @@ awful.screen.connect_for_each_screen(function(s) baticon, batwidget, bar_spr, - diskicon, - diskwidget, + fsicon, + fswidget, bar_spr, volicon, volumewidget, @@ -420,7 +424,7 @@ root.buttons(awful.util.table.join( globalkeys = awful.util.table.join( -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "P", function() os.execute(os.getenv("HOME") .. "/screenshot") end), + awful.key({ altkey }, "p", function() os.execute("screenshot") end), -- Hotkeys awful.key({ modkey, }, "s", hotkeys_popup.show_help, @@ -554,29 +558,29 @@ globalkeys = awful.util.table.join( -- ALSA volume control awful.key({ altkey }, "Up", function () - os.execute(string.format("amixer set %s 1%%+", volumewidget.channel)) - volumewidget.update() + os.execute(string.format("amixer set %s 1%%+", volume.channel)) + volume.notify() end), awful.key({ altkey }, "Down", function () - os.execute(string.format("amixer set %s 1%%-", volumewidget.channel)) - volumewidget.update() + os.execute(string.format("amixer set %s 1%%-", volume.channel)) + volume.notify() end), awful.key({ altkey }, "m", function () - os.execute(string.format("amixer set %s toggle", volumewidget.channel)) - volumewidget.update() + os.execute(string.format("amixer set %s toggle", volume.togglechannel or volume.channel)) + volume.notify() end), awful.key({ altkey, "Control" }, "m", function () - os.execute(string.format("amixer set %s 100%%", volumewidget.channel)) - volumewidget.update() + os.execute(string.format("amixer set %s 100%%", volume.channel)) + volume.notify() end), awful.key({ altkey, "Control" }, "0", function () os.execute(string.format("amixer -q set %s 0%%", volume.channel)) - volumewidget.update() + volume.notify() end), -- MPD control @@ -607,7 +611,7 @@ globalkeys = awful.util.table.join( -- User programs awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), + awful.key({ modkey }, "e", function () awful.util.spawn(gui_editor) end), awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), --[[ Default diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 63b4683..24678e7 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -228,7 +228,7 @@ netupicon = wibox.widget.imagebox(beautiful.widget_netup) netupinfo = lain.widgets.net({ settings = function() if iface ~= "network off" and - string.match(myweather._layout.text, "N/A") + string.match(myweather._private.layout.text, "N/A") then myweather.update() end diff --git a/themes/blackburn/theme.lua b/themes/blackburn/theme.lua index 16ccc93..0cc71db 100644 --- a/themes/blackburn/theme.lua +++ b/themes/blackburn/theme.lua @@ -31,7 +31,7 @@ theme.tasklist_bg_focus = "#060606" theme.menu_height = 16 theme.menu_width = 140 -theme.submenu_icon = theme.dir .. "/icons/submenu.png" +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.arrl_lr_pre = theme.dir .. "/icons/arrl_lr_pre.png" diff --git a/themes/copland/icons/widget_bg.png b/themes/copland/icons/widget_bg.png deleted file mode 100644 index e04f4955cd29c676c99316a2b079494d1e72a929..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^E{XE)7O>#E~l`Fr0lteA8mj_k)AG&ArXh)UfalfK!L|4FhP~S z@N%{Adj~D|Mm9}Nfm8Lo58nAX6=^bjh?{!lzmS>IE1Tl)g$gTY-~3y5&wrZbr!#X_ puj%!7QWSxpLrL4R4VfGG^|soGzBsj28t4E922WQ%mvv4FO#rk7L4E)L diff --git a/themes/copland/theme.lua b/themes/copland/theme.lua index 531adf5..0995e39 100644 --- a/themes/copland/theme.lua +++ b/themes/copland/theme.lua @@ -37,10 +37,9 @@ theme.tasklist_maximized_vertical = "" theme.tasklist_disable_icon = true theme.awesome_icon = theme.dir .."/icons/awesome.png" -theme.submenu_icon = theme.dir .."/icons/submenu.png" +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" -theme.widget_bg = theme.dir .. "/icons/widget_bg.png" theme.vol = theme.dir .. "/icons/vol.png" theme.vol_low = theme.dir .. "/icons/vol_low.png" theme.vol_no = theme.dir .. "/icons/vol_no.png" diff --git a/themes/dremora/theme.lua b/themes/dremora/theme.lua index c66cc3e..b891562 100644 --- a/themes/dremora/theme.lua +++ b/themes/dremora/theme.lua @@ -29,7 +29,7 @@ theme.taglist_bg_focus = "#121212" theme.menu_height = "16" theme.menu_width = "140" -theme.submenu_icon = theme.dir .. "/icons/submenu.png" +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.arrl_lr_pre = theme.dir .. "/icons/arrl_lr_pre.png" diff --git a/themes/holo/theme.lua b/themes/holo/theme.lua index 5a8651d..9a59a7b 100644 --- a/themes/holo/theme.lua +++ b/themes/holo/theme.lua @@ -38,7 +38,7 @@ theme.menu_width = "400" theme.widget_bg = theme.icon_dir .. "/bg_focus_noline.png" theme.awesome_icon = theme.icon_dir .. "/awesome_icon.png" theme.vol_bg = theme.icon_dir .. "/vol_bg.png" -theme.submenu_icon = theme.icon_dir .. "/submenu.png" +theme.menu_submenu_icon = theme.icon_dir .. "/submenu.png" theme.taglist_squares_sel = theme.icon_dir .. "/square_sel.png" theme.taglist_squares_unsel = theme.icon_dir .. "/square_unsel.png" theme.last = theme.icon_dir .. "/last.png" diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index 0394add..278327a 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -43,7 +43,7 @@ theme.menu_fg_focus = "#ff8c00" theme.menu_bg_normal = "#050505dd" theme.menu_bg_focus = "#050505dd" -theme.submenu_icon = theme.confdir .. "/icons/submenu.png" +theme.menu_submenu_icon = theme.confdir .. "/icons/submenu.png" theme.widget_temp = theme.confdir .. "/icons/temp.png" theme.widget_uptime = theme.confdir .. "/icons/ac.png" theme.widget_cpu = theme.confdir .. "/icons/cpu.png" diff --git a/themes/powerarrow-darker/theme.lua b/themes/powerarrow-darker/theme.lua index d257655..ead9123 100644 --- a/themes/powerarrow-darker/theme.lua +++ b/themes/powerarrow-darker/theme.lua @@ -37,7 +37,7 @@ theme.mouse_finder_color = "#CC9393" theme.menu_height = "16" theme.menu_width = "140" -theme.submenu_icon = themes_dir .. "/icons/submenu.png" +theme.menu_submenu_icon = themes_dir .. "/icons/submenu.png" theme.taglist_squares_sel = themes_dir .. "/icons/square_sel.png" theme.taglist_squares_unsel = themes_dir .. "/icons/square_unsel.png" diff --git a/themes/rainbow/theme.lua b/themes/rainbow/theme.lua index 90715f8..ca3726f 100644 --- a/themes/rainbow/theme.lua +++ b/themes/rainbow/theme.lua @@ -36,7 +36,7 @@ theme.tasklist_maximized_vertical = "" theme.tasklist_disable_icon = true theme.menu_awesome_icon = theme.dir .."/icons/awesome.png" -theme.submenu_icon = theme.dir .."/icons/submenu.png" +theme.menu_submenu_icon = theme.dir .."/icons/submenu.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.vol_bg = theme.dir .. "/icons/vol_bg.png" diff --git a/themes/steamburn/theme.lua b/themes/steamburn/theme.lua index 17d8fda..653909c 100644 --- a/themes/steamburn/theme.lua +++ b/themes/steamburn/theme.lua @@ -41,7 +41,7 @@ theme.layout_txt_fullscreen = "[F]" theme.layout_txt_magnifier = "[M]" theme.layout_txt_floating = "[|]" -theme.submenu_icon = themes_dir .. "/icons/submenu.png" +theme.menu_submenu_icon = themes_dir .. "/icons/submenu.png" theme.taglist_squares_sel = themes_dir .. "/icons/square_sel.png" theme.taglist_squares_unsel = themes_dir .. "/icons/square_unsel.png"