Skip to content

Instantly share code, notes, and snippets.

@zamber
Created June 10, 2015 15:09
Show Gist options
  • Save zamber/c7dca0599a32739ad7b6 to your computer and use it in GitHub Desktop.
Save zamber/c7dca0599a32739ad7b6 to your computer and use it in GitHub Desktop.
Key binding for getting window properties for writing i3-wm `for_window` rules
#!/bin/sh
# Get active window properties for writing `for_window` rules
# In ~/.i3/config:
# bindsym $mod+g ~/.i3/windowprops.sh
NAME=$(xprop -id `xdotool getactivewindow` | grep 'WM_NAME(STRING)')
CLASS=$(xprop -id `xdotool getactivewindow` | grep 'WM_CLASS(STRING)')
notify-send "$NAME
$CLASS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment