Skip to content

Instantly share code, notes, and snippets.

@zorbash
Created July 4, 2013 10:33
Show Gist options
  • Save zorbash/5926649 to your computer and use it in GitHub Desktop.
Save zorbash/5926649 to your computer and use it in GitHub Desktop.
#!/home/agorf/.rbenv/shims/ruby
require 'json'
workspaces = JSON.load(`i3-msg -t get_workspaces`)
num = ((1..10).to_a - workspaces.map {|w| w['num'] }).min
exec "i3-msg workspace #{num}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment