Skip to content

Instantly share code, notes, and snippets.

View m-GDEV's full-sized avatar
💭
📘 Always learning

Musa Ahmed m-GDEV

💭
📘 Always learning
View GitHub Profile
@m-GDEV
m-GDEV / i3-organize.sh
Created August 21, 2024 01:13
# 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
#!/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}]')