wmctrl的安装教程
??首先去github上下载源码 https://github.com/dancor/wmctrl,我是在Ubuntu上进行的操作,遇到下面的问题
No package 'glib-2.0' found
no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
??提醒是缺少 glib-2.0 库,所以需要下载一下
sudo apt-get install libglib2.0-dev
??接着遇到下面的问题
main.c:36:10: fatal error: X11/Xmu/WinUtil.h: No such file or directory
36 | #include <X11/Xmu/WinUtil.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
??从网上找的解决方法
sudo apt-get install libxmu-dev
??最后执行 sudo make install 即可,下面列出结果
lizequan@lizequanComputer:~/Desktop/github-wmctrl/wmctrl$ wmctrl -h
wmctrl 1.07
Usage: wmctrl [OPTION]...
Actions:
-m Show information about the window manager and
about the environment.
-l List windows managed by the window manager.
-d List desktops. The current desktop is marked
with an asterisk.
-j List current desktop.
-s <DESK> Switch to the specified desktop.
-a <WIN> Activate the window by switching to its desktop and
raising it.
-c <WIN> Close the window gracefully.
-R <WIN> Move the window to the current desktop and
activate it.
-r <WIN> -t <DESK> Move the window to the specified desktop.
-r <WIN> -e <MVARG> Resize and move the window around the desktop.
The format of the <MVARG> argument is described below.
-r <WIN> -y <MVARG> Resize and move like above, then reactivate.
-r <WIN> -b <STARG> Change the state of the window. Using this option it's
possible for example to make the window maximized,
minimized or fullscreen. The format of the <STARG>
argument and list of possible states is given below.
-r <WIN> -N <STR> Set the name (long title) of the window.
-r <WIN> -I <STR> Set the icon name (short title) of the window.
-r <WIN> -T <STR> Set both the name and the icon name of the window.
|