summaryrefslogtreecommitdiffstats
path: root/awesome
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-04-08 15:13:01 +0200
committerGravatar Tom Willemse2015-04-08 15:13:18 +0200
commitfb1066f5e00249dfb28d8f2288c8f4fd1edf1b77 (patch)
treec54ed7c84c4fc1ff79edd349253db08f8fa7793e /awesome
parent41968ee029f4d8b4602188c923e5a6e8ccdd3aa3 (diff)
downloaddotfiles-fb1066f5e00249dfb28d8f2288c8f4fd1edf1b77.tar.gz
dotfiles-fb1066f5e00249dfb28d8f2288c8f4fd1edf1b77.zip
Focus screen relative to focused window, not mouse
Diffstat (limited to 'awesome')
-rw-r--r--awesome/.config/awesome/rc.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua
index 1a10a72..c832390 100644
--- a/awesome/.config/awesome/rc.lua
+++ b/awesome/.config/awesome/rc.lua
@@ -62,6 +62,10 @@ function shrink_to_picturefix_width()
client.focus:geometry({x = g.x, y = g.y, width = 1066, height = 1060})
end
+function oni_focus_relative(i)
+ return awful.screen.focus(awful.util.cycle(screen.count(), client.focus.screen + i))
+end
+
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
@@ -365,8 +369,8 @@ globalkeys = awful.util.table.join(
-- Layout manipulation
awful.key({ modkey, "Shift" }, "n", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "p", function () awful.client.swap.byidx( -1) end),
- awful.key({ modkey, }, ".", function () awful.screen.focus_relative( 1) end),
- awful.key({ modkey, }, ",", function () awful.screen.focus_relative(-1) end),
+ awful.key({ modkey, }, ".", function () oni_focus_relative( 1) end),
+ awful.key({ modkey, }, ",", function () oni_focus_relative(-1) end),
awful.key({ modkey, "Shift" }, ".", function () awful.client.movetoscreen(client.focus) end),
awful.key({ modkey, "Shift" }, ",", function () awful.client.movetoscreen(client.focus, -1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),