README.md (2749B)
1 wmutils' core 2 ============= 3 4 wmutils' core is a set of tools for X windows manipulation. Each tool only has 5 one purpose, to make it as flexible and reliable as possible. 6 7 Here's a quick example. This snippet will put the currently focused window in 8 the middle of the screen: 9 10 #!/bin/sh 11 12 # get current window id, width and height 13 WID=$(pfw) 14 WW=$(wattr w $WID) 15 WH=$(wattr h $WID) 16 17 # get screen width and height 18 ROOT=$(lsw -r) 19 SW=$(wattr w $ROOT) 20 SH=$(wattr h $ROOT) 21 22 # move the current window to the center of the screen 23 wtp $(((SW - WW)/2)) $(((SH - WH)/2)) $WW $WH $WID 24 25 You also might want to check [sxhkd](https://github.com/baskerville/sxhkd), a 26 daemon which allow binding applications to hot keys. 27 28 utilities 29 --------- 30 31 * chwb - change window's border 32 * chwso - change window's stacking order 33 * ignw - ignore/unignore window 34 * killw - kill windows 35 * lsw - list windows 36 * mapw - map/unmap windows 37 * pfw - print focused window 38 * pdw - print decoration window 39 * slw - select window interactively 40 * wattr - show window's attributes 41 * wmp - move the mouse pointer 42 * wmv - move a window 43 * wrs - resize a window 44 * wtf - focus a window 45 * wtp - teleport a window 46 * atomx - modify atoms on a window 47 48 All these tools come with a manpage ! read them for further informations. 49 50 dependencies 51 ------------ 52 53 wmutils only relies on the XCB library. 54 55 license 56 ------- 57 58 All the code of this project is released under the 59 [ISC](http://www.openbsd.org/policy.html) license. See LICENSE file. 60 61 build & install 62 --------------- 63 64 System-wide installation (default PREFIX is `/usr`): 65 66 $ make 67 # make install 68 69 Here are the variables you can override, along with their default values: 70 71 CC = cc 72 LD = $(CC) 73 CFLAGS = -std=c99 -pedantic -Wall -Os 74 LDFLAGS = -lxcb 75 PREFIX = /usr 76 MANPREFIX = $(PREFIX)/man 77 DESTDIR = 78 79 You can override them by passing them on the command line: 80 81 make DESTDIR=/newroot install 82 83 Or by setting them via the environment: 84 85 CC=c99; export CC 86 make -e 87 88 contribute 89 ---------- 90 91 You can contribute to the project in many ways; be it by testing the software, 92 reporting bugs, submitting patches, or simply talking about it to other 93 people! 94 The official IRC channel for wmutils' talks is #wmutils @irc.freenode.net. 95 96 If you find a bug in the software, please report an issue. Same goes for 97 feature requests, if they match the project's philosophy. 98 99 When submitting pull requests, please reference the issue number. If there is 100 no issue to reference, then create one and wait for a validation of the bug 101 before submitting the pull request. 102 103 IF YOUR PULL REQUEST DOESN'T REFER TO A VALID ISSUE, IT WILL BE DISCARDED.