.config/awesome/rc.lua

This commit is contained in:
Tom Willemsen 2012-09-13 17:14:39 +02:00
parent adf8e13bb0
commit 802607545b

View file

@ -11,7 +11,7 @@ oni = { } -- Container for custom functions.
oni.maildirfmt = "/home/slash/documents/mail/%s/inbox/new/" oni.maildirfmt = "/home/slash/documents/mail/%s/inbox/new/"
-- {{{ Error handling --- Error handling
-- Check if awesome encountered an error during startup and fell back to -- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config) -- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then if awesome.startup_errors then
@ -34,8 +34,8 @@ do
in_error = false in_error = false
end) end)
end end
-- }}}
--- Functions
function oni.focus_raise(direction) function oni.focus_raise(direction)
awful.client.focus.bydirection(direction) awful.client.focus.bydirection(direction)
if client.focus then client.focus:raise() end if client.focus then client.focus:raise() end
@ -118,6 +118,7 @@ function oni.run_or_raise(cmd, properties)
-- And then focus the client -- And then focus the client
client.focus = c client.focus = c
c:raise() c:raise()
awful.screen.focus(c.screen)
return return
end end
awful.util.spawn(cmd) awful.util.spawn(cmd)