diff --git a/wmctrl-1.07.tar.gz b/wmctrl-1.07.tar.gz new file mode 100644 index 0000000..67237e7 Binary files /dev/null and b/wmctrl-1.07.tar.gz differ diff --git a/wmctrl-sticky-workspace.patch b/wmctrl-sticky-workspace.patch new file mode 100644 index 0000000..90964e5 --- /dev/null +++ b/wmctrl-sticky-workspace.patch @@ -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 as the WM_CLASS name. + .TP + .I + 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 diff --git a/wmctrl.spec b/wmctrl.spec new file mode 100644 index 0000000..6c09a5e --- /dev/null +++ b/wmctrl.spec @@ -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 - 1.07-1 +- package init diff --git a/wmctrl.yaml b/wmctrl.yaml new file mode 100644 index 0000000..00bbaf0 --- /dev/null +++ b/wmctrl.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +seperator: NA