Code Monkey home page Code Monkey logo

wmutils's Introduction

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
  • 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

Here are the varialbes you can override, along with their default values:

CC         =  cc
LD         =  $(CC)
CFLAGS     =  -std=c99 -pedantic -Wall -Os
LDFLAGS    =  -lxcb
PREFIX     =  /usr
MANPREFIX  =  $(PREFIX)/man
DESTDIR    =

You can override them by passing them on the command line:

make DESTDIR=/newroot install

Or by setting them via the environment:

CC=c99; export CC
make -e

contribute

You can contribute to the project in many ways; be it by testing the software, reporting bugs, submitting patches, or simply talking about it to other people! The official IRC channel for wmutils' talks is #wmutils @irc.freenode.net.

If you find a bug in the software, please report an issue. Same goes for feature requests, if they match the project's philosophy.

When submitting pull requests, please reference the issue number. If there is no issue to reference, then create one and wait for a validation of the bug before submitting the pull request.

IF YOUR PULL REQUEST DOESN'T REFER TO A VALID ISSUE, IT WILL BE DISCARDED.

wmutils's People

Contributors

dcat avatar algernon avatar adbjesus avatar agloo avatar bentley avatar baskerville avatar danil avatar ivzave avatar ayakashi avatar waldyrious avatar ndem0 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.