diff options
-rw-r--r-- | config.h | 113 | ||||
-rwxr-xr-x | dwm | bin | 68584 -> 68616 bytes |
2 files changed, 55 insertions, 58 deletions
@@ -1,6 +1,6 @@ /* See LICENSE file for copyright and license details. */ -/* appearance */ +/* Appearance. */ static unsigned int borderpx = 5; /* border pixel of windows */ static unsigned int snap = 32; /* snap pixel */ static unsigned int gappx = 15; @@ -22,59 +22,25 @@ static char sel_bor_col[] = "#83a598"; static char sel_fg_col[] = "#282828"; static char *colors[][3] = { - /* fg bg border */ + /* Scheme, fg, bg, border. */ [SchemeNorm] = { norm_fg_col, norm_bg_col, norm_bor_col }, [SchemeSel] = { sel_fg_col, sel_bg_col, sel_bor_col }, }; -/* tagging */ -static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; - -static const Rule rules[] = { - /* xprop(1): - * WM_CLASS(STRING) = instance, class - * WM_NAME(STRING) = title - */ - /* class instance title tags mask isfloating monitor */ - { "Gimp", NULL, NULL, 0, 1, -1 }, - { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, -}; - -/* layout(s) */ -static 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 = 0; /* 1 means respect size hints in tiled resizals */ -static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ +/* Layouts. */ +static 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 = 0; /* 1 means respect size hints in tiled resizals. */ +static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ static const Layout layouts[] = { /* Symbol, layout. */ - { "[]=", tile }, /* First entry is default. */ - { "><>", NULL }, /* No layout function means floating behavior. */ - { "[M]", monocle }, + { "[]=", tile }, /* First entry is default. */ + { "><>", NULL }, /* No layout function means floating behavior. */ + { "[M]", monocle }, /* Active window fills all available space. */ }; -/* key definitions */ -#define MODKEY Mod4Mask -#define TAGKEYS(KEY,TAG) \ - { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ - { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, - -/* helper for spawning shell commands in the pre dwm-5.0 fashion */ -#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } - -/* Commands. */ -static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL }; -static const char *termcmd[] = { "/home/c/.local/bin/launchers/term.sh", NULL }; -static const char *webcmd[] = { "/home/c/.local/bin/launchers/web.sh", NULL }; -static const char *passcmd[] = { "/sbin/passmenu", NULL }; -static const char *bmkscmd[] = { "/home/c/.local/bin/bmks", NULL }; -static const char *bmkaddcmd[]= { "/home/c/.local/bin/bmks", "dadd", NULL }; - -static const char *papercmd[] = { "/home/c/.local/bin/wallpaper.sh", NULL }; - +/* Xresources. */ ResourcePref resources[] = { {"norm_bg_col", STRING, &norm_bg_col }, {"norm_bor_col", STRING, &norm_bor_col }, @@ -92,6 +58,37 @@ ResourcePref resources[] = { {"dmenufont", STRING, &dmenufont }, }; +/* Tags. */ +static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; + +static const Rule rules[] = { + /* Class instance, title, tags mask, is floating, monitor. */ + { "Gimp", NULL, NULL, 0, 1, -1 }, + { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, +}; + +/* Key definitions. */ +#define MODKEY Mod4Mask +#define TAGKEYS(KEY,TAG) \ + { MODKEY, KEY, view, {.ui = 1 << TAG} }, /* View tag tag. */ \ + { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, /* Toggle view tag. */ \ + { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, /* Add window to tag. */ \ + { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, /* Add window to tag and toggle view tag. */ + +/* Helper for spawning shell commands in the pre dwm-5.0 fashion. */ +#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } + +/* Commands. */ +static char dmenumon[2] = "0"; /* Component of dmenucmd, manipulated in spawn(). */ +static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL }; +static const char *termcmd[] = { "$SCRIPTS/launchers/term.sh", NULL }; +static const char *webcmd[] = { "$SCRIPTS/launchers/web.sh", NULL }; +static const char *passcmd[] = { "/sbin/passmenu", NULL }; +static const char *bmkscmd[] = { "$SCRIPTS/bmks", NULL }; +static const char *bmkaddcmd[]= { "$SCRIPTS/bmks", "dadd", NULL }; + +static const char *papercmd[] = { "$SCRIPTS/wallpaper.sh", NULL }; + #include "movestack.c" static const Key keys[] = { @@ -156,19 +153,19 @@ static const Key keys[] = { }; /* Button definitions. */ -/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ +/* A click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin. */ static const Button buttons[] = { - /* click event mask button function argument */ - { ClkLtSymbol, 0, Button1, setlayout, {0} }, - { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, - { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, - { ClkClientWin, MODKEY, Button1, movemouse, {0} }, - { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, - { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, - { ClkTagBar, 0, Button1, view, {0} }, - { ClkTagBar, 0, Button3, toggleview, {0} }, - { ClkTagBar, MODKEY, Button1, tag, {0} }, - { ClkTagBar, MODKEY, Button3, toggletag, {0} }, + /* Click, mask, button, function, argument. */ + { ClkLtSymbol, 0, Button1, setlayout, {0} }, + { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, + { ClkWinTitle, 0, Button2, zoom, {0} }, + { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, + { ClkClientWin, MODKEY, Button1, movemouse, {0} }, + { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, + { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, + { ClkTagBar, 0, Button1, view, {0} }, + { ClkTagBar, 0, Button3, toggleview, {0} }, + { ClkTagBar, MODKEY, Button1, tag, {0} }, + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, }; |