package init

This commit is contained in:
maminjie 2020-09-04 11:55:19 +08:00
parent ac9381fa83
commit 1c142333b7
4 changed files with 76 additions and 0 deletions

BIN
wmctrl-1.07.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,32 @@
--- a/main.c
+++ a/main.c
@@ -681,7 +681,7 @@ static int window_to_desktop (Display *disp, Window win, int desktop) {/*{{{*/
unsigned long *cur_desktop = NULL;
Window root = DefaultRootWindow(disp);
- if (desktop == -1) {
+ if (desktop == -2) {
if (! (cur_desktop = (unsigned long *)get_property(disp, root,
XA_CARDINAL, "_NET_CURRENT_DESKTOP", NULL))) {
if (! (cur_desktop = (unsigned long *)get_property(disp, root,
@@ -897,7 +897,7 @@ static int action_window (Display *disp, Window win, char mode) {/*{{{*/
case 'R':
/* move the window to the current desktop and activate it => -r */
- if (window_to_desktop(disp, win, -1) == EXIT_SUCCESS) {
+ if (window_to_desktop(disp, win, -2) == EXIT_SUCCESS) {
usleep(100000); /* 100 ms - make sure the WM has enough
time to move the window, before we activate it */
return activate_window(disp, win, FALSE);
--- a/wmctrl.1
+++ a/wmctrl.1
@@ -258,7 +258,8 @@ Include WM_CLASS in the window list or interpret <WIN> as the WM_CLASS name.
.TP
.I <DESK>
A Desktop is always specified by an integer which represents the
-desktop numbers. Desktop numbers start at 0.
+desktop numbers. Desktop numbers start at 0. Use -1 to pin to all
+desktops.
.TP
.I <MVARG>

40
wmctrl.spec Normal file
View File

@ -0,0 +1,40 @@
Name: wmctrl
Version: 1.07
Release: 1
Summary: Command line tool to interact with an X Window Manager
License: GPLv2+
URL: http://sweb.cz/tripie/utils/wmctrl
Source0: http://sweb.cz/tripie/utils/wmctrl/dist/%{name}-%{version}.tar.gz
Patch0000: wmctrl-sticky-workspace.patch
BuildRequires: gcc glib2-devel libXmu-devel xorg-x11-proto-devel
%description
The wmctrl program is a UNIX/Linux command line tool to interact with an
EWMH/NetWM compatible X Window Manager. The tool provides command line access
to almost all the features defined in the EWMH specification. It can be used,
for example, to obtain information about the window manager, to get a detailed
list of desktops and managed windows, to switch and resize desktops, to make
windows full-screen, always-above or sticky, and to activate, close, move,
resize, maximize and minimize them. The command line access to these window
management functions makes it easy to automate and execute them from any
application that is able to run a command in response to an event.
%prep
%autosetup -p1
%build
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
%files
%doc AUTHORS COPYING README
%{_bindir}/*
%{_mandir}/man1/*
%changelog
* Tue Jul 28 2020 maminjie <maminjie1@huawei.com> - 1.07-1
- package init

4
wmctrl.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: NA
src_repo: NA
tag_prefix: NA
seperator: NA