Skip to content

User Configuration File

Avahe Kellenberger edited this page Aug 30, 2022 · 19 revisions

Table of Contents

  1. Settings Table
  2. Controls Table
  3. Autostarting Programs
  4. Starting External Processes with Keybindings
  5. Application Startup Rules
  6. Changing Text of Tags
  7. Setting the default number of master windows

Settings Table

The settings table [settings] is used to define default values; all settings are listed below.


gapSize - The size of the gap between windows, and between windows to the edges of the screen

outerGap - The size of the gap between windows and edges of the screen (overrides gapSize)

borderWidth - The width of the border around each window

borderColorFocused - The color of the border of the focused window (hex value, e.g. #22CC11)

borderColorUnfocused - The color of the border of unfocused windows (hex value, e.g. #22CC11)

borderColorUrgent - The color of the border of urgent windows (hex value, e.g. #22CC11)

barHeight - The height of the built-it status bar

windowTitlePosition - The position in the bar to render the window title.

Must be: "center", "centre", or "left".

barBackgroundColor - The background color of the status bar (hex value, e.g. #22CC11)

barForegroundColor - The foreground color of the status bar (hex value, e.g. #22CC11)

barSelectionColor - The selection color of the status bar (hex value, e.g. #22CC11)

barUrgentColor - The urgent color of the status bar (hex value, e.g. #22CC11)

barFonts - A list of fonts (in order of priority) used to render text on the bar

resizeStep - Number of pixels to resize the master window (see increaseMasterWidth)

scratchpadWidth - The default width of scratchpad windows

scratchpadHeight - The default height of scratchpad windows

Controls Table

The controls table [controls] defines keybindings that control the window manager.

Each action/control has a list of modifiers (which must all be pressed), and a list of keys (where any could be pressed), to trigger the action/control.


reloadConfig - Reloads all settings from your config file

focusPrevious - Focuses the previous window

focusNext - Focuses the next window

moveWindowPrevious - Moves the window to the previous position in the window stack

moveWindowNext - Moves the window to the next position in the window stack

toggleFullscreen - Toggles the fullscreen state of the selected window

destroySelectedWindow - Destroys the selected window

moveWindowToTag - Moves the selected window to the tag associated with the pressed number

moveWindowToLeftTag - Moves the window to the tag on the left.

moveWindowToRightTag - Moves the window to the tag on the right.

goToTag - Views the selected tag

goToLeftTag - Goes to the tag on the left.

goToRightTag - Goes to the tag on the right.

goToPreviousTag - Views the previously viewed tag

moveWindowToPreviousTag - Moves the selected window to the previously viewed tag.

toggleTagView - Toggles the visibility of a tag

toggleWindowTag - Toggles the assignment of a window to a tag

focusPreviousMonitor - Focuses the previous monitor (wraps around to the last monitor)

focusNextMonitor - Focuses the next monitor (wraps around to the first monitor)

moveWindowToPreviousMonitor - Moves the selected window to the previous monitor

moveWindowToNextMonitor - Moves the selected window to the next monitor

increaseMasterCount - Increases the number of master windows in the layout

decreaseMasterCount - Decreases the number of master windows in the layout

toggleFloating - Toggles the floating state of the selected window

jumpToUrgentWindow - Finds and selects the first urgent window

increaseMasterWidth - Increases the width of the master window

decreaseMasterWidth - Decreases the width of the master window

moveWindowToScratchpad - Moves the selected window to the scratchpad

popScratchpad - Brings back the window most recently added to the scratchpad

rotateClients - Rotate clients clockwise, making the last window master

toggleStatusBar - Hides or shows the status bar on the selected monitor

Autostarting Programs

The autostart table [autostart] allows for a list of strings which will be executed by your shell when Nimdow is first started.

Example:

[autostart]
exec = [
  "firefox",
  "st"
]

Starting External Processes with Keybindings

To declare a keybinding to start an external process, use the format below:

[[startProcess]]
command = "dmenu_run"
keys = [ "p" ]
modifiers = [ "super" ]

[[startProcess]]
command = "maim -sou > out.png"
keys = [ "s" ]
modifiers = [ "super", "shift" ]

Application Startup Rules

Rules can be defined which determine which monitor and tags an application is placed when they are first started.

[[appRule]]
class = "*Vivaldi*"
instance = ""
title = ""
monitor = 1
tags = [ 1, 4, 7 ]
state = "floating" # "normal", "floating", and "fullscreen" are all valid.
# The following only apply if the window is "floating"
x = 100
y = 400
width = 800
height = 600

According to the above, any window created which contains the text Vivaldi in its WM_CLASS property will start on monitor 1 (the first monitor), and will be available on tags 1, 4, and 7.

class, instance, and title:

  • Are case sensitive
  • Can be excluded
  • Support * as a prefix and/or suffix

The first app rule that matches a specific application will be chosen; the others will not be considered.

How do I find these properties?

Use the program xprop.

  1. Start xprop in a terminal
  2. Click the application in which you want to find the properties
  3. The properties are output in the terminal

If WM_CLASS has two properties, the first is the instance and the second is the class. WM_NAME is the title

Changing Text of Tags

Instead of using 1-9 for tag names, the user can specify other strings of characters.

[monitors]
  [monitors.default.tags]
  1.displayString = "one"
  2.displayString = "two"

  [monitors.1.tags]
  2.displayString = "tag two"

  [monitors.2.tags]
  2.displayString = "🦀"

In this example, the default display strings for tags 1 and 2 are set to one and two, respectively.

Monitor 1 (the first monitor found) has its tag number 2's text set to tag two, which overrides the default.

Monitor 2 has its tag number 2's text set to 🦀 (yes, even emojis can be used here).

Setting the default number of master windows

By default, all tags have one master window. This can be changed with keybindings or the cli client while Nimdow is running.

To set a default upon startup, you can do the following:

[monitors]
  [monitors.default.tags]
  # Set the number of master windows for all tags on all monitors.
  all.numMasterWindows = 2

  [monitors.1.tags]
  # Set the number of master windows per-monitor.
  all.numMasterWindows = 3
  # Set the number of master windows per-tag. This overrides the `all` option.
  2.numMasterWindows = 1

  [monitors.2.tags]
  1.numMasterWindows = 4