Created
June 10, 2015 15:09
-
-
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
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/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