• Stars
    star
    203
  • Rank 192,890 (Top 4 %)
  • Language
    C
  • License
    ISC License
  • Created about 8 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Window Chef is a stacking window manager that cooks windows with orders from the Waitron

Windowchef

Disclaimer

This software is constantly changing and may break your workflow (yeah, it's that one xkcd comic, everyone knows it).

Cooking windows since 2016

Windowchef is a stacking window manager that doesn't handle keyboard or pointer inputs. A third party program (like sxhkd) is needed in order to translate keyboard and pointer events to waitron commands.

Waitron is a program that sends commands to the window manager through X client messages. It doesn't print anything on success. The commands and the parameters are fed as program arguments and waitron delivers them to the windowchef.

Windowchef is written in C with the help of the XCB library for communicating with the X server. It supports randr and a subset of ewmh and icccm.

Rationale

Window managers are spreading like rats these days (I may be wrong). So what do you want to achieve with this one?

What I want to achieve by writing windowchef is a simple window manager that provides basic functionality for a more minimal, yet comfortable workflow while being easily extensible using the standard UNIX way: shell scripts. Cool features like sorting windows by size on a specific monitor are not included in windowchef. Instead, the user is encouraged to write a script that does this using available tools like wmutils for window manipulation and disputils for getting information regarding randr outputs.

Have fun!

Usage

See the bundled .sxhkdrc and .windowchefrc for an example of a basic configuration. Additionally, you can read the manual pages (windowchef(1) and waitron(1)).

The default configuration file is ~/.config/windowchef/windowchefrc. It is usually a shell script that calls waitron wm_config for configuration. See the manual page for waitron(1) for details regarding this topic.

If you want to use window rules, a feature that windowchef lacks, you can use ruler.

Dependencies

  • xcb
  • xcb-randr
  • xcb-util-wm
  • xcb-keysyms
  • xproto (compile-time dependency)

Windowchef depends on xcb to communicate with the X11 server, xcb-randr to gather information about connected displays and xcb-util-wm for ewmh and icccm helper functions.

xcb-keysyms and xproto are required for mouse support.

I couldn't find compiled documentation for xcb-util-wm so I compiled it and put it on my website here.

Building windowchef and installing it

Available in the AUR:

First, you may need to tweak the search path for some operating systems (e.g. OpenBSD) in config.mk.

Then, just make it:

$ make
$ sudo make install

The Makefile respects the DESTDIR and PREFIX variables.

Features

  • Move, teleport, enlarge/shrink and resize windows
  • Focus windows by direction
  • Maximize windows vertically/horizontally/fully
    • Supports maximizing via EWMH
  • Monocle mode
  • Close windows (either by killing them or via ICCCM)
  • Put windows in a virtual grid.
  • Snap windows in the corners or in the middle of the screen
  • Cycle windows forwards and backwards
  • cwm-like window groups
    • Add or remove windows to a group
    • Activate/Deactivate/Toggle a group
    • groups can be "sticky": windows are assigned to the currently selected group automatically
  • Mouse support
    • Focus, move and resize windows with the mouse
    • Supports window resize hints
  • Respects window resize hints.
  • Simple and stylish solid-color border. Width can be configured
  • Gaps around the monitor and around the cells of the virtual grid(s).
  • Configuration script. Windowchef loads a given script at startup that can be used for configuration with waitron.
  • 100% compatible with window management utilities (e.g. wmutils). Windowchef will update its internal state if programs attempt to manage windows. It also applies the correct window decorations when a program focuses a window. This makes it possible to use it as a "backend" with wm utilities.

Many of the features listed above are optional and can be disabled.

Soon to come

  • Nothing yet.

Groups

A window belongs in a maximum number of 1 groups. You can show or hide as many groups as you wish. For example, you can have group 1 with a terminal window for programming and another one with a shell opened and group 2 with a browser window. You can either show only group 1, only group 2 or both at the same time.

Windowchef allows you to add/remove windows to/from groups, show groups, hide groups or toggle them.

You can also activate sticky group mode. When activated, new windows are automatically assigned to the currently selected group. Together with the group_activate_specific command (see waitron(1)), a workspace-like workflow can be achieved.

Virtual grids

You can tell windowchef to move and resize a window so it can fit in a cell of a virtual grid. The user specifies the size of the grid and the coordinates of the cell the window will sit in. For example, I can define a 3x3 grid and put my window in the cell at x = 0, y = 2:

+-----------------------+
|       |        |      |
|-------+--------+------|
|       |        |      |
|-------+--------+------|
| xterm |        |      |
+-----------------------+

Screenshot

Using the mouse

Windowchef doesn't offer any mouse moving/resizing features. You can emulate that with xmmv(1) and xmrs(1) from wmutils' opt.

It does now!

You can do 4 actions:

  • focus windows
  • move windows
  • resize windows
    • from the corners
    • from the sides

All actions (besides focusing windows) require pressing a modifier key (super or alt, you choose) while doing it. You can configure all the mouse buttons for each action. The modifier key can be changed but it's the same for all actions.

You can also configure windowchef to require pressing the modifier key to focus windows.

When resizing, you don't need to put the pointer exactly in the corner/on the side of the window (like on windows or GNOME). It will work as long as it's in the right quarter of the window.

Bars and panels

Windowchef doesn't come with a bar/panel on its own. Windowchef ignores windows with the _NET_WM_WINDOW_TYPE_DOCK type. Panels can get information about the state of the window manager through ewmh properties.

Tested with lemonbar.

Thanks

This software was written by tudurom.

Thanks to dcat and z3bra for writing wmutils. Their software helped me learn the essentials of X11 development.

Thanks to venam, Michaell Cardell and baskerville for the window managers they made: 2bwm, mcwm and bspwm (ironically they all end in wm :). Their programs were and still are a very good source of inspiration for anyone who wants to write a window manager.

And many, many thanks to contributors:

  • @neosilky
  • @n1kolas
  • @nullrndtx
  • @dialuplama
  • @allora
  • @onodera-punpun

Thank you for using windowchef!

More Repositories

1

dotfiles

My computing environment, in code form.
Shell
153
star
2

rainbou

Theme generator
CSS
30
star
3

ruler

Window rule daemon
C
26
star
4

usam

blending sam with the shell experiment
Go
16
star
5

albumify

Simple webpage to create imgur-like albums out of images from the whole web.
JavaScript
14
star
6

disputils

utilities for getting info about displays
C
14
star
7

terra

just another bitmap font
13
star
8

rwsh

Really Weird Shell - shell based around Structral Regular Expressions - mirror repo
Rust
12
star
9

rainbou-legacy

Simple color scheme file generator written in sh
C
9
star
10

orator

Simple, fast, and flexible static site generator written in Go.
Go
6
star
11

ttyname

Go equivalent for the tty command
Go
6
star
12

st

st config. patches stolen from everywhere
C
5
star
13

clint

CLI Note Taking program - git-powered note-taking script
Shell
4
star
14

crux-ports

Ports for crux. Based off @ix's original ports. DEPRECATED. PLEASE DON'T USE THEM
Shell
4
star
15

pynotifyd

Simple freedesktop notification daemon
Python
3
star
16

site

My website
HTML
3
star
17

cloudy-gtk

Gtk theme generated with oomox using my terminal color scheme, cloudy
CSS
3
star
18

lastplayer

Simple program that keeps track of the last used MPRIS2 players
Python
2
star
19

micro-logrus

go-micro log bridge for logrus
Go
2
star
20

textual

Simple ASCII Art interface library in JavaScript
HTML
2
star
21

oji_bot

Send message to channel if a web page changes. Used for monitoring olimpiada.info
Go
1
star
22

slashr_bot

Telegram bot that sends full reddit links to user pages or subreddits when it encounters shortlinks (like /u/ or /r/)
Go
1
star
23

everyonebot

Telegram bot that emulates Discord's @everyone
Python
1
star
24

bw-git-helper

Go
1
star
25

linux-configs

.config files for the linux kernel
1
star
26

padawans

Scoala de padawani a lui tudurom. In codul Jedi se specifica ca nu ai voie sa ai mai mult de un ucenic, dar eu sunt mai smecher 😎
CSS
1
star
27

brclock

Binary clock with braille characters
C
1
star