SHOW:
|
|
- or go back to the newest paste.
| 1 | /* See LICENSE file for copyright and license details. */ | |
| 2 | #include <X11/XF86keysym.h> | |
| 3 | #include <push.c> | |
| 4 | ||
| 5 | /* appearance */ | |
| 6 | static const char font[] = "-*-ohsnap.icons-medium-r-*-*-11-*-*-*-*-*-*-*"; | |
| 7 | static const char normbordercolor[] = "#333333"; | |
| 8 | static const char normbgcolor[] = "#202020"; | |
| 9 | static const char normfgcolor[] = "#A7A8AC"; | |
| 10 | static const char selbordercolor[] = "#808185"; | |
| 11 | static const char selbgcolor[] = "#202020"; | |
| 12 | static const char selfgcolor[] = "#006738"; | |
| 13 | static const unsigned int borderpx = 2; /* border pixel of windows */ | |
| 14 | static const unsigned int gappx = 0; /* gap pixel between windows */ | |
| 15 | static const unsigned int snap = 32; /* snap pixel */ | |
| 16 | static const Bool showbar = True; /* False means no bar */ | |
| 17 | static const Bool topbar = True; /* False means bottom bar */ | |
| 18 | ||
| 19 | //COLORS | |
| 20 | #define NUMCOLORS 4 /* Need at least 3*/ | |
| 21 | static const char colors[NUMCOLORS][ColLast][8] = {
| |
| 22 | // border foreground background | |
| 23 | { "#333333", "#A7A8AC", "#202020" }, // 0 = normal
| |
| 24 | { "#5DAAE0", "#84AE00", "#202020" }, // 1 = selected
| |
| 25 | { "#0066ff", "#5DAAE0", "#202020" }, // 2 = urgent/warning
| |
| 26 | { "#ff0000", "#FB7500", "#202020" }, // 3 = error
| |
| 27 | // add more here | |
| 28 | }; | |
| 29 | ||
| 30 | ||
| 31 | /* TAGS */ | |
| 32 | static const char *tags[] = { " £ Web", " ½ Work", " ¨ Utils", " ê Media", };
| |
| 33 | ||
| 34 | static const Rule rules[] = {
| |
| 35 | /* class instance title tags mask isfloating monitor */ | |
| 36 | { "Gimp", NULL, NULL, 0, True, -1 },
| |
| 37 | { "Firefox", NULL, NULL, 1 << 8, False, -1 },
| |
| 38 | }; | |
| 39 | ||
| 40 | /* LAYOUTS */ | |
| 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 Bool resizehints = False; /* True means respect size hints in tiled resizals */ | |
| 44 | ||
| 45 | #include "bstack.c" | |
| 46 | #include "bstackhoriz.c" | |
| 47 | static const Layout layouts[] = {
| |
| 48 | /* symbol arrange function */ | |
| 49 | { "þ", tile }, /* first entry is default */
| |
| 50 | { "ý", NULL }, /* no layout function means floating behavior */
| |
| 51 | { "ÿ", monocle },
| |
| 52 | - | { "ü", bstack },
|
| 52 | + | { "ü", bstack },
|
| 53 | - | { "û", bstackhoriz },
|
| 53 | + | { "û", bstackhoriz },
|
| 54 | }; | |
| 55 | ||
| 56 | /* KEYS */ | |
| 57 | #define MODKEY Mod4Mask | |
| 58 | #define TAGKEYS(KEY,TAG) \ | |
| 59 | { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
| |
| 60 | { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
| |
| 61 | { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
| |
| 62 | { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
| |
| 63 | ||
| 64 | /* helper for spawning shell commands in the pre dwm-5.0 fashion */ | |
| 65 | #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
| |
| 66 | ||
| 67 | /* COMMANDS */ | |
| 68 | static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
| |
| 69 | static const char *termcmd[] = { "urxvtc", NULL };
| |
| 70 | static const char *lock[] = { "lock", NULL };
| |
| 71 | static const char *shutd[] = { "goodbye", NULL};
| |
| 72 | ||
| 73 | /* MUSIC AND VOLUME */ | |
| 74 | ||
| 75 | static const char *voldn[] = { "amixer", "set", "Master", "1%-", "unmute", NULL};
| |
| 76 | static const char *volup[] = { "amixer", "set", "Master", "1%+", "unmute", NULL};
| |
| 77 | static const char *volmt[] = { "amixer", "set", "Master", "nmute", NULL};
| |
| 78 | static const char *mpdpl[] = { "ncmpcpp", "play", NULL};
| |
| 79 | static const char *mpdpa[] = { "ncmpcpp", "pause", NULL};
| |
| 80 | static const char *mpdnx[] = { "ncmpcpp", "next", NULL};
| |
| 81 | static const char *mpdpr[] = { "ncmpcpp", "prev", NULL};
| |
| 82 | ||
| 83 | static Key keys[] = {
| |
| 84 | /* modifier key function argument */ | |
| 85 | { MODKEY, XK_space, spawn, {.v = dmenucmd } },
| |
| 86 | { MODKEY, XK_Return, spawn, {.v = termcmd } },
| |
| 87 | - | { MODKEY|ControlMask, XK_j, pushdown, {0} },
|
| 87 | + | { MODKEY|ControlMask, XK_j, pushdown, {0} },
|
| 88 | - | { MODKEY|ControlMask, XK_k, pushup, {0} },
|
| 88 | + | { MODKEY|ControlMask, XK_k, pushup, {0} },
|
| 89 | { MODKEY, XK_b, togglebar, {0} },
| |
| 90 | { MODKEY, XK_j, focusstack, {.i = +1 } },
| |
| 91 | { MODKEY, XK_k, focusstack, {.i = -1 } },
| |
| 92 | { MODKEY, XK_i, incnmaster, {.i = +1 } },
| |
| 93 | { MODKEY, XK_d, incnmaster, {.i = -1 } },
| |
| 94 | { MODKEY, XK_h, setmfact, {.f = -0.05} },
| |
| 95 | { MODKEY, XK_l, setmfact, {.f = +0.05} },
| |
| 96 | { MODKEY|ShiftMask, XK_Return, zoom, {0} },
| |
| 97 | { MODKEY, XK_Tab, view, {0} },
| |
| 98 | { MODKEY, XK_q, killclient, {0} },
| |
| 99 | { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
| |
| 100 | { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
| |
| 101 | { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
| |
| 102 | - | { MODKEY, XK_s, setlayout, {.v = &layouts[3]} },
|
| 102 | + | { MODKEY, XK_s, setlayout, {.v = &layouts[3]} },
|
| 103 | { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
| |
| 104 | { MODKEY, XK_0, view, {.ui = ~0 } },
| |
| 105 | { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
| |
| 106 | { MODKEY, XK_comma, focusmon, {.i = -1 } },
| |
| 107 | { MODKEY, XK_period, focusmon, {.i = +1 } },
| |
| 108 | { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
| |
| 109 | { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
| |
| 110 | TAGKEYS( XK_1, 0) | |
| 111 | TAGKEYS( XK_2, 1) | |
| 112 | TAGKEYS( XK_3, 2) | |
| 113 | TAGKEYS( XK_4, 3) | |
| 114 | TAGKEYS( XK_5, 4) | |
| 115 | TAGKEYS( XK_6, 5) | |
| 116 | TAGKEYS( XK_7, 6) | |
| 117 | TAGKEYS( XK_8, 7) | |
| 118 | TAGKEYS( XK_9, 8) | |
| 119 | { MODKEY|ShiftMask, XK_q, quit, {0} },
| |
| 120 | ||
| 121 | //Media Keys// | |
| 122 | ||
| 123 | {0, XF86XK_AudioLowerVolume, spawn, {.v = voldn} },
| |
| 124 | {0, XF86XK_AudioRaiseVolume, spawn, {.v = volup} },
| |
| 125 | {0, XF86XK_AudioMute, spawn, {.v = volmt} },
| |
| 126 | {0, XF86XK_AudioPlay, spawn, {.v = mpdpl} },
| |
| 127 | {0, XF86XK_AudioStop, spawn, {.v = mpdpa} },
| |
| 128 | {0, XF86XK_AudioNext, spawn, {.v = mpdnx} },
| |
| 129 | {0, XF86XK_AudioPrev, spawn, {.v = mpdpr} },
| |
| 130 | ||
| 131 | //CUSTOM KEYS// | |
| 132 | ||
| 133 | { MODKEY, XK_F2, spawn, {.v = lock} },
| |
| 134 | { MODKEY, XK_F1, spawn, {.v = shutd} },
| |
| 135 | ||
| 136 | }; | |
| 137 | ||
| 138 | /* button definitions */ | |
| 139 | /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ | |
| 140 | static Button buttons[] = {
| |
| 141 | /* click event mask button function argument */ | |
| 142 | { ClkLtSymbol, 0, Button1, setlayout, {0} },
| |
| 143 | { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
| |
| 144 | { ClkWinTitle, 0, Button2, zoom, {0} },
| |
| 145 | { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
| |
| 146 | { ClkClientWin, MODKEY, Button1, movemouse, {0} },
| |
| 147 | { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
| |
| 148 | { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
| |
| 149 | { ClkTagBar, 0, Button1, view, {0} },
| |
| 150 | { ClkTagBar, 0, Button3, toggleview, {0} },
| |
| 151 | { ClkTagBar, MODKEY, Button1, tag, {0} },
| |
| 152 | { ClkTagBar, MODKEY, Button3, toggletag, {0} },
| |
| 153 | }; |