dwm


"/home/yossef/notes/git/envir_sys/dwm.md"

path: git/envir_sys/dwm.md

- **fileName**: dwm
- **Created on**: 2025-03-26 17:10:24

Dwm Config Explained

img dwm

Appearance

static const unsigned int borderpx  = 1;        // border pixel of windows
static const unsigned int snap      = 32;       // snap pixel
static const int showbar            = 1;        // 0 means no bar
static const int topbar             = 1;        // 0 means bottom bar

Fonts and Colors

static const char *fonts[]          = { "monospace:size=10" };
static const char dmenufont[]       = "monospace:size=10";
static const char col_gray1[]       = "#222222";
static const char col_gray2[]       = "#444444";
static const char col_gray3[]       = "#bbbbbb";
static const char col_gray4[]       = "#eeeeee";
static const char col_cyan[]        = "#005577";
static const char *colors[][3]      = {
	/*               fg         bg         border   */
	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
};

Tagging

static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

Layouts

static const float mfact     = 0.55; // factor of master area size [0.05..0.95]
static const int nmaster     = 1;    // number of clients in master area
static const int resizehints = 1;    // 1 means respect size hints in tiled resizals
static const int lockfullscreen = 1; // force focus on the fullscreen window
static const Layout layouts[] = {
	/* symbol     arrange function */
	{ "[]=",      tile },    // first entry is default
	{ "><>",      NULL },    // no layout function means floating behavior
	{ "[M]",      monocle },
};

Rules

static const Rule rules[] = {
	/* class      instance    title       tags mask     isfloating   monitor */
	{ "Gimp",     NULL,       NULL,       0,            1,           -1 },
	{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
};

Keybindings Table

Keybinding Action
MODKEY + Enter Launch terminal
MODKEY + p Launch dmenu
MODKEY + Shift + q Kill focused window
MODKEY + j/k Move focus to next/previous window
MODKEY + h/l Shrink/Expand master window area
MODKEY + ,/. Increase/Decrease number of master panes
MODKEY + Shift + c Close the focused window
MODKEY + t/f/m Switch to tiling/floating/monocle layout
MODKEY + 1-9 Switch to workspace (tag)
MODKEY + Shift + 1-9 Move focused window to workspace (tag)
MODKEY + Shift + Space Toggle floating for focused window
MODKEY + Shift + r Restart DWM
MODKEY + Shift + e Quit DWM

MODKEY is usually set to Alt or Super (Windows key) in your config.

continue:./hypr.md
before:./i3.md