Skip to content

Instantly share code, notes, and snippets.

@Maartyl
Created December 23, 2016 16:15
Show Gist options
  • Select an option

  • Save Maartyl/55ebcd9a57da15db805adea81d0a6f09 to your computer and use it in GitHub Desktop.

Select an option

Save Maartyl/55ebcd9a57da15db805adea81d0a6f09 to your computer and use it in GitHub Desktop.
-- FIX(hack): chrome drag&drop needs correct _NET_CURRENT_DESKTOP, but Awesome always uses that from first monitor
-- this is ALREADY FIXED in upstream awesome, on MAY 2016, but not yet in any stable version (as of DEC 2016) //maartyl
-- this is the commit that fixes it: https://github.com/awesomeWM/awesome/pull/910/commits (so I know and can use newer version when it's available,
-- including this) - it's been merged to master
client.connect_signal("focus", function(c)
-- get _NET_WM_DESKTOP(CARDINAL) from client
-- call: xprop -root -f _NET_CURRENT_DESKTOP 32c -set _NET_CURRENT_DESKTOP <HERE GOES THE NUMBER>
-- btw. if I find a way to do that inside awesome, that would be much better...
os.execute("xprop -root -f _NET_CURRENT_DESKTOP 32c -set _NET_CURRENT_DESKTOP $(xprop -id " .. c.window .. " | fgrep _NET_WM_DESKTOP | grep -oE '[^ ]+$')")
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment