Skip to content

Instantly share code, notes, and snippets.

@Oddly
Created September 28, 2025 19:19
Show Gist options
  • Save Oddly/170f29295b02b08b7b2f3a3d3662aa65 to your computer and use it in GitHub Desktop.
Save Oddly/170f29295b02b08b7b2f3a3d3662aa65 to your computer and use it in GitHub Desktop.
sway outputs to kanshi
swaymsg -t get_outputs | jq -r '.[] | {active, make, model, serial, mode_w: .current_mode.width, mode_h: .current_mode.height, mode_r: .current_mode.refresh, pos_x: .rect.x, pos_y: .rect.y, scale, transform} | "output \"\(.make) \(.model) \(.serial)\" position \(.pos_x),\(.pos_y) mode \(.mode_w)x\(.mode_h)@\(.mode_r) scale \(
.scale) transform \(.transform) \(.active)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment