Skip to content

Instantly share code, notes, and snippets.

@avgerin0s
Created July 4, 2013 11:13
Show Gist options
  • Save avgerin0s/5926866 to your computer and use it in GitHub Desktop.
Save avgerin0s/5926866 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