| dwm-keymodes-vim-config.h - sites - public wiki contents of suckless.org | |
| git clone git://git.suckless.org/sites | |
| Log | |
| Files | |
| Refs | |
| --- | |
| dwm-keymodes-vim-config.h (11712B) | |
| --- | |
| 1 /* See LICENSE file for copyright and license details. */ | |
| 2 | |
| 3 /* appearance */ | |
| 4 static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*… | |
| 5 static const char normbordercolor[] = "#1f1f1f"; | |
| 6 static const char normbgcolor[] = "#1f1f1f"; | |
| 7 static const char normfgcolor[] = "#c0c0c0"; | |
| 8 static const char selbordercolor[] = "#ff8000"; | |
| 9 static const char selbgcolor[] = "#1f1f1f"; | |
| 10 static const char selfgcolor[] = "#ff8000"; | |
| 11 static const unsigned int borderpx = 1; /* border pixel of windo… | |
| 12 static const unsigned int snap = 32; /* snap pixel */ | |
| 13 static const Bool showbar = True; /* False means no bar */ | |
| 14 static const Bool topbar = True; /* False means bottom ba… | |
| 15 | |
| 16 /* tagging */ | |
| 17 static const char *tags[] = { "1", "2", "3", "4", "5" }; | |
| 18 | |
| 19 /* include(s) depending on the tags array */ | |
| 20 #include "flextile.h" | |
| 21 | |
| 22 /* include(s) defining functions */ | |
| 23 #include "keymodes.pre.h" | |
| 24 | |
| 25 static const Rule rules[] = { | |
| 26 /* class instance title tags mask isfloating … | |
| 27 { "Gimp", NULL, NULL, 0, True, … | |
| 28 { "Firefox", NULL, NULL, 1 << 4, False, … | |
| 29 }; | |
| 30 | |
| 31 /* layout(s) */ | |
| 32 static const float mfact = 0.6; /* factor of master area size [0.05… | |
| 33 static const Bool resizehints = True; /* True means respect size hints i… | |
| 34 static const int layoutaxis[] = { | |
| 35 1, /* layout axis: 1 = x, 2 = y; negative values mirror the l… | |
| 36 2, /* master axis: 1 = x (from left to right), 2 = y (from to… | |
| 37 2, /* stack axis: 1 = x (from left to right), 2 = y (from to… | |
| 38 }; | |
| 39 | |
| 40 static const Layout layouts[] = { | |
| 41 /* symbol arrange function */ | |
| 42 { "[M]", monocle }, /* first entry is default */ | |
| 43 { "[]=", tile }, | |
| 44 { "><>", NULL }, /* no layout function means floating be… | |
| 45 }; | |
| 46 | |
| 47 /* key definitions */ | |
| 48 #define MODKEY Mod1Mask | |
| 49 #define TAGKEYS(KEY,TAG) \ | |
| 50 { MODKEY, KEY, view, {.ui =… | |
| 51 { MODKEY|ControlMask, KEY, toggleview, {.ui =… | |
| 52 { MODKEY|ShiftMask, KEY, tag, {.ui =… | |
| 53 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui =… | |
| 54 | |
| 55 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ | |
| 56 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } | |
| 57 | |
| 58 /* commands */ | |
| 59 static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normb… | |
| 60 static const char *haltcmd[] = { "sudo", "halt", NULL }; | |
| 61 static const char *helpcmd[] = { "uxterm", "-e", "man", "dwm", NULL }; | |
| 62 static const char *sleepcmd[] = { "sudo", "pm-suspend", NULL }; | |
| 63 static const char *termcmd[] = { "uxterm", NULL }; | |
| 64 static const char *audio1cmd[] = { "amixer", "--quiet", "sset", "Master… | |
| 65 static const char *audio2cmd[] = { "amixer", "--quiet", "sset", "Master… | |
| 66 static const char *audio3cmd[] = { "amixer", "--quiet", "sset", "Master… | |
| 67 | |
| 68 #include <X11/XF86keysym.h> | |
| 69 static Key keys[] = { | |
| 70 /* modifier key function argum… | |
| 71 { 0, XK_Super_L, setkeymode, {.ui … | |
| 72 { 0, XF86XK_AudioRaiseVolume, spawn, {.v =… | |
| 73 { 0, XF86XK_AudioLowerVolume, spawn, {.v =… | |
| 74 { MODKEY|ShiftMask, XK_m, spawn, {.v =… | |
| 75 { MODKEY, XK_Down, focusstack, {.i =… | |
| 76 { MODKEY, XK_Up, focusstack, {.i =… | |
| 77 { MODKEY, XK_Tab, view, {0} }, | |
| 78 { MODKEY, XK_f, setlayout, {.v =… | |
| 79 { MODKEY, XK_space, setlayout, {0} }, | |
| 80 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, | |
| 81 { MODKEY, XK_0, view, {.ui … | |
| 82 { MODKEY|ShiftMask, XK_0, tag, {.ui … | |
| 83 { MODKEY, XK_comma, focusmon, {.i =… | |
| 84 { MODKEY, XK_period, focusmon, {.i =… | |
| 85 { MODKEY|ShiftMask, XK_comma, tagmon, {.i =… | |
| 86 { MODKEY|ShiftMask, XK_period, tagmon, {.i =… | |
| 87 TAGKEYS( XK_1, 0) | |
| 88 TAGKEYS( XK_2, 1) | |
| 89 TAGKEYS( XK_3, 2) | |
| 90 TAGKEYS( XK_4, 3) | |
| 91 TAGKEYS( XK_5, 4) | |
| 92 }; | |
| 93 | |
| 94 static const int h_master[] = {+1, 2, 2}; | |
| 95 static const int j_master[] = {-2, 1, 1}; | |
| 96 static const int k_master[] = {+2, 1, 1}; | |
| 97 static const int l_master[] = {-1, 2, 2}; | |
| 98 | |
| 99 static Key cmdkeys[] = { | |
| 100 /* modifier keys function argument */ | |
| 101 { 0, XK_Escape, clearcmd, {0} }, | |
| 102 { ControlMask, XK_c, clearcmd, {0} }, | |
| 103 { 0, XK_i, setkeymode, {.ui = INSER… | |
| 104 { 0, XF86XK_Standby, spawn, {.v = sleepc… | |
| 105 }; | |
| 106 static Command commands[] = { | |
| 107 /* modifier (4 keys) keysyms (4 keys) … | |
| 108 { {0, 0, 0, 0}, {XK_g, XK_t, … | |
| 109 { {0, ShiftMask, 0, 0}, {XK_g, XK_t, … | |
| 110 { {ControlMask, 0, 0, 0}, {XK_w, XK_c, … | |
| 111 { {ControlMask, 0, 0, 0}, {XK_w, XK_h, … | |
| 112 { {ControlMask, 0, 0, 0}, {XK_w, XK_j, … | |
| 113 { {ControlMask, 0, 0, 0}, {XK_w, XK_k, … | |
| 114 { {ControlMask, 0, 0, 0}, {XK_w, XK_l, … | |
| 115 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_h, … | |
| 116 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_j, … | |
| 117 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_k, … | |
| 118 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_l, … | |
| 119 { {ControlMask, 0, 0, 0}, {XK_w, XK_o, … | |
| 120 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_o, … | |
| 121 { {ControlMask, 0, 0, 0}, {XK_w, XK_s, … | |
| 122 { {ControlMask, 0, 0, 0}, {XK_w, XK_t, … | |
| 123 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_t, … | |
| 124 { {ControlMask, 0, 0, 0}, {XK_w, XK_v, … | |
| 125 { {ControlMask, 0, 0, 0}, {XK_w, XK_x, … | |
| 126 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_x, … | |
| 127 { {ControlMask, 0, 0, 0}, {XK_w, XK_w, … | |
| 128 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_w, … | |
| 129 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_0, … | |
| 130 { {ControlMask, 0, 0, 0}, {XK_w, XK_les… | |
| 131 { {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_les… | |
| 132 { {ControlMask, 0, 0, 0}, {XK_w, XK_min… | |
| 133 { {ControlMask, 0, 0, 0}, {XK_w, XK_plu… | |
| 134 { {ShiftMask, 0, 0, 0}, {XK_period, XK_e, … | |
| 135 { {ShiftMask, 0, 0, 0}, {XK_period, XK_o, … | |
| 136 { {ShiftMask, ShiftMask, 0, 0}, {XK_period, XK_1, … | |
| 137 { {ControlMask, 0, ShiftMask, 0}, {XK_w, XK_1, … | |
| 138 { {ControlMask, 0, ShiftMask, 0}, {XK_w, XK_2, … | |
| 139 { {ControlMask, 0, ShiftMask, 0}, {XK_w, XK_3, … | |
| 140 { {ControlMask, 0, ShiftMask, 0}, {XK_w, XK_4, … | |
| 141 { {ControlMask, 0, ShiftMask, 0}, {XK_w, XK_5, … | |
| 142 { {0, 0, 0, 0}, {XK_1, XK_g, … | |
| 143 { {0, 0, 0, 0}, {XK_2, XK_g, … | |
| 144 { {0, 0, 0, 0}, {XK_3, XK_g, … | |
| 145 { {0, 0, 0, 0}, {XK_4, XK_g, … | |
| 146 { {0, 0, 0, 0}, {XK_5, XK_g, … | |
| 147 { {ShiftMask, 0, 0, 0}, {XK_period, XK_h, … | |
| 148 { {ShiftMask, 0, 0, 0}, {XK_period, XK_q, … | |
| 149 { {ShiftMask, 0, 0, 0}, {XK_period, XK_b, … | |
| 150 { {ShiftMask, 0, 0, 0}, {XK_period, XK_b, … | |
| 151 { {ShiftMask, 0, ShiftMask, 0}, {XK_period, XK_b, … | |
| 152 { {ShiftMask, 0, ShiftMask, 0}, {XK_period, XK_q, … | |
| 153 { {ShiftMask, 0, 0, 0}, {XK_period, XK_g, … | |
| 154 }; | |
| 155 | |
| 156 /* button definitions */ | |
| 157 /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, o… | |
| 158 static Button buttons[] = { | |
| 159 /* click event mask button function… | |
| 160 }; | |
| 161 | |
| 162 /* include(s) depending on the configuration variables */ | |
| 163 #include "keymodes.post.h" |