adbjesus / wmutils-core

Set of window manipulation tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wmutils' core

wmutils' core is a set of tools for X windows manipulation. Each tool only has one purpose, to make it as flexible and reliable as possible.

Here's a quick example. This snippet will put the currently focused window in the middle of the screen:

#!/bin/sh

# get current window id, width and height
WID=$(pfw)
WW=$(wattr w $WID)
WH=$(wattr h $WID)

# get screen width and height
ROOT=$(lsw -r)
SW=$(wattr w $ROOT)
SH=$(wattr h $ROOT)

# move the current window to the center of the screen
wtp $(((SW - WW)/2)) $(((SH - WH)/2)) $WW $WH $WID

You also might want to check sxhkd, a daemon which allow binding applications to hot keys.

utilities

Here are the tools. This project is quite young, new tools can arrive without being added to this list, so take it with a grain of salt.

  • chwb - change window's border
  • chwso - change window's stacking order
  • ignw - ignore/unignore window
  • killw - kill windows
  • lsw - list windows
  • mapw - map/unmap windows
  • pfw - print focused window
  • wattr - show window's attributes
  • wmp - move the mouse pointer
  • wmv - move a window
  • wname - get a window's name
  • wrs - resize a window
  • wtf - focus a window
  • wtp - teleport a window

All these tools come with a manpage ! read them for further informations.

dependencies

wmutils only relies on the XCB library.

license

All the code of this project is released under the ISC license. See LICENSE file.

build & install

System-wide installation (default PREFIX is /usr):

$ make
# make install

Fakeroot installation:

$ make
$ make DESTDIR=$PWD/newroot install

About

Set of window manipulation tools

License:Other


Languages

Language:C 92.9%Language:Makefile 7.1%