http://onion.dynserv.net/~timo/misc.html (없어졌나?) wmctrl로는 조금 돌아가야 하는 동작을 간단하게 처리해주는 부분이 있다. 가령
xprop -root _NET_SHOWING_DESKTOP | awk -F "=" '{print $2}' | xargs test 0 = && wmctrl -k on || wmctrl -k off
라고 써야 할 것이 netwmctrl -tdesktop으로 된다.
- diff -ur netwmctrl-001/src/main.c _/src/main.c
--- netwmctrl-001/src/main.c 2005-03-28 21:03:07.000000000 +0900 +++ _/src/main.c 2006-05-17 22:43:30.000000000 +0900 @@ -266,8 +266,8 @@ program_invocation_name, cmd); return; } - if (desktop < -1) { - fprintf(stderr, "%s: desktop number must be >=0 or -1 (all desktops)\n", + if (desktop < -2) { + fprintf(stderr, "%s: desktop number must be >=0 or -1 (all desktops) or -2 (current desktop)\n", program_invocation_name); return; } diff -ur netwmctrl-001/src/x.c _/src/x.c --- netwmctrl-001/src/x.c 2005-03-28 04:55:07.000000000 +0900 +++ _/src/x.c 2006-05-17 22:46:38.000000000 +0900 @@ -509,6 +509,9 @@ if (desktop == -1) { desk = 0xffffffff; + } else + if (desktop == -2) { + x_get_current_desktop ((int *)&desk); } else { desk = desktop; }
위의 패치를 적용하고netwmctrl print | awk -F: '{print $2}' | xargs test -1 = && netwmctrl desktop=-2 || netwmctrl desktop=-1
라고 하면 전체 작업공간에 보일지 어떨지 토글할 수 있다. |
|