문제

(On a Linux, for a shell running in a terminal emulator in a graphical server,) I'm interested in knowing how to determine in which Window manager the shell is running.
Thanks

(I want that for my .bashrc)

도움이 되었습니까?

해결책

wmctrl -m | grep Name | cut -d: -f2 seems to give the right answer. But it is not necessarily installed.

xlsclients lists all X clients in the current display (including the window manager) which may be useful, but you'll need to know a list of possible window managers to make a positive identification. e.g

xlsclients | grep -e compiz -e xfwm4
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top