added my default config file, might need tweaking
This commit is contained in:
parent
cb6069c7e9
commit
ce10409f36
243
config.def.h
243
config.def.h
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
|
static const unsigned int gappx = 6; /* gaps between windows */
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||||
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
|
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
|
||||||
@ -10,21 +11,34 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display
|
|||||||
static const int showsystray = 1; /* 0 means no systray */
|
static const int showsystray = 1; /* 0 means no systray */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const char *fonts[] = { "monospace:size=10" };
|
static const char *fonts[] = {"FiraCode Nerd Font:size=10:antialias=true:hinting=true"};
|
||||||
static const char dmenufont[] = "monospace:size=10";
|
static const char dmenufont[] = "FiraCode Nerd Font:size=10:antialias=true:hinting=true";
|
||||||
static const char col_gray1[] = "#222222";
|
|
||||||
static const char col_gray2[] = "#444444";
|
static const char norm_fg[] = "#D5C4A1";
|
||||||
static const char col_gray3[] = "#bbbbbb";
|
static const char norm_bg[] = "#262626";
|
||||||
static const char col_gray4[] = "#eeeeee";
|
static const char norm_border[] = "#665c54";
|
||||||
static const char col_cyan[] = "#005577";
|
|
||||||
|
static const char sel_fg[] = "#262626";
|
||||||
|
static const char sel_bg[] = "#FE8019";
|
||||||
|
static const char sel_border[] = "#fbf1c7";
|
||||||
|
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
[SchemeNorm] = {norm_fg, norm_bg, norm_border}, // unfocused wins
|
||||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
[SchemeSel] = {sel_fg, sel_bg, sel_border}, // the focused win
|
||||||
|
};
|
||||||
|
|
||||||
|
static const unsigned int baralpha = 0xd0;
|
||||||
|
static const unsigned int borderalpha = 0xd0;
|
||||||
|
|
||||||
|
static const unsigned int alphas[][3] = {
|
||||||
|
/* fg bg border */
|
||||||
|
[SchemeNorm] = {OPAQUE, baralpha, borderalpha},
|
||||||
|
[SchemeSel] = {OPAQUE, baralpha, borderalpha},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* xprop(1):
|
/* xprop(1):
|
||||||
@ -32,91 +46,172 @@ static const Rule rules[] = {
|
|||||||
* WM_NAME(STRING) = title
|
* WM_NAME(STRING) = title
|
||||||
*/
|
*/
|
||||||
/* class instance title tags mask isfloating monitor */
|
/* class instance title tags mask isfloating monitor */
|
||||||
{ "Gimp", NULL, NULL, 0, 1, -1 },
|
{"Gimp", NULL, NULL, 0, 1, -1},
|
||||||
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
|
{"Firefox", NULL, NULL, 1 << 8, 0, -1},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* layout(s) */
|
/* layout(s) */
|
||||||
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
|
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
|
||||||
static const int nmaster = 1; /* number of clients in master area */
|
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 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 int lockfullscreen =1; /* 1 will force focus on the fullscreen window */
|
||||||
static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
|
static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
|
||||||
|
|
||||||
static const Layout layouts[] = {
|
static const Layout layouts[] = {
|
||||||
/* symbol arrange function */
|
/* symbol arrange function */
|
||||||
{ "[]=", tile }, /* first entry is default */
|
{"[]=", tile}, /* first entry is default */
|
||||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
{"><>", NULL}, /* no layout function means floating behavior */
|
||||||
{ "[M]", monocle },
|
{"[M]", monocle},
|
||||||
|
{"TTT", bstack},
|
||||||
|
{"===", bstackhoriz},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* key definitions */
|
/* key definitions */
|
||||||
#define MODKEY Mod1Mask
|
#define MODKEY Mod1Mask
|
||||||
#define TAGKEYS(KEY,TAG) \
|
#define TAGKEYS(CHAIN, KEY, TAG) \
|
||||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
{MODKEY, CHAIN, KEY, view, {.ui = 1 << TAG}}, \
|
||||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
{MODKEY | ControlMask, CHAIN, KEY, toggleview, {.ui = 1 << TAG}}, \
|
||||||
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
{MODKEY | ShiftMask, CHAIN, KEY, tag, {.ui = 1 << TAG}}, \
|
||||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
{MODKEY | ControlMask | ShiftMask, CHAIN, KEY, toggletag, {.ui = 1 << TAG}},
|
||||||
|
|
||||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
|
/* some defaults */
|
||||||
|
#define TERMINAL "st"
|
||||||
|
#define STATUSBAR "dwmblocks"
|
||||||
|
|
||||||
/* commands */
|
/* commands */
|
||||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
static const char *dmenucmd[] = {"dmenu_run", NULL};
|
||||||
static const char *termcmd[] = { "st", NULL };
|
static const char *slockcmd[] = {"slock", NULL};
|
||||||
|
static const char *termcmd[] = {TERMINAL, "-e", "tmux-worker", NULL};
|
||||||
|
|
||||||
|
#include "movestack.c"
|
||||||
|
#include "shift-tools.c"
|
||||||
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
|
static Key keys[] = {
|
||||||
|
/* modifier chain key key function argument */
|
||||||
|
{MODKEY | ControlMask | ShiftMask, -1, XK_apostrophe, quit, {0}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_apostrophe, quit, {1}},
|
||||||
|
|
||||||
|
{MODKEY, -1, XK_apostrophe, killclient, {0}},
|
||||||
|
|
||||||
|
{MODKEY, -1, XK_a, spawn, {.v = dmenucmd}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_Return, spawn, {.v = termcmd}},
|
||||||
|
{MODKEY, -1, XK_Escape, spawn, {.v = slockcmd}},
|
||||||
|
|
||||||
|
{MODKEY, -1, XK_l, shiftviewclients, {.i = +1}},
|
||||||
|
{MODKEY, -1, XK_h, shiftviewclients, {.i = -1}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_l, shiftview, {.i = +1}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_h, shiftview, {.i = -1}},
|
||||||
|
{MODKEY | ControlMask, -1, XK_l, shiftboth, {.i = +1}},
|
||||||
|
{MODKEY | ControlMask, -1, XK_h, shiftboth, {.i = -1}},
|
||||||
|
{MODKEY | ControlMask | ShiftMask, -1, XK_l, shiftswaptags, {.i = +1}},
|
||||||
|
{MODKEY | ControlMask | ShiftMask, -1, XK_h, shiftswaptags, {.i = -1}},
|
||||||
|
|
||||||
|
{MODKEY, -1, XK_j, focusstack, {.i = +1}},
|
||||||
|
{MODKEY, -1, XK_k, focusstack, {.i = -1}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_v, incnmaster, {.i = +1}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_w, incnmaster, {.i = -1}},
|
||||||
|
{MODKEY, -1, XK_minus, setmfact, {.f = -0.05}},
|
||||||
|
{MODKEY, -1, XK_equal, setmfact, {.f = +0.05}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_j, movestack, {.i = +1}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_k, movestack, {.i = -1}},
|
||||||
|
{MODKEY, -1, XK_Return, zoom, {0}},
|
||||||
|
{MODKEY, -1, XK_Tab, view, {0}},
|
||||||
|
|
||||||
|
{MODKEY, XK_w, XK_t, setlayout, {.v = &layouts[0]}},
|
||||||
|
{MODKEY, XK_w, XK_m, setlayout, {.v = &layouts[2]}},
|
||||||
|
{MODKEY, XK_w, XK_b, setlayout, {.v = &layouts[3]}},
|
||||||
|
{MODKEY, XK_w, XK_h, setlayout, {.v = &layouts[4]}},
|
||||||
|
{MODKEY, XK_w, XK_f, setlayout, {.v = &layouts[1]}},
|
||||||
|
{MODKEY, -1, XK_F11, fullscreen, {0}},
|
||||||
|
{MODKEY, -1, XK_space, setlayout, {0}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_space, togglefloating, {0}},
|
||||||
|
{MODKEY, -1, XK_b, togglebar, {0}},
|
||||||
|
|
||||||
|
{MODKEY, -1, XK_0, view, {.ui = ~0}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_0, tag, {.ui = ~0}},
|
||||||
|
{MODKEY, -1, XK_comma, focusmon, {.i = -1}},
|
||||||
|
{MODKEY, -1, XK_period, focusmon, {.i = +1}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_comma, tagmon, {.i = -1}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_period, tagmon, {.i = +1}},
|
||||||
|
|
||||||
|
{MODKEY | ShiftMask, -1, XK_s, spawn, {.v = (const char *[]){"dmenuprompt","Are you sure you want to shutdown?","shutdown -h now", NULL}}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_r, spawn, {.v = (const char *[]){"dmenuprompt", "Are you sure you want to restart?", "shutdown -r now", NULL}}},
|
||||||
|
|
||||||
|
{MODKEY | ShiftMask, -1, XK_o, spawn, {.v = (const char *[]){"set-default-sink", NULL}}},
|
||||||
|
{MODKEY | ShiftMask, -1, XK_i, spawn, {.v = (const char *[]){"set-default-source", NULL}}},
|
||||||
|
|
||||||
|
{MODKEY, XK_m, XK_p, spawn, {.v = (const char *[]){"mpc", "toggle", NULL}}},
|
||||||
|
{MODKEY, XK_m, XK_l, spawn, {.v = (const char *[]){"mpc", "next", NULL}}},
|
||||||
|
{MODKEY, XK_m, XK_h, spawn, {.v = (const char *[]){"mpc", "prev", NULL}}},
|
||||||
|
|
||||||
|
{MODKEY, XK_o, XK_l, spawn, {.v = (const char *[]){TERMINAL, "-e", "lf", NULL}}},
|
||||||
|
{MODKEY, XK_o, XK_f, spawn, {.v = (const char *[]){"firefox-bin", NULL}}},
|
||||||
|
{MODKEY, XK_o, XK_e, spawn, {.v = (const char *[]){"element-desktop", NULL}}},
|
||||||
|
{MODKEY, XK_o, XK_n, spawn, {.v = (const char *[]){TERMINAL, "-e", "ncmpcpp", NULL}}},
|
||||||
|
{MODKEY, XK_o, XK_m, spawn, {.v = (const char *[]){TERMINAL, "-e", "gotop", NULL}}},
|
||||||
|
{MODKEY, XK_o, XK_t, spawn, {.v = (const char *[]){"thunar", NULL}}},
|
||||||
|
|
||||||
|
{MODKEY, XK_d, XK_m, spawn, {.v = (const char *[]){"mounter", NULL}}},
|
||||||
|
{MODKEY, XK_d, XK_c, spawn, {.v = (const char *[]){"dmenumountcifs", NULL}}},
|
||||||
|
{MODKEY, XK_d, XK_u, spawn, {.v = (const char *[]){"unmounter", NULL}}},
|
||||||
|
{MODKEY, XK_d, XK_s, spawn, {.v = (const char *[]){"dmenusearch", "duckduckgo", NULL}}},
|
||||||
|
|
||||||
|
// I can't get dmenu-bluetooth working without SHCMD :(
|
||||||
|
{MODKEY, XK_d, XK_b, spawn, SHCMD("dmenu-bluetooth -i -l 25")},
|
||||||
|
|
||||||
|
// I can't get trayer working without SHCMD :(
|
||||||
|
{MODKEY | ShiftMask, -1, XK_t, spawn, SHCMD("trayer-toggle trayer --edge top --align center --widthtype request " "--padding 6 --SetDockType true --SetPartialStrut true --expand " "true --transparent true --alpha 0 --tint 0x262626 --height 18 &")},
|
||||||
|
|
||||||
|
{MODKEY | ShiftMask, -1, XK_f, spawn, {.v = (const char *[]){"screenlayout", NULL}}},
|
||||||
|
|
||||||
|
{MODKEY, -1, XK_F1, spawn, {.v = (const char *[]){"kbswitcher", NULL}}},
|
||||||
|
|
||||||
|
{0, -1, XF86XK_AudioMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -37 $(pidof " "dwmblocks)")},
|
||||||
|
{0, -1, XF86XK_AudioRaiseVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -37 $(pidof " "dwmblocks)")},
|
||||||
|
{0, -1, XF86XK_AudioLowerVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -37 $(pidof " "dwmblocks)")},
|
||||||
|
{0, -1, XF86XK_AudioMicMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle; kill -37 $(pidof " "dwmblocks)")},
|
||||||
|
{MODKEY, -1, XK_v, spawn, {.v = (const char *[]){"setvol", NULL}}},
|
||||||
|
|
||||||
|
{0, -1, XF86XK_MonBrightnessUp, spawn, {.v = (const char *[]){"mod_backlight", "up", NULL}}},
|
||||||
|
{0, -1, XF86XK_MonBrightnessDown, spawn, {.v = (const char *[]){"mod_backlight", "down", NULL}}},
|
||||||
|
|
||||||
|
TAGKEYS(-1, XK_1, 0)
|
||||||
|
TAGKEYS(-1, XK_2, 1)
|
||||||
|
TAGKEYS(-1, XK_3, 2)
|
||||||
|
TAGKEYS(-1, XK_4, 3)
|
||||||
|
TAGKEYS(-1, XK_5, 4)
|
||||||
|
TAGKEYS(-1, XK_6, 5)
|
||||||
|
TAGKEYS(-1, XK_7, 6)
|
||||||
|
TAGKEYS(-1, XK_8, 7)
|
||||||
|
TAGKEYS(-1, XK_9, 8)
|
||||||
|
|
||||||
static const Key keys[] = {
|
|
||||||
/* modifier key function argument */
|
|
||||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
|
||||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
|
||||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
|
||||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
|
||||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
|
||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
|
||||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
|
||||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
|
||||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
|
||||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
|
||||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
|
||||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
|
||||||
{ MODKEY, XK_space, setlayout, {0} },
|
|
||||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
|
||||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
|
||||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
|
||||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
|
||||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
|
||||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
|
||||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
|
||||||
TAGKEYS( XK_1, 0)
|
|
||||||
TAGKEYS( XK_2, 1)
|
|
||||||
TAGKEYS( XK_3, 2)
|
|
||||||
TAGKEYS( XK_4, 3)
|
|
||||||
TAGKEYS( XK_5, 4)
|
|
||||||
TAGKEYS( XK_6, 5)
|
|
||||||
TAGKEYS( XK_7, 6)
|
|
||||||
TAGKEYS( XK_8, 7)
|
|
||||||
TAGKEYS( XK_9, 8)
|
|
||||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
||||||
static const Button buttons[] = {
|
* ClkClientWin, or ClkRootWin */
|
||||||
|
static Button buttons[] = {
|
||||||
/* click event mask button function argument */
|
/* click event mask button function argument */
|
||||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
{ClkLtSymbol, 0, Button1, setlayout, {0}},
|
||||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
{ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}},
|
||||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
{ClkWinTitle, 0, Button2, zoom, {0}},
|
||||||
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
{ClkStatusText, 0, Button1, sigstatusbar, {.i = 1}},
|
||||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
{ClkStatusText, 0, Button2, sigstatusbar, {.i = 2}},
|
||||||
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
{ClkStatusText, 0, Button3, sigstatusbar, {.i = 3}},
|
||||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
{ClkStatusText, 0, Button4, sigstatusbar, {.i = 4}},
|
||||||
{ ClkTagBar, 0, Button1, view, {0} },
|
{ClkStatusText, 0, Button5, sigstatusbar, {.i = 5}},
|
||||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
{ClkStatusText, ShiftMask, Button1, sigstatusbar, {.i = 6}},
|
||||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
{ClkClientWin, MODKEY, Button1, movemouse, {0}},
|
||||||
{ ClkTagBar, MODKEY, Button3, toggletag, {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}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user