This file contains hidden or 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
#!/bin/bash | |
# This program gets a list of all windows in i3 and based on the name of the window it moves | |
# them to a specific workspace | |
# Get workspace names: i3-msg -t get_workspaces | |
# https://jsonselector.com helps | |
WINDOWS=$(i3-msg -t get_tree | jq '[.nodes[1].nodes[1].nodes[] | select(.type="workspace") | .nodes[] | {id: .id, name: .window_properties.instance}]') |