diff --git a/README.rst b/README.rst
index fe8491b..7f454d5 100644
--- a/README.rst
+++ b/README.rst
@@ -11,6 +11,7 @@ I am in the process of updating to awesome 4.0. Currently, the ported themes are
- blackburn
- copland
- dremora
+- holo
- multicolor
-------------------------
@@ -41,14 +42,13 @@ Notable features
- Net carrier status notifier
- Colorful autoupdating icons
- Symbolic tag names
-- TXT layoutbox
-- Cairo wibox bar
+- Text layoutbox
+- Cairo wibar
- Custom layouts
- No borders when there's only one visible client
- Freedesktop.org compliant menu and desktop icons
- Vi-like client focus
- Non-empty tag browsing
-- Dynamic client borders (colors change along with processes status)
- Dynamic useless gaps
- Dynamic tagging
@@ -123,7 +123,7 @@ Only compatible with **stable** versions of Lua and Awesome (git/unstable versio
Complements are provided by lain_: be sure to meet its dependencies_.
-Fonts are Terminus_ (Multicolor, Powerarrow Darker), Tamzen_ (Copland) and Tamsyn_ (other ones).
+Fonts are Terminus_ (Multicolor, Powerarrow Darker), Tamzen_ (Copland), Roboto_ (Holo) and Tamsyn_ (other ones).
Every theme has a colorscheme_.
@@ -133,19 +133,20 @@ Default additional software used: ::
unclutter firefox scrot mpd mpc dmenu xsel
-.. _BY-NC-SA: http://creativecommons.org/licenses/by-nc-sa/4.0/
+.. _BY-NC-SA: http://creativecommons.org/licenses/by-nc-sa/4.0
.. _Awesome: http://github.com/awesomeWM/awesome
.. _lucamanni: https://github.com/lucamanni/awesome
.. _romockee: https://github.com/romockee/powerarrow
.. _ok100: http://ok100.deviantart.com/art/DWM-January-2013-348656846
.. _amouly: https://bbs.archlinux.org/viewtopic.php?pid=1307158#p1307158
-.. _foozer: http://dotshare.it/dots/499/
+.. _foozer: http://dotshare.it/dots/499
.. _`switch-theme.sh`: https://github.com/copycat-killer/awesome-copycats/issues/36
.. _lain: https://github.com/copycat-killer/lain
.. _dependencies: https://github.com/copycat-killer/lain/wiki#dependencies
-.. _Terminus: http://terminus-font.sourceforge.net/
+.. _Terminus: http://terminus-font.sourceforge.net
.. _Tamzen: https://github.com/sunaku/tamzen-font
-.. _Tamsyn: http://www.fial.com/~scott/tamsyn-font/
+.. _Roboto: https://fonts.google.com/specimen/Roboto
+.. _Tamsyn: http://www.fial.com/~scott/tamsyn-font
.. _colorscheme: https://github.com/copycat-killer/dots/tree/master/.colors
.. _Icons: https://github.com/copycat-killer/dots/tree/master/.fonts
.. _Debian: http://weiwu.sdf.org/100921.html
diff --git a/lain b/lain
index 5d892e0..617675d 160000
--- a/lain
+++ b/lain
@@ -1 +1 @@
-Subproject commit 5d892e0ceb9d4dece6d2d61b2e5c4046bbc91e9f
+Subproject commit 617675d6c3a7b79d650bfcd52a3c13e8dcdfa459
diff --git a/rc.lua.blackburn b/rc.lua.blackburn
index 6a85c53..a57e35b 100644
--- a/rc.lua.blackburn
+++ b/rc.lua.blackburn
@@ -1,7 +1,7 @@
--[[
- Blackburn Awesome WM config 2.0
+ Blackburn Awesome WM config 3.0
github.com/copycat-killer
--]]
@@ -561,17 +561,22 @@ globalkeys = awful.util.table.join(
--[[ Default
-- Prompt
- awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
+ awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
+ {description = "run prompt", group = "launcher"}),
awful.key({ modkey }, "x",
function ()
- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end),
+ awful.prompt.run {
+ prompt = "Run Lua code: ",
+ textbox = awful.screen.focused().mypromptbox.widget,
+ exe_callback = awful.util.eval,
+ history_path = awful.util.get_cache_dir() .. "/history_eval"
+ }
+ end,
+ {description = "lua execute prompt", group = "awesome"}),
-- Menubar
- awful.key({ modkey }, "p", function() menubar.show() end)
+ awful.key({ modkey }, "p", function() menubar.show() end,
+ {description = "show the menubar", group = "launcher"})
--]]
-- dmenu
diff --git a/rc.lua.copland b/rc.lua.copland
index bce1a00..e23f540 100644
--- a/rc.lua.copland
+++ b/rc.lua.copland
@@ -1,9 +1,9 @@
--[[
-
- Copland Awesome WM config
- github.com/copycat-killer
-
+
+ Copland Awesome WM config 2.0
+ github.com/copycat-killer
+
--]]
-- {{{ Required libraries
@@ -627,17 +627,22 @@ globalkeys = awful.util.table.join(
--[[ Default
-- Prompt
- awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
+ awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
+ {description = "run prompt", group = "launcher"}),
awful.key({ modkey }, "x",
function ()
- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end),
+ awful.prompt.run {
+ prompt = "Run Lua code: ",
+ textbox = awful.screen.focused().mypromptbox.widget,
+ exe_callback = awful.util.eval,
+ history_path = awful.util.get_cache_dir() .. "/history_eval"
+ }
+ end,
+ {description = "lua execute prompt", group = "awesome"}),
-- Menubar
- awful.key({ modkey }, "p", function() menubar.show() end)
+ awful.key({ modkey }, "p", function() menubar.show() end,
+ {description = "show the menubar", group = "launcher"})
--]]
-- dmenu
diff --git a/rc.lua.dremora b/rc.lua.dremora
index 284baba..e5a6392 100644
--- a/rc.lua.dremora
+++ b/rc.lua.dremora
@@ -554,17 +554,22 @@ globalkeys = awful.util.table.join(
--[[ Default
-- Prompt
- awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
+ awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
+ {description = "run prompt", group = "launcher"}),
awful.key({ modkey }, "x",
function ()
- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end),
+ awful.prompt.run {
+ prompt = "Run Lua code: ",
+ textbox = awful.screen.focused().mypromptbox.widget,
+ exe_callback = awful.util.eval,
+ history_path = awful.util.get_cache_dir() .. "/history_eval"
+ }
+ end,
+ {description = "lua execute prompt", group = "awesome"}),
-- Menubar
- awful.key({ modkey }, "p", function() menubar.show() end)
+ awful.key({ modkey }, "p", function() menubar.show() end,
+ {description = "show the menubar", group = "launcher"})
--]]
-- dmenu
diff --git a/rc.lua.holo b/rc.lua.holo
index 8764d52..b3cda62 100644
--- a/rc.lua.holo
+++ b/rc.lua.holo
@@ -1,20 +1,23 @@
+
--[[
- Holo Awesome WM config 2.0
+ Holo Awesome WM config 3.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
-local gears = require("gears")
-local awful = require("awful")
-awful.rules = require("awful.rules")
- require("awful.autofocus")
-local wibox = require("wibox")
-local beautiful = require("beautiful")
-local naughty = require("naughty")
-local lain = require("lain")
---local menubar = require("menubar")
+local gears = require("gears")
+local awful = require("awful")
+ require("awful.autofocus")
+local wibox = require("wibox")
+local beautiful = require("beautiful")
+local naughty = require("naughty")
+local lain = require("lain")
+local shape = require("gears.shape")
+--local menubar = require("menubar")
+local freedesktop = require("freedesktop")
+local hotkeys_popup = require("awful.hotkeys_popup").widget
-- }}}
-- {{{ Error handling
@@ -32,20 +35,20 @@ do
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
- text = err })
+ text = tostring(err) })
in_error = false
end)
end
-- }}}
-- {{{ Autostart applications
-function run_once(cmd)
+local function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
- awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
+ awful.spawn.with_shell(string.format("pgrep -u $USER -x %s > /dev/null || (%s)", findme, cmd))
end
run_once("urxvtd")
@@ -62,78 +65,80 @@ modkey = "Mod4"
altkey = "Mod1"
terminal = "urxvtc" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi"
-editor_cmd = terminal .. " -e " .. editor
-- user defined
browser = "firefox"
gui_editor = "gvim"
graphics = "gimp"
-musicplr = terminal .. " -e ncmpcpp "
+musicplr = terminal .. " -e ncmpcpp "
-local layouts = {
- awful.layout.suit.floating,
- lain.layout.uselesstile,
- awful.layout.suit.fair,
- lain.layout.uselesstile.left,
- lain.layout.uselesstile.top
-}
+-- lain
+lain.layout.termfair.nmaster = 3
+lain.layout.termfair.ncol = 1
+lain.layout.centerfair.nmaster = 3
+lain.layout.centerfair.ncol = 1
-- quake terminal
local quakeconsole = {}
-for s = 1, screen.count() do
- quakeconsole[s] = lain.util.quake({ app = terminal, wibox_height = 32})
+for s in screen do
+ quakeconsole[s] = lain.util.quake({ app = terminal })
end
-- }}}
--- {{{ Tags
-tags = {
- names = { " WEB ", " TERMINAL ", " FILES ", " OTHER " },
- layout = { layouts[1], layouts[3], layouts[2], layouts[4] }
-}
-for s = 1, screen.count() do
- tags[s] = awful.tag(tags.names, s, tags.layout)
-end
--- }}}
+-- {{{ Helper functions
+local function client_menu_toggle_fn()
+ local instance = nil
--- {{{ Wallpaper
-if beautiful.wallpaper then
- for s = 1, screen.count() do
- gears.wallpaper.maximized(beautiful.wallpaper, s, true)
+ return function ()
+ if instance and instance.wibox.visible then
+ instance:hide()
+ instance = nil
+ else
+ instance = awful.menu.clients({ theme = { width = 250 } })
+ end
end
end
-- }}}
-- {{{ Menu
-mymainmenu = awful.menu.new({ items = require("freedesktop").menu.build(),
- theme = { height = 16, width = 130 }})
-mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
- menu = mymainmenu })
--- Menubar configuration
---menubar.utils.terminal = terminal -- Set the terminal for applications that require it
+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({
+ before = {
+ { "Awesome", myawesomemenu, beautiful.awesome_icon_white },
+ -- other triads can be put here
+ },
+ after = {
+ { "Open terminal", terminal },
+ -- other triads can be put here
+ }
+})
+mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })
+--menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it
-- }}}
--- {{{ Wibox
+-- {{{ Wibar
markup = lain.util.markup
blue = "#80CCE6"
space3 = markup.font("Tamsyn 3", " ")
-space2 = markup.font("Tamsyn 2", " ")
-- Clock
-mytextclock = awful.widget.textclock(markup("#FFFFFF", space3 .. "%H:%M" .. space2))
-clock_icon = wibox.widget.imagebox()
-clock_icon:set_image(beautiful.clock)
-clockwidget = wibox.widget.background()
-clockwidget:set_widget(mytextclock)
-clockwidget:set_bgimage(beautiful.widget_bg)
+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)
-- Calendar
-mytextcalendar = awful.widget.textclock(markup("#FFFFFF", space3 .. "%d %b "))
-calendar_icon = wibox.widget.imagebox()
-calendar_icon:set_image(beautiful.calendar)
-calendarwidget = wibox.widget.background()
-calendarwidget:set_widget(mytextcalendar)
-calendarwidget:set_bgimage(beautiful.widget_bg)
-lain.widgets.calendar.attach(calendarwidget, { fg = "#FFFFFF", position = "bottom_right" })
+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)
+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
@@ -158,35 +163,27 @@ mailwidget = lain.widgets.imap({
]]
-- MPD
-mpd_icon = wibox.widget.imagebox()
-mpd_icon:set_image(beautiful.mpd)
-prev_icon = wibox.widget.imagebox()
-prev_icon:set_image(beautiful.prev)
-next_icon = wibox.widget.imagebox()
-next_icon:set_image(beautiful.nex)
-stop_icon = wibox.widget.imagebox()
-stop_icon:set_image(beautiful.stop)
-pause_icon = wibox.widget.imagebox()
-pause_icon:set_image(beautiful.pause)
-play_pause_icon = wibox.widget.imagebox()
-play_pause_icon:set_image(beautiful.play)
-
+mpd_icon = wibox.widget.imagebox(beautiful.mpd)
+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({
settings = function ()
if mpd_now.state == "play" then
mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower)
mpd_now.title = mpd_now.title:upper():gsub("&.-;", string.lower)
widget:set_markup(markup.font("Tamsyn 4", " ")
- .. markup.font("Tamsyn 8",
- mpd_now.artist
+ .. markup.font(beautiful.taglist_font,
+ " " .. mpd_now.artist
.. " - " ..
- mpd_now.title
- .. markup.font("Tamsyn 10", " ")))
+ mpd_now.title .. " ") .. markup.font("Tamsyn 5", " "))
play_pause_icon:set_image(beautiful.pause)
elseif mpd_now.state == "pause" then
widget:set_markup(markup.font("Tamsyn 4", " ") ..
- markup.font("Tamsyn 8", "MPD PAUSED") ..
- markup.font("Tamsyn 10", " "))
+ markup.font(beautiful.taglist_font, " MPD PAUSED ") ..
+ markup.font("Tamsyn 5", " "))
play_pause_icon:set_image(beautiful.play)
else
widget:set_markup("")
@@ -194,37 +191,37 @@ 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)
-musicwidget = wibox.widget.background()
-musicwidget:set_widget(mpdwidget)
-musicwidget:set_bgimage(beautiful.widget_bg)
musicwidget:buttons(awful.util.table.join(awful.button({ }, 1,
-function () awful.util.spawn_with_shell(musicplr) end)))
+function () awful.spawn.with_shell(musicplr) end)))
mpd_icon:buttons(awful.util.table.join(awful.button({ }, 1,
-function () awful.util.spawn_with_shell(musicplr) end)))
+function () awful.spawn.with_shell(musicplr) end)))
prev_icon:buttons(awful.util.table.join(awful.button({}, 1,
function ()
- awful.util.spawn_with_shell("mpc prev || ncmpc prev || pms prev")
+ awful.spawn.with_shell("mpc prev || ncmpc prev || pms prev")
mpdwidget.update()
end)))
next_icon:buttons(awful.util.table.join(awful.button({}, 1,
function ()
- awful.util.spawn_with_shell("mpc next || ncmpc next || pms next")
+ awful.spawn.with_shell("mpc next || ncmpc next || pms next")
mpdwidget.update()
end)))
stop_icon:buttons(awful.util.table.join(awful.button({}, 1,
function ()
play_pause_icon:set_image(beautiful.play)
- awful.util.spawn_with_shell("mpc stop || ncmpc stop || pms stop")
+ awful.spawn.with_shell("mpc stop || ncmpc stop || pms stop")
mpdwidget.update()
end)))
play_pause_icon:buttons(awful.util.table.join(awful.button({}, 1,
function ()
- awful.util.spawn_with_shell("mpc toggle || ncmpc toggle || pms toggle")
+ awful.spawn.with_shell("mpc toggle || ncmpc toggle || pms toggle")
mpdwidget.update()
end)))
-- Battery
+--[[
batwidget = lain.widgets.bat({
settings = function()
bat_header = " Bat "
@@ -235,70 +232,60 @@ batwidget = lain.widgets.bat({
widget:set_markup(markup(blue, bat_header) .. bat_p)
end
})
+--]]
-- ALSA volume bar
-myvolumebar = lain.widgets.alsabar({
- card = "0",
- ticks = true,
- width = 80,
- height = 10,
+volume = lain.widgets.alsabar({
+ notifications = { font = "Monospace", font_size = 10 },
+ --togglechannel = "IEC958,3",
+ --[[
+ width = 75, height = 10, border_width = 0,
colors = {
background = "#383838",
unmute = "#80CCE6",
mute = "#FF9F9F"
},
- notifications = {
- font = "Tamsyn",
- font_size = "12",
- bar_size = 32
- }
+ --]]
})
-alsamargin = wibox.layout.margin(myvolumebar.bar, 5, 8, 80)
-wibox.layout.margin.set_top(alsamargin, 12)
-wibox.layout.margin.set_bottom(alsamargin, 12)
-volumewidget = wibox.widget.background()
-volumewidget:set_widget(alsamargin)
-volumewidget:set_bgimage(beautiful.widget_bg)
+--[[
+volumemar = wibox.container.margin(volume.bar, 0, 0, 10, 10)
+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({
settings = function()
widget:set_markup(space3 .. "CPU " .. cpu_now.usage
- .. "%" .. markup.font("Tamsyn 5", " "))
+ .. "% " .. markup.font("Tamsyn 5", " "))
end
})
-cpuwidget = wibox.widget.background()
-cpuwidget:set_widget(cpu_widget)
-cpuwidget:set_bgimage(beautiful.widget_bg)
-cpu_icon = wibox.widget.imagebox()
-cpu_icon:set_image(beautiful.cpu)
+cpubg = wibox.container.background(cpu_widget, beautiful.bg_focus, shape.rectangle)
+cpuwidget = wibox.container.margin(cpubg, 0, 0, 5, 5)
-- Net
-netdown_icon = wibox.widget.imagebox()
-netdown_icon:set_image(beautiful.net_down)
-netup_icon = wibox.widget.imagebox()
-netup_icon:set_image(beautiful.net_up)
+netdown_icon = wibox.widget.imagebox(beautiful.net_down)
+netup_icon = wibox.widget.imagebox(beautiful.net_up)
netwidget = lain.widgets.net({
settings = function()
widget:set_markup(markup.font("Tamsyn 1", " ") .. net_now.received .. " - "
- .. net_now.sent .. space2)
+ .. net_now.sent .. markup.font("Tamsyn 2", " "))
end
})
-networkwidget = wibox.widget.background()
-networkwidget:set_widget(netwidget)
-networkwidget:set_bgimage(beautiful.widget_bg)
+netbg = wibox.container.background(netwidget, beautiful.bg_focus, shape.rectangle)
+networkwidget = wibox.container.margin(netbg, 0, 0, 5, 5)
-- Weather
myweather = lain.widgets.weather({
+ notification_preset = { font = "Monospace 9" },
city_id = 123456 -- placeholder
})
-- Separators
-first = wibox.widget.textbox(' ')
-last = wibox.widget.imagebox()
-last:set_image(beautiful.last)
-spr = wibox.widget.imagebox()
-spr:set_image(beautiful.spr)
+first = wibox.widget.textbox(' ')
spr_small = wibox.widget.imagebox()
spr_small:set_image(beautiful.spr_small)
spr_very_small = wibox.widget.imagebox()
@@ -315,21 +302,24 @@ bottom_bar = wibox.widget.imagebox()
bottom_bar:set_image(beautiful.bottom_bar)
-- Create a wibox for each screen and add it
-mywibox = {}
-mybottomwibox = {}
-mypromptbox = {}
-mylayoutbox = {}
-mytaglist = {}
-mytaglist.buttons = awful.util.table.join(
- awful.button({ }, 1, awful.tag.viewonly),
- awful.button({ modkey }, 1, awful.client.movetotag),
+local taglist_buttons = awful.util.table.join(
+ awful.button({ }, 1, function(t) t:view_only() end),
+ awful.button({ modkey }, 1, function(t)
+ if client.focus then
+ client.focus:move_to_tag(t)
+ end
+ end),
awful.button({ }, 3, awful.tag.viewtoggle),
- awful.button({ modkey }, 3, awful.client.toggletag),
- awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
- awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
- )
-mytasklist = {}
-mytasklist.buttons = awful.util.table.join(
+ awful.button({ modkey }, 3, function(t)
+ if client.focus then
+ client.focus:toggle_tag(t)
+ end
+ end),
+ awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
+ awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
+ )
+
+local tasklist_buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
@@ -337,8 +327,8 @@ mytasklist.buttons = awful.util.table.join(
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
- if not c:isvisible() then
- awful.tag.viewonly(c:tags()[1])
+ if not c:isvisible() and c.first_tag then
+ c.first_tag:view_only()
end
-- This will also un-minimize
-- the client, if needed
@@ -346,114 +336,133 @@ mytasklist.buttons = awful.util.table.join(
c:raise()
end
end),
- awful.button({ }, 3, function ()
- if instance then
- instance:hide()
- instance = nil
- else
- instance = awful.menu.clients({ width=250 })
- end
- end),
+ awful.button({ }, 3, client_menu_toggle_fn()),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
- if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
- if client.focus then client.focus:raise() end
end))
-for s = 1, screen.count() do
+local function set_wallpaper(s)
+ -- Wallpaper
+ if beautiful.wallpaper then
+ local wallpaper = beautiful.wallpaper
+ -- If wallpaper is a function, call it with the screen
+ if type(wallpaper) == "function" then
+ wallpaper = wallpaper(s)
+ end
+ gears.wallpaper.maximized(wallpaper, s, true)
+ end
+end
+
+local barcolor = gears.color({
+ type = "linear",
+ from = { 32, 0 },
+ to = { 32, 32 },
+ stops = { {0, beautiful.bg_focus }, {0.25, "#505050"}, {1, beautiful.bg_focus} }
+})
+
+-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
+screen.connect_signal("property::geometry", set_wallpaper)
+
+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,
+ })
+
-- Create a promptbox for each screen
- mypromptbox[s] = awful.widget.prompt()
+ s.mypromptbox = awful.widget.prompt()
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
- mylayoutbox[s] = awful.widget.layoutbox(s)
- mylayoutbox[s]:buttons(awful.util.table.join(
- awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
- awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
- awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
- awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
+ s.mylayoutbox = awful.widget.layoutbox(s)
+ s.mylayoutbox:buttons(awful.util.table.join(
+ awful.button({ }, 1, 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({ }, 5, function () awful.layout.inc(-1) end)))
-- Create a taglist widget
- mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
+ s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons, {bg_focus = barcolor})
+
+ mytaglistcont = wibox.container.background(s.mytaglist, beautiful.bg_focus, shape.rectangle)
+ s.mytag = wibox.container.margin(mytaglistcont, 0, 0, 5, 5)
-- Create a tasklist widget
- mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons, { bg_focus = beautiful.bg_focus, shape = shape.rectangle, shape_border_width = 5, shape_border_color = beautiful.tasklist_bg_normal, align = "center" })
-- Create the wibox
- mywibox[s] = awful.wibox({ position = "top", screen = s, height = 32 })
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 32 })
- -- Widgets that are aligned to the upper left
- local left_layout = wibox.layout.fixed.horizontal()
- left_layout:add(first)
- left_layout:add(mytaglist[s])
- left_layout:add(spr_small)
- left_layout:add(mylayoutbox[s])
- left_layout:add(mypromptbox[s])
-
- -- Widgets that are aligned to the upper right
- local right_layout = wibox.layout.fixed.horizontal()
- if s == 1 then right_layout:add(wibox.widget.systray()) end
- --right_layout:add(mailwidget)
- right_layout:add(batwidget)
- right_layout:add(spr_right)
- right_layout:add(prev_icon)
- right_layout:add(next_icon)
- right_layout:add(stop_icon)
- right_layout:add(play_pause_icon)
- right_layout:add(bar)
- right_layout:add(mpd_icon)
- right_layout:add(musicwidget)
- right_layout:add(bar)
- right_layout:add(spr_very_small)
- right_layout:add(volumewidget)
- right_layout:add(spr_left)
-
- -- Now bring it all together (with the tasklist in the middle)
- local layout = wibox.layout.align.horizontal()
- layout:set_left(left_layout)
- layout:set_right(right_layout)
-
- mywibox[s]:set_widget(layout)
+ -- Add widgets to the wibox
+ s.mywibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ first,
+ s.mytag,
+ spr_small,
+ s.mylayoutbox,
+ spr_small,
+ s.mypromptbox,
+ },
+ nil, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ wibox.widget.systray(),
+ --mailwidget,
+ --batwidget,
+ spr_right,
+ musicwidget,
+ bar,
+ prev_icon,
+ next_icon,
+ stop_icon,
+ play_pause_icon,
+ bar,
+ mpd_icon,
+ --bar,
+ --spr_very_small,
+ --volumewidget,
+ spr_left,
+ },
+ }
-- Create the bottom wibox
- mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 32 })
+ s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = 32 })
- -- Widgets that are aligned to the bottom left
- bottom_left_layout = wibox.layout.fixed.horizontal()
- bottom_left_layout:add(mylauncher)
-
- -- Widgets that are aligned to the bottom right
- bottom_right_layout = wibox.layout.fixed.horizontal()
- bottom_right_layout:add(spr_bottom_right)
- bottom_right_layout:add(netdown_icon)
- bottom_right_layout:add(networkwidget)
- bottom_right_layout:add(netup_icon)
- bottom_right_layout:add(bottom_bar)
- bottom_right_layout:add(cpu_icon)
- bottom_right_layout:add(cpuwidget)
- bottom_right_layout:add(bottom_bar)
- bottom_right_layout:add(calendar_icon)
- bottom_right_layout:add(calendarwidget)
- bottom_right_layout:add(bottom_bar)
- bottom_right_layout:add(clock_icon)
- bottom_right_layout:add(clockwidget)
- bottom_right_layout:add(last)
-
- -- Now bring it all together (with the tasklist in the middle)
- bottom_layout = wibox.layout.align.horizontal()
- bottom_layout:set_left(bottom_left_layout)
- bottom_layout:set_middle(mytasklist[s])
- bottom_layout:set_right(bottom_right_layout)
- mybottomwibox[s]:set_widget(bottom_layout)
-
- -- Set proper backgrounds, instead of beautiful.bg_normal
- mywibox[s]:set_bg(beautiful.topbar_path .. math.floor((screen[mouse.screen].workarea.width)) .. ".png")
- mybottomwibox[s]:set_bg("#242424")
-
- -- Create a borderbox above the bottomwibox
- lain.widgets.borderbox(mybottomwibox[s], s, { position = "top", color = "#0099CC" } )
-end
+ -- Add widgets to the bottom wibox
+ s.mybottomwibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ mylauncher,
+ },
+ s.mytasklist, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ spr_bottom_right,
+ netdown_icon,
+ networkwidget,
+ netup_icon,
+ bottom_bar,
+ cpu_icon,
+ cpuwidget,
+ bottom_bar,
+ calendar_icon,
+ calendarwidget,
+ bottom_bar,
+ clock_icon,
+ clockwidget,
+ },
+ }
+end)
-- }}}
-- {{{ Mouse bindings
@@ -470,26 +479,36 @@ globalkeys = awful.util.table.join(
-- https://github.com/copycat-killer/dots/blob/master/bin/screenshot
awful.key({ altkey }, "p", function() os.execute("screenshot") end),
+ -- Hotkeys
+ awful.key({ modkey, }, "s", hotkeys_popup.show_help,
+ {description="show help", group="awesome"}),
-- Tag browsing
- awful.key({ modkey }, "Left", awful.tag.viewprev ),
- awful.key({ modkey }, "Right", awful.tag.viewnext ),
- awful.key({ modkey }, "Escape", awful.tag.history.restore),
+ awful.key({ modkey, }, "Left", awful.tag.viewprev,
+ {description = "view previous", group = "tag"}),
+ awful.key({ modkey, }, "Right", awful.tag.viewnext,
+ {description = "view next", group = "tag"}),
+ awful.key({ modkey, }, "Escape", awful.tag.history.restore,
+ {description = "go back", group = "tag"}),
-- Non-empty tag browsing
- awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end),
- awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end),
+ awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end,
+ {description = "view previous nonempty", group = "tag"}),
+ awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end,
+ {description = "view previous nonempty", group = "tag"}),
-- Default client focus
- awful.key({ altkey }, "k",
+ awful.key({ altkey, }, "j",
function ()
awful.client.focus.byidx( 1)
- if client.focus then client.focus:raise() end
- end),
- awful.key({ altkey }, "j",
+ end,
+ {description = "focus next by index", group = "client"}
+ ),
+ awful.key({ altkey, }, "k",
function ()
awful.client.focus.byidx(-1)
- if client.focus then client.focus:raise() end
- end),
+ end,
+ {description = "focus previous by index", group = "client"}
+ ),
-- By direction client focus
awful.key({ modkey }, "j",
@@ -512,50 +531,79 @@ globalkeys = awful.util.table.join(
awful.client.focus.bydirection("right")
if client.focus then client.focus:raise() end
end),
-
- -- Show Menu
- awful.key({ modkey }, "w",
- function ()
- mymainmenu:show({ keygrabber = true })
- end),
-
- -- Show/Hide Wibox
- awful.key({ modkey }, "b", function ()
- mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible
- mybottomwibox[mouse.screen].visible = not mybottomwibox[mouse.screen].visible
- end),
-
- -- On the fly useless gaps change
- awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end),
- awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
+ awful.key({ modkey, }, "w", function () mymainmenu:show() end,
+ {description = "show main menu", group = "awesome"}),
-- Layout manipulation
- awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
- awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
- awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
- awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
- awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
+ awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
+ {description = "swap with next client by index", group = "client"}),
+ awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
+ {description = "swap with previous client by index", group = "client"}),
+ awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
+ {description = "focus the next screen", group = "screen"}),
+ awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
+ {description = "focus the previous screen", group = "screen"}),
+ awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
+ {description = "jump to urgent client", group = "client"}),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
- end),
- awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end),
- awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end),
- awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
- awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
- awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
- awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
- awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
- awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
- awful.key({ modkey, "Control" }, "n", awful.client.restore),
+ end,
+ {description = "go back", group = "client"}),
+
+ -- Show/Hide Wibox
+ awful.key({ modkey }, "b", function ()
+ for s in screen do
+ s.mywibox.visible = not s.mywibox.visible
+ s.mybottomwibox.visible = not s.mybottomwibox.visible
+ end
+ end),
+
+ -- On the fly useless gaps change
+ awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end),
+ awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
+
+ -- Rename tag
+ awful.key({ altkey, "Shift" }, "r", function () lain.util.rename_tag() end),
-- Standard program
- awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
- awful.key({ modkey, "Control" }, "r", awesome.restart),
- awful.key({ modkey, "Shift" }, "q", awesome.quit),
+ awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
+ {description = "open a terminal", group = "launcher"}),
+ awful.key({ modkey, "Control" }, "r", awesome.restart,
+ {description = "reload awesome", group = "awesome"}),
+ awful.key({ modkey, "Shift" }, "q", awesome.quit,
+ {description = "quit awesome", group = "awesome"}),
+
+ awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end,
+ {description = "increase master width factor", group = "layout"}),
+ awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end,
+ {description = "decrease master width factor", group = "layout"}),
+ awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
+ {description = "increase the number of master clients", group = "layout"}),
+ awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
+ {description = "decrease the number of master clients", group = "layout"}),
+ awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
+ {description = "increase the number of columns", group = "layout"}),
+ awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
+ {description = "decrease the number of columns", group = "layout"}),
+ awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
+ {description = "select next", group = "layout"}),
+ awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
+ {description = "select previous", group = "layout"}),
+
+ awful.key({ modkey, "Control" }, "n",
+ function ()
+ local c = awful.client.restore()
+ -- Focus restored client
+ if c then
+ client.focus = c
+ c:raise()
+ end
+ end,
+ {description = "restore minimized", group = "client"}),
-- Dropdown terminal
awful.key({ modkey, }, "z", function () quakeconsole[mouse.screen]:toggle() end),
@@ -567,140 +615,171 @@ globalkeys = awful.util.table.join(
-- ALSA volume control
awful.key({ altkey }, "Up",
function ()
- os.execute(string.format("amixer set %s %s+", myvolumebar.channel, myvolumebar.step))
- myvolumebar.update()
+ os.execute(string.format("amixer set %s 1%%+", volume.channel))
+ volume.notify()
end),
awful.key({ altkey }, "Down",
function ()
- os.execute(string.format("amixer set %s %s-", myvolumebar.channel, myvolumebar.step))
- myvolumebar.update()
+ os.execute(string.format("amixer set %s 1%%-", volume.channel))
+ volume.notify()
end),
awful.key({ altkey }, "m",
function ()
- os.execute(string.format("amixer set %s toggle", myvolumebar.channel))
- myvolumebar.update()
+ os.execute(string.format("amixer set %s toggle", volume.togglechannel or volume.channel))
+ volume.notify()
end),
awful.key({ altkey, "Control" }, "m",
function ()
- os.execute(string.format("amixer set %s 100%%", myvolumebar.channel))
- myvolumebar.update()
+ os.execute(string.format("amixer set %s 100%%", volume.channel))
+ volume.notify()
end),
+ awful.key({ altkey, "Control" }, "0",
+ function ()
+ os.execute(string.format("amixer -q set %s 0%%", volume.channel))
+ volume.notify()
+ end),
+
-- MPD control
awful.key({ altkey, "Control" }, "Up",
function ()
- awful.util.spawn_with_shell("mpc toggle || ncmpc toggle || pms toggle")
+ awful.spawn.with_shell("mpc toggle || ncmpc toggle || pms toggle")
mpdwidget.update()
end),
awful.key({ altkey, "Control" }, "Down",
function ()
- awful.util.spawn_with_shell("mpc stop || ncmpc stop || pms stop")
+ awful.spawn.with_shell("mpc stop || ncmpc stop || pms stop")
mpdwidget.update()
end),
awful.key({ altkey, "Control" }, "Left",
function ()
- awful.util.spawn_with_shell("mpc prev || ncmpc prev || pms prev")
+ awful.spawn.with_shell("mpc prev || ncmpc prev || pms prev")
mpdwidget.update()
end),
awful.key({ altkey, "Control" }, "Right",
function ()
- awful.util.spawn_with_shell("mpc next || ncmpc next || pms next")
+ awful.spawn.with_shell("mpc next || ncmpc next || pms next")
mpdwidget.update()
end),
+ --]]
- -- Copy to clipboard
- awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end),
+ -- Copy primary to clipboard
+ awful.key({ modkey }, "c", function () os.execute("xsel | xsel -b") end),
-- User programs
- awful.key({ modkey }, "q", function () awful.util.spawn(browser) end),
- awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end),
- awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end),
+ awful.key({ modkey }, "q", function () awful.spawn(browser) end),
+ awful.key({ modkey }, "e", function () awful.spawn(gui_editor) end),
+ awful.key({ modkey }, "g", function () awful.spawn(graphics) end),
- --[[ Default
+ -- Default
-- Prompt
- awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
+ awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
+ {description = "run prompt", group = "launcher"}),
awful.key({ modkey }, "x",
function ()
- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end),
+ awful.prompt.run {
+ prompt = "Run Lua code: ",
+ textbox = awful.screen.focused().mypromptbox.widget,
+ exe_callback = awful.util.eval,
+ history_path = awful.util.get_cache_dir() .. "/history_eval"
+ }
+ end,
+ {description = "lua execute prompt", group = "awesome"}),
-- Menubar
- awful.key({ modkey }, "p", function() menubar.show() end)
+ awful.key({ modkey }, "p", function() menubar.show() end,
+ {description = "show the menubar", group = "launcher"})
--]]
- -- dmenu
+ --[[ dmenu
awful.key({ modkey }, "x", function ()
- awful.util.spawn(string.format("dmenu_run -i -fn 'Tamsyn' -nb '%s' -nf '%s' -sb '%s' -sf '%s'",
- beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus))
+ awful.spawn(string.format("dmenu_run -i -fn 'Tamsyn' -nb '%s' -nf '%s' -sb '%s' -sf '%s'",
+ beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)),
end)
+ --]]
)
clientkeys = awful.util.table.join(
- awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
- awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
- awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
- awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
- awful.key({ modkey, }, "o", awful.client.movetoscreen ),
- awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
+ awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client ),
+ awful.key({ modkey, }, "f",
+ function (c)
+ c.fullscreen = not c.fullscreen
+ c:raise()
+ end,
+ {description = "toggle fullscreen", group = "client"}),
+ awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
+ {description = "close", group = "client"}),
+ awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
+ {description = "toggle floating", group = "client"}),
+ awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
+ {description = "move to master", group = "client"}),
+ awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
+ {description = "move to screen", group = "client"}),
+ awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
+ {description = "toggle keep on top", group = "client"}),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
- end),
+ end ,
+ {description = "minimize", group = "client"}),
awful.key({ modkey, }, "m",
function (c)
- c.maximized_horizontal = not c.maximized_horizontal
- c.maximized_vertical = not c.maximized_vertical
- end)
+ c.maximized = not c.maximized
+ c:raise()
+ end ,
+ {description = "maximize", group = "client"})
)
-- Bind all key numbers to tags.
--- be careful: we use keycodes to make it works on any keyboard layout.
+-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
globalkeys = awful.util.table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function ()
- local screen = mouse.screen
- local tag = awful.tag.gettags(screen)[i]
+ local screen = awful.screen.focused()
+ local tag = screen.tags[i]
if tag then
- awful.tag.viewonly(tag)
+ tag:view_only()
end
- end),
- -- Toggle tag.
+ end,
+ {description = "view tag #"..i, group = "tag"}),
+ -- Toggle tag display.
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
- local screen = mouse.screen
- local tag = awful.tag.gettags(screen)[i]
+ local screen = awful.screen.focused()
+ local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
- end),
+ end,
+ {description = "toggle tag #" .. i, group = "tag"}),
-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus then
- local tag = awful.tag.gettags(client.focus.screen)[i]
+ local tag = client.focus.screen.tags[i]
if tag then
- awful.client.movetotag(tag)
+ client.focus:move_to_tag(tag)
end
end
- end),
- -- Toggle tag.
+ end,
+ {description = "move focused client to tag #"..i, group = "tag"}),
+ -- Toggle tag on focused client.
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus then
- local tag = awful.tag.gettags(client.focus.screen)[i]
+ local tag = client.focus.screen.tags[i]
if tag then
- awful.client.toggletag(tag)
+ client.focus:toggle_tag(tag)
end
end
- end))
+ end,
+ {description = "toggle focused client on tag #" .. i, group = "tag"})
+ )
end
clientbuttons = awful.util.table.join(
@@ -713,6 +792,7 @@ root.keys(globalkeys)
-- }}}
-- {{{ Rules
+-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
@@ -722,15 +802,19 @@ awful.rules.rules = {
raise = true,
keys = clientkeys,
buttons = clientbuttons,
- size_hints_honor = false } },
+ screen = awful.screen.preferred,
+ placement = awful.placement.no_overlap+awful.placement.no_offscreen,
+ size_hints_honor = false
+ }
+ },
+
+ -- Titlebars
+ { rule_any = { type = { "dialog", "normal" } },
+ properties = { titlebars_enabled = false } },
+
+ -- Set Firefox to always map on the first tag on screen 1.
{ rule = { class = "Firefox" },
- properties = { tag = tags[1][1] } },
-
- { rule = { instance = "plugin-container" },
- properties = { tag = tags[1][1] } },
-
- { rule = { class = "Gimp" },
- properties = { tag = tags[1][4] } },
+ properties = { screen = 1, tag = awful.screen.focused().tags[1] } },
{ rule = { class = "Gimp", role = "gimp-image-window" },
properties = { maximized_horizontal = true,
@@ -740,65 +824,77 @@ awful.rules.rules = {
-- {{{ Signals
-- Signal function to execute when a new client appears.
-local sloppyfocus_last = {c=nil}
-client.connect_signal("manage", function (c, startup)
- -- Enable sloppy focus
- client.connect_signal("mouse::enter", function(c)
- if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
- and awful.client.focus.filter(c) then
- -- Skip focusing the client if the mouse wasn't moved.
- if c ~= sloppyfocus_last.c then
- client.focus = c
- sloppyfocus_last.c = c
- end
- end
- end)
+client.connect_signal("manage", function (c)
+ -- Set the windows at the slave,
+ -- i.e. put it at the end of others instead of setting it master.
+ -- if not awesome.startup then awful.client.setslave(c) end
- local titlebars_enabled = false
- if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
- -- buttons for the titlebar
- local buttons = awful.util.table.join(
- awful.button({ }, 1, function()
- client.focus = c
- c:raise()
- awful.mouse.client.move(c)
- end),
- awful.button({ }, 3, function()
- client.focus = c
- c:raise()
- awful.mouse.client.resize(c)
- end)
- )
-
- -- Widgets that are aligned to the right
- local right_layout = wibox.layout.fixed.horizontal()
- right_layout:add(awful.titlebar.widget.floatingbutton(c))
- right_layout:add(awful.titlebar.widget.maximizedbutton(c))
- right_layout:add(awful.titlebar.widget.stickybutton(c))
- right_layout:add(awful.titlebar.widget.ontopbutton(c))
- right_layout:add(awful.titlebar.widget.closebutton(c))
-
- -- The title goes in the middle
- local middle_layout = wibox.layout.flex.horizontal()
- local title = awful.titlebar.widget.titlewidget(c)
- title:set_align("center")
- middle_layout:add(title)
- middle_layout:buttons(buttons)
-
- -- Now bring it all together
- local layout = wibox.layout.align.horizontal()
- layout:set_right(right_layout)
- layout:set_middle(middle_layout)
-
- awful.titlebar(c,{size=16}):set_widget(layout)
+ if awesome.startup and
+ not c.size_hints.user_position
+ and not c.size_hints.program_position then
+ -- Prevent clients from being unreachable after screen count changes.
+ awful.placement.no_offscreen(c)
end
end)
--- No border for maximized or single clients
+-- Add a titlebar if titlebars_enabled is set to true in the rules.
+client.connect_signal("request::titlebars", function(c)
+ -- buttons for the titlebar
+ local buttons = awful.util.table.join(
+ awful.button({ }, 1, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.move(c)
+ end),
+ awful.button({ }, 3, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.resize(c)
+ end)
+ )
+
+ awful.titlebar(c, {size = 16}) : setup {
+ { -- Left
+ awful.titlebar.widget.iconwidget(c),
+ buttons = buttons,
+ layout = wibox.layout.fixed.horizontal
+ },
+ { -- Middle
+ { -- Title
+ align = "center",
+ widget = awful.titlebar.widget.titlewidget(c)
+ },
+ buttons = buttons,
+ layout = wibox.layout.flex.horizontal
+ },
+ { -- Right
+ awful.titlebar.widget.floatingbutton (c),
+ awful.titlebar.widget.maximizedbutton(c),
+ awful.titlebar.widget.stickybutton (c),
+ awful.titlebar.widget.ontopbutton (c),
+ awful.titlebar.widget.closebutton (c),
+ layout = wibox.layout.fixed.horizontal()
+ },
+ layout = wibox.layout.align.horizontal
+ }
+end)
+
+-- Enable sloppy focus, so that focus follows mouse.
+--[[
+client.connect_signal("mouse::enter", function(c)
+ if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
+ and awful.client.focus.filter(c) then
+ client.focus = c
+ end
+end)
+]]
+
+-- No border for maximized clients
client.connect_signal("focus",
function(c)
if c.maximized_horizontal == true and c.maximized_vertical == true then
c.border_width = 0
+ -- no borders if only 1 client visible
elseif #awful.client.visible(mouse.screen) > 1 then
c.border_width = beautiful.border_width
c.border_color = beautiful.border_focus
@@ -806,20 +902,3 @@ client.connect_signal("focus",
end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
-
--- {{{ Arrange signal handler
-for s = 1, screen.count() do screen[s]:connect_signal("arrange",
- function ()
- local clients = awful.client.visible(s)
- local layout = awful.layout.getname(awful.layout.get(s))
-
- if #clients > 0 then
- for _, c in pairs(clients) do -- Floaters always have borders
- if awful.client.floating.get(c) or layout == "floating" then
- c.border_width = beautiful.border_width
- end
- end
- end
- end)
-end
--- }}}
diff --git a/rc.lua.multicolor b/rc.lua.multicolor
index d1144c7..5a04e2d 100644
--- a/rc.lua.multicolor
+++ b/rc.lua.multicolor
@@ -649,17 +649,22 @@ globalkeys = awful.util.table.join(
--[[ Default
-- Prompt
- awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
+ awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
+ {description = "run prompt", group = "launcher"}),
awful.key({ modkey }, "x",
function ()
- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end),
+ awful.prompt.run {
+ prompt = "Run Lua code: ",
+ textbox = awful.screen.focused().mypromptbox.widget,
+ exe_callback = awful.util.eval,
+ history_path = awful.util.get_cache_dir() .. "/history_eval"
+ }
+ end,
+ {description = "lua execute prompt", group = "awesome"}),
-- Menubar
- awful.key({ modkey }, "p", function() menubar.show() end)
+ awful.key({ modkey }, "p", function() menubar.show() end,
+ {description = "show the menubar", group = "launcher"})
--]]
-- dmenu
diff --git a/themes/holo/icons/awesome_icon_white.png b/themes/holo/icons/awesome_icon_white.png
new file mode 100644
index 0000000..476a86a
Binary files /dev/null and b/themes/holo/icons/awesome_icon_white.png differ
diff --git a/themes/holo/icons/bar.png b/themes/holo/icons/bar.png
index 023f198..767885c 100644
Binary files a/themes/holo/icons/bar.png and b/themes/holo/icons/bar.png differ
diff --git a/themes/holo/icons/base_widget.png b/themes/holo/icons/base_widget.png
deleted file mode 100644
index 059f9c0..0000000
Binary files a/themes/holo/icons/base_widget.png and /dev/null differ
diff --git a/themes/holo/icons/bg_focus.png b/themes/holo/icons/bg_focus.png
deleted file mode 100644
index 28673a1..0000000
Binary files a/themes/holo/icons/bg_focus.png and /dev/null differ
diff --git a/themes/holo/icons/bg_focus_noline.png b/themes/holo/icons/bg_focus_noline.png
deleted file mode 100644
index a867946..0000000
Binary files a/themes/holo/icons/bg_focus_noline.png and /dev/null differ
diff --git a/themes/holo/icons/bottom_bar.png b/themes/holo/icons/bottom_bar.png
index 0f6b809..fa6a7ae 100644
Binary files a/themes/holo/icons/bottom_bar.png and b/themes/holo/icons/bottom_bar.png differ
diff --git a/themes/holo/icons/last.png b/themes/holo/icons/last.png
deleted file mode 100644
index 33a4b96..0000000
Binary files a/themes/holo/icons/last.png and /dev/null differ
diff --git a/themes/holo/icons/mail_notify.png b/themes/holo/icons/mail_notify.png
deleted file mode 100644
index 3816f53..0000000
Binary files a/themes/holo/icons/mail_notify.png and /dev/null differ
diff --git a/themes/holo/icons/mpd.png b/themes/holo/icons/mpd.png
index 6a96cee..c61030b 100644
Binary files a/themes/holo/icons/mpd.png and b/themes/holo/icons/mpd.png differ
diff --git a/themes/holo/icons/next.png b/themes/holo/icons/next.png
index 9de2da8..d3caba7 100644
Binary files a/themes/holo/icons/next.png and b/themes/holo/icons/next.png differ
diff --git a/themes/holo/icons/prev.png b/themes/holo/icons/prev.png
index 3cd3efb..8b9b50e 100644
Binary files a/themes/holo/icons/prev.png and b/themes/holo/icons/prev.png differ
diff --git a/themes/holo/icons/spr.png b/themes/holo/icons/spr.png
deleted file mode 100644
index 148aa80..0000000
Binary files a/themes/holo/icons/spr.png and /dev/null differ
diff --git a/themes/holo/icons/spr_left.png b/themes/holo/icons/spr_left.png
index a74db86..44822ed 100644
Binary files a/themes/holo/icons/spr_left.png and b/themes/holo/icons/spr_left.png differ
diff --git a/themes/holo/icons/stop.png b/themes/holo/icons/stop.png
index 95d8116..63ed405 100644
Binary files a/themes/holo/icons/stop.png and b/themes/holo/icons/stop.png differ
diff --git a/themes/holo/icons/submenu.png b/themes/holo/icons/submenu.png
deleted file mode 100644
index 10ca014..0000000
Binary files a/themes/holo/icons/submenu.png and /dev/null differ
diff --git a/themes/holo/icons/taglist_bg_focus.png b/themes/holo/icons/taglist_bg_focus.png
deleted file mode 100644
index d911dfe..0000000
Binary files a/themes/holo/icons/taglist_bg_focus.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1024.png b/themes/holo/icons/topbar/1024.png
deleted file mode 100644
index bc1449b..0000000
Binary files a/themes/holo/icons/topbar/1024.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1152.png b/themes/holo/icons/topbar/1152.png
deleted file mode 100644
index 8f16c02..0000000
Binary files a/themes/holo/icons/topbar/1152.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1280.png b/themes/holo/icons/topbar/1280.png
deleted file mode 100644
index c4f7637..0000000
Binary files a/themes/holo/icons/topbar/1280.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1366.png b/themes/holo/icons/topbar/1366.png
deleted file mode 100644
index 8a5ac44..0000000
Binary files a/themes/holo/icons/topbar/1366.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1440.png b/themes/holo/icons/topbar/1440.png
deleted file mode 100644
index 4fb7c7f..0000000
Binary files a/themes/holo/icons/topbar/1440.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1600.png b/themes/holo/icons/topbar/1600.png
deleted file mode 100644
index f58f733..0000000
Binary files a/themes/holo/icons/topbar/1600.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1680.png b/themes/holo/icons/topbar/1680.png
deleted file mode 100644
index 2abea88..0000000
Binary files a/themes/holo/icons/topbar/1680.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/1920.png b/themes/holo/icons/topbar/1920.png
deleted file mode 100644
index 7b3c216..0000000
Binary files a/themes/holo/icons/topbar/1920.png and /dev/null differ
diff --git a/themes/holo/icons/topbar/2560.png b/themes/holo/icons/topbar/2560.png
deleted file mode 100644
index 6b496ac..0000000
Binary files a/themes/holo/icons/topbar/2560.png and /dev/null differ
diff --git a/themes/holo/icons/uselesstile.png b/themes/holo/icons/uselesstile.png
deleted file mode 100644
index f482b10..0000000
Binary files a/themes/holo/icons/uselesstile.png and /dev/null differ
diff --git a/themes/holo/icons/uselesstileleft.png b/themes/holo/icons/uselesstileleft.png
deleted file mode 100644
index caf6366..0000000
Binary files a/themes/holo/icons/uselesstileleft.png and /dev/null differ
diff --git a/themes/holo/icons/uselesstiletop.png b/themes/holo/icons/uselesstiletop.png
deleted file mode 100644
index 8cddfb6..0000000
Binary files a/themes/holo/icons/uselesstiletop.png and /dev/null differ
diff --git a/themes/holo/theme.lua b/themes/holo/theme.lua
index c3a45ed..5ef996f 100644
--- a/themes/holo/theme.lua
+++ b/themes/holo/theme.lua
@@ -1,48 +1,38 @@
--[[
- Holo Awesome WM config 2.0
+ Holo Awesome WM config 3.0
github.com/copycat-killer
--]]
-theme = {}
+local theme = {}
theme.icon_dir = os.getenv("HOME") .. "/.config/awesome/themes/holo/icons"
-
theme.wallpaper = os.getenv("HOME") .. "/.config/awesome/themes/holo/wall.png"
-theme.topbar_path = "png:" .. theme.icon_dir .. "/topbar/"
-
-theme.font = "Tamsyn 10.5"
-theme.taglist_font = "Tamsyn 8"
+theme.font = "Roboto Bold 10"
+theme.taglist_font = "Roboto Condensed Regular 8"
theme.fg_normal = "#FFFFFF"
theme.fg_focus = "#0099CC"
+theme.bg_focus = "#303030"
theme.bg_normal = "#242424"
theme.fg_urgent = "#CC9393"
-theme.bg_urgent = "#2A1F1E"
-theme.border_width = "1"
+theme.bg_urgent = "#006B8E"
+theme.border_width = 3
theme.border_normal = "#252525"
theme.border_focus = "#0099CC"
theme.taglist_fg_focus = "#FFFFFF"
-theme.taglist_bg_focus = "png:" .. theme.icon_dir .. "/taglist_bg_focus.png"
theme.tasklist_bg_normal = "#222222"
theme.tasklist_fg_focus = "#4CB7DB"
-theme.tasklist_bg_focus = "png:" .. theme.icon_dir .. "/bg_focus_noline.png"
-theme.textbox_widget_margin_top = 1
-theme.awful_widget_height = 14
-theme.awful_widget_margin_top = 2
-theme.menu_height = "20"
-theme.menu_width = "400"
+theme.menu_height = 20
+theme.menu_width = 160
-theme.widget_bg = theme.icon_dir .. "/bg_focus_noline.png"
theme.awesome_icon = theme.icon_dir .. "/awesome_icon.png"
+theme.awesome_icon_white = theme.icon_dir .. "/awesome_icon_white.png"
theme.vol_bg = theme.icon_dir .. "/vol_bg.png"
-theme.menu_submenu_icon = theme.icon_dir .. "/submenu.png"
theme.taglist_squares_sel = theme.icon_dir .. "/square_sel.png"
theme.taglist_squares_unsel = theme.icon_dir .. "/square_unsel.png"
-theme.last = theme.icon_dir .. "/last.png"
-theme.spr = theme.icon_dir .. "/spr.png"
theme.spr_small = theme.icon_dir .. "/spr_small.png"
theme.spr_very_small = theme.icon_dir .. "/spr_very_small.png"
theme.spr_right = theme.icon_dir .. "/spr_right.png"
@@ -62,7 +52,6 @@ theme.calendar = theme.icon_dir .. "/cal.png"
theme.cpu = theme.icon_dir .. "/cpu.png"
theme.net_up = theme.icon_dir .. "/net_up.png"
theme.net_down = theme.icon_dir .. "/net_down.png"
-theme.widget_mail_notify = theme.icon_dir .. "/mail_notify.png"
theme.layout_tile = theme.icon_dir .. "/tile.png"
theme.layout_tilegaps = theme.icon_dir .. "/tilegaps.png"
@@ -81,10 +70,6 @@ theme.layout_floating = theme.icon_dir .. "/floating.png"
theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true
--- lain related
-theme.useless_gap_width = 10
-theme.layout_uselesstile = theme.icon_dir .. "/uselesstile.png"
-theme.layout_uselesstileleft = theme.icon_dir .. "/uselesstileleft.png"
-theme.layout_uselesstiletop = theme.icon_dir .. "/uselesstiletop.png"
+theme.useless_gap = 4
return theme