Skip to content

Instantly share code, notes, and snippets.

@alanfzf
Created August 19, 2025 06:29
Show Gist options
  • Select an option

  • Save alanfzf/7a4b6fd562990fdb74164d4107d58adc to your computer and use it in GitHub Desktop.

Select an option

Save alanfzf/7a4b6fd562990fdb74164d4107d58adc to your computer and use it in GitHub Desktop.
Get current monitor config for sway
#!/bin/bash
swaymsg -t get_outputs | jq -r '.[] | select(.active) | "output \(.name) resolution \(.current_mode.width)x\(.current_mode.height)@\(.current_mode.refresh/1000)Hz position \(.rect.x),\(.rect.y) scale \(.scale) transform \(.transform)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment