Created
February 5, 2014 11:59
-
-
Save benkaiser/8822222 to your computer and use it in GitHub Desktop.
Scripts to get i3 dynamic tagging working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just add the following lines to your i3 config file | |
# dynamic tagging feature | |
bindsym $mod+t exec ~/.i3/get_workspace_options.py | dmenu -b | ~/.i3/go_to_workspace.py | |
bindsym $mod+Shift+t exec ~/.i3/get_workspace_options.py | dmenu -b | ~/.i3/move_to_workspace.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
import json | |
test = subprocess.Popen(["i3-msg","-t","get_workspaces"], stdout=subprocess.PIPE) | |
output = test.communicate()[0] | |
data = json.loads(output.decode()) | |
data = sorted(data, key=lambda k: k['name']) | |
for i in data: | |
print(i['name']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
import sys | |
data = sys.stdin.readlines()[0] | |
test = subprocess.Popen(["i3-msg","workspace "+data], stdout=subprocess.PIPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
import sys | |
data = sys.stdin.readlines()[0] | |
test = subprocess.Popen(["i3-msg","move container to workspace "+data], stdout=subprocess.PIPE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment