Mercurial > nixos
annotate config/dwm/config.def.h @ 4:7c8c5e548075 default tip
fix stuff
| author | Yasuri <yasuri@charliesmp.net> |
|---|---|
| date | Sat, 03 Oct 2026 19:23:53 -0500 |
| parents | a2c891f7b914 |
| children |
| rev | line source |
|---|---|
| 0 | 1 /* See LICENSE file for copyright and license details. */ |
| 2 | |
| 3 /* appearance */ | |
| 4 static const unsigned int borderpx = 1; /* border pixel of windows */ | |
| 5 static const unsigned int snap = 32; /* snap pixel */ | |
| 6 static const unsigned int gappih = 20; /* horiz inner gap between windows */ | |
| 7 static const unsigned int gappiv = 10; /* vert inner gap between windows */ | |
| 8 static const unsigned int gappoh = 0; /* horiz outer gap between windows and screen edge */ | |
| 9 static const unsigned int gappov = 0; /* vert outer gap between windows and screen edge */ | |
| 10 static int smartgaps = 0; /* 1 means no outer gap when there is only one window */ | |
| 11 static const int showbar = 1; /* 0 means no bar */ | |
| 12 static const int topbar = 1; /* 0 means bottom bar */ | |
| 2 | 13 static const char *fonts[] = { "Iosevka Nerd Font Propo:size=10" }; |
| 14 static const char dmenufont[] = "Iosevka Nerd Font Propo:size=10"; | |
| 15 static const char col_bg[] = "#1d1b2a"; | |
| 16 static const char col_border[] = "#38364b"; | |
| 17 static const char col_fg[] = "#9a9db8"; | |
| 18 static const char col_selfg[] = "#dfdbec"; | |
| 19 static const char col_selbg[] = "#526882"; | |
| 20 static const char col_selbrd[] = "#57708b"; | |
| 0 | 21 static const char *colors[][3] = { |
| 2 | 22 /* fg bg border */ |
| 23 [SchemeNorm] = { col_fg, col_bg, col_border }, | |
| 24 [SchemeSel] = { col_selfg, col_selbg, col_selbrd }, | |
| 0 | 25 }; |
| 26 | |
| 27 /* tagging */ | |
| 28 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | |
| 29 | |
| 30 static const Rule rules[] = { | |
| 31 /* xprop(1): | |
| 32 * WM_CLASS(STRING) = instance, class | |
| 33 * WM_NAME(STRING) = title | |
| 34 */ | |
| 35 /* class instance title tags mask isfloating monitor */ | |
| 36 { "Gimp", NULL, NULL, 0, 1, -1 }, | |
| 37 { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, | |
| 38 }; | |
| 39 | |
| 40 /* layout(s) */ | |
| 41 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ | |
| 42 static const int nmaster = 1; /* number of clients in master area */ | |
| 43 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ | |
| 44 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ | |
| 45 static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */ | |
| 46 | |
| 47 #define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */ | |
| 48 #include "vanitygaps.c" | |
| 49 | |
| 50 static const Layout layouts[] = { | |
| 51 /* symbol arrange function */ | |
| 2 | 52 { "[F]", NULL }, /* first entry is default */ |
| 0 | 53 { "[M]", monocle }, |
| 54 { "[@]", spiral }, | |
| 55 { "[\\]", dwindle }, | |
| 56 { "H[]", deck }, | |
| 57 { "TTT", bstack }, | |
| 58 { "===", bstackhoriz }, | |
| 59 { "HHH", grid }, | |
| 60 { "###", nrowgrid }, | |
| 61 { "---", horizgrid }, | |
| 62 { ":::", gaplessgrid }, | |
| 63 { "|M|", centeredmaster }, | |
| 64 { ">M>", centeredfloatingmaster }, | |
| 65 { "><>", NULL }, /* no layout function means floating behavior */ | |
| 66 { NULL, NULL }, | |
| 67 }; | |
| 68 | |
| 69 /* key definitions */ | |
| 70 #define MODKEY Mod4Mask | |
| 71 #define TAGKEYS(KEY,TAG) \ | |
| 72 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ | |
| 73 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ | |
| 74 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ | |
| 75 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, | |
| 76 | |
| 77 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ | |
| 78 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } | |
| 79 | |
| 80 /* commands */ | |
| 81 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ | |
| 2 | 82 static const char *dmenucmd[] = { |
| 83 "dmenu_run", "-m", dmenumon, | |
| 84 "-nb", col_bg, "-nf", col_fg, | |
| 85 "-sb", col_selbg, "-sf", col_selfg, | |
| 86 NULL | |
| 87 }; | |
|
1
f78c8a98f113
Add new stuff and remove useless overlay in home.nix
Yasuri <yasuri@charliesmp.net>
parents:
0
diff
changeset
|
88 static const char *termcmd[] = { "st", "-e", "tmux", NULL }; |
| 0 | 89 |
| 90 static const Key keys[] = { | |
| 91 /* modifier key function argument */ | |
| 92 { MODKEY, XK_d, spawn, {.v = dmenucmd } }, | |
| 93 { MODKEY, XK_Return, spawn, {.v = termcmd } }, | |
| 94 { MODKEY, XK_b, togglebar, {0} }, | |
| 95 { MODKEY, XK_j, focusstack, {.i = +1 } }, | |
| 96 { MODKEY, XK_k, focusstack, {.i = -1 } }, | |
| 97 { MODKEY, XK_i, incnmaster, {.i = +1 } }, | |
| 98 { MODKEY, XK_p, incnmaster, {.i = -1 } }, | |
| 99 { MODKEY, XK_h, setmfact, {.f = -0.05} }, | |
| 100 { MODKEY, XK_l, setmfact, {.f = +0.05} }, | |
| 101 { MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} }, | |
| 102 { MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} }, | |
| 103 { MODKEY|ShiftMask, XK_o, setcfact, {.f = 0.00} }, | |
| 104 { MODKEY|ShiftMask, XK_Return, zoom, {0} }, | |
| 105 { MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } }, | |
| 106 { MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } }, | |
| 107 { MODKEY|Mod4Mask, XK_i, incrigaps, {.i = +1 } }, | |
| 108 { MODKEY|Mod4Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } }, | |
| 109 { MODKEY|Mod4Mask, XK_o, incrogaps, {.i = +1 } }, | |
| 110 { MODKEY|Mod4Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } }, | |
| 111 { MODKEY|Mod4Mask, XK_6, incrihgaps, {.i = +1 } }, | |
| 112 { MODKEY|Mod4Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } }, | |
| 113 { MODKEY|Mod4Mask, XK_7, incrivgaps, {.i = +1 } }, | |
| 114 { MODKEY|Mod4Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } }, | |
| 115 { MODKEY|Mod4Mask, XK_8, incrohgaps, {.i = +1 } }, | |
| 116 { MODKEY|Mod4Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } }, | |
| 117 { MODKEY|Mod4Mask, XK_9, incrovgaps, {.i = +1 } }, | |
| 118 { MODKEY|Mod4Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } }, | |
| 119 { MODKEY|Mod4Mask, XK_0, togglegaps, {0} }, | |
| 120 { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} }, | |
| 121 { MODKEY, XK_Tab, view, {0} }, | |
| 122 { MODKEY, XK_q, killclient, {0} }, | |
| 123 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, | |
| 124 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, | |
| 125 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, | |
| 126 { MODKEY, XK_space, setlayout, {0} }, | |
| 127 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, | |
| 128 { MODKEY, XK_0, view, {.ui = ~0 } }, | |
| 129 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, | |
| 130 { MODKEY, XK_comma, focusmon, {.i = -1 } }, | |
| 131 { MODKEY, XK_period, focusmon, {.i = +1 } }, | |
| 132 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, | |
| 133 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, | |
| 134 TAGKEYS( XK_1, 0) | |
| 135 TAGKEYS( XK_2, 1) | |
| 136 TAGKEYS( XK_3, 2) | |
| 137 TAGKEYS( XK_4, 3) | |
| 138 TAGKEYS( XK_5, 4) | |
| 139 TAGKEYS( XK_6, 5) | |
| 140 TAGKEYS( XK_7, 6) | |
| 141 TAGKEYS( XK_8, 7) | |
| 142 TAGKEYS( XK_9, 8) | |
| 143 { MODKEY|ShiftMask, XK_q, quit, {0} }, | |
| 144 }; | |
| 145 | |
| 146 /* button definitions */ | |
| 147 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ | |
| 148 static const Button buttons[] = { | |
| 149 /* click event mask button function argument */ | |
| 150 { ClkLtSymbol, 0, Button1, setlayout, {0} }, | |
| 151 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, | |
| 152 { ClkWinTitle, 0, Button2, zoom, {0} }, | |
| 153 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, | |
| 154 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, | |
| 155 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, | |
| 156 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, | |
| 157 { ClkTagBar, 0, Button1, view, {0} }, | |
| 158 { ClkTagBar, 0, Button3, toggleview, {0} }, | |
| 159 { ClkTagBar, MODKEY, Button1, tag, {0} }, | |
| 160 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, | |
| 161 }; | |
| 162 |
