monochromatic

monochromatic blog: http://blog.z3bra.org
git clone git://z3bra.org/monochromatic
Log | Files | Refs

commit 01fabfd1131cdbad090cdc6724244f3464ebbabf
parent e97aa66e857d3934fab42a40a077db5d98b7e8b6
Author: z3bra <willy@mailoo.org>
Date:   Thu,  8 Jan 2015 21:41:23 +0100

New article released !

Diffstat:
2015/01/you-are-the-wm.txt | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config.mk | 3++-
index.txt | 1+
3 files changed, 90 insertions(+), 1 deletion(-)

diff --git a/2015/01/you-are-the-wm.txt b/2015/01/you-are-the-wm.txt @@ -0,0 +1,87 @@ +# [You are the WM](#) +## &mdash; 08 January, 2015 + +A window manager is a program that runs in the background, and give you keybinds +and/or mouse moves to move/resize and arrange your windows on your screen. + +Abbreviated "WM", the window manager is an important part of your system, +because without it, you'd probably end up with all your windows pop in the +bottom left hand-corner of your screen, unable to switch between them. + +But guess what... + +### You don't need it ! + +It's a fact. A +[study](http://www.nytimes.com/2005/01/11/health/11anim.html) determined that +some rat could be able to determine which language you are speaking. But that's +totally unrelated here, I agree. + +What is a window manager ? + +<q>It's a program !</q> woah. Thank you Timmy. + +A window manager is a program (thank you Timmy) that runs in the background, and +wait for X events (I wont talk about wayland here). Those X events can be of +any form: key press, window creation/deletion, mouse move, and so on. + +The most used events being the keypress events, because the window manager will +perform different actions to arrange you windows. + +With [dcat](http://vps.iotek.org/~dcat), we realized that some programs (sxhkd, +xbindkeys and others) already handle those events, and could start programs when +receiving them. Following the Ô so true Unix way, we decided to create a set of +small tools to perform all the task a window manager is supposed to do. + +We ended up with [wmutils](http://github.com/wmutils/core). + +### Coreutils, for Xorg + +This project aims to provide all the tools needed to manage a list of X windows, +while keeping each tool as simple as possible, so that they can easily be glued +together to create complex behaviors. + +Using wmutils, you can list windows, move/resize/teleport them, change their +borders, change their visibility, stacking order, ignore them, focus them, and +more... + +It's power reside in its simplicity. As you can chain commands together, you +could easily perform some action that other WM can't even do. + +For example, here is how you kill all the windows that are not shown on screen +(eg, attached to other workspaces): + + lsw -u | xargs killw + +Put a window in the top-left corner ? pff. easy: + + wtp 0 0 $(wattr whi `$pfw`) + +bottom-left corner ? + + wid=$(pfw) + w=$(wattr w $wid) + h=$(wattr h $wid) + fh=$(wattr h `lsw -r`) + + wtp 0 $((fh - h)) $(wattr whi $wid)) + +You get the idea. As a matter of fact, the following as been done using ONLY\* +wmutils tools: + +[![gif showing floating +mode](http://blog.z3bra.org/img/thumb/floater.gif)](http://blog.z3bra.org/img/floater.gif) +[![gif showing tiling +mode](http://blog.z3bra.org/img/thumb/tiler.gif)](http://blog.z3bra.org/img/tiler.gif) + +<span class="caption">\*only exception is the use of x-move-resize from +[no-wm](https://github.com/patrickhaller/no-wm), which is planned to be added to +wmutils anyway)</span> + +Check out the "[contrib](http://github.com/wmutils/contrib)" repo. There are +some nice scripts in there ! + +Now throw your window manager away, you don't need it anymore. **YOU ARE THE WM +!** + +<!-- vim: set ft=markdown ts=4 et tw=80: --> diff --git a/config.mk b/config.mk @@ -22,7 +22,8 @@ PAGES = index.html \ 2014/08/shred-configh.html \ 2014/09/backup-someone.html \ 2014/11/avoid-workspaces.html \ - 2014/12/so-tox-me-maybe.html + 2014/12/so-tox-me-maybe.html \ + 2015/01/you-are-the-wm.html FEEDS = rss/feed.xml EXTRA = css img vid errors favicon.ico diff --git a/index.txt b/index.txt @@ -1,3 +1,4 @@ +* 0x0013 - [You are the WM](/2015/01/you-are-the-wm.html) * 0x0012 - [So tox me maybe](/2014/12/so-tox-me-maybe.html) * 0x0011 - [Avoid workspaces](/2014/11/avoid-workspaces.html) * 0x0010 - [Backup, someone ?](/2014/09/backup-someone.html)