Skip to content

Instantly share code, notes, and snippets.

@farhaven
Created December 11, 2010 00:11
Show Gist options
  • Save farhaven/737015 to your computer and use it in GitHub Desktop.
Save farhaven/737015 to your computer and use it in GitHub Desktop.
for s = 1, screen.count() do
awful.tag.attached_add_signal(s, "property::selected", function(tag)
if not tag.selected then return end
local idx = nil
for i, v in pairs(screen[s]:tags()) do
if v == tag then
idx = i
break
end
end
if not idx then return end
local c = client.focus
for scr = 1, screen.count() do
if scr ~= s then
if screen[scr]:tags()[idx] ~= nil then
awful.tag.viewonly(screen[scr]:tags()[idx])
end
end
end
client.focus = c
end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment