wmutils / core Goto Github PK
View Code? Open in Web Editor NEWSet of window manipulation tools
License: Other
Set of window manipulation tools
License: Other
Are there chances of having wmutils
compiled as a single-file binary, in a similar fashion to busybox
?
Pretty much what the title says: WM_CLASS contains two strings (instance, class), but atomx WM_CLASS $(pfw)
only returns the first of them (the instance).
Found out while writing window rules for a wmutils-only setup. Currently making-do with xprop -id "$wid" WM_CLASS
and a bunch of clean-up, but having atomx
output both would help simplify things.
Something does not look right here. For some reason release v1.2 is not shown:
$ git describe --long --tags
v1.1-0-g7b86e8b
When calling wmp, for example:
wmp -a 10 10
It returns the usage message
usage: ./wmp -ar <x> <y>
To me, it seems like the problem is in line 42, it should be
if(argc != 4)
instead of
if(argc != 2)
Cannot find it in core/man
(Leaving this on here because everyone seems to be asleep at the time)
pfw isn't printing the corrent window address. no errors, just wrong address. I've tried in multiple X sessions, so I'm not sure what the problem is.
The function used in pfw
to retrieve tge WID having the input focus should be exported to libwm as wm_get_focus_window()
I noticed this while trying to fix focus.sh in contrib. Focus.sh uses wtf and chwso to focus a window, but only wtf is working, so the window becomes focused, but is still behind other windows. Running chwso manually given a wid does nothing, and returns nothing.
Tested on Arch Linux running GNOME.
I've just come across this project and I really love what you did here!
I'm wondering whether it can/will be ported to Wayland though,- did you dig into the specifications yet?
My idea is here to get the same workflow with the same script names, just the scripts itself have a different implementation.
This way one could replace his X-Server with Wayland and still have a fully working WM environment.
I run something like wmv 17 33 0x010196c6
and nothing happens. The window does not move.
I double checked that the window ID is correct.
Passive tools like wattr work fine with the same ID.
Operating System: EndeavourOS
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.1.30-1-lts (64-bit)
Graphics Platform: X11
Is it possible to get the current border color of a window? I have a script that sets the border colors with chwb
, I want to capture the original color so I can revert back to it. I'm currently just using bspc config focused_border_color
for this, but since that is a bspwm specific command it isn't very portable.
Hi, I'm having the following error at the moment of executing 'make command'
Clarified that i'm installed the dependencies xdotools and wmutils.
The error is a follow:
└──╼ #make
CC util.c
util.c:5:10: fatal error: xcb/xcb_aux.h: No such file or directory
#include <xcb/xcb_aux.h>
^~~~~~~~~~~~~~~
compilation terminated.
Makefile:37: recipe for target 'util.o' failed
make: *** [util.o] Error 1
Thanks for your help.
Please make a new release so it can be packaged accordingly.
These three programs are doing their work at random rates. Sometimes I have to execute wmv
from 3 to 6 times to move a window.
I observed this issue yesterday, 14th of January. I did some investigation and I found that I upgraded xorg-server
on 13th of January, although the three programs were behaving normally two days ago.
Recording of wmv: http://pub.iotek.org/p/2W8nWui (open as mp4 file)
In the recording wmv
is not moving the window at all.
Props to @laserswald for notifying me about this bug.
I noticed while using wmp
that negative numbers on the left side of the command causes wmp to pick them up as switches rather than as numbers.
You can reproduce it by using the following command wmp -r -100 0
which will print he usage message instead of moving to the cursor left.
I tested this on using latest commit with swm running.
No matter what I do, or which window I focus, pfw prints 0x00000001.
Using Arch Linux and no WM or DE, only wmutils.
Hi,
I'm on a fresh Arch install and I have installed wmutils (core and opt).
None of my windows get focused and running pfw returns pfw: focus not set.
Any idea why this might be happening?
There are cases I've found now that being able to get this information back would be handy. I.e. if a window border has been set to nothing and don't want focus.sh to set the border width back to my predefined value when I leave then window. (Currently getting around this issue by having yet another focus script)
Other examples could have a script checking each second for a window border colour change, (i.e. sent by shell script or other process running in window), then do stuff based upon that, I.e. jump to window immediately and set the window border to another colour.
Hi, I am using debian buster. Downloaded the repo via git clone and then hit "make install" in the core directory.
I got this error:
CC util.c
util.c:5:10: fatal error: xcb/xcb_aux.h: No such file or directory
#include <xcb/xcb_aux.h>
^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:40: util.o] Error 1
I have zero knowledge about C coding - I hope somebody can help me out :)
sxhkd had a commit which removes the integer conversion of mouseX events. As a result, wmv/wrs can no longer retrieve coordinates. There's a functionality added to read a socket in sxhkd, so I tried to check how bspwm (bspc pointer) was reading pointer events but didn't quite figure it out yet.
If you have any code suggestions (or simply config ones) I'd love to get to the bottom of this.
Using -r to unignore a window doesn't work.
I would like to create a pkgsrc package for wmutils (starting with pkgsrc-wip package). It needs an actual release (version) number, rather than using a git hash. Do you plan to release/tag this repo soon? Otherwise, I will just start with 0.01 or something like that.
If a window is moved with a mouse, it unignores the window and can be moved freely.
edit: this is a quirk of using swm and wmutils (this edit is for any future reference)
When trying to build wmutils core on OpenBSD -current (May 3, 2016 snapshot), I get the following error using BSD make:
CC util.c
util.c:4:21: error: xcb/xcb.h: No such file or directory
In file included from util.c:6:
util.h:4: error: expected ')' before '*' token
util.h:5: error: expected ')' before '*' token
util.h:7: error: expected ')' before '*' token
util.h:8: error: expected ')' before '*' token
util.h:10: error: expected ')' before '*' token
util.h:11: error: expected ')' before '*' token
util.h:12: error: expected ')' before '*' token
util.c:9: error: expected ')' before '*' token
util.c:17: error: expected ')' before '*' token
util.c:24: error: expected ')' before '*' token
util.c:32: error: expected ')' before '*' token
util.c:48: error: expected ')' before '*' token
util.c:67: error: expected ')' before '*' token
util.c:86: error: expected ')' before '*' token
*** Error 1 in /home/joe/src/core (Makefile:38 'util.o': @cc -c util.c -o util.o -std=c99 -pedantic -Wall -Os)
Roughly the same deal when I try GNU make:
CC util.c
util.c:4:21: error: xcb/xcb.h: No such file or directory
In file included from util.c:6:
util.h:4: error: expected ')' before '*' token
util.h:5: error: expected ')' before '*' token
util.h:7: error: expected ')' before '*' token
util.h:8: error: expected ')' before '*' token
util.h:10: error: expected ')' before '*' token
util.h:11: error: expected ')' before '*' token
util.h:12: error: expected ')' before '*' token
util.c:9: error: expected ')' before '*' token
util.c:17: error: expected ')' before '*' token
util.c:24: error: expected ')' before '*' token
util.c:32: error: expected ')' before '*' token
util.c:48: error: expected ')' before '*' token
util.c:67: error: expected ')' before '*' token
util.c:86: error: expected ')' before '*' token
Makefile:37: recipe for target 'util.o' failed
gmake: *** [util.o] Error 1
libxcb is installed on my system via xenocara.
The IRC channel is given quite clearly, but not the network it's on, unless I missed it somewhere further up.
Hello and thank you for this project.
I created some ebuilds (for Gentoo's package manager) so in case you'd like to extend your "install section", you can link to them.
Bugtracker links:
x11-misc/wmutils-core: https://bugs.gentoo.org/show_bug.cgi?id=533738
x11-misc/wmutils-opt: https://bugs.gentoo.org/show_bug.cgi?id=533742
As of right now, they await being added to portage, but I'm confident they'll be added in some way. Should that not be the case for whatever reason, just use them from a local overlay.
I would like to be able to use a wid I have as an unsigned long/not have it passed through strtoul(3)
.
I invoke wattr with the following command:
wattr xy $(pfw)
or explicitly, with a known valid wid:
wattr xy 0x00a00006
Each time it returns the following:
wattr: 0x00000000: no such window
When running make (and sudo make) I get the following error
LD pfw
/usr/bin/ld: cannot find -lxcb-cursor
collect2: error: ld returned 1 exit status
make: *** [Makefile:36: pfw] Error 1
libxcb is installed and I'm on artix using dwm
Here we go. I'm working on the multimonitor utilities, and I now have enough info where I can create programs that fulfill my scripts' functions. Before I go any further, I'd like some feedback on the best, most unixy command line interfaces for multimonitor.
Which interface do we like the most? Xinerama, or RandR?
Xinerama indexes each output by a single integer, while RandR references each output by a string with the protocol name followed by a number, i.e. "VGA-0". Xinerama's method of choosing the output is stupid easy, while RandR gives more information to the user. I have a slight lean to Xinerama.
Which "One Thing (tm)" should each program do in order to maximize usefulness and composibility?
The scripts I made only did two things; one listed the outputs RandR style, and the other, when given a screen, gave the output's dimensions. Should I just make those two? Can anyone think of features that one would also need for manipulating multimonitor applications?
Should I add multimonitor capabilities to wattr?
I think that finding out which output(s) a window is currently in would be very useful. Adding an extra character option to wattr could be possible, but it starts entangling dependencies a little bit.
I've already got some of the functionality done, I just need some ideas and guidance on what you guys want me to do.
When I call wmv with high frequency (I think) arguments parsing isn't always working properly.
When using wrs
in absolute mode sometimes (a lot of the time) the size of the window changes to a size completely different from the desired size (usually a lot smaller, most of the time not even the correct aspect ratio).
I can reproduce this most of the time with wrs -a 500 500 $some_window_id
. Notice how the resulting window is not square.
Tested with urxvt on a 1080p screen without a WM running.
Context of finding this bug:
I am currently writing wrappers for wmv
and wrs
that move the mouse pointer with them to fix some of the inconveniences of the detail fix. The wrs
wrapper also introduces arguments that make it possible to keep the center of the window in the same place after a resize or resizing to the left. The wmv
wrapper is mostly finished, while the wrs
wrapper still needs work. In particular that is some fixes for center-keeping resizes on the right edge of the screen and absolute resizing (should work in theory, but discovered this wrs
bug)
As the title says, I find this annoying as killing one (private) window does not mean I want to close the entire browser.
I've had to restart Firefox several times because of this and I thought I should report it as a bug, since I don't think this is intended behaviour.
Although restarting Firefox is probably good for memory usage, it's certainly not the best workflow. lol
Hi,
i am currently trying wmutils and have some problems...
I am using tint2 and if I start the tile.sh script it tiles the bar too. Using "ignw -s tint2" does not do anything.
Also if a start switch-grid.sh the following error appears:
switch_grid.sh: 32: switch_grid.sh: bc: not found
switch_grid.sh: 52: test: -eq: argument expected
switch_grid.sh: 61: switch_grid.sh: arithmetic expression: division by zero: " SH/ROWS - GAP - BW "
I am glad about every help :)
I installed GNU make and run gmake, but compilation fails with:
CC util.c
util.c:4:10: fatal error: 'xcb/xcb.h' file not found
#include <xcb/xcb.h>
^
1 error generated.
Makefile:37: recipe for target 'util.o' failed
gmake: *** [util.o] Error 1
So I tried to export INCLUDEDIR as /usr/local/include. Also ran gmake -I /usr/local/include
. And tried PREFIX=/usr/local.
I have xcb and libxcb packages installed. xcb.h exists in /usr/local/include/xcb
I suggest adding xqp (X Query Pointer) to wmutils. https://github.com/baskerville/xqp
It can be used to determine when pointer is on specific window. This can be used to, for example with sxhkd, binding arbitary commands to clicking desktop. I use it to provide openbox style desktop menus to bspwm.
oops
lsw
returns:
0x01800020
0x015bb79a
0x01565393
0x0152d2de
0x01408113
0x015b8a07
0x015dc544
0x0153ec80
0x01600003
pfw
returns:
0x00c08d50
which is not in the list.
Calling wattr xywh $(pfw)
returns -1 -1 1 1
or some other gibberish.
Calling lsw | xargs -L1 wattr xywh
and moving the window around confirmed that the real focused window is in the list returned by lsw
:
0 0 2560 1600
278 706 1282 813
161 506 1282 533
1613 338 853 813
612 189 1896 1576
83 93 897 533
334 506 897 533
688 303 831 1033
0 1576 2560 24
I'm on dwm and a lot of stuff doesnt work. Selecting and listing windows works fine, but focusing and moving them with wmutils doesnt do anything. No error messages, just nothing. It would be really awesome if this project would support dwm at some point.
i'm using no-wm,and sxhkd for keybind. I will try to move xterm with wmv -20 0 $(pfw) but the command say pfw : focus cannot set. If i use this command in swm runs well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.