1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-23 03:32:30 +00:00

fixed layouts

This commit is contained in:
copycat-killer 2017-01-16 14:11:02 +01:00
parent e52ec9235f
commit 1c0f57371d
11 changed files with 433 additions and 319 deletions

View file

@ -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_. 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 unclutter firefox scrot mpd mpc dmenu xsel

View file

@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/blackburn/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/blackburn/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -92,14 +113,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -118,14 +139,14 @@ separators = lain.util.separators
gray = "#9E9C9A" gray = "#9E9C9A"
-- Textclock -- Textclock
mytextclock = wibox.widget.textclock(" %H:%M ") local mytextclock = wibox.widget.textclock(" %H:%M ")
-- Calendar -- Calendar
lain.widgets.calendar.attach(mytextclock) lain.widgets.calendar.attach(mytextclock)
--[[ Mail IMAP check --[[ Mail IMAP check
-- commented because it needs to be set before use -- commented because it needs to be set before use
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -145,7 +166,7 @@ mailwidget = lain.widgets.imap({
]] ]]
-- MPD -- MPD
mpdwidget = lain.widgets.mpd({ local mpdwidget = lain.widgets.mpd({
settings = function() settings = function()
artist = mpd_now.artist .. " " artist = mpd_now.artist .. " "
title = mpd_now.title .. " " title = mpd_now.title .. " "
@ -163,7 +184,7 @@ mpdwidget = lain.widgets.mpd({
}) })
-- /home fs -- /home fs
fshome = lain.widgets.fs({ local fshome = lain.widgets.fs({
partition = "/home", partition = "/home",
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
settings = function() settings = function()
@ -180,7 +201,7 @@ fshome = lain.widgets.fs({
}) })
-- Battery -- Battery
batwidget = lain.widgets.bat({ local batwidget = lain.widgets.bat({
settings = function() settings = function()
bat_header = " Bat " bat_header = " Bat "
bat_p = bat_now.perc .. " " bat_p = bat_now.perc .. " "
@ -189,7 +210,7 @@ batwidget = lain.widgets.bat({
}) })
-- ALSA volume -- ALSA volume
volume = lain.widgets.alsa({ local volume = lain.widgets.alsa({
settings = function() settings = function()
header = " Vol " header = " Vol "
level = volume_now.level level = volume_now.level
@ -204,7 +225,7 @@ volume = lain.widgets.alsa({
end end
}) })
myweather = lain.widgets.weather({ local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder city_id = 123456, -- placeholder
settings = function() settings = function()
units = math.floor(weather_now["main"]["temp"]) units = math.floor(weather_now["main"]["temp"])
@ -213,9 +234,9 @@ myweather = lain.widgets.weather({
}) })
-- Separators -- Separators
first = wibox.widget.textbox('<span font="Tamsyn 4"> </span>') local first = wibox.widget.textbox('<span font="Tamsyn 4"> </span>')
arrl_pre = separators.arrow_right("alpha", "#1A1A1A") local arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
arrl_post = separators.arrow_right("#1A1A1A", "alpha") local arrl_post = separators.arrow_right("#1A1A1A", "alpha")
-- 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(
@ -298,13 +319,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
awful.layout.suit.tile,
awful.layout.suit.fair,
awful.layout.suit.tile.left,
awful.layout.suit.tile.top,
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()

View file

@ -61,15 +61,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/copland/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/copland/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -94,14 +115,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -115,21 +136,21 @@ mymainmenu = freedesktop.menu.build({
-- }}} -- }}}
-- {{{ Wibar -- {{{ Wibar
markup = lain.util.markup local markup = lain.util.markup
blue = beautiful.fg_focus local blue = beautiful.fg_focus
red = "#EB8F8F" local red = "#EB8F8F"
green = "#8FEB8F" local green = "#8FEB8F"
-- Textclock -- Textclock
--os.setlocale(os.getenv("LANG")) -- to localize the clock --os.setlocale(os.getenv("LANG")) -- to localize the clock
mytextclock = wibox.widget.textclock("<span font='Tamsyn 5'> </span>%H:%M ") local mytextclock = wibox.widget.textclock("<span font='Tamsyn 5'> </span>%H:%M ")
-- Calendar -- Calendar
lain.widgets.calendar.attach(mytextclock) lain.widgets.calendar.attach(mytextclock)
--[[ Mail IMAP check --[[ Mail IMAP check
-- commented because it needs to be set before use -- commented because it needs to be set before use
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -149,8 +170,8 @@ mailwidget = lain.widgets.imap({
]] ]]
-- MPD -- MPD
mpdicon = wibox.widget.imagebox() local mpdicon = wibox.widget.imagebox()
mpdwidget = lain.widgets.mpd({ local mpdwidget = lain.widgets.mpd({
settings = function() settings = function()
if mpd_now.state == "play" then if mpd_now.state == "play" then
title = mpd_now.title title = mpd_now.title
@ -174,8 +195,8 @@ mpdwidget = lain.widgets.mpd({
}) })
-- Battery -- Battery
baticon = wibox.widget.imagebox(beautiful.bat) local baticon = wibox.widget.imagebox(beautiful.bat)
batbar = wibox.widget { local batbar = wibox.widget {
forced_height = 1, forced_height = 1,
forced_width = 59, forced_width = 59,
color = beautiful.fg_normal, color = beautiful.fg_normal,
@ -186,7 +207,7 @@ batbar = wibox.widget {
ticks_size = 6, ticks_size = 6,
widget = wibox.widget.progressbar, widget = wibox.widget.progressbar,
} }
batupd = lain.widgets.bat({ local 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
@ -218,12 +239,12 @@ batupd = lain.widgets.bat({
batbar:set_value(bat_now.perc / 100) batbar:set_value(bat_now.perc / 100)
end end
}) })
batbg = wibox.container.background(batbar, "#474747", shape.rectangle) local batbg = wibox.container.background(batbar, "#474747", shape.rectangle)
batwidget = wibox.container.margin(batbg, 2, 7, 4, 4) local batwidget = wibox.container.margin(batbg, 2, 7, 4, 4)
-- /home fs -- /home fs
fsicon = wibox.widget.imagebox(beautiful.disk) local fsicon = wibox.widget.imagebox(beautiful.disk)
fsbar = wibox.widget { local fsbar = wibox.widget {
forced_height = 1, forced_height = 1,
forced_width = 59, forced_width = 59,
color = beautiful.fg_normal, color = beautiful.fg_normal,
@ -234,7 +255,7 @@ fsbar = wibox.widget {
ticks_size = 6, ticks_size = 6,
widget = wibox.widget.progressbar, widget = wibox.widget.progressbar,
} }
fshome = lain.widgets.fs({ local fshome = lain.widgets.fs({
partition = "/home", partition = "/home",
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
settings = function() settings = function()
@ -246,12 +267,12 @@ fshome = lain.widgets.fs({
fsbar:set_value(fs_now.used / 100) fsbar:set_value(fs_now.used / 100)
end end
}) })
fsbg = wibox.container.background(fsbar, "#474747", shape.rectangle) local fsbg = wibox.container.background(fsbar, "#474747", shape.rectangle)
fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4) local fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4)
-- ALSA volume bar -- ALSA volume bar
volicon = wibox.widget.imagebox(beautiful.vol) local volicon = wibox.widget.imagebox(beautiful.vol)
volume = lain.widgets.alsabar({ local volume = lain.widgets.alsabar({
width = 59, border_width = 0, ticks = true, ticks_size = 6, step = "2%", width = 59, border_width = 0, ticks = true, ticks_size = 6, step = "2%",
--togglechannel = "IEC958,3", --togglechannel = "IEC958,3",
settings = function() settings = function()
@ -271,18 +292,18 @@ volume = lain.widgets.alsabar({
unmute = beautiful.fg_normal unmute = beautiful.fg_normal
} }
}) })
volumebg = wibox.container.background(volume.bar, "#474747", shape.rectangle) local volumebg = wibox.container.background(volume.bar, "#474747", shape.rectangle)
volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4) local volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4)
-- Weather -- Weather
myweather = lain.widgets.weather({ local myweather = lain.widgets.weather({
city_id = 123456 -- placeholder city_id = 123456 -- placeholder
}) })
-- Separators -- Separators
spr = wibox.widget.textbox(' ') local spr = wibox.widget.textbox(' ')
small_spr = wibox.widget.textbox('<span font="Tamsyn 4"> </span>') local 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>') local 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(
@ -349,13 +370,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ "start", "2", "3", "4", "5" }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
awful.layout.suit.fair,
awful.layout.suit.tile,
lain.layout.termfair,
lain.layout.centerfair
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()

View file

@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/dremora/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/dremora/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -92,14 +113,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -113,13 +134,13 @@ mymainmenu = freedesktop.menu.build({
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
markup = lain.util.markup local markup = lain.util.markup
separators = lain.util.separators local separators = lain.util.separators
white = beautiful.fg_focus local white = beautiful.fg_focus
gray = "#858585" local gray = "#858585"
-- Textclock -- 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 ")) .. markup(white, " %d ") .. markup(gray, "%b ") .. markup(white, "%H:%M "))
-- Calendar -- Calendar
@ -127,7 +148,7 @@ lain.widgets.calendar.attach(mytextclock, { fg = white })
--[[ Mail IMAP check --[[ Mail IMAP check
-- commented because it needs to be set before use -- commented because it needs to be set before use
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -148,7 +169,7 @@ mailwidget = lain.widgets.imap({
]] ]]
-- MPD -- MPD
mpdwidget = lain.widgets.mpd({ local mpdwidget = lain.widgets.mpd({
settings = function() settings = function()
mpd_notification_preset.fg = white mpd_notification_preset.fg = white
artist = mpd_now.artist .. " " artist = mpd_now.artist .. " "
@ -167,7 +188,7 @@ mpdwidget = lain.widgets.mpd({
}) })
-- /home fs -- /home fs
fshome = lain.widgets.fs({ local fshome = lain.widgets.fs({
partition = "/home", partition = "/home",
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
notification_preset = { fg = white }, notification_preset = { fg = white },
@ -185,7 +206,7 @@ fshome = lain.widgets.fs({
}) })
-- Battery -- Battery
batwidget = lain.widgets.bat({ local batwidget = lain.widgets.bat({
settings = function() settings = function()
bat_header = " Bat " bat_header = " Bat "
bat_p = bat_now.perc .. " " bat_p = bat_now.perc .. " "
@ -194,7 +215,7 @@ batwidget = lain.widgets.bat({
}) })
-- ALSA volume -- ALSA volume
volume = lain.widgets.alsa({ local volume = lain.widgets.alsa({
--togglechannel = "IEC958,3", --togglechannel = "IEC958,3",
settings = function() settings = function()
header = " Vol " header = " Vol "
@ -211,15 +232,15 @@ volume = lain.widgets.alsa({
}) })
-- Weather -- Weather
myweather = lain.widgets.weather({ local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder city_id = 123456, -- placeholder
notification_preset = { fg = white } notification_preset = { fg = white }
}) })
-- Separators -- Separators
first = wibox.widget.textbox('<span font="Tamsyn 4"> </span>') local first = wibox.widget.textbox('<span font="Tamsyn 4"> </span>')
arrl_pre = separators.arrow_right("alpha", "#1A1A1A") local arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
arrl_post = separators.arrow_right("#1A1A1A", "alpha") local arrl_post = separators.arrow_right("#1A1A1A", "alpha")
-- 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(
@ -286,13 +307,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
awful.layout.suit.tile,
awful.layout.suit.fair,
awful.layout.suit.tile.left,
awful.layout.suit.tile.top
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() 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({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end))) awful.button({ }, 5, function () awful.layout.inc(-1) end)))
-- Create a taglist widget -- Create a taglist widget
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons) s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)

View file

@ -60,16 +60,37 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/holo/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/holo/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" local graphics = "gimp"
musicplr = terminal .. " -e ncmpcpp " 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -94,14 +115,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
icon_size = 32, icon_size = 32,
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon_white }, { "Awesome", myawesomemenu, beautiful.awesome_icon_white },
@ -112,31 +133,31 @@ mymainmenu = freedesktop.menu.build({
-- other triads can be put here -- 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 --menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it
-- }}} -- }}}
-- {{{ Wibar -- {{{ Wibar
markup = lain.util.markup local markup = lain.util.markup
blue = "#80CCE6" local blue = "#80CCE6"
space3 = markup.font("Tamsyn 3", " ") local space3 = markup.font("Tamsyn 3", " ")
-- Clock -- Clock
mytextclock = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%H:%M " .. markup.font("Tamsyn 4", " "))) local mytextclock = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%H:%M " .. markup.font("Tamsyn 4", " ")))
clock_icon = wibox.widget.imagebox(beautiful.clock) local clock_icon = wibox.widget.imagebox(beautiful.clock)
clockbg = wibox.container.background(mytextclock, beautiful.bg_focus, shape.rectangle) local clockbg = wibox.container.background(mytextclock, beautiful.bg_focus, shape.rectangle)
clockwidget = wibox.container.margin(clockbg, 0, 3, 5, 5) local clockwidget = wibox.container.margin(clockbg, 0, 3, 5, 5)
-- Calendar -- Calendar
mytextcalendar = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%d %b " .. markup.font("Tamsyn 5", " "))) local mytextcalendar = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%d %b " .. markup.font("Tamsyn 5", " ")))
calendar_icon = wibox.widget.imagebox(beautiful.calendar) local calendar_icon = wibox.widget.imagebox(beautiful.calendar)
calbg = wibox.container.background(mytextcalendar, beautiful.bg_focus, shape.rectangle) local calbg = wibox.container.background(mytextcalendar, beautiful.bg_focus, shape.rectangle)
calendarwidget = wibox.container.margin(calbg, 0, 0, 5, 5) 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 }) lain.widgets.calendar.attach(calendarwidget, { fg = "#FFFFFF", position = "bottom_right", font = "Monospace", font_size = 9 })
--[[ Mail IMAP check --[[ Mail IMAP check
-- commented because it needs to be set before use -- commented because it needs to be set before use
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -157,13 +178,13 @@ mailwidget = lain.widgets.imap({
]] ]]
-- MPD -- MPD
mpd_icon = awful.widget.launcher({ image = beautiful.mpd, command = musicplr }) local mpd_icon = awful.widget.launcher({ image = beautiful.mpd, command = musicplr })
prev_icon = wibox.widget.imagebox(beautiful.prev) local prev_icon = wibox.widget.imagebox(beautiful.prev)
next_icon = wibox.widget.imagebox(beautiful.nex) local next_icon = wibox.widget.imagebox(beautiful.nex)
stop_icon = wibox.widget.imagebox(beautiful.stop) local stop_icon = wibox.widget.imagebox(beautiful.stop)
pause_icon = wibox.widget.imagebox(beautiful.pause) local pause_icon = wibox.widget.imagebox(beautiful.pause)
play_pause_icon = wibox.widget.imagebox(beautiful.play) local play_pause_icon = wibox.widget.imagebox(beautiful.play)
mpdwidget = lain.widgets.mpd({ local mpdwidget = lain.widgets.mpd({
settings = function () settings = function ()
if mpd_now.state == "play" then if mpd_now.state == "play" then
mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower) mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower)
@ -185,8 +206,8 @@ mpdwidget = lain.widgets.mpd({
end end
end end
}) })
musicbg = wibox.container.background(mpdwidget, beautiful.bg_focus, shape.rectangle) local musicbg = wibox.container.background(mpdwidget, beautiful.bg_focus, shape.rectangle)
musicwidget = wibox.container.margin(musicbg, 0, 0, 5, 5) local musicwidget = wibox.container.margin(musicbg, 0, 0, 5, 5)
musicwidget:buttons(awful.util.table.join(awful.button({ }, 1, musicwidget:buttons(awful.util.table.join(awful.button({ }, 1,
function () awful.spawn.with_shell(musicplr) end))) function () awful.spawn.with_shell(musicplr) end)))
@ -214,7 +235,7 @@ end)))
-- Battery -- Battery
--[[ --[[
batwidget = lain.widgets.bat({ local batwidget = lain.widgets.bat({
settings = function() settings = function()
bat_header = " Bat " bat_header = " Bat "
bat_p = bat_now.perc .. " " bat_p = bat_now.perc .. " "
@ -227,7 +248,7 @@ batwidget = lain.widgets.bat({
--]] --]]
-- ALSA volume bar -- ALSA volume bar
volume = lain.widgets.alsabar({ local volume = lain.widgets.alsabar({
notifications = { font = "Monospace", font_size = 10 }, notifications = { font = "Monospace", font_size = 10 },
--togglechannel = "IEC958,3", --togglechannel = "IEC958,3",
--[[ --[[
@ -240,51 +261,51 @@ volume = lain.widgets.alsabar({
--]] --]]
}) })
--[[ --[[
volumemar = wibox.container.margin(volume.bar, 0, 0, 10, 10) local volumemar = wibox.container.margin(volume.bar, 0, 0, 10, 10)
volumewidget = wibox.container.background(volumemar, beautiful.bg_focus, shape.rectangle) local volumewidget = wibox.container.background(volumemar, beautiful.bg_focus, shape.rectangle)
volumewidget.shape_border_width = 5 volumewidget.shape_border_width = 5
volumewidget.shape_border_color = beautiful.tasklist_bg_normal volumewidget.shape_border_color = beautiful.tasklist_bg_normal
--]] --]]
-- CPU -- CPU
cpu_icon = wibox.widget.imagebox(beautiful.cpu) local cpu_icon = wibox.widget.imagebox(beautiful.cpu)
cpu_widget = lain.widgets.cpu({ local cpu_widget = lain.widgets.cpu({
settings = function() settings = function()
widget:set_markup(space3 .. "CPU " .. cpu_now.usage widget:set_markup(space3 .. "CPU " .. cpu_now.usage
.. "% " .. markup.font("Tamsyn 5", " ")) .. "% " .. markup.font("Tamsyn 5", " "))
end end
}) })
cpubg = wibox.container.background(cpu_widget, beautiful.bg_focus, shape.rectangle) local cpubg = wibox.container.background(cpu_widget, beautiful.bg_focus, shape.rectangle)
cpuwidget = wibox.container.margin(cpubg, 0, 0, 5, 5) local cpuwidget = wibox.container.margin(cpubg, 0, 0, 5, 5)
-- Net -- Net
netdown_icon = wibox.widget.imagebox(beautiful.net_down) local netdown_icon = wibox.widget.imagebox(beautiful.net_down)
netup_icon = wibox.widget.imagebox(beautiful.net_up) local netup_icon = wibox.widget.imagebox(beautiful.net_up)
netwidget = lain.widgets.net({ local netwidget = lain.widgets.net({
settings = function() settings = function()
widget:set_markup(markup.font("Tamsyn 1", " ") .. net_now.received .. " - " widget:set_markup(markup.font("Tamsyn 1", " ") .. net_now.received .. " - "
.. net_now.sent .. markup.font("Tamsyn 2", " ")) .. net_now.sent .. markup.font("Tamsyn 2", " "))
end end
}) })
netbg = wibox.container.background(netwidget, beautiful.bg_focus, shape.rectangle) local netbg = wibox.container.background(netwidget, beautiful.bg_focus, shape.rectangle)
networkwidget = wibox.container.margin(netbg, 0, 0, 5, 5) local networkwidget = wibox.container.margin(netbg, 0, 0, 5, 5)
-- Weather -- Weather
myweather = lain.widgets.weather({ local myweather = lain.widgets.weather({
notification_preset = { font = "Monospace 9" }, notification_preset = { font = "Monospace 9" },
city_id = 123456 -- placeholder city_id = 123456 -- placeholder
}) })
-- Separators -- Separators
first = wibox.widget.textbox('<span font="Tamsyn 7"> </span>') local first = wibox.widget.textbox('<span font="Tamsyn 7"> </span>')
spr_small = wibox.widget.imagebox(beautiful.spr_small) local spr_small = wibox.widget.imagebox(beautiful.spr_small)
spr_very_small = wibox.widget.imagebox(beautiful.spr_very_small) local spr_very_small = wibox.widget.imagebox(beautiful.spr_very_small)
spr_right = wibox.widget.imagebox(beautiful.spr_right) local spr_right = wibox.widget.imagebox(beautiful.spr_right)
spr_bottom_right = wibox.widget.imagebox(beautiful.spr_bottom_right) local spr_bottom_right = wibox.widget.imagebox(beautiful.spr_bottom_right)
spr_left = wibox.widget.imagebox(beautiful.spr_left) local spr_left = wibox.widget.imagebox(beautiful.spr_left)
bar = wibox.widget.imagebox(beautiful.bar) local bar = wibox.widget.imagebox(beautiful.bar)
bottom_bar = wibox.widget.imagebox(beautiful.bottom_bar) local bottom_bar = wibox.widget.imagebox(beautiful.bottom_bar)
-- 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(
@ -358,13 +379,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ " WEB ", " TERMINAL ", " FILES ", " OTHER " }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
awful.layout.suit.fair,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.top
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()

View file

@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/multicolor/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/multicolor/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -92,14 +113,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -113,14 +134,14 @@ mymainmenu = freedesktop.menu.build({
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
markup = lain.util.markup local markup = lain.util.markup
-- Textclock -- Textclock
os.setlocale(os.getenv("LANG")) -- to localize the clock os.setlocale(os.getenv("LANG")) -- to localize the clock
clockicon = wibox.widget.imagebox(beautiful.widget_clock) local clockicon = wibox.widget.imagebox(beautiful.widget_clock)
mytextclock = wibox.widget.textclock(markup("#7788af", "%A %d %B ") .. markup("#535f7a", ">") .. markup("#de5e1e", " %H:%M ")) 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, timeout = 60,
cmd = "date +'%A %d %B %R'", cmd = "date +'%A %d %B %R'",
settings = function() settings = function()
@ -138,8 +159,8 @@ mytextclock = lain.widgets.base({
lain.widgets.calendar.attach(mytextclock, { font_size = 10 }) lain.widgets.calendar.attach(mytextclock, { font_size = 10 })
-- Weather -- Weather
weathericon = wibox.widget.imagebox(beautiful.widget_weather) local weathericon = wibox.widget.imagebox(beautiful.widget_weather)
myweather = lain.widgets.weather({ local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder city_id = 123456, -- placeholder
weather_na_markup = markup("#eca4c4", "N/A "), weather_na_markup = markup("#eca4c4", "N/A "),
settings = function() settings = function()
@ -150,8 +171,8 @@ myweather = lain.widgets.weather({
}) })
-- / fs -- / fs
fsicon = wibox.widget.imagebox(beautiful.widget_fs) local fsicon = wibox.widget.imagebox(beautiful.widget_fs)
fsroot = lain.widgets.fs({ local fsroot = lain.widgets.fs({
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
settings = function() settings = function()
widget:set_markup(markup("#80d9d8", fs_now.used .. "% ")) widget:set_markup(markup("#80d9d8", fs_now.used .. "% "))
@ -160,8 +181,8 @@ fsroot = lain.widgets.fs({
--[[ Mail IMAP check --[[ Mail IMAP check
-- commented because it needs to be set before use -- commented because it needs to be set before use
mailicon = wibox.widget.imagebox() local mailicon = wibox.widget.imagebox()
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -182,25 +203,24 @@ mailwidget = lain.widgets.imap({
]] ]]
-- CPU -- CPU
cpuicon = wibox.widget.imagebox() local cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
cpuicon:set_image(beautiful.widget_cpu) local cpuwidget = lain.widgets.cpu({
cpuwidget = lain.widgets.cpu({
settings = function() settings = function()
widget:set_markup(markup("#e33a6e", cpu_now.usage .. "% ")) widget:set_markup(markup("#e33a6e", cpu_now.usage .. "% "))
end end
}) })
-- Coretemp -- Coretemp
tempicon = wibox.widget.imagebox(beautiful.widget_temp) local tempicon = wibox.widget.imagebox(beautiful.widget_temp)
tempwidget = lain.widgets.temp({ local tempwidget = lain.widgets.temp({
settings = function() settings = function()
widget:set_markup(markup("#f1af5f", coretemp_now .. "°C ")) widget:set_markup(markup("#f1af5f", coretemp_now .. "°C "))
end end
}) })
-- Battery -- Battery
baticon = wibox.widget.imagebox(beautiful.widget_batt) local baticon = wibox.widget.imagebox(beautiful.widget_batt)
batwidget = lain.widgets.bat({ local batwidget = lain.widgets.bat({
settings = function() settings = function()
if bat_now.perc ~= "N/A" then if bat_now.perc ~= "N/A" then
bat_now.perc = bat_now.perc .. "%" bat_now.perc = bat_now.perc .. "%"
@ -214,8 +234,8 @@ batwidget = lain.widgets.bat({
}) })
-- ALSA volume -- ALSA volume
volicon = wibox.widget.imagebox(beautiful.widget_vol) local volicon = wibox.widget.imagebox(beautiful.widget_vol)
volume = lain.widgets.alsa({ local volume = lain.widgets.alsa({
settings = function() settings = function()
if volume_now.status == "off" then if volume_now.status == "off" then
volume_now.level = volume_now.level .. "M" volume_now.level = volume_now.level .. "M"
@ -226,12 +246,10 @@ volume = lain.widgets.alsa({
}) })
-- Net -- Net
netdownicon = wibox.widget.imagebox(beautiful.widget_netdown) local netdownicon = wibox.widget.imagebox(beautiful.widget_netdown)
--netdownicon.align = "middle" local netdowninfo = wibox.widget.textbox()
netdowninfo = wibox.widget.textbox() local netupicon = wibox.widget.imagebox(beautiful.widget_netup)
netupicon = wibox.widget.imagebox(beautiful.widget_netup) local netupinfo = lain.widgets.net({
--netupicon.align = "middle"
netupinfo = lain.widgets.net({
settings = function() settings = function()
if iface ~= "network off" and if iface ~= "network off" and
string.match(myweather._private.layout.text, "N/A") string.match(myweather._private.layout.text, "N/A")
@ -245,16 +263,16 @@ netupinfo = lain.widgets.net({
}) })
-- MEM -- MEM
memicon = wibox.widget.imagebox(beautiful.widget_mem) local memicon = wibox.widget.imagebox(beautiful.widget_mem)
memwidget = lain.widgets.mem({ local memwidget = lain.widgets.mem({
settings = function() settings = function()
widget:set_markup(markup("#e0da37", mem_now.used .. "M ")) widget:set_markup(markup("#e0da37", mem_now.used .. "M "))
end end
}) })
-- MPD -- MPD
mpdicon = wibox.widget.imagebox() local mpdicon = wibox.widget.imagebox()
mpdwidget = lain.widgets.mpd({ local mpdwidget = lain.widgets.mpd({
settings = function() settings = function()
mpd_notification_preset = { mpd_notification_preset = {
text = string.format("%s [%s] - %s\n%s", mpd_now.artist, text = string.format("%s [%s] - %s\n%s", mpd_now.artist,
@ -345,18 +363,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ "web", "term", "docs", "media", "files", "other" }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
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
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()

View file

@ -59,18 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local 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 "
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -95,14 +113,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -116,13 +134,13 @@ mymainmenu = freedesktop.menu.build({
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
markup = lain.util.markup local markup = lain.util.markup
separators = lain.util.separators local separators = lain.util.separators
clockicon = wibox.widget.imagebox(beautiful.widget_clock) local clockicon = wibox.widget.imagebox(beautiful.widget_clock)
--mytextclock = wibox.widget.textclock(" %a %d %b %H:%M") --local mytextclock = wibox.widget.textclock(" %a %d %b %H:%M")
mytextclock = lain.widgets.abase({ local mytextclock = lain.widgets.abase({
timeout = 60, timeout = 60,
cmd = " date +'%a %d %b %R'", cmd = " date +'%a %d %b %R'",
settings = function() settings = function()
@ -134,10 +152,10 @@ mytextclock = lain.widgets.abase({
lain.widgets.calendar.attach(mytextclock, { font_size = 10 }) lain.widgets.calendar.attach(mytextclock, { font_size = 10 })
-- Mail IMAP check -- 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))) mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end)))
--[[ commented because it needs to be set before use --[[ commented because it needs to be set before use
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -155,9 +173,9 @@ mailwidget = lain.widgets.imap({
]] ]]
-- MPD -- 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))) 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() settings = function()
if mpd_now.state == "play" then if mpd_now.state == "play" then
artist = " " .. mpd_now.artist .. " " artist = " " .. mpd_now.artist .. " "
@ -177,32 +195,32 @@ mpdwidget = lain.widgets.mpd({
}) })
-- MEM -- MEM
memicon = wibox.widget.imagebox(beautiful.widget_mem) local memicon = wibox.widget.imagebox(beautiful.widget_mem)
memwidget = lain.widgets.mem({ local memwidget = lain.widgets.mem({
settings = function() settings = function()
widget:set_text(" " .. mem_now.used .. "MB ") widget:set_text(" " .. mem_now.used .. "MB ")
end end
}) })
-- CPU -- CPU
cpuicon = wibox.widget.imagebox(beautiful.widget_cpu) local cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
cpuwidget = lain.widgets.cpu({ local cpuwidget = lain.widgets.cpu({
settings = function() settings = function()
widget:set_text(" " .. cpu_now.usage .. "% ") widget:set_text(" " .. cpu_now.usage .. "% ")
end end
}) })
-- Coretemp -- Coretemp
tempicon = wibox.widget.imagebox(beautiful.widget_temp) local tempicon = wibox.widget.imagebox(beautiful.widget_temp)
tempwidget = lain.widgets.temp({ local tempwidget = lain.widgets.temp({
settings = function() settings = function()
widget:set_text(" " .. coretemp_now .. "°C ") widget:set_text(" " .. coretemp_now .. "°C ")
end end
}) })
-- / fs -- / fs
fsicon = wibox.widget.imagebox(beautiful.widget_hdd) local fsicon = wibox.widget.imagebox(beautiful.widget_hdd)
fsroot = lain.widgets.fs({ local fsroot = lain.widgets.fs({
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
settings = function() settings = function()
widget:set_text(" " .. fs_now.used .. "% ") widget:set_text(" " .. fs_now.used .. "% ")
@ -210,8 +228,8 @@ fsroot = lain.widgets.fs({
}) })
-- Battery -- Battery
baticon = wibox.widget.imagebox(beautiful.widget_battery) local baticon = wibox.widget.imagebox(beautiful.widget_battery)
batwidget = lain.widgets.bat({ local batwidget = lain.widgets.bat({
settings = function() settings = function()
if bat_now.status ~= "N/A" then if bat_now.status ~= "N/A" then
if bat_now.ac_status == 1 then if bat_now.ac_status == 1 then
@ -233,8 +251,8 @@ batwidget = lain.widgets.bat({
}) })
-- ALSA volume -- ALSA volume
volicon = wibox.widget.imagebox(beautiful.widget_vol) local volicon = wibox.widget.imagebox(beautiful.widget_vol)
volume = lain.widgets.alsa({ local volume = lain.widgets.alsa({
settings = function() settings = function()
if volume_now.status == "off" then if volume_now.status == "off" then
volicon:set_image(beautiful.widget_vol_mute) volicon:set_image(beautiful.widget_vol_mute)
@ -251,9 +269,9 @@ volume = lain.widgets.alsa({
}) })
-- Net -- 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))) 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() settings = function()
widget:set_markup(markup("#7AC82E", " " .. net_now.received) widget:set_markup(markup("#7AC82E", " " .. net_now.received)
.. " " .. .. " " ..
@ -262,9 +280,9 @@ netwidget = lain.widgets.net({
}) })
-- Separators -- Separators
spr = wibox.widget.textbox(' ') local spr = wibox.widget.textbox(' ')
arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha") local arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha")
arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus) local arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus)
-- 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(
@ -331,13 +349,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ "1", "2", "3", "4", "5" }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
awful.layout.suit.tile,
awful.layout.suit.tile.bottom,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()

View file

@ -60,15 +60,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/rainbow/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/rainbow/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -93,14 +114,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -114,19 +135,19 @@ mymainmenu = freedesktop.menu.build({
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
markup = lain.util.markup local markup = lain.util.markup
white = beautiful.fg_focus local white = beautiful.fg_focus
gray = beautiful.fg_normal local gray = beautiful.fg_normal
-- Textclock -- Textclock
mytextclock = wibox.widget.textclock(markup(white, " %H:%M ")) local mytextclock = wibox.widget.textclock(markup(white, " %H:%M "))
-- Calendar -- Calendar
lain.widgets.calendar.attach(mytextclock, { fg = beautiful.fg_focus }) lain.widgets.calendar.attach(mytextclock, { fg = beautiful.fg_focus })
--[[ Mail IMAP check --[[ Mail IMAP check
-- commented because it needs to be set before use -- commented because it needs to be set before use
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -148,7 +169,7 @@ mailwidget = lain.widgets.imap({
]] ]]
-- MPD -- MPD
mpdwidget = lain.widgets.mpd({ local mpdwidget = lain.widgets.mpd({
settings = function() settings = function()
mpd_notification_preset.fg = white mpd_notification_preset.fg = white
@ -168,7 +189,7 @@ mpdwidget = lain.widgets.mpd({
}) })
-- /home fs -- /home fs
fshome = lain.widgets.fs({ local fshome = lain.widgets.fs({
partition = "/home", partition = "/home",
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
settings = function() settings = function()
@ -187,12 +208,12 @@ fshome = lain.widgets.fs({
}) })
-- ALSA volume bar -- ALSA volume bar
volume = lain.widgets.alsabar({ ticks = true, width = 67 }) local volume = lain.widgets.alsabar({ ticks = true, width = 67 })
volumebg = wibox.container.background(volume.bar, "#585858", shape.rectangle) local volumebg = wibox.container.background(volume.bar, "#585858", shape.rectangle)
volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5) local volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5)
-- Weather -- Weather
myweather = lain.widgets.weather({ local myweather = lain.widgets.weather({
city_id = 123456, -- placeholder city_id = 123456, -- placeholder
settings = function() settings = function()
w_notification_preset.fg = white w_notification_preset.fg = white
@ -200,13 +221,8 @@ myweather = lain.widgets.weather({
}) })
-- Separators -- Separators
spr = wibox.widget.textbox(' ') local first = wibox.widget.textbox(markup.font("Tamsyn 4", " "))
small_spr = wibox.widget.textbox('<span font="Tamsyn 4"> </span>') local spr = wibox.widget.textbox(' ')
med_spr = wibox.widget.textbox('<span font="Tamsyn 7"> </span>')
-- Separators
first = wibox.widget.textbox(markup.font("Tamsyn 4", " "))
spr = wibox.widget.textbox(' ')
-- 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(
@ -279,13 +295,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ "www", "dev", "docs", "media" }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
awful.layout.suit.fair,
awful.layout.suit.tile,
awful.layout.suit.fair.horizontal,
lain.layout.termfair,
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()

View file

@ -59,15 +59,36 @@ run_once("unclutter -root")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/steamburn/theme.lua") beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/steamburn/theme.lua")
-- common -- common
modkey = "Mod4" local modkey = "Mod4"
altkey = "Mod1" local altkey = "Mod1"
terminal = "urxvtc" or "xterm" local terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi" local editor = os.getenv("EDITOR") or "nano" or "vi"
-- user defined -- user defined
browser = "firefox" local browser = "firefox"
gui_editor = "gvim" local gui_editor = "gvim"
graphics = "gimp" 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
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
@ -92,14 +113,14 @@ end
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
myawesomemenu = { local 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", string.format("%s -e %s %s", terminal, editor, 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 = freedesktop.menu.build({ local mymainmenu = freedesktop.menu.build({
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -113,17 +134,17 @@ mymainmenu = freedesktop.menu.build({
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
markup = lain.util.markup local markup = lain.util.markup
gray = "#94928F" local gray = "#94928F"
-- Textclock -- Textclock
mytextclock = wibox.widget.textclock(" %H:%M ") local mytextclock = wibox.widget.textclock(" %H:%M ")
-- Calendar -- Calendar
lain.widgets.calendar.attach(mytextclock) lain.widgets.calendar.attach(mytextclock)
-- Mail IMAP check -- Mail IMAP check
mailwidget = lain.widgets.imap({ local mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -142,7 +163,7 @@ mailwidget = lain.widgets.imap({
}) })
-- MPD -- MPD
mpdwidget = lain.widgets.mpd({ local mpdwidget = lain.widgets.mpd({
settings = function() settings = function()
artist = mpd_now.artist .. " " artist = mpd_now.artist .. " "
title = mpd_now.title .. " " title = mpd_now.title .. " "
@ -160,26 +181,26 @@ mpdwidget = lain.widgets.mpd({
}) })
-- CPU -- CPU
cpuwidget = lain.widgets.sysload({ local cpuwidget = lain.widgets.sysload({
settings = function() settings = function()
widget:set_markup(markup(gray, " Cpu ") .. load_1 .. " ") widget:set_markup(markup(gray, " Cpu ") .. load_1 .. " ")
end end
}) })
-- MEM -- MEM
memwidget = lain.widgets.mem({ local memwidget = lain.widgets.mem({
settings = function() settings = function()
widget:set_markup(markup(gray, " Mem ") .. mem_now.used .. " ") widget:set_markup(markup(gray, " Mem ") .. mem_now.used .. " ")
end end
}) })
-- /home fs -- /home fs
fshome = lain.widgets.fs({ local fshome = lain.widgets.fs({
partition = "/home" partition = "/home"
}) })
-- Battery -- Battery
batwidget = lain.widgets.bat({ local batwidget = lain.widgets.bat({
settings = function() settings = function()
bat_perc = bat_now.perc bat_perc = bat_now.perc
if bat_now.ac_status == 1 then bat_perc = "Plug" end if bat_now.ac_status == 1 then bat_perc = "Plug" end
@ -188,7 +209,7 @@ batwidget = lain.widgets.bat({
}) })
-- Net checker -- Net checker
netwidget = lain.widgets.net({ local netwidget = lain.widgets.net({
settings = function() settings = function()
if net_now.state == "up" then net_state = "On" if net_now.state == "up" then net_state = "On"
else net_state = "Off" end else net_state = "Off" end
@ -197,7 +218,7 @@ netwidget = lain.widgets.net({
}) })
-- ALSA volume -- ALSA volume
volume = lain.widgets.alsa({ local volume = lain.widgets.alsa({
settings = function() settings = function()
header = " Vol " header = " Vol "
vlevel = volume_now.level vlevel = volume_now.level
@ -213,13 +234,13 @@ volume = lain.widgets.alsa({
}) })
-- Weather -- Weather
myweather = lain.widgets.weather({ local myweather = lain.widgets.weather({
city_id = 123456 -- placeholder city_id = 123456 -- placeholder
}) })
-- Separators -- Separators
first = wibox.widget.textbox(markup.font("Tamsyn 4", " ")) local first = wibox.widget.textbox(markup.font("Tamsyn 4", " "))
spr = wibox.widget.textbox(' ') local spr = wibox.widget.textbox(' ')
-- 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(
@ -292,13 +313,8 @@ awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
awful.tag({ "web", "term", "docs", "media", "down" }, s, { -- Tags
awful.layout.suit.floating, awful.tag(tagnames, s, awful.layout.layouts)
awful.layout.suit.tile,
awful.layout.suit.tile.bottom,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
})
-- Create a promptbox for each screen -- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

View file

@ -31,6 +31,7 @@ theme.tasklist_bg_focus = "#060606"
theme.menu_height = 16 theme.menu_height = 16
theme.menu_width = 130 theme.menu_width = 130
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" 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_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"