下面的脚本能够输出选定窗口的属性,输出符合xmonad配置文件要求的字符串,
原文在这里原文的代码有个小错误,我修正了一下
- #! /bin/sh
-
exec xprop -notype \
-
-f WM_NAME 8s ':\n title =\? $0\n' \
-
-f WM_CLASS 8s ':\n appName =\? $0\n className =\? $1\n' \
-
-f WM_WINDOW_ROLE 8s ':\n stringProperty "WM_WINDOW_ROLE" =\? $0\n' \
-
WM_NAME WM_CLASS WM_WINDOW_ROLE \
-
${1+"$@"}
关于xprop里面
8s的作用可以看man xprop,讲得很清楚
阅读(1419) | 评论(0) | 转发(0) |