diff --git a/README.rst b/README.rst
index 38be7eb..5f8ec97 100644
--- a/README.rst
+++ b/README.rst
@@ -118,7 +118,7 @@ Every theme has a colorscheme_.
Blackburn and Dremora use Icons_: be sure to have bitmaps enabled if running under Debian_ or Ubuntu_. If you want more glyphs, try FontAwesome_.
-Default additional software used: ::
+Additional software used: ::
unclutter firefox scrot mpd mpc dmenu xsel
diff --git a/rc.lua.blackburn b/rc.lua.blackburn
index 5c042db..31befaa 100644
--- a/rc.lua.blackburn
+++ b/rc.lua.blackburn
@@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/blackburn/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local tagnames = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -92,14 +113,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@@ -118,14 +139,14 @@ separators = lain.util.separators
gray = "#9E9C9A"
-- Textclock
-mytextclock = wibox.widget.textclock(" %H:%M ")
+local mytextclock = wibox.widget.textclock(" %H:%M ")
-- Calendar
lain.widgets.calendar.attach(mytextclock)
--[[ Mail IMAP check
-- commented because it needs to be set before use
-mailwidget = lain.widgets.imap({
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -145,7 +166,7 @@ mailwidget = lain.widgets.imap({
]]
-- MPD
-mpdwidget = lain.widgets.mpd({
+local mpdwidget = lain.widgets.mpd({
settings = function()
artist = mpd_now.artist .. " "
title = mpd_now.title .. " "
@@ -163,7 +184,7 @@ mpdwidget = lain.widgets.mpd({
})
-- /home fs
-fshome = lain.widgets.fs({
+local fshome = lain.widgets.fs({
partition = "/home",
options = "--exclude-type=tmpfs",
settings = function()
@@ -180,7 +201,7 @@ fshome = lain.widgets.fs({
})
-- Battery
-batwidget = lain.widgets.bat({
+local batwidget = lain.widgets.bat({
settings = function()
bat_header = " Bat "
bat_p = bat_now.perc .. " "
@@ -189,7 +210,7 @@ batwidget = lain.widgets.bat({
})
-- ALSA volume
-volume = lain.widgets.alsa({
+local volume = lain.widgets.alsa({
settings = function()
header = " Vol "
level = volume_now.level
@@ -204,7 +225,7 @@ volume = lain.widgets.alsa({
end
})
-myweather = lain.widgets.weather({
+local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder
settings = function()
units = math.floor(weather_now["main"]["temp"])
@@ -213,9 +234,9 @@ myweather = lain.widgets.weather({
})
-- Separators
-first = wibox.widget.textbox(' ')
-arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
-arrl_post = separators.arrow_right("#1A1A1A", "alpha")
+local first = wibox.widget.textbox(' ')
+local arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
+local arrl_post = separators.arrow_right("#1A1A1A", "alpha")
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
@@ -298,13 +319,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.tile,
- awful.layout.suit.fair,
- awful.layout.suit.tile.left,
- awful.layout.suit.tile.top,
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
diff --git a/rc.lua.copland b/rc.lua.copland
index b47557b..cbccd85 100644
--- a/rc.lua.copland
+++ b/rc.lua.copland
@@ -61,15 +61,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/copland/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local tagnames = { "start", "2", "3", "4", "5" }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -94,14 +115,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@@ -115,21 +136,21 @@ mymainmenu = freedesktop.menu.build({
-- }}}
-- {{{ Wibar
-markup = lain.util.markup
-blue = beautiful.fg_focus
-red = "#EB8F8F"
-green = "#8FEB8F"
+local markup = lain.util.markup
+local blue = beautiful.fg_focus
+local red = "#EB8F8F"
+local green = "#8FEB8F"
-- Textclock
--os.setlocale(os.getenv("LANG")) -- to localize the clock
-mytextclock = wibox.widget.textclock(" %H:%M ")
+local mytextclock = wibox.widget.textclock(" %H:%M ")
-- Calendar
lain.widgets.calendar.attach(mytextclock)
--[[ Mail IMAP check
-- commented because it needs to be set before use
-mailwidget = lain.widgets.imap({
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -149,8 +170,8 @@ mailwidget = lain.widgets.imap({
]]
-- MPD
-mpdicon = wibox.widget.imagebox()
-mpdwidget = lain.widgets.mpd({
+local mpdicon = wibox.widget.imagebox()
+local mpdwidget = lain.widgets.mpd({
settings = function()
if mpd_now.state == "play" then
title = mpd_now.title
@@ -174,8 +195,8 @@ mpdwidget = lain.widgets.mpd({
})
-- Battery
-baticon = wibox.widget.imagebox(beautiful.bat)
-batbar = wibox.widget {
+local baticon = wibox.widget.imagebox(beautiful.bat)
+local batbar = wibox.widget {
forced_height = 1,
forced_width = 59,
color = beautiful.fg_normal,
@@ -186,7 +207,7 @@ batbar = wibox.widget {
ticks_size = 6,
widget = wibox.widget.progressbar,
}
-batupd = lain.widgets.bat({
+local batupd = lain.widgets.bat({
settings = function()
if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end
@@ -218,12 +239,12 @@ batupd = lain.widgets.bat({
batbar:set_value(bat_now.perc / 100)
end
})
-batbg = wibox.container.background(batbar, "#474747", shape.rectangle)
-batwidget = wibox.container.margin(batbg, 2, 7, 4, 4)
+local batbg = wibox.container.background(batbar, "#474747", shape.rectangle)
+local batwidget = wibox.container.margin(batbg, 2, 7, 4, 4)
-- /home fs
-fsicon = wibox.widget.imagebox(beautiful.disk)
-fsbar = wibox.widget {
+local fsicon = wibox.widget.imagebox(beautiful.disk)
+local fsbar = wibox.widget {
forced_height = 1,
forced_width = 59,
color = beautiful.fg_normal,
@@ -234,7 +255,7 @@ fsbar = wibox.widget {
ticks_size = 6,
widget = wibox.widget.progressbar,
}
-fshome = lain.widgets.fs({
+local fshome = lain.widgets.fs({
partition = "/home",
options = "--exclude-type=tmpfs",
settings = function()
@@ -246,12 +267,12 @@ fshome = lain.widgets.fs({
fsbar:set_value(fs_now.used / 100)
end
})
-fsbg = wibox.container.background(fsbar, "#474747", shape.rectangle)
-fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4)
+local fsbg = wibox.container.background(fsbar, "#474747", shape.rectangle)
+local fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4)
-- ALSA volume bar
-volicon = wibox.widget.imagebox(beautiful.vol)
-volume = lain.widgets.alsabar({
+local volicon = wibox.widget.imagebox(beautiful.vol)
+local volume = lain.widgets.alsabar({
width = 59, border_width = 0, ticks = true, ticks_size = 6, step = "2%",
--togglechannel = "IEC958,3",
settings = function()
@@ -271,18 +292,18 @@ volume = lain.widgets.alsabar({
unmute = beautiful.fg_normal
}
})
-volumebg = wibox.container.background(volume.bar, "#474747", shape.rectangle)
-volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4)
+local volumebg = wibox.container.background(volume.bar, "#474747", shape.rectangle)
+local volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4)
-- Weather
-myweather = lain.widgets.weather({
+local myweather = lain.widgets.weather({
city_id = 123456 -- placeholder
})
-- Separators
-spr = wibox.widget.textbox(' ')
-small_spr = wibox.widget.textbox(' ')
-bar_spr = wibox.widget.textbox(' ' .. markup("#333333", "|") .. ' ')
+local spr = wibox.widget.textbox(' ')
+local small_spr = wibox.widget.textbox(' ')
+local bar_spr = wibox.widget.textbox(' ' .. markup("#333333", "|") .. ' ')
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
@@ -349,13 +370,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ "start", "2", "3", "4", "5" }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.fair,
- awful.layout.suit.tile,
- lain.layout.termfair,
- lain.layout.centerfair
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
diff --git a/rc.lua.dremora b/rc.lua.dremora
index f37b09b..7f2def3 100644
--- a/rc.lua.dremora
+++ b/rc.lua.dremora
@@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/dremora/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local tagnames = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -92,14 +113,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@@ -113,13 +134,13 @@ mymainmenu = freedesktop.menu.build({
-- }}}
-- {{{ Wibox
-markup = lain.util.markup
-separators = lain.util.separators
-white = beautiful.fg_focus
-gray = "#858585"
+local markup = lain.util.markup
+local separators = lain.util.separators
+local white = beautiful.fg_focus
+local gray = "#858585"
-- Textclock
-mytextclock = wibox.widget.textclock(markup(gray, " %a")
+local mytextclock = wibox.widget.textclock(markup(gray, " %a")
.. markup(white, " %d ") .. markup(gray, "%b ") .. markup(white, "%H:%M "))
-- Calendar
@@ -127,7 +148,7 @@ lain.widgets.calendar.attach(mytextclock, { fg = white })
--[[ Mail IMAP check
-- commented because it needs to be set before use
-mailwidget = lain.widgets.imap({
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -148,7 +169,7 @@ mailwidget = lain.widgets.imap({
]]
-- MPD
-mpdwidget = lain.widgets.mpd({
+local mpdwidget = lain.widgets.mpd({
settings = function()
mpd_notification_preset.fg = white
artist = mpd_now.artist .. " "
@@ -167,7 +188,7 @@ mpdwidget = lain.widgets.mpd({
})
-- /home fs
-fshome = lain.widgets.fs({
+local fshome = lain.widgets.fs({
partition = "/home",
options = "--exclude-type=tmpfs",
notification_preset = { fg = white },
@@ -185,7 +206,7 @@ fshome = lain.widgets.fs({
})
-- Battery
-batwidget = lain.widgets.bat({
+local batwidget = lain.widgets.bat({
settings = function()
bat_header = " Bat "
bat_p = bat_now.perc .. " "
@@ -194,7 +215,7 @@ batwidget = lain.widgets.bat({
})
-- ALSA volume
-volume = lain.widgets.alsa({
+local volume = lain.widgets.alsa({
--togglechannel = "IEC958,3",
settings = function()
header = " Vol "
@@ -211,15 +232,15 @@ volume = lain.widgets.alsa({
})
-- Weather
-myweather = lain.widgets.weather({
+local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder
notification_preset = { fg = white }
})
-- Separators
-first = wibox.widget.textbox(' ')
-arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
-arrl_post = separators.arrow_right("#1A1A1A", "alpha")
+local first = wibox.widget.textbox(' ')
+local arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
+local arrl_post = separators.arrow_right("#1A1A1A", "alpha")
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
@@ -286,13 +307,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.tile,
- awful.layout.suit.fair,
- awful.layout.suit.tile.left,
- awful.layout.suit.tile.top
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
@@ -304,6 +320,7 @@ awful.screen.connect_for_each_screen(function(s)
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
+
-- Create a taglist widget
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
diff --git a/rc.lua.holo b/rc.lua.holo
index 02033eb..94d8f32 100644
--- a/rc.lua.holo
+++ b/rc.lua.holo
@@ -60,16 +60,37 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/holo/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
-musicplr = terminal .. " -e ncmpcpp "
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local musicplr = terminal .. " -e ncmpcpp "
+local tagnames = { " WEB ", " TERMINAL ", " FILES ", " OTHER " }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -94,14 +115,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
icon_size = 32,
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon_white },
@@ -112,31 +133,31 @@ mymainmenu = freedesktop.menu.build({
-- other triads can be put here
}
})
-mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })
+local mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })
--menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it
-- }}}
-- {{{ Wibar
-markup = lain.util.markup
-blue = "#80CCE6"
-space3 = markup.font("Tamsyn 3", " ")
+local markup = lain.util.markup
+local blue = "#80CCE6"
+local space3 = markup.font("Tamsyn 3", " ")
-- Clock
-mytextclock = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%H:%M " .. markup.font("Tamsyn 4", " ")))
-clock_icon = wibox.widget.imagebox(beautiful.clock)
-clockbg = wibox.container.background(mytextclock, beautiful.bg_focus, shape.rectangle)
-clockwidget = wibox.container.margin(clockbg, 0, 3, 5, 5)
+local mytextclock = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%H:%M " .. markup.font("Tamsyn 4", " ")))
+local clock_icon = wibox.widget.imagebox(beautiful.clock)
+local clockbg = wibox.container.background(mytextclock, beautiful.bg_focus, shape.rectangle)
+local clockwidget = wibox.container.margin(clockbg, 0, 3, 5, 5)
-- Calendar
-mytextcalendar = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%d %b " .. markup.font("Tamsyn 5", " ")))
-calendar_icon = wibox.widget.imagebox(beautiful.calendar)
-calbg = wibox.container.background(mytextcalendar, beautiful.bg_focus, shape.rectangle)
-calendarwidget = wibox.container.margin(calbg, 0, 0, 5, 5)
+local mytextcalendar = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%d %b " .. markup.font("Tamsyn 5", " ")))
+local calendar_icon = wibox.widget.imagebox(beautiful.calendar)
+local calbg = wibox.container.background(mytextcalendar, beautiful.bg_focus, shape.rectangle)
+local calendarwidget = wibox.container.margin(calbg, 0, 0, 5, 5)
lain.widgets.calendar.attach(calendarwidget, { fg = "#FFFFFF", position = "bottom_right", font = "Monospace", font_size = 9 })
--[[ Mail IMAP check
-- commented because it needs to be set before use
-mailwidget = lain.widgets.imap({
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -157,13 +178,13 @@ mailwidget = lain.widgets.imap({
]]
-- MPD
-mpd_icon = awful.widget.launcher({ image = beautiful.mpd, command = musicplr })
-prev_icon = wibox.widget.imagebox(beautiful.prev)
-next_icon = wibox.widget.imagebox(beautiful.nex)
-stop_icon = wibox.widget.imagebox(beautiful.stop)
-pause_icon = wibox.widget.imagebox(beautiful.pause)
-play_pause_icon = wibox.widget.imagebox(beautiful.play)
-mpdwidget = lain.widgets.mpd({
+local mpd_icon = awful.widget.launcher({ image = beautiful.mpd, command = musicplr })
+local prev_icon = wibox.widget.imagebox(beautiful.prev)
+local next_icon = wibox.widget.imagebox(beautiful.nex)
+local stop_icon = wibox.widget.imagebox(beautiful.stop)
+local pause_icon = wibox.widget.imagebox(beautiful.pause)
+local play_pause_icon = wibox.widget.imagebox(beautiful.play)
+local mpdwidget = lain.widgets.mpd({
settings = function ()
if mpd_now.state == "play" then
mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower)
@@ -185,8 +206,8 @@ mpdwidget = lain.widgets.mpd({
end
end
})
-musicbg = wibox.container.background(mpdwidget, beautiful.bg_focus, shape.rectangle)
-musicwidget = wibox.container.margin(musicbg, 0, 0, 5, 5)
+local musicbg = wibox.container.background(mpdwidget, beautiful.bg_focus, shape.rectangle)
+local musicwidget = wibox.container.margin(musicbg, 0, 0, 5, 5)
musicwidget:buttons(awful.util.table.join(awful.button({ }, 1,
function () awful.spawn.with_shell(musicplr) end)))
@@ -214,7 +235,7 @@ end)))
-- Battery
--[[
-batwidget = lain.widgets.bat({
+local batwidget = lain.widgets.bat({
settings = function()
bat_header = " Bat "
bat_p = bat_now.perc .. " "
@@ -227,7 +248,7 @@ batwidget = lain.widgets.bat({
--]]
-- ALSA volume bar
-volume = lain.widgets.alsabar({
+local volume = lain.widgets.alsabar({
notifications = { font = "Monospace", font_size = 10 },
--togglechannel = "IEC958,3",
--[[
@@ -240,51 +261,51 @@ volume = lain.widgets.alsabar({
--]]
})
--[[
-volumemar = wibox.container.margin(volume.bar, 0, 0, 10, 10)
-volumewidget = wibox.container.background(volumemar, beautiful.bg_focus, shape.rectangle)
+local volumemar = wibox.container.margin(volume.bar, 0, 0, 10, 10)
+local volumewidget = wibox.container.background(volumemar, beautiful.bg_focus, shape.rectangle)
volumewidget.shape_border_width = 5
volumewidget.shape_border_color = beautiful.tasklist_bg_normal
--]]
-- CPU
-cpu_icon = wibox.widget.imagebox(beautiful.cpu)
-cpu_widget = lain.widgets.cpu({
+local cpu_icon = wibox.widget.imagebox(beautiful.cpu)
+local cpu_widget = lain.widgets.cpu({
settings = function()
widget:set_markup(space3 .. "CPU " .. cpu_now.usage
.. "% " .. markup.font("Tamsyn 5", " "))
end
})
-cpubg = wibox.container.background(cpu_widget, beautiful.bg_focus, shape.rectangle)
-cpuwidget = wibox.container.margin(cpubg, 0, 0, 5, 5)
+local cpubg = wibox.container.background(cpu_widget, beautiful.bg_focus, shape.rectangle)
+local cpuwidget = wibox.container.margin(cpubg, 0, 0, 5, 5)
-- Net
-netdown_icon = wibox.widget.imagebox(beautiful.net_down)
-netup_icon = wibox.widget.imagebox(beautiful.net_up)
-netwidget = lain.widgets.net({
+local netdown_icon = wibox.widget.imagebox(beautiful.net_down)
+local netup_icon = wibox.widget.imagebox(beautiful.net_up)
+local netwidget = lain.widgets.net({
settings = function()
widget:set_markup(markup.font("Tamsyn 1", " ") .. net_now.received .. " - "
.. net_now.sent .. markup.font("Tamsyn 2", " "))
end
})
-netbg = wibox.container.background(netwidget, beautiful.bg_focus, shape.rectangle)
-networkwidget = wibox.container.margin(netbg, 0, 0, 5, 5)
+local netbg = wibox.container.background(netwidget, beautiful.bg_focus, shape.rectangle)
+local networkwidget = wibox.container.margin(netbg, 0, 0, 5, 5)
-- Weather
-myweather = lain.widgets.weather({
+local myweather = lain.widgets.weather({
notification_preset = { font = "Monospace 9" },
city_id = 123456 -- placeholder
})
-- Separators
-first = wibox.widget.textbox(' ')
-spr_small = wibox.widget.imagebox(beautiful.spr_small)
-spr_very_small = wibox.widget.imagebox(beautiful.spr_very_small)
-spr_right = wibox.widget.imagebox(beautiful.spr_right)
-spr_bottom_right = wibox.widget.imagebox(beautiful.spr_bottom_right)
-spr_left = wibox.widget.imagebox(beautiful.spr_left)
-bar = wibox.widget.imagebox(beautiful.bar)
-bottom_bar = wibox.widget.imagebox(beautiful.bottom_bar)
+local first = wibox.widget.textbox(' ')
+local spr_small = wibox.widget.imagebox(beautiful.spr_small)
+local spr_very_small = wibox.widget.imagebox(beautiful.spr_very_small)
+local spr_right = wibox.widget.imagebox(beautiful.spr_right)
+local spr_bottom_right = wibox.widget.imagebox(beautiful.spr_bottom_right)
+local spr_left = wibox.widget.imagebox(beautiful.spr_left)
+local bar = wibox.widget.imagebox(beautiful.bar)
+local bottom_bar = wibox.widget.imagebox(beautiful.bottom_bar)
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
@@ -358,13 +379,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ " WEB ", " TERMINAL ", " FILES ", " OTHER " }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.fair,
- awful.layout.suit.tile,
- awful.layout.suit.tile.left,
- awful.layout.suit.tile.top
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
diff --git a/rc.lua.multicolor b/rc.lua.multicolor
index 9070972..b424103 100644
--- a/rc.lua.multicolor
+++ b/rc.lua.multicolor
@@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/multicolor/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local tagnames = { "web", "term", "docs", "media", "files", "other" }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -92,14 +113,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@@ -113,14 +134,14 @@ mymainmenu = freedesktop.menu.build({
-- }}}
-- {{{ Wibox
-markup = lain.util.markup
+local markup = lain.util.markup
-- Textclock
os.setlocale(os.getenv("LANG")) -- to localize the clock
-clockicon = wibox.widget.imagebox(beautiful.widget_clock)
-mytextclock = wibox.widget.textclock(markup("#7788af", "%A %d %B ") .. markup("#535f7a", ">") .. markup("#de5e1e", " %H:%M "))
+local clockicon = wibox.widget.imagebox(beautiful.widget_clock)
+local mytextclock = wibox.widget.textclock(markup("#7788af", "%A %d %B ") .. markup("#535f7a", ">") .. markup("#de5e1e", " %H:%M "))
--[[
-mytextclock = lain.widgets.base({
+local mytextclock = lain.widgets.base({
timeout = 60,
cmd = "date +'%A %d %B %R'",
settings = function()
@@ -138,8 +159,8 @@ mytextclock = lain.widgets.base({
lain.widgets.calendar.attach(mytextclock, { font_size = 10 })
-- Weather
-weathericon = wibox.widget.imagebox(beautiful.widget_weather)
-myweather = lain.widgets.weather({
+local weathericon = wibox.widget.imagebox(beautiful.widget_weather)
+local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder
weather_na_markup = markup("#eca4c4", "N/A "),
settings = function()
@@ -150,8 +171,8 @@ myweather = lain.widgets.weather({
})
-- / fs
-fsicon = wibox.widget.imagebox(beautiful.widget_fs)
-fsroot = lain.widgets.fs({
+local fsicon = wibox.widget.imagebox(beautiful.widget_fs)
+local fsroot = lain.widgets.fs({
options = "--exclude-type=tmpfs",
settings = function()
widget:set_markup(markup("#80d9d8", fs_now.used .. "% "))
@@ -160,8 +181,8 @@ fsroot = lain.widgets.fs({
--[[ Mail IMAP check
-- commented because it needs to be set before use
-mailicon = wibox.widget.imagebox()
-mailwidget = lain.widgets.imap({
+local mailicon = wibox.widget.imagebox()
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -182,25 +203,24 @@ mailwidget = lain.widgets.imap({
]]
-- CPU
-cpuicon = wibox.widget.imagebox()
-cpuicon:set_image(beautiful.widget_cpu)
-cpuwidget = lain.widgets.cpu({
+local cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
+local cpuwidget = lain.widgets.cpu({
settings = function()
widget:set_markup(markup("#e33a6e", cpu_now.usage .. "% "))
end
})
-- Coretemp
-tempicon = wibox.widget.imagebox(beautiful.widget_temp)
-tempwidget = lain.widgets.temp({
+local tempicon = wibox.widget.imagebox(beautiful.widget_temp)
+local tempwidget = lain.widgets.temp({
settings = function()
widget:set_markup(markup("#f1af5f", coretemp_now .. "°C "))
end
})
-- Battery
-baticon = wibox.widget.imagebox(beautiful.widget_batt)
-batwidget = lain.widgets.bat({
+local baticon = wibox.widget.imagebox(beautiful.widget_batt)
+local batwidget = lain.widgets.bat({
settings = function()
if bat_now.perc ~= "N/A" then
bat_now.perc = bat_now.perc .. "%"
@@ -214,8 +234,8 @@ batwidget = lain.widgets.bat({
})
-- ALSA volume
-volicon = wibox.widget.imagebox(beautiful.widget_vol)
-volume = lain.widgets.alsa({
+local volicon = wibox.widget.imagebox(beautiful.widget_vol)
+local volume = lain.widgets.alsa({
settings = function()
if volume_now.status == "off" then
volume_now.level = volume_now.level .. "M"
@@ -226,12 +246,10 @@ volume = lain.widgets.alsa({
})
-- Net
-netdownicon = wibox.widget.imagebox(beautiful.widget_netdown)
---netdownicon.align = "middle"
-netdowninfo = wibox.widget.textbox()
-netupicon = wibox.widget.imagebox(beautiful.widget_netup)
---netupicon.align = "middle"
-netupinfo = lain.widgets.net({
+local netdownicon = wibox.widget.imagebox(beautiful.widget_netdown)
+local netdowninfo = wibox.widget.textbox()
+local netupicon = wibox.widget.imagebox(beautiful.widget_netup)
+local netupinfo = lain.widgets.net({
settings = function()
if iface ~= "network off" and
string.match(myweather._private.layout.text, "N/A")
@@ -245,16 +263,16 @@ netupinfo = lain.widgets.net({
})
-- MEM
-memicon = wibox.widget.imagebox(beautiful.widget_mem)
-memwidget = lain.widgets.mem({
+local memicon = wibox.widget.imagebox(beautiful.widget_mem)
+local memwidget = lain.widgets.mem({
settings = function()
widget:set_markup(markup("#e0da37", mem_now.used .. "M "))
end
})
-- MPD
-mpdicon = wibox.widget.imagebox()
-mpdwidget = lain.widgets.mpd({
+local mpdicon = wibox.widget.imagebox()
+local mpdwidget = lain.widgets.mpd({
settings = function()
mpd_notification_preset = {
text = string.format("%s [%s] - %s\n%s", mpd_now.artist,
@@ -345,18 +363,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ "web", "term", "docs", "media", "files", "other" }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.tile,
- awful.layout.suit.tile.left,
- awful.layout.suit.tile.bottom,
- awful.layout.suit.tile.top,
- awful.layout.suit.fair,
- awful.layout.suit.fair.horizontal,
- awful.layout.suit.spiral,
- awful.layout.suit.spiral.dwindle,
- awful.layout.suit.max
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker
index 40db4ba..b11d3e6 100644
--- a/rc.lua.powerarrow-darker
+++ b/rc.lua.powerarrow-darker
@@ -59,18 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
-mail = terminal .. " -e mutt "
-iptraf = terminal .. " -g 180x54-20+34 -e sudo iptraf-ng -i all "
-musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp "
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local tagnames = { "1", "2", "3", "4", "5" }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -95,14 +113,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@@ -116,13 +134,13 @@ mymainmenu = freedesktop.menu.build({
-- }}}
-- {{{ Wibox
-markup = lain.util.markup
-separators = lain.util.separators
+local markup = lain.util.markup
+local separators = lain.util.separators
-clockicon = wibox.widget.imagebox(beautiful.widget_clock)
---mytextclock = wibox.widget.textclock(" %a %d %b %H:%M")
+local clockicon = wibox.widget.imagebox(beautiful.widget_clock)
+--local mytextclock = wibox.widget.textclock(" %a %d %b %H:%M")
-mytextclock = lain.widgets.abase({
+local mytextclock = lain.widgets.abase({
timeout = 60,
cmd = " date +'%a %d %b %R'",
settings = function()
@@ -134,10 +152,10 @@ mytextclock = lain.widgets.abase({
lain.widgets.calendar.attach(mytextclock, { font_size = 10 })
-- Mail IMAP check
-mailicon = wibox.widget.imagebox(beautiful.widget_mail)
+local mailicon = wibox.widget.imagebox(beautiful.widget_mail)
mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end)))
--[[ commented because it needs to be set before use
-mailwidget = lain.widgets.imap({
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -155,9 +173,9 @@ mailwidget = lain.widgets.imap({
]]
-- MPD
-mpdicon = wibox.widget.imagebox(beautiful.widget_music)
+local mpdicon = wibox.widget.imagebox(beautiful.widget_music)
mpdicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end)))
-mpdwidget = lain.widgets.mpd({
+local mpdwidget = lain.widgets.mpd({
settings = function()
if mpd_now.state == "play" then
artist = " " .. mpd_now.artist .. " "
@@ -177,32 +195,32 @@ mpdwidget = lain.widgets.mpd({
})
-- MEM
-memicon = wibox.widget.imagebox(beautiful.widget_mem)
-memwidget = lain.widgets.mem({
+local memicon = wibox.widget.imagebox(beautiful.widget_mem)
+local memwidget = lain.widgets.mem({
settings = function()
widget:set_text(" " .. mem_now.used .. "MB ")
end
})
-- CPU
-cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
-cpuwidget = lain.widgets.cpu({
+local cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
+local cpuwidget = lain.widgets.cpu({
settings = function()
widget:set_text(" " .. cpu_now.usage .. "% ")
end
})
-- Coretemp
-tempicon = wibox.widget.imagebox(beautiful.widget_temp)
-tempwidget = lain.widgets.temp({
+local tempicon = wibox.widget.imagebox(beautiful.widget_temp)
+local tempwidget = lain.widgets.temp({
settings = function()
widget:set_text(" " .. coretemp_now .. "°C ")
end
})
-- / fs
-fsicon = wibox.widget.imagebox(beautiful.widget_hdd)
-fsroot = lain.widgets.fs({
+local fsicon = wibox.widget.imagebox(beautiful.widget_hdd)
+local fsroot = lain.widgets.fs({
options = "--exclude-type=tmpfs",
settings = function()
widget:set_text(" " .. fs_now.used .. "% ")
@@ -210,8 +228,8 @@ fsroot = lain.widgets.fs({
})
-- Battery
-baticon = wibox.widget.imagebox(beautiful.widget_battery)
-batwidget = lain.widgets.bat({
+local baticon = wibox.widget.imagebox(beautiful.widget_battery)
+local batwidget = lain.widgets.bat({
settings = function()
if bat_now.status ~= "N/A" then
if bat_now.ac_status == 1 then
@@ -233,8 +251,8 @@ batwidget = lain.widgets.bat({
})
-- ALSA volume
-volicon = wibox.widget.imagebox(beautiful.widget_vol)
-volume = lain.widgets.alsa({
+local volicon = wibox.widget.imagebox(beautiful.widget_vol)
+local volume = lain.widgets.alsa({
settings = function()
if volume_now.status == "off" then
volicon:set_image(beautiful.widget_vol_mute)
@@ -251,9 +269,9 @@ volume = lain.widgets.alsa({
})
-- Net
-neticon = wibox.widget.imagebox(beautiful.widget_net)
+local neticon = wibox.widget.imagebox(beautiful.widget_net)
neticon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(iptraf) end)))
-netwidget = lain.widgets.net({
+local netwidget = lain.widgets.net({
settings = function()
widget:set_markup(markup("#7AC82E", " " .. net_now.received)
.. " " ..
@@ -262,9 +280,9 @@ netwidget = lain.widgets.net({
})
-- Separators
-spr = wibox.widget.textbox(' ')
-arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha")
-arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus)
+local spr = wibox.widget.textbox(' ')
+local arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha")
+local arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus)
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
@@ -331,13 +349,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ "1", "2", "3", "4", "5" }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.tile,
- awful.layout.suit.tile.bottom,
- awful.layout.suit.fair,
- awful.layout.suit.fair.horizontal,
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
diff --git a/rc.lua.rainbow b/rc.lua.rainbow
index 32b34f6..947c5fa 100644
--- a/rc.lua.rainbow
+++ b/rc.lua.rainbow
@@ -60,15 +60,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/rainbow/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local tagnames = { "www", "dev", "docs", "media" }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -93,14 +114,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@@ -114,19 +135,19 @@ mymainmenu = freedesktop.menu.build({
-- }}}
-- {{{ Wibox
-markup = lain.util.markup
-white = beautiful.fg_focus
-gray = beautiful.fg_normal
+local markup = lain.util.markup
+local white = beautiful.fg_focus
+local gray = beautiful.fg_normal
-- Textclock
-mytextclock = wibox.widget.textclock(markup(white, " %H:%M "))
+local mytextclock = wibox.widget.textclock(markup(white, " %H:%M "))
-- Calendar
lain.widgets.calendar.attach(mytextclock, { fg = beautiful.fg_focus })
--[[ Mail IMAP check
-- commented because it needs to be set before use
-mailwidget = lain.widgets.imap({
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -148,7 +169,7 @@ mailwidget = lain.widgets.imap({
]]
-- MPD
-mpdwidget = lain.widgets.mpd({
+local mpdwidget = lain.widgets.mpd({
settings = function()
mpd_notification_preset.fg = white
@@ -168,7 +189,7 @@ mpdwidget = lain.widgets.mpd({
})
-- /home fs
-fshome = lain.widgets.fs({
+local fshome = lain.widgets.fs({
partition = "/home",
options = "--exclude-type=tmpfs",
settings = function()
@@ -187,12 +208,12 @@ fshome = lain.widgets.fs({
})
-- ALSA volume bar
-volume = lain.widgets.alsabar({ ticks = true, width = 67 })
-volumebg = wibox.container.background(volume.bar, "#585858", shape.rectangle)
-volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5)
+local volume = lain.widgets.alsabar({ ticks = true, width = 67 })
+local volumebg = wibox.container.background(volume.bar, "#585858", shape.rectangle)
+local volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5)
-- Weather
-myweather = lain.widgets.weather({
+local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder
settings = function()
w_notification_preset.fg = white
@@ -200,13 +221,8 @@ myweather = lain.widgets.weather({
})
-- Separators
-spr = wibox.widget.textbox(' ')
-small_spr = wibox.widget.textbox(' ')
-med_spr = wibox.widget.textbox(' ')
-
--- Separators
-first = wibox.widget.textbox(markup.font("Tamsyn 4", " "))
-spr = wibox.widget.textbox(' ')
+local first = wibox.widget.textbox(markup.font("Tamsyn 4", " "))
+local spr = wibox.widget.textbox(' ')
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
@@ -279,13 +295,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ "www", "dev", "docs", "media" }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.fair,
- awful.layout.suit.tile,
- awful.layout.suit.fair.horizontal,
- lain.layout.termfair,
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
diff --git a/rc.lua.steamburn b/rc.lua.steamburn
index 7f2dc29..fd1a434 100644
--- a/rc.lua.steamburn
+++ b/rc.lua.steamburn
@@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/steamburn/theme.lua")
-- common
-modkey = "Mod4"
-altkey = "Mod1"
-terminal = "urxvtc" or "xterm"
-editor = os.getenv("EDITOR") or "nano" or "vi"
+local modkey = "Mod4"
+local altkey = "Mod1"
+local terminal = "urxvtc" or "xterm"
+local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined
-browser = "firefox"
-gui_editor = "gvim"
-graphics = "gimp"
+local browser = "firefox"
+local gui_editor = "gvim"
+local graphics = "gimp"
+local tagnames = { "web", "term", "docs", "media", "down" }
+
+-- table of layouts to cover with awful.layout.inc, order matters.
+awful.layout.layouts = {
+ awful.layout.suit.floating,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.spiral,
+ awful.layout.suit.spiral.dwindle,
+ awful.layout.suit.max,
+ awful.layout.suit.max.fullscreen,
+ awful.layout.suit.magnifier,
+ awful.layout.suit.corner.nw,
+ -- awful.layout.suit.corner.ne,
+ -- awful.layout.suit.corner.sw,
+ -- awful.layout.suit.corner.se,
+}
-- lain
lain.layout.termfair.nmaster = 3
@@ -92,14 +113,14 @@ end
-- }}}
-- {{{ Menu
-myawesomemenu = {
+local myawesomemenu = {
{ "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 = freedesktop.menu.build({
+local mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@@ -113,17 +134,17 @@ mymainmenu = freedesktop.menu.build({
-- }}}
-- {{{ Wibox
-markup = lain.util.markup
-gray = "#94928F"
+local markup = lain.util.markup
+local gray = "#94928F"
-- Textclock
-mytextclock = wibox.widget.textclock(" %H:%M ")
+local mytextclock = wibox.widget.textclock(" %H:%M ")
-- Calendar
lain.widgets.calendar.attach(mytextclock)
-- Mail IMAP check
-mailwidget = lain.widgets.imap({
+local mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -142,7 +163,7 @@ mailwidget = lain.widgets.imap({
})
-- MPD
-mpdwidget = lain.widgets.mpd({
+local mpdwidget = lain.widgets.mpd({
settings = function()
artist = mpd_now.artist .. " "
title = mpd_now.title .. " "
@@ -160,26 +181,26 @@ mpdwidget = lain.widgets.mpd({
})
-- CPU
-cpuwidget = lain.widgets.sysload({
+local cpuwidget = lain.widgets.sysload({
settings = function()
widget:set_markup(markup(gray, " Cpu ") .. load_1 .. " ")
end
})
-- MEM
-memwidget = lain.widgets.mem({
+local memwidget = lain.widgets.mem({
settings = function()
widget:set_markup(markup(gray, " Mem ") .. mem_now.used .. " ")
end
})
-- /home fs
-fshome = lain.widgets.fs({
+local fshome = lain.widgets.fs({
partition = "/home"
})
-- Battery
-batwidget = lain.widgets.bat({
+local batwidget = lain.widgets.bat({
settings = function()
bat_perc = bat_now.perc
if bat_now.ac_status == 1 then bat_perc = "Plug" end
@@ -188,7 +209,7 @@ batwidget = lain.widgets.bat({
})
-- Net checker
-netwidget = lain.widgets.net({
+local netwidget = lain.widgets.net({
settings = function()
if net_now.state == "up" then net_state = "On"
else net_state = "Off" end
@@ -197,7 +218,7 @@ netwidget = lain.widgets.net({
})
-- ALSA volume
-volume = lain.widgets.alsa({
+local volume = lain.widgets.alsa({
settings = function()
header = " Vol "
vlevel = volume_now.level
@@ -213,13 +234,13 @@ volume = lain.widgets.alsa({
})
-- Weather
-myweather = lain.widgets.weather({
+local myweather = lain.widgets.weather({
city_id = 123456 -- placeholder
})
-- Separators
-first = wibox.widget.textbox(markup.font("Tamsyn 4", " "))
-spr = wibox.widget.textbox(' ')
+local first = wibox.widget.textbox(markup.font("Tamsyn 4", " "))
+local spr = wibox.widget.textbox(' ')
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
@@ -292,13 +313,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
- awful.tag({ "web", "term", "docs", "media", "down" }, s, {
- awful.layout.suit.floating,
- awful.layout.suit.tile,
- awful.layout.suit.tile.bottom,
- awful.layout.suit.fair,
- awful.layout.suit.fair.horizontal,
- })
+ -- Tags
+ awful.tag(tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
diff --git a/themes/blackburn/icons/awesome.png b/themes/blackburn/icons/awesome.png
new file mode 100644
index 0000000..8193454
Binary files /dev/null and b/themes/blackburn/icons/awesome.png differ
diff --git a/themes/blackburn/theme.lua b/themes/blackburn/theme.lua
index 7942556..562779b 100644
--- a/themes/blackburn/theme.lua
+++ b/themes/blackburn/theme.lua
@@ -31,6 +31,7 @@ theme.tasklist_bg_focus = "#060606"
theme.menu_height = 16
theme.menu_width = 130
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
+theme.awesome_icon = theme.dir .."/icons/awesome.png"
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"