summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2013-05-02 09:05:57 +0100
committerAlan Pearce2013-05-02 09:05:57 +0100
commit353a43e2df0b68b37415167ccd2b1b0af369ea11 (patch)
tree3cde0ae3ba4989c3be91bfa738155e729c987181
parentfe0c6cc671c9f8f2489f268856fbe98e2d759427 (diff)
downloadnixfiles-353a43e2df0b68b37415167ccd2b1b0af369ea11.tar.lz
nixfiles-353a43e2df0b68b37415167ccd2b1b0af369ea11.tar.zst
nixfiles-353a43e2df0b68b37415167ccd2b1b0af369ea11.zip
zsh: New version of wprop alias to make class and instance names clearer
-rwxr-xr-xzsh/zshrc4
1 files changed, 3 insertions, 1 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 7d8915bb..5aba1abf 100755
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -272,7 +272,9 @@ alias namecoin="~alan/applications/namecoin/src/namecoind"
 alias e="$EDITOR"
 alias E="SUDO_EDITOR=\emacsclient -c -a emacs\" sudoedit"
 alias aticonfig="DISPLAY=:0 \aticonfig"
-alias wprop="xprop | egrep WM_(CLASS|NAME|WINDOW_ROLE|TYPE)"
+alias wprop='xprop |awk '\''
+    /^WM_CLASS/{sub(/.* =/, "instance:"); sub(/,/, "\nclass:"); print}
+    /^WM_NAME/{sub(/.* =/, "title:"); print}'\'''
 
 alias -g ...='../..'