Permalink
Browse files

make client-to-tag binding example work properly

  • Loading branch information...
1 parent 62ea299 commit 4cbd353c1e15cd6c912f9548d681a8e8fc69484c @freehaha freehaha committed Feb 20, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 example.rc.lua
View
@@ -433,8 +433,11 @@ for i = 1, (shifty.config.maxtags or 9) do
-- move clients to other tags
awful.key({modkey, "Shift"}, i, function()
if client.focus then
+ -- remember the focused client because getpos() switch
+ -- to new tag (if it doesn't exist) and the client lost focus
+ local c = client.focus
t = shifty.getpos(i)
- awful.client.movetotag(t)
+ awful.client.movetotag(t, c)
awful.tag.viewonly(t)
end
end))

0 comments on commit 4cbd353

Please sign in to comment.