• Stars
    star
    272
  • Rank 146,860 (Top 3 %)
  • Language
    Go
  • License
    Other
  • Created over 7 years ago
  • Updated over 7 years ago

Reviews

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

Repository Details

A pure go autotiling window manager written with literate programming

dewm - a window manager written with literate programming

dewm is a pure Go autotiling window manager. It's intended to make the text editor de feel more similar to acme when windows are spawned with the p9p plumber, with the window management handled at a window manager level, rather than integrated into the text editor. (If you're unfamiliar with acme, it's a text editor written by Rob Pike for Plan 9 after he got drunk one night and forgot that he wrote "cat -v considered harmful.")

dewm is written in a literate programming style, in the hopes that it can inspire anyone else who's ever wanted to write their own window manager that they can learn enough to do it. I knew next to nothing about the X11 protocol or ICCCM conventions when I started this (and still don't), so if I got anything wrong please feel free to either send a pull request or email me so I can correct it. I don't want to misinform anyone who reads the markdown source in the src/ directory.

Basics

dewm arranges the screen into columns, and divides columns up between windows that are in that column. Windows always spawn in the first empty column, or the end of the last column if there are no empty columns. (If no columns exist, the first one is created automatically.)

By default, all columns are equally sized, and each window in any given column is equally sized, but they can be resized dynamically (see keybindings below).

Keybindings

These keybindings are currently hardcoded, but may one day be configurable.

Window Management

  • Alt-H/Alt-L move the current window left or right 1 column.
  • Alt-J/Alt-K move the current window up or down 1 window in current column
  • Ctrl-Alt-Up/Down increase/decrease the size of the current window. Other windows will be dynamically resized to make sure the column still takes the whole height of the screen.)
  • Ctrl-Alt-Left/Right increase/decrease the size of the column with the currently active window. (Other columns will be dynamically resized to make up for it.)
  • Ctrl-Alt-Enter toggle whether or not the current window is maximized.
  • Ctrl-Shift-N create a new column
  • Ctrl-Shift-D delete any empty columns

Other

  • Alt-E spawn an xterm
  • Alt-Q close the current window
  • Alt-Shift-Q destroy the current window
  • Ctrl-Alt-Backspace quit dewm

Screenshots

This is what dewm looks like with two windows in two columns:

dewm with two columns

And this is it looks like if, after browsing a bit, you threw an xterm into the mix.

dewm with multiple windows in a column

Installation

The generated go files are included in this repo, so that you can install dewm with the standard go get tool (go get github.com/driusan/dewm)

You should then be able to add:

dewm

to the end of your .xinitrc or .xsession file (assuming $GOBIN is in your path, otherwise you'll have to include the full the path to the executable, wherever go get compiled it to.)

License

Any code that I've written is MIT licensed. I've often used taowm as a reference when figuring out how to do things. I don't think any reasonable person would say this is a derivative work, but to be safe, LICENSE.taowm contains the taowm (3-clause BSD) license and applies to any code that explicltly comes from there.

More Repositories

1

de

A Programmer's Text Editor
Go
422
star
2

bug

Distributed bug tracking with the filesystem and hg or git
Go
204
star
3

dainit

A simple pure-Go Linux init system
Go
179
star
4

lmt

literate markdown tangle
Go
139
star
5

dgit

A Pure Go Git Implementation
Go
111
star
6

mandown

a tool to help write man pages in markdown
Go
62
star
7

gob

Gob: An Experimental Pure Go Web Browser
Go
41
star
8

gosh

A UNIX shell written in a literate programming style, using Go and markdown.
Go
28
star
9

dkim

Pure Go tools for managing DKIM headers
Go
28
star
10

PoormanIssueTracker

A simple format for using the file system as an issue tracker
27
star
11

hammer2fs

An implementation of the hammer2 filesystem for Plan 9
C
13
star
12

kernel

An attempt to write an OS kernel in Go
C
12
star
13

webmail

simple webmail for plan9
Go
5
star
14

drawterm

wayland driver for drawterm
C
4
star
15

fedi9

A fediverse client/server for 9front
Shell
3
star
16

osm9

OpenStreetMap for Plan9
C
3
star
17

schemaman

An experimental database schema tracking tool
Go
3
star
18

bug-serve

HTTP Implementation of bug, the distributed bug tracker.
JavaScript
3
star
19

noruntime

An attempt to build assembly with the Go toolchain and bypass the Go runtime
Go
3
star
20

aranet4linux

An Aranet4 Client for Linux
C
2
star
21

fediwiki

A federated ActivityStreams based wiki
Go
2
star
22

Configuration

Driusan's Unix Config
Vim Script
2
star
23

DaveKey

A React Native / Expo Go app for accessing Calckey servers
JavaScript
2
star
24

Password

A Go implementation of the PHP password API
Go
1
star
25

Loris-Backup

The development trunk for Loris
PHP
1
star
26

driusan.github.io

My personal website.
JavaScript
1
star
27

p9auth

Go
1
star
28

GoGeneratorGenerator

A program for writing programs that write programs.
Go
1
star