copland: deprecations removed; lain: new commit

This commit is contained in:
copycat-killer 2017-01-05 14:05:15 +01:00
parent 792e3b5e91
commit 5b13c8aef5
13 changed files with 91 additions and 88 deletions

2
lain

@ -1 +1 @@
Subproject commit 301faf5370d045e94c9c344acb0fdac84a2f25a6 Subproject commit 1bd178f68757099e6c9ccde1992ca5d519ccb8e5

View File

@ -113,7 +113,7 @@ markup = lain.util.markup
gray = "#9E9C9A" gray = "#9E9C9A"
-- Textclock -- Textclock
mytextclock = awful.widget.textclock(" %H:%M ") mytextclock = wibox.widget.textclock(" %H:%M ")
-- Calendar -- Calendar
lain.widgets.calendar.attach(mytextclock) lain.widgets.calendar.attach(mytextclock)
@ -345,7 +345,7 @@ root.buttons(awful.util.table.join(
globalkeys = awful.util.table.join( globalkeys = awful.util.table.join(
-- Take a screenshot -- Take a screenshot
-- https://github.com/copycat-killer/dots/blob/master/bin/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 -- Hotkeys
awful.key({ modkey, }, "s", hotkeys_popup.show_help, awful.key({ modkey, }, "s", hotkeys_popup.show_help,
@ -532,7 +532,7 @@ globalkeys = awful.util.table.join(
-- User programs -- User programs
awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), 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), awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end),
--[[ Default --[[ Default

View File

@ -15,6 +15,7 @@ local beautiful = require("beautiful")
local naughty = require("naughty") local naughty = require("naughty")
local lain = require("lain") local lain = require("lain")
local eminent = require("eminent") local eminent = require("eminent")
local shape = require("gears.shape")
--local menubar = require("menubar") --local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup").widget local hotkeys_popup = require("awful.hotkeys_popup").widget
-- }}} -- }}}
@ -64,7 +65,6 @@ modkey = "Mod4"
altkey = "Mod1" altkey = "Mod1"
terminal = "urxvtc" or "xterm" terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" editor = os.getenv("EDITOR") or "nano" or "vi"
editor_cmd = terminal .. " -e " .. editor
-- user defined -- user defined
browser = "firefox" browser = "firefox"
@ -101,17 +101,19 @@ end
-- {{{ Menu -- {{{ Menu
myawesomemenu = { myawesomemenu = {
{ "hotkeys", function() return false, hotkeys_popup.show_help end}, { "hotkeys", function() return false, hotkeys_popup.show_help end },
{ "manual", terminal .. " -e man awesome" }, { "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awesome.conffile }, { "edit config", string.format("%s -e %s %s", terminal, editor, awesome.conffile) },
{ "restart", awesome.restart }, { "restart", awesome.restart },
{ "quit", function() awesome.quit() end} { "quit", function() awesome.quit() end }
} }
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, mymainmenu = awful.menu({
{ "applications", require("freedesktop").menu.build() }, items = {
{ "open terminal", terminal }, { "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 --menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it
-- }}} -- }}}
@ -175,15 +177,17 @@ mpdwidget = lain.widgets.mpd({
-- Battery -- Battery
baticon = wibox.widget.imagebox(beautiful.bat) baticon = wibox.widget.imagebox(beautiful.bat)
batbar = awful.widget.progressbar() batbar = wibox.widget {
batbar:set_color(beautiful.fg_normal) forced_height = 1,
batbar:set_width(55) forced_width = 59,
batbar:set_ticks(true) color = beautiful.fg_normal,
batbar:set_ticks_size(6) background_color = beautiful.bg_normal,
batbar:set_background_color(beautiful.bg_normal) margins = 1,
batmargin = wibox.layout.margin(batbar, 2, 7) paddings = 1,
batmargin:set_top(6) ticks = true,
batmargin:set_bottom(6) ticks_size = 6,
widget = wibox.widget.progressbar,
}
batupd = lain.widgets.bat({ batupd = lain.widgets.bat({
settings = function() settings = function()
if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end 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) batbar:set_value(bat_now.perc / 100)
end end
}) })
batwidget = wibox.widget.background(batmargin) batbg = wibox.container.background(batbar, "#474747", shape.rectangle)
batwidget:set_bgimage(beautiful.widget_bg) batwidget = wibox.container.margin(batbg, 2, 7, 4, 4)
-- /home fs -- /home fs
diskicon = wibox.widget.imagebox(beautiful.disk) fsicon = wibox.widget.imagebox(beautiful.disk)
diskbar = awful.widget.progressbar() fsbar = wibox.widget {
diskbar:set_color(beautiful.fg_normal) forced_height = 1,
diskbar:set_width(55) forced_width = 59,
diskbar:set_ticks(true) color = beautiful.fg_normal,
diskbar:set_ticks_size(6) background_color = beautiful.bg_normal,
diskbar:set_background_color(beautiful.bg_normal) margins = 1,
diskmargin = wibox.layout.margin(diskbar, 2, 7) paddings = 1,
diskmargin:set_top(6) ticks = true,
diskmargin:set_bottom(6) ticks_size = 6,
widget = wibox.widget.progressbar,
}
fshome = lain.widgets.fs({ fshome = lain.widgets.fs({
partition = "/home", partition = "/home",
settings = function() settings = function()
if fs_now.used < 90 then if fs_now.used < 90 then
diskbar:set_color(beautiful.fg_normal) fsbar:set_color(beautiful.fg_normal)
else else
diskbar:set_color("#EB8F8F") fsbar:set_color("#EB8F8F")
end end
diskbar:set_value(fs_now.used / 100) fsbar:set_value(fs_now.used / 100)
end end
}) })
diskwidget = wibox.widget.background(diskmargin) fsbg = wibox.container.background(fsbar, "#474747", shape.rectangle)
diskwidget:set_bgimage(beautiful.widget_bg) fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4)
-- ALSA volume bar -- ALSA volume bar
volicon = wibox.widget.imagebox(beautiful.vol) volicon = wibox.widget.imagebox(beautiful.vol)
volume = lain.widgets.alsabar({width = 55, ticks = true, ticks_size = 6, step = "2%", volume = lain.widgets.alsabar({
settings = function() width = 59, border_width = 0, ticks = true, ticks_size = 6, step = "2%",
if volume_now.status == "off" then --togglechannel = "IEC958,3",
volicon:set_image(beautiful.vol_mute) settings = function()
elseif volume_now.level == 0 then if volume_now.status == "off" then
volicon:set_image(beautiful.vol_no) volicon:set_image(beautiful.vol_mute)
elseif volume_now.level <= 50 then elseif volume_now.level == 0 then
volicon:set_image(beautiful.vol_low) volicon:set_image(beautiful.vol_no)
else elseif volume_now.level <= 50 then
volicon:set_image(beautiful.vol) volicon:set_image(beautiful.vol_low)
end else
end, volicon:set_image(beautiful.vol)
colors = end
{ end,
background = beautiful.bg_normal, colors = {
mute = red, background = beautiful.bg_normal,
unmute = beautiful.fg_normal mute = red,
}}) unmute = beautiful.fg_normal
volmargin = wibox.layout.margin(volume.bar, 2, 7) }
volmargin:set_top(6) })
volmargin:set_bottom(6) volumebg = wibox.container.background(volume.bar, "#474747", shape.rectangle)
volumewidget = wibox.widget.background(volmargin) volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4)
volumewidget:set_bgimage(beautiful.widget_bg)
-- Weather -- Weather
myweather = lain.widgets.weather({ myweather = lain.widgets.weather({
@ -279,7 +284,6 @@ myweather = lain.widgets.weather({
spr = wibox.widget.textbox(' ') spr = wibox.widget.textbox(' ')
small_spr = wibox.widget.textbox('<span font="Tamsyn 4"> </span>') small_spr = wibox.widget.textbox('<span font="Tamsyn 4"> </span>')
bar_spr = wibox.widget.textbox('<span font="Tamsyn 3"> </span>' .. markup("#333333", "|") .. '<span font="Tamsyn 3"> </span>') bar_spr = wibox.widget.textbox('<span font="Tamsyn 3"> </span>' .. markup("#333333", "|") .. '<span font="Tamsyn 3"> </span>')
-- Create a wibox for each screen and add it -- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join( local taglist_buttons = awful.util.table.join(
awful.button({ }, 1, function(t) t:view_only() end), awful.button({ }, 1, function(t) t:view_only() end),
@ -396,8 +400,8 @@ awful.screen.connect_for_each_screen(function(s)
baticon, baticon,
batwidget, batwidget,
bar_spr, bar_spr,
diskicon, fsicon,
diskwidget, fswidget,
bar_spr, bar_spr,
volicon, volicon,
volumewidget, volumewidget,
@ -420,7 +424,7 @@ root.buttons(awful.util.table.join(
globalkeys = awful.util.table.join( globalkeys = awful.util.table.join(
-- Take a screenshot -- Take a screenshot
-- https://github.com/copycat-killer/dots/blob/master/bin/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 -- Hotkeys
awful.key({ modkey, }, "s", hotkeys_popup.show_help, awful.key({ modkey, }, "s", hotkeys_popup.show_help,
@ -554,29 +558,29 @@ globalkeys = awful.util.table.join(
-- ALSA volume control -- ALSA volume control
awful.key({ altkey }, "Up", awful.key({ altkey }, "Up",
function () function ()
os.execute(string.format("amixer set %s 1%%+", volumewidget.channel)) os.execute(string.format("amixer set %s 1%%+", volume.channel))
volumewidget.update() volume.notify()
end), end),
awful.key({ altkey }, "Down", awful.key({ altkey }, "Down",
function () function ()
os.execute(string.format("amixer set %s 1%%-", volumewidget.channel)) os.execute(string.format("amixer set %s 1%%-", volume.channel))
volumewidget.update() volume.notify()
end), end),
awful.key({ altkey }, "m", awful.key({ altkey }, "m",
function () function ()
os.execute(string.format("amixer set %s toggle", volumewidget.channel)) os.execute(string.format("amixer set %s toggle", volume.togglechannel or volume.channel))
volumewidget.update() volume.notify()
end), end),
awful.key({ altkey, "Control" }, "m", awful.key({ altkey, "Control" }, "m",
function () function ()
os.execute(string.format("amixer set %s 100%%", volumewidget.channel)) os.execute(string.format("amixer set %s 100%%", volume.channel))
volumewidget.update() volume.notify()
end), end),
awful.key({ altkey, "Control" }, "0", awful.key({ altkey, "Control" }, "0",
function () function ()
os.execute(string.format("amixer -q set %s 0%%", volume.channel)) os.execute(string.format("amixer -q set %s 0%%", volume.channel))
volumewidget.update() volume.notify()
end), end),
-- MPD control -- MPD control
@ -607,7 +611,7 @@ globalkeys = awful.util.table.join(
-- User programs -- User programs
awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), 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), awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end),
--[[ Default --[[ Default

View File

@ -228,7 +228,7 @@ netupicon = wibox.widget.imagebox(beautiful.widget_netup)
netupinfo = lain.widgets.net({ netupinfo = lain.widgets.net({
settings = function() settings = function()
if iface ~= "network off" and if iface ~= "network off" and
string.match(myweather._layout.text, "N/A") string.match(myweather._private.layout.text, "N/A")
then then
myweather.update() myweather.update()
end end

View File

@ -31,7 +31,7 @@ theme.tasklist_bg_focus = "#060606"
theme.menu_height = 16 theme.menu_height = 16
theme.menu_width = 140 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_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
theme.arrl_lr_pre = theme.dir .. "/icons/arrl_lr_pre.png" theme.arrl_lr_pre = theme.dir .. "/icons/arrl_lr_pre.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

View File

@ -37,10 +37,9 @@ theme.tasklist_maximized_vertical = ""
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.awesome_icon = theme.dir .."/icons/awesome.png" 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_sel = theme.dir .. "/icons/square_unsel.png"
theme.taglist_squares_unsel = 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 = theme.dir .. "/icons/vol.png"
theme.vol_low = theme.dir .. "/icons/vol_low.png" theme.vol_low = theme.dir .. "/icons/vol_low.png"
theme.vol_no = theme.dir .. "/icons/vol_no.png" theme.vol_no = theme.dir .. "/icons/vol_no.png"

View File

@ -29,7 +29,7 @@ theme.taglist_bg_focus = "#121212"
theme.menu_height = "16" theme.menu_height = "16"
theme.menu_width = "140" 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_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
theme.arrl_lr_pre = theme.dir .. "/icons/arrl_lr_pre.png" theme.arrl_lr_pre = theme.dir .. "/icons/arrl_lr_pre.png"

View File

@ -38,7 +38,7 @@ theme.menu_width = "400"
theme.widget_bg = theme.icon_dir .. "/bg_focus_noline.png" theme.widget_bg = theme.icon_dir .. "/bg_focus_noline.png"
theme.awesome_icon = theme.icon_dir .. "/awesome_icon.png" theme.awesome_icon = theme.icon_dir .. "/awesome_icon.png"
theme.vol_bg = theme.icon_dir .. "/vol_bg.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_sel = theme.icon_dir .. "/square_sel.png"
theme.taglist_squares_unsel = theme.icon_dir .. "/square_unsel.png" theme.taglist_squares_unsel = theme.icon_dir .. "/square_unsel.png"
theme.last = theme.icon_dir .. "/last.png" theme.last = theme.icon_dir .. "/last.png"

View File

@ -43,7 +43,7 @@ theme.menu_fg_focus = "#ff8c00"
theme.menu_bg_normal = "#050505dd" theme.menu_bg_normal = "#050505dd"
theme.menu_bg_focus = "#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_temp = theme.confdir .. "/icons/temp.png"
theme.widget_uptime = theme.confdir .. "/icons/ac.png" theme.widget_uptime = theme.confdir .. "/icons/ac.png"
theme.widget_cpu = theme.confdir .. "/icons/cpu.png" theme.widget_cpu = theme.confdir .. "/icons/cpu.png"

View File

@ -37,7 +37,7 @@ theme.mouse_finder_color = "#CC9393"
theme.menu_height = "16" theme.menu_height = "16"
theme.menu_width = "140" 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_sel = themes_dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = themes_dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = themes_dir .. "/icons/square_unsel.png"

View File

@ -36,7 +36,7 @@ theme.tasklist_maximized_vertical = ""
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.menu_awesome_icon = theme.dir .."/icons/awesome.png" 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_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
theme.vol_bg = theme.dir .. "/icons/vol_bg.png" theme.vol_bg = theme.dir .. "/icons/vol_bg.png"

View File

@ -41,7 +41,7 @@ theme.layout_txt_fullscreen = "[F]"
theme.layout_txt_magnifier = "[M]" theme.layout_txt_magnifier = "[M]"
theme.layout_txt_floating = "[|]" 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_sel = themes_dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = themes_dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = themes_dir .. "/icons/square_unsel.png"