• Stars
    star
    472
  • Rank 89,919 (Top 2 %)
  • Language
    C
  • License
    MIT License
  • Created over 14 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

velox window manager

velox

velox is a simple window manager based on swc. It is inspired by dwm and xmonad.

Design

velox uses tag-based window management similar to dwm. This allows you to construct your workspace by selecting a set of tags to work with. However, in contrast with dwm, windows do not have any screen associated with them; they are shown on whichever screen has their tag selected, allowing you to easily move windows between screens by selecting their tag on a different screen. This is similar to the multi-monitor workspace switching in xmonad.

To ensure that we never attempt to show a window in two places at once, we have to impose several constraints. First, each window must have exactly one tag. In practice, I've found that I rarely intentionally mark a window with more than one tag anyway. Second, when you select a tag that is currently displayed on a different screen, the tag is first deselected from that screen.

Configuration

velox uses a text file for its configuration. The configuration file is searched for first in ${HOME}/.velox.conf and then /etc/velox.conf.

Internally, the configuration structure is organized as a tree. For example, the identifier window.border_width refers to the property controlling the border width of the windows, and the identifier tag.3.toggle refers to the action that toggles visibility of the third tag.

The format is fairly simple. Each line consists of a command, followed by command-specific arguments. The currently available commands are set, action, key, button and rule.

The set command

set <property> <value>

The set command is used to set the value of a property. It takes as its first argument the identifier of the property to set, and as its second argument the new value. The interpretation of the strings provided as values is dependent upon the property being set. For example, window.border_color_active interprets its value as a hexadecimal color, while tag.1.name simply sets the name of the tag to the given string.

The action command

action <identifier> <type> <type-specific-arguments>

The action command creates a new action that can be invoked using key bindings. The first argument is an identifier to use for the action to be created. The second argument is the type of action to be created. Right now, the only action type is spawn. All remaining arguments are interpreted based on the action type.

The spawn action type

action <identifier> spawn <shell-command>

The spawn action type is used to create actions which spawn a command when invoked. This is useful to create key bindings which launch a particular program. Its arguments are treated as a single string and are interpreted by the shell using sh -c '<shell-command>'.

The key command

key <keysym> <modifier-list> <action-when-pressed>[:<action-when-released>]

The key command registers a key binding which invokes a particular action. The first argument is the name of the keysym to bind to. These can be found in /usr/include/xkbcommon/xkbcommon-keysyms.h (dropping the XKB_KEY_ prefix). The second argument is a comma separated list of modifiers under which to activate the binding. Valid modifiers are ctrl, alt, logo, shift, any, or mod. any matches any set of modifiers, and mod is a convenience modifier which refers to the value of the mod property. The third and final argument are the identifier of the action(s) to invoke when the key is pressed or released. The general form is <action-when-pressed>:<action-when-released>, and either action identifier can be omitted if none is desired. For convenience, the common case of <action-when-pressed>: can be written as just <action-when-pressed>.

These actions can be internal to velox, such as focus_next, or custom actions created with the action command.

The button command

button <button> <modifier-list> <action-when-pressed>[:<action-when-released>]

The button command works identically to key, except that instead of a keysym, it takes a button name. Valid button names are left, right, middle, side, and extra.

The rule command

rule <type> <identifier> action

The rule command creates a new rule that will match new windows when they are created. This is useful to, for example, spawn certain windows on certain tags. The first argument is one of title or app_id and indicates which property of the window should be matched. The second argument is the value to match the window property against. If the type is title it is compared with the window title, and if the type is app_id it compared with the application ID (see the xdg_shell protocol for more details). The last argument is the action to execute when the newly created window matches the rule. This action is invoked with the new window as an argument. An example to always spawn a window with title st on tag 2, is:

rule title st tag.2.apply

See velox.conf.sample for an example of a basic configuration file.

More Repositories

1

samurai

ninja-compatible build tool written in C
C
783
star
2

cproc

C11 compiler (mirror)
C
665
star
3

swc

a library for making a simple Wayland compositor
C
591
star
4

wld

A primitive drawing library targeted at Wayland
C
76
star
5

sbase

Portable UNIX tools (mirror)
C
50
star
6

st

C
49
star
7

qbe

Personal branch of git://c9x.me/qbe.git
C
35
star
8

libtls-bearssl

libtls implemented on top of BearSSL
C
35
star
9

dmenu

C
22
star
10

blake3-tiny

Tiny public-domain implementation of BLAKE3
C
19
star
11

base64

public-domain base64 implementation
C
16
star
12

musl

C
12
star
13

x509cert

Tool and library for generating X.509 certificates and certificate requests (mirror)
C
11
star
14

ubase

personal branch of git://git.suckless.org/ubase
C
10
star
15

wl9

rio-wayland shim server
C
9
star
16

pax

pax archive utility
C
8
star
17

upnp-av

UPnP AV server
C
7
star
18

dnssec-rr

Tools for working with DNSSEC (mirror)
C
6
star
19

nine

wine for 9
C
5
star
20

libblit

C
5
star
21

inverse_kinematics

CS184 Final Project - Inverse Kinematics Solver
Haskell
5
star
22

sdhcp

C
5
star
23

oscmix

Mixer for RME Fireface UCX II
C
5
star
24

coreboot

My fork of coreboot supporting Opus M4
C
5
star
25

tridactyla

tridactyla's exherbo repository, moved to git.exherbo.org
4
star
26

tinyemu

C
4
star
27

trickle

Trickle is an extensible frontend to various BitTorrent clients. It runs on all platforms supported by KDE4, and can connect to any server running a supported BitTorrent backend, like rTorrent and XmlRpc, or uTorrent and WebUI.
C++
3
star
28

gefs

personal gefs branch
C
3
star
29

resample

Public-domain audio resampler
Objective-C
3
star
30

intpack

Integer encoding/decoding functions
C
3
star
31

tridactyla-personal

Tridactyla's exherbo repository for personal projects
2
star
32

opus_m4

Coreboot configuration and rom utilities for Opus M4
Shell
2
star
33

one_astronaut

C
2
star
34

smileys

smileys plugin for velox
C
2
star
35

playground

An area where I can play around with stuff
C++
2
star
36

miniyacc

Personal branch of git://c9x.me/miniyacc.git
Yacc
1
star
37

perp

persistent process supervision (http://b0llix.net/perp/)
C
1
star
38

libwl

Wayland client implementation in Myrddin
Python
1
star
39

surf

C
1
star
40

binutils-gdb

Personal binutils branch
C
1
star
41

fm

FM-Net implementation (https://docs.formality-lang.org/en/latest/theory/Formality-Net.html)
C
1
star
42

bearssl-util

1
star
43

arbor

arbor with musl support
1
star