2024-01-31 01:19:44 +01:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
2024-02-03 15:38:38 +01:00
|
|
|
#define TERM "st"
|
|
|
|
#define TERM_FLAG_NAME "-n"
|
|
|
|
#define TERM_FLAG_EXEC "-e"
|
|
|
|
#define TERM_START "tmux"
|
|
|
|
|
|
|
|
#define STATUSBAR "dwmblocks"
|
2024-01-31 12:10:24 +01:00
|
|
|
|
|
|
|
#define BROWSER "brave-browser"
|
2024-02-03 16:11:18 +01:00
|
|
|
#define BROWSER_FLAG_INCOG "--incognito"
|
2024-01-31 12:10:24 +01:00
|
|
|
#define BROWSER_FLAG_1 "--enable-blink-features=MiddleClickAutoscroll"
|
|
|
|
|
2024-01-31 01:19:44 +01:00
|
|
|
/* appearance */
|
2024-02-03 15:38:38 +01:00
|
|
|
static const unsigned int borderpx = 2;
|
|
|
|
static const unsigned int snap = 33;
|
|
|
|
static const int showbar = 1;
|
2024-02-04 10:24:33 +01:00
|
|
|
static const int topbar = 1;
|
2024-02-03 15:38:38 +01:00
|
|
|
static const int focusonwheel = 1;
|
|
|
|
static int floatposgrid_x = 5;
|
|
|
|
static int floatposgrid_y = 3;
|
2024-02-03 19:06:33 +01:00
|
|
|
static const unsigned int systrayspacing = 3;
|
2024-02-03 16:11:18 +01:00
|
|
|
static const int showsystray = 1;
|
2024-01-31 01:19:44 +01:00
|
|
|
|
|
|
|
/* Indicators: see patch/bar_indicators.h for options */
|
2024-02-03 16:11:18 +01:00
|
|
|
static int tagindicatortype = INDICATOR_NONE;
|
2024-01-31 01:19:44 +01:00
|
|
|
static int tiledindicatortype = INDICATOR_NONE;
|
2024-02-03 16:11:18 +01:00
|
|
|
static int floatindicatortype = INDICATOR_NONE;
|
|
|
|
|
2024-02-06 10:25:45 +01:00
|
|
|
static const char font[] = "FiraCode Nerd Font 12";
|
2024-01-31 01:19:44 +01:00
|
|
|
|
2024-01-31 12:02:49 +01:00
|
|
|
#define NOCOLOR "#FF0000"
|
|
|
|
#define COLOR0 "#15161E"
|
|
|
|
#define COLOR1 "#f7768e"
|
|
|
|
#define COLOR2 "#9ece6a"
|
|
|
|
#define COLOR3 "#e0af68"
|
|
|
|
#define COLOR4 "#7aa2f7"
|
|
|
|
#define COLOR5 "#bb9af7"
|
|
|
|
#define COLOR6 "#7dcfff"
|
|
|
|
#define COLOR7 "#a9b1d6"
|
|
|
|
#define COLOR8 "#414868"
|
|
|
|
#define COLOR9 "#f7768e"
|
|
|
|
#define COLOR10 "#9ece6a"
|
|
|
|
#define COLOR11 "#e0af68"
|
|
|
|
#define COLOR12 "#7aa2f7"
|
|
|
|
#define COLOR13 "#bb9af7"
|
|
|
|
#define COLOR14 "#7dcfff"
|
|
|
|
#define COLOR15 "#c0caf5"
|
|
|
|
|
|
|
|
#define BORDERNORM "#383c4a"
|
|
|
|
#define BORDERSEL COLOR4
|
|
|
|
|
|
|
|
static char normfgcolor[] = COLOR15;
|
|
|
|
static char normbgcolor[] = COLOR0;
|
|
|
|
static char normbordercolor[] = BORDERNORM;
|
|
|
|
static char normfloatcolor[] = BORDERNORM;
|
|
|
|
|
|
|
|
static char selfgcolor[] = COLOR15;
|
|
|
|
static char selbgcolor[] = COLOR4;
|
|
|
|
static char selbordercolor[] = BORDERSEL;
|
|
|
|
static char selfloatcolor[] = BORDERSEL;
|
|
|
|
|
|
|
|
static char titlenormfgcolor[] = COLOR7;
|
|
|
|
static char titlenormbgcolor[] = COLOR0;
|
|
|
|
static char titlenormbordercolor[] = NOCOLOR;
|
|
|
|
static char titlenormfloatcolor[] = NOCOLOR;
|
|
|
|
|
|
|
|
static char titleselfgcolor[] = COLOR7;
|
|
|
|
static char titleselbgcolor[] = COLOR0;
|
|
|
|
static char titleselbordercolor[] = NOCOLOR;
|
|
|
|
static char titleselfloatcolor[] = NOCOLOR;
|
|
|
|
|
|
|
|
static char tagsnormfgcolor[] = COLOR7;
|
|
|
|
static char tagsnormbgcolor[] = COLOR0;
|
|
|
|
static char tagsnormbordercolor[] = NOCOLOR;
|
|
|
|
static char tagsnormfloatcolor[] = NOCOLOR;
|
|
|
|
|
|
|
|
static char tagsselfgcolor[] = COLOR0;
|
|
|
|
static char tagsselbgcolor[] = COLOR4;
|
|
|
|
static char tagsselbordercolor[] = NOCOLOR;
|
|
|
|
static char tagsselfloatcolor[] = NOCOLOR;
|
|
|
|
|
|
|
|
static char hidnormfgcolor[] = NOCOLOR;
|
|
|
|
static char hidselfgcolor[] = NOCOLOR;
|
|
|
|
static char hidnormbgcolor[] = NOCOLOR;
|
|
|
|
static char hidselbgcolor[] = NOCOLOR;
|
|
|
|
|
|
|
|
static char urgfgcolor[] = COLOR0;
|
|
|
|
static char urgbgcolor[] = COLOR1;
|
|
|
|
static char urgbordercolor[] = COLOR1;
|
|
|
|
static char urgfloatcolor[] = COLOR1;
|
|
|
|
|
|
|
|
static char scratchselfgcolor[] = COLOR15;
|
|
|
|
static char scratchselbgcolor[] = COLOR4;
|
|
|
|
static char scratchselbordercolor[] = BORDERSEL;
|
|
|
|
static char scratchselfloatcolor[] = BORDERSEL;
|
|
|
|
|
|
|
|
static char scratchnormfgcolor[] = COLOR15;
|
|
|
|
static char scratchnormbgcolor[] = COLOR0;
|
|
|
|
static char scratchnormbordercolor[] = BORDERNORM;
|
|
|
|
static char scratchnormfloatcolor[] = BORDERNORM;
|
|
|
|
|
|
|
|
static const unsigned int baralpha = 0xcc;
|
2024-01-31 01:19:44 +01:00
|
|
|
static const unsigned int borderalpha = OPAQUE;
|
|
|
|
static const unsigned int alphas[][3] = {
|
2024-02-03 15:38:38 +01:00
|
|
|
/* fg bg border */
|
|
|
|
[SchemeNorm] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeSel] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeTitleNorm] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeTitleSel] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeTagsNorm] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeTagsSel] = { OPAQUE, OPAQUE, borderalpha },
|
|
|
|
[SchemeHidNorm] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeHidSel] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeUrg] = { OPAQUE, OPAQUE, borderalpha },
|
|
|
|
[SchemeScratchSel] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeScratchNorm] = { OPAQUE, baralpha, borderalpha },
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static char *colors[][ColCount] = {
|
2024-02-03 16:11:18 +01:00
|
|
|
/* fg bg border float */
|
|
|
|
[SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor, normfloatcolor },
|
|
|
|
[SchemeSel] = { selfgcolor, selbgcolor, selbordercolor, selfloatcolor },
|
|
|
|
[SchemeTitleNorm] = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor },
|
|
|
|
[SchemeTitleSel] = { titleselfgcolor, titleselbgcolor, titleselbordercolor, titleselfloatcolor },
|
|
|
|
[SchemeTagsNorm] = { tagsnormfgcolor, tagsnormbgcolor, tagsnormbordercolor, tagsnormfloatcolor },
|
|
|
|
[SchemeTagsSel] = { tagsselfgcolor, tagsselbgcolor, tagsselbordercolor, tagsselfloatcolor },
|
|
|
|
[SchemeHidNorm] = { hidnormfgcolor, hidnormbgcolor, NOCOLOR, NOCOLOR },
|
|
|
|
[SchemeHidSel] = { hidselfgcolor, hidselbgcolor, NOCOLOR, NOCOLOR },
|
|
|
|
[SchemeUrg] = { urgfgcolor, urgbgcolor, urgbordercolor, urgfloatcolor },
|
|
|
|
[SchemeScratchSel] = { scratchselfgcolor, scratchselbgcolor, scratchselbordercolor, scratchselfloatcolor },
|
2024-02-03 15:38:38 +01:00
|
|
|
[SchemeScratchNorm] = { scratchnormfgcolor, scratchnormbgcolor, scratchnormbordercolor, scratchnormfloatcolor },
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
2024-02-03 15:38:38 +01:00
|
|
|
static const char *layoutmenu_cmd = "xmenulayout";
|
|
|
|
// static const char *layoutxmenu = "$HOME/.local/libexec/dwm/xmenulayout"; // TODO: Patch layoutmenu to accept arguments
|
|
|
|
// static const char *layoutdmenu = "$HOME/.local/libexec/dwm/dmenulayout"; // TODO: Patch layoutmenu to accept shell commands
|
|
|
|
|
2024-01-31 01:19:44 +01:00
|
|
|
static const char *const autostart[] = {
|
2024-02-04 14:19:13 +01:00
|
|
|
"sh", "-c", "run-parts $HOME/.local/libexec/dwm/autorun.d", NULL,
|
2024-02-06 10:33:54 +01:00
|
|
|
"logwrap", "pipewire", NULL,
|
|
|
|
"logwrap", "wireplumber", NULL,
|
|
|
|
"logwrap", "pipewire", "-c", "pipewire-pulse.conf", NULL,
|
|
|
|
"logwrap", "dunst", NULL,
|
|
|
|
"logwrap", "picom", NULL,
|
2024-02-04 14:19:13 +01:00
|
|
|
"unclutter", "-noevents", "-idle", "3", NULL,
|
2024-02-06 10:33:54 +01:00
|
|
|
"logwrap", "syncthingtray", NULL,
|
2024-02-04 14:19:13 +01:00
|
|
|
"sh", "-c", "$HOME/.local/libexec/daemons/remapd", NULL,
|
2024-02-06 10:33:54 +01:00
|
|
|
"sh", "-c", "env PATH=\"$HOME/.local/libexec/statusbar:$PATH\" logwrap dwmblocks", NULL,
|
2024-02-04 14:19:13 +01:00
|
|
|
"sh", "-c", "$HOME/.local/libexec/dwm/locker", NULL,
|
2024-02-03 15:38:38 +01:00
|
|
|
NULL
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
2024-02-03 15:38:38 +01:00
|
|
|
static const char *spterm[] = { "t", TERM, "-n", "spterm", TERM_FLAG_EXEC, "tmux", NULL };
|
2024-02-05 15:53:02 +01:00
|
|
|
static const char *spfile[] = { "f", TERM, "-n", "spfile", TERM_FLAG_EXEC, "lfX", NULL };
|
2024-02-03 19:36:05 +01:00
|
|
|
static const char *spproc[] = { "p", TERM, "-n", "spproc", TERM_FLAG_EXEC, "htop", NULL };
|
|
|
|
static const char *spvolm[] = { "v", TERM, "-n", "spvolm", TERM_FLAG_EXEC, "pulsemixer", NULL };
|
|
|
|
static const char *sphelp[] = { "h", TERM, "-n", "sphelp", TERM_FLAG_EXEC, "/bin/sh", "-c", "glow -p -s $XDG_CONFIG_HOME/glow/style.json /usr/share/dwm/dwm.md", NULL };
|
2024-02-03 15:38:38 +01:00
|
|
|
static const char *spinet[] = { "i", TERM, "-n", "spinet", TERM_FLAG_EXEC, "nmtui", NULL };
|
2024-02-03 19:36:05 +01:00
|
|
|
static const char *spwiki[] = { "w", TERM, "-n", "spwiki", TERM_FLAG_EXEC, "zk", "edit", "-i", NULL };
|
2024-02-03 15:38:38 +01:00
|
|
|
static const char *spcalc[] = { "c", TERM, "-n", "spcalc", TERM_FLAG_EXEC, "bc", "-li", NULL };
|
|
|
|
|
2024-01-31 01:19:44 +01:00
|
|
|
static char *tagicons[][NUMTAGS] =
|
|
|
|
{
|
2024-02-03 15:38:38 +01:00
|
|
|
[DEFAULT_TAGS] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" },
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static const Rule rules[] = {
|
2024-02-03 15:38:38 +01:00
|
|
|
/* xprop(1):
|
|
|
|
* WM_CLASS(STRING) = instance, class
|
|
|
|
* WM_NAME(STRING) = title
|
|
|
|
* WM_WINDOW_ROLE(STRING) = role
|
|
|
|
* _NET_WM_WINDOW_TYPE(ATOM) = wintype
|
|
|
|
*/
|
|
|
|
RULE(.wintype = WTYPE "DIALOG", .isfloating = 1)
|
|
|
|
RULE(.wintype = WTYPE "UTILITY", .isfloating = 1)
|
|
|
|
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
|
|
|
|
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
|
2024-02-05 11:51:06 +01:00
|
|
|
RULE(.role = "pop-up", .isfloating = 1)
|
2024-02-03 15:38:38 +01:00
|
|
|
RULE(.class = "St", .isterminal = 1)
|
2024-02-06 11:25:42 +01:00
|
|
|
RULE(.instance = "gcr-prompter", .floatpos = "50% 50% 308W 214H")
|
2024-02-03 15:38:38 +01:00
|
|
|
RULE(.instance = "sphelp", .scratchkey = 'h', .isfloating = 1, .floatpos = "50% 50% 40% 80%")
|
|
|
|
RULE(.instance = "spcalc", .scratchkey = 'c', .isfloating = 1, .floatpos = "50% 50% 40% 80%")
|
|
|
|
RULE(.instance = "spterm", .scratchkey = 't', .isfloating = 1, .floatpos = "50% 50% 80% 80%")
|
|
|
|
RULE(.instance = "spfile", .scratchkey = 'f', .isfloating = 1, .floatpos = "50% 50% 80% 80%")
|
|
|
|
RULE(.instance = "spproc", .scratchkey = 'p', .isfloating = 1, .floatpos = "50% 50% 80% 80%")
|
|
|
|
RULE(.instance = "spwiki", .scratchkey = 'w', .isfloating = 1, .floatpos = "50% 50% 80% 80%")
|
2024-02-03 16:48:48 +01:00
|
|
|
RULE(.instance = "spvolm", .scratchkey = 'v', .isfloating = 1, .floatpos = "100% 100% 900W 600H")
|
|
|
|
RULE(.instance = "spinet", .scratchkey = 'i', .isfloating = 1, .floatpos = "100% 100% 800W 800H")
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Bar rules allow you to configure what is shown where on the bar, as well as
|
|
|
|
* introducing your own bar modules.
|
|
|
|
*
|
|
|
|
* monitor:
|
|
|
|
* -1 show on all monitors
|
|
|
|
* 0 show on monitor 0
|
|
|
|
* 'A' show on active monitor (i.e. focused / selected) (or just -1 for active?)
|
|
|
|
* bar - bar index, 0 is default, 1 is extrabar
|
|
|
|
* alignment - how the module is aligned compared to other modules
|
|
|
|
* widthfunc, drawfunc, clickfunc - providing bar module width, draw and click functions
|
|
|
|
* name - does nothing, intended for visual clue and for logging / debugging
|
|
|
|
*/
|
|
|
|
static const BarRule barrules[] = {
|
2024-02-03 19:12:29 +01:00
|
|
|
/* monitor bar alignment widthfunc drawfunc clickfunc hoverfunc name */
|
|
|
|
{ -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, hover_tags, "tags" },
|
|
|
|
{ 'A', 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" },
|
|
|
|
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" },
|
|
|
|
{ 'A', 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_status, NULL, "status" },
|
|
|
|
{ -1, 0, BAR_ALIGN_NONE, width_wintitle, draw_wintitle, click_wintitle, NULL, "wintitle" },
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* layout(s) */
|
2024-02-03 16:11:18 +01:00
|
|
|
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 nstack = 0; /* number of clients in primary stack area */
|
|
|
|
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
|
2024-01-31 01:19:44 +01:00
|
|
|
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
2024-02-03 16:11:18 +01:00
|
|
|
static const int decorhints = 1; /* 1 means respect decoration hints */
|
2024-01-31 01:19:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const Layout layouts[] = {
|
2024-02-03 15:38:38 +01:00
|
|
|
/* symbol arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis, symbol func } */
|
|
|
|
{ "[]=", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout
|
|
|
|
{ "><>", NULL, {0} }, /* no layout function means floating behavior */
|
|
|
|
{ "[M]", flextile, { -1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL } }, // monocle
|
|
|
|
{ "|||", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout
|
|
|
|
{ ">M>", flextile, { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // floating master
|
|
|
|
{ "[D]", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL } }, // deck
|
|
|
|
{ "TTT", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // bstack
|
|
|
|
{ "===", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // bstackhoriz
|
|
|
|
{ "|M|", flextile, { -1, -1, SPLIT_CENTERED_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, TOP_TO_BOTTOM, NULL } }, // centeredmaster
|
|
|
|
{ "-M-", flextile, { -1, -1, SPLIT_CENTERED_HORIZONTAL, TOP_TO_BOTTOM, LEFT_TO_RIGHT, LEFT_TO_RIGHT, NULL } }, // centeredmaster horiz
|
|
|
|
{ ":::", flextile, { -1, -1, NO_SPLIT, GAPPLESSGRID, GAPPLESSGRID, 0, NULL } }, // gappless grid
|
|
|
|
{ "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE, DWINDLE, 0, NULL } }, // fibonacci dwindle
|
|
|
|
{ "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL, SPIRAL, 0, NULL } }, // fibonacci spiral
|
|
|
|
{ "[T]", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TATAMI, 0, NULL } }, // tatami mats
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* key definitions */
|
2024-02-03 15:38:38 +01:00
|
|
|
#define MODKEY Mod4Mask
|
2024-01-31 01:19:44 +01:00
|
|
|
#define TAGKEYS(KEY,TAG) \
|
2024-02-03 16:48:48 +01:00
|
|
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
2024-02-03 15:38:38 +01:00
|
|
|
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
2024-02-03 16:48:48 +01:00
|
|
|
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
2024-02-03 15:38:38 +01:00
|
|
|
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }
|
|
|
|
|
2024-01-31 01:19:44 +01:00
|
|
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
|
|
|
|
|
|
|
/* commands */
|
2024-02-03 15:38:38 +01:00
|
|
|
static const char *termcmd[] = { TERM, TERM_FLAG_EXEC, TERM_START, NULL };
|
2024-01-31 01:19:44 +01:00
|
|
|
|
2024-02-03 15:38:38 +01:00
|
|
|
#include <X11/XF86keysym.h>
|
2024-01-31 01:19:44 +01:00
|
|
|
static const Key keys[] = {
|
2024-02-03 15:38:38 +01:00
|
|
|
/* modifier key function argument */
|
|
|
|
{ MODKEY, XK_F1, togglescratch, {.v = sphelp} },
|
|
|
|
// { MODKEY | ShiftMask, XK_F1, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F2, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuhandler") },
|
|
|
|
// { MODKEY | ShiftMask, XK_F2, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F3, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad") },
|
|
|
|
// { MODKEY | ShiftMask, XK_F3, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F4, spawn, SHCMD("$HOME/.local/libexec/dwm/togcompositor") },
|
|
|
|
// { MODKEY | ShiftMask, XK_F4, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F5, xrdb, {.v = NULL } },
|
|
|
|
// { MODKEY, XK_F6, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_F6, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_F7, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_F7, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_F8, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_F8, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F9, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenumount") },
|
|
|
|
// { MODKEY | ShiftMask, XK_F9, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F10, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuumount") },
|
|
|
|
// { MODKEY | ShiftMask, XK_F10, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F11, spawn, SHCMD("$HOME/.local/libexec/dwm/displayselect") },
|
|
|
|
// { MODKEY | ShiftMask, XK_F11, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_F12, spawn, SHCMD("$HOME/.local/libexec/dwm/remaps") },
|
|
|
|
// { MODKEY | ShiftMask, XK_F12, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_grave, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuunicode --nocopy") },
|
|
|
|
{ MODKEY | ShiftMask, XK_grave, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuunicode") },
|
|
|
|
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, XK_0, view, {.ui = ~0} },
|
|
|
|
{ MODKEY | ShiftMask, XK_0, tag, {.ui = ~0} },
|
|
|
|
{ MODKEY | Mod1Mask, XK_0, winview, {0} },
|
|
|
|
// { MODKEY, XK_bracketleft, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_bracketleft, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_bracketright, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_bracketright, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_BackSpace, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenusys") },
|
|
|
|
// { MODKEY | ShiftMask, XK_BackSpace, spawn, {.v = (const char *[]){NULL}} },
|
2024-02-03 16:11:18 +01:00
|
|
|
// { MODKEY, XK_Tab, spawn, {.v = (const char *[]){NULL}} },
|
2024-02-03 15:38:38 +01:00
|
|
|
// { MODKEY | ShiftMask, XK_Tab, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_apostrophe, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_apostrophe, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_comma, focusmon, {.i = +1} },
|
|
|
|
{ MODKEY | ShiftMask, XK_comma, tagmon, {.i = +1} },
|
|
|
|
{ MODKEY, XK_period, focusmon, {.i = -1} },
|
|
|
|
{ MODKEY | ShiftMask, XK_period, tagmon, {.i = -1} },
|
|
|
|
{ MODKEY, XK_p, spawn, {.v = (const char *[]){"playerctl", "play-pause", NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_p, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_y, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_y, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_f, togglefullscreen, {0} },
|
|
|
|
// { MODKEY | ShiftMask, XK_f, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_g, cyclelayout, {.i = -1} },
|
|
|
|
{ MODKEY | ShiftMask, XK_g, rotatelayoutaxis, {.i = -1} },
|
|
|
|
{ MODKEY, XK_c, setlayout, {.v = &layouts[0]} },
|
|
|
|
// { MODKEY | ShiftMask, XK_c, spawn, {.v = (const char *[]){NULL}} }, /* TODO: reset axis */
|
|
|
|
{ MODKEY, XK_r, cyclelayout, {.i = +1} },
|
|
|
|
{ MODKEY | ShiftMask, XK_r, rotatelayoutaxis, {.i = +1} },
|
|
|
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
2024-02-03 16:11:18 +01:00
|
|
|
{ MODKEY | ShiftMask, XK_l, setcfact, {.f = +0.1} },
|
2024-02-03 15:38:38 +01:00
|
|
|
// { MODKEY, XK_slash, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_slash, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_equal, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_equal, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_a, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_a, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_o, togglescratch, {.v = spproc} },
|
|
|
|
// { MODKEY | ShiftMask, XK_o, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_e, togglescratch, {.v = spfile} },
|
|
|
|
// { MODKEY | ShiftMask, XK_e, spawn, {.v = (const char *[]){NULL}} },
|
2024-02-04 10:48:54 +01:00
|
|
|
{ MODKEY, XK_u, spawn, {.v = (const char *[]){"dmenu_run", NULL}} },
|
2024-02-03 15:38:38 +01:00
|
|
|
// { MODKEY | ShiftMask, XK_u, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_i, spawn, {.v = (const char *[]){"dunstctl", "close", NULL}} },
|
|
|
|
{ MODKEY | ShiftMask, XK_i, spawn, {.v = (const char *[]){"dunstctl", "history-pop", NULL}} },
|
|
|
|
{ MODKEY, XK_d, spawn, {.v = (const char *[]){"dunstctl", "context", NULL}} },
|
|
|
|
{ MODKEY | ShiftMask, XK_d, spawn, {.v = (const char *[]){"dunstctl", "action", "0", NULL}} },
|
|
|
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
2024-02-03 16:11:18 +01:00
|
|
|
{ MODKEY | ShiftMask, XK_h, setcfact, {.f = -0.1} },
|
2024-02-03 15:38:38 +01:00
|
|
|
{ MODKEY, XK_t, spawn, {.v = (const char *[]){BROWSER, BROWSER_FLAG_1, NULL}} },
|
|
|
|
{ MODKEY | ShiftMask, XK_t, spawn, {.v = (const char *[]){BROWSER, BROWSER_FLAG_1, BROWSER_FLAG_INCOG, NULL}} },
|
|
|
|
{ MODKEY, XK_n, focusstack, {.i = PREVSEL} },
|
|
|
|
{ MODKEY | ShiftMask, XK_n, pushstack, {.i = PREVSEL} },
|
|
|
|
{ MODKEY, XK_s, incnmaster, {.i = +1 } },
|
|
|
|
{ MODKEY | ShiftMask, XK_s, incnmaster, {.i = -1 } },
|
|
|
|
// { MODKEY, XK_minus, spawn, {.v = (const char *[]){NULL}} }, /* TODO: reset nmaster */
|
|
|
|
// { MODKEY | ShiftMask, XK_minus, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_backslash, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_backslash, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_Return, zoom, {0} },
|
|
|
|
{ MODKEY | ShiftMask, XK_Return, mirrorlayout, {0} },
|
|
|
|
// { MODKEY, XK_semicolon, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_semicolon, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_q, killclient, {0} },
|
|
|
|
// { MODKEY | ShiftMask, XK_q, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_j, focusstack, {.i = INC(+1)} },
|
|
|
|
{ MODKEY | ShiftMask, XK_j, pushstack, {.i = INC(+1)} },
|
|
|
|
{ MODKEY, XK_k, focusstack, {.i = INC(-1)} },
|
|
|
|
{ MODKEY | ShiftMask, XK_k, pushstack, {.i = INC(-1)} },
|
|
|
|
{ MODKEY, XK_x, togglescratch, {.v = spcalc }},
|
|
|
|
// { MODKEY | ShiftMask, XK_x, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_b, togglescratch, {.v = spinet} },
|
|
|
|
// { MODKEY | ShiftMask, XK_b, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_m, togglescratch, {.v = spvolm} },
|
|
|
|
// { MODKEY | ShiftMask, XK_m, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_w, togglescratch, {.v = spwiki} },
|
|
|
|
// { MODKEY | ShiftMask, XK_w, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_v, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_v, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_z, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_z, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_space, spawn, {.v = termcmd} },
|
|
|
|
{ MODKEY | ShiftMask, XK_space, togglescratch, {.v = spterm} },
|
|
|
|
{ MODKEY, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenurecord") },
|
|
|
|
{ MODKEY | ShiftMask, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenurecord kill") },
|
|
|
|
{ 0, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenumaim full") },
|
|
|
|
{ ShiftMask, XK_Print, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenumaim") },
|
|
|
|
// { MODKEY, XK_scroll_lock, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_scroll_lock, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_pause, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_pause, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_insert, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_insert, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_home, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_home, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_page_up, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_page_up, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_delete, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_delete, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY, XK_End, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY | ShiftMask, XK_End, quit, {0} },
|
|
|
|
// { MODKEY, XK_page_down, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { MODKEY | ShiftMask, XK_page_down, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ MODKEY, XK_Left, spawn, {.v = (const char *[]){"playerctl", "position", "5-", NULL}} },
|
|
|
|
{ MODKEY | ShiftMask, XK_Left, spawn, {.v = (const char *[]){"playerctl", "previous", NULL}} },
|
|
|
|
{ MODKEY, XK_Right, spawn, {.v = (const char *[]){"playerctl", "position", "5+", NULL}} },
|
|
|
|
{ MODKEY | ShiftMask, XK_Right, spawn, {.v = (const char *[]){"playerctl", "next", NULL}} },
|
2024-02-04 14:27:36 +01:00
|
|
|
{ MODKEY, XK_Up, spawn, SHCMD("$HOME/.local/libexec/dwm/pamixer-notify --allow-boost -i 5") },
|
2024-02-03 15:38:38 +01:00
|
|
|
{ MODKEY | ShiftMask, XK_Up, spawn, {.v = (const char *[]){"playerctl", "volume", "5+", NULL}} },
|
2024-02-04 14:27:36 +01:00
|
|
|
{ MODKEY, XK_Down, spawn, SHCMD("$HOME/.local/libexec/dwm/pamixer-notify --allow-boost -d 5") },
|
2024-02-03 15:38:38 +01:00
|
|
|
{ MODKEY | ShiftMask, XK_Down, spawn, {.v = (const char *[]){"playerctl", "volume", "5-", NULL}} },
|
|
|
|
|
2024-02-04 14:27:36 +01:00
|
|
|
{ 0, XF86XK_AudioMute, spawn, SHCMD("$HOME/.local/libexec/dwm/pamixer-notify -t") },
|
|
|
|
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("$HOME/.local/libexec/dwm/pamixer-notify --allow-boost -i 5") },
|
|
|
|
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("$HOME/.local/libexec/dwm/pamixer-notify --allow-boost -d 5") },
|
2024-02-03 15:38:38 +01:00
|
|
|
{ 0, XF86XK_AudioPrev, spawn, {.v = (const char *[]){"playerctl", "previous", NULL}} },
|
|
|
|
{ 0, XF86XK_AudioNext, spawn, {.v = (const char *[]){"playerctl", "next", NULL}} },
|
|
|
|
{ 0, XF86XK_AudioPause, spawn, {.v = (const char *[]){"playerctl", "pause", NULL}} },
|
|
|
|
{ 0, XF86XK_AudioPlay, spawn, {.v = (const char *[]){"playerctl", "play-pause", NULL}} }, // Most keyboards only have a play button
|
|
|
|
{ 0, XF86XK_AudioStop, spawn, {.v = (const char *[]){"playerctl", "stop", NULL}} },
|
|
|
|
{ 0, XF86XK_AudioRewind, spawn, {.v = (const char *[]){"playerctl", "position", "5-", NULL}} },
|
|
|
|
{ 0, XF86XK_AudioForward, spawn, {.v = (const char *[]){"playerctl", "position", "5+", NULL}} },
|
|
|
|
// { 0, XF86XK_AudioMedia, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ 0, XF86XK_AudioMicMute, spawn, {.v = (const char *[]){"pactl", "set-source-mute", "@DEFAULT_SOURCE@", "toggle", NULL}} }, /* TODO: Test this */
|
|
|
|
{ 0, XF86XK_PowerOff, spawn, {.v = (const char *[]){"dmenusys", NULL}} },
|
|
|
|
{ 0, XF86XK_Calculator, spawn, {.v = (const char *[]){TERM, "-e", "bc", "-li", NULL}} },
|
|
|
|
{ 0, XF86XK_Sleep, spawn, {.v = (const char *[]){"loginctl", "suspend", "-i", NULL}} },
|
|
|
|
{ 0, XF86XK_WWW, spawn, {.v = (const char *[]){BROWSER, BROWSER_FLAG_1, NULL}} },
|
|
|
|
// { 0, XF86XK_WLAN, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ 0, XF86XK_DOS, spawn, {.v = (const char *[]){TERM, NULL}} },
|
|
|
|
{ 0, XF86XK_ScreenSaver, spawn, {.v = (const char *[]){"xset", "s", "activate", NULL}} },
|
|
|
|
{ 0, XF86XK_TaskPane, spawn, {.v = (const char *[]){TERM, "-e", "htop", NULL}} },
|
|
|
|
// { 0, XF86XK_Mail, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ 0, XF86XK_MyComputer, spawn, {.v = (const char *[]){TERM, "-e", "lfX", "/", NULL}} },
|
|
|
|
// { 0, XF86XK_Battery, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
// { 0, XF86XK_Launch1, spawn, {.v = (const char *[]){NULL}} },
|
|
|
|
{ 0, XF86XK_TouchpadToggle, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad") },
|
|
|
|
{ 0, XF86XK_TouchpadOff, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad -n") },
|
|
|
|
{ 0, XF86XK_TouchpadOn, spawn, SHCMD("$HOME/.local/libexec/dwm/togtouchpad -y") },
|
|
|
|
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("$HOME/.local/libexec/dwm/brightness-notify +5") },
|
|
|
|
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("$HOME/.local/libexec/dwm/brightness-notify -5") },
|
|
|
|
/* WARN: If you have multiple backlight controllers this will fail */
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* button definitions */
|
|
|
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
|
|
|
static const Button buttons[] = {
|
2024-02-03 15:38:38 +01:00
|
|
|
/* click event mask button function argument */
|
|
|
|
{ ClkLtSymbol, 0, Button1, layoutmenu, {0} },
|
|
|
|
// { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
|
|
|
// { ClkWinTitle, 0, Button2, zoom, {0} },
|
2024-02-03 19:12:29 +01:00
|
|
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
2024-02-03 15:38:38 +01:00
|
|
|
{ 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} },
|
2024-01-31 01:19:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|