summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu/config.h.bak48
-rw-r--r--dwm/config.def.h495
-rw-r--r--dwm/config.def.h.bak487
-rw-r--r--dwm/config.h.bak495
-rw-r--r--dwmblocks/config.def.h34
-rw-r--r--dwmblocks/config.def.h.bak33
-rw-r--r--dwmblocks/config.h.bak34
-rw-r--r--slock/config.def.h77
-rw-r--r--slock/config.def.h.bak77
-rw-r--r--slock/config.h.bak77
-rw-r--r--st/config.h.bak567
11 files changed, 0 insertions, 2424 deletions
diff --git a/dmenu/config.h.bak b/dmenu/config.h.bak
deleted file mode 100644
index 10c2024..0000000
--- a/dmenu/config.h.bak
+++ /dev/null
@@ -1,48 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-/* Default settings; can be overriden by command line. */
-
-static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
-static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */
-/* -fn option overrides fonts[0]; default X11 font or font set */
-static const char *fonts[] = {
- "monospace:size=10",
- "NotoColorEmoji:pixelsize=8:antialias=true:autohint=true"};
-static const unsigned int bgalpha = 0xe0;
-static const unsigned int fgalpha = OPAQUE;
-static const char *prompt =
- NULL; /* -p option; prompt to the left of input field */
-static const char *colors[SchemeLast][2] = {
- /* fg bg */
- [SchemeNorm] = {"#bbbbbb", "#222222"},
- [SchemeSel] = {"#eeeeee", "#005577"},
- [SchemeOut] = {"#000000", "#00ffff"},
- [SchemeCursor] = {"#222222", "#bbbbbb"},
-};
-static const unsigned int alphas[SchemeLast][2] = {
- /* fgalpha bgalphga */
- [SchemeNorm] = {fgalpha, bgalpha},
- [SchemeSel] = {fgalpha, bgalpha},
- [SchemeOut] = {fgalpha, bgalpha},
-};
-
-/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
-static unsigned int lines = 0;
-
-/*
- * Characters not considered part of a word while deleting words
- * for example: " /?\"&[]"
- */
-static const char worddelimiters[] = " ";
-
-/*
- * -vi option; if nonzero, vi mode is always enabled and can be
- * accessed with the global_esc keysym + mod mask
- */
-static unsigned int vi_mode = 1;
-static unsigned int start_mode =
- 0; /* mode to use when -vi is passed. 0 = insert mode, 1 = normal mode */
-static Key global_esc = {
- XK_c, ControlMask}; /* escape key when vi mode is not enabled explicitly */
-static Key quit_keys[] = {
- /* keysym modifier */
- {XK_q, 0}};
diff --git a/dwm/config.def.h b/dwm/config.def.h
deleted file mode 100644
index dec3915..0000000
--- a/dwm/config.def.h
+++ /dev/null
@@ -1,495 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-/* constants */
-#define TERMINAL "st"
-#define TERMCLASS "St"
-#define BROWSER "firefox"
-#define BROWSERCLASS "Firefox"
-#define GAP 6
-
-/* appearance */
-static unsigned int borderpx = 3; /* border pixel of windows */
-static unsigned int snap = 32; /* snap pixel */
-static unsigned int gappih = GAP; /* horiz inner gap between windows */
-static unsigned int gappiv = GAP; /* vert inner gap between windows */
-static unsigned int gappoh = GAP; /* horiz outer gap between windows and screen edge */
-static unsigned int gappov = GAP; /* vert outer gap between windows and screen edge */
-static int swallowfloating = 0; /* 1 means swallow floating windows by default */
-static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
-static int showbar = 1; /* 0 means no bar */
-static int topbar = 1; /* 0 means bottom bar */
-static const int vertpad = GAP; /* vertical padding of bar */
-static const int sidepad = GAP; /* horizontal padding of bar */
-static char *fonts[] = {
- "monospace:size=10",
- "NotoColorEmoji:pixelsize=10:antialias=true:autohint=true" };
-static char normbgcolor[] = "#222222";
-static char normbordercolor[] = "#555555";
-static char normfgcolor[] = "#bbbbbb";
-static char selfgcolor[] = "#eeeeee";
-static char selbordercolor[] = "#4CBB17";
-static char selbgcolor[] = "#005577";
-static const unsigned int baralpha = 0xd0;
-static const unsigned int borderalpha = OPAQUE;
-static char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },
- [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor },
-};
-static const unsigned int alphas[][3] = {
- /* fg bg border */
- [SchemeNorm] = { OPAQUE, baralpha, borderalpha },
- [SchemeSel] = { OPAQUE, baralpha, borderalpha },
-};
-
-typedef struct {
- const char *name;
- const void *cmd;
-} Sp;
-
-/* scratchpads */
-const char *spcmd1[] = { TERMINAL, "-n", "spterm", "-g", "120x34", NULL };
-const char *spcmd2[] = { TERMINAL, "-n", "spcalc", "-f", "monospace:size=16",
- "-g", "50x20", "-e", "bc", "-lq", NULL };
-static Sp scratchpads[] = {
- /* name cmd */
- { "spterm", spcmd1 },
- { "spcalc", spcmd2 },
-};
-
-/* 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 isterminal noswallow monitor */
- { "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1 },
- { "kakaotalk", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
- { TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1 },
- { BROWSERCLASS, NULL, NULL, 0, 0, 0, -1, -1 },
- { TERMCLASS, "floatterm", NULL, 0, 1, 1, 0, -1 },
- { TERMCLASS, "bg", NULL, 1 << 7, 0, 1, 0, -1 },
- { TERMCLASS, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 },
- { TERMCLASS, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 },
- { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
-};
-
-/* layout(s) */
-static float mfact = 0.55; /* factor of master area size [0.05..0.95] */
-static int nmaster = 1; /* number of clients in master area */
-static int resizehints = 0; /* 1 means respect size hints in tiled resizals */
-static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
-
-#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
-#include "vanitygaps.c"
-
-static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile }, /* 0: Default: Master on left, slaves on right */
- { "[M]", monocle }, /* 1: All windows on top of eachother */
- { "|||", col }, /* 2: Column */
- { "[@]", spiral }, /* 3: Fibonacci spiral */
- { "[\\]", dwindle }, /* 4: Decreasing in size right and leftward */
- { "H[]", deck }, /* 5: Master on left, slaves in monocle-like mode on right */
- { "TTT", bstack }, /* 6: Master on top, slaves on bottom horizontally */
- { "===", bstackhoriz }, /* 7: Master on top, slaves on bottom vertically */
- { "HHH", grid }, /* 8: Equal grid */
- { "###", nrowgrid }, /* 9: Number of row grid */
- { "---", horizgrid }, /* 10: Horizontal grid */
- { ":::", gaplessgrid }, /* 11: Gapless grid */
- { "|M|", centeredmaster }, /* 12: Master in middle, slaves on sides */
- { ">M>", centeredfloatingmaster }, /* 13: Same but master floats */
- { "><>", NULL }, /* 14: no layout function means floating behavior */
- { NULL, NULL },
-};
-
-/* imports */
-#include <X11/XF86keysym.h>
-#include "shift-tools-scratchpads.c"
-#include "tagandview.c"
-#include "exresize.c"
-
-/* key definitions */
-#define MODKEY Mod4Mask
-#define MODKEY2 Mod1Mask
-
-#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 } }, \
- { MODKEY2 | ShiftMask, KEY, tagandview, { .ui = 1 << TAG } },
-
-#define CTAGKEYS(KEY, TAG) \
- { {0,0,0,0}, {KEY,0,0,0}, view, { .ui = 1 << TAG} }, \
- { {ControlMask,0,0,0}, {KEY,0,0,0}, toggleview, { .ui = 1 << TAG} }, \
- { {ShiftMask,0,0,0}, {KEY,0,0,0}, tag, { .ui = 1 << TAG} }, \
- { {ControlMask|ShiftMask,0,0,0}, {KEY,0,0,0}, toggletag, { .ui = 1 << TAG} },
-
-#define STACKKEYS(MOD, ACTION) \
- { MOD, XK_j, ACTION##stack, { .i = INC(+1) } }, \
- { MOD, XK_k, ACTION##stack, { .i = INC(-1) } }, \
- { MOD, XK_Tab, ACTION##stack, { .i = PREVSEL } }, \
- { MOD, XK_x, ACTION##stack, { .i = 0 } }, \
- { MOD, XK_a, ACTION##stack, { .i = 1 } }, \
- { MOD, XK_s, ACTION##stack, { .i = 2 } }, \
- { MOD, XK_z, ACTION##stack, { .i = -1 } },
-
-#define CSTACKKEYS(MOD, ACTION) \
- { {MOD,0,0,0}, {XK_j, 0,0,0}, ACTION##stack, { .i = INC(+1) } }, \
- { {MOD,0,0,0}, {XK_k, 0,0,0}, ACTION##stack, { .i = INC(-1) } }, \
- { {MOD,0,0,0}, {XK_Tab,0,0,0}, ACTION##stack, { .i = PREVSEL } }, \
- { {MOD,0,0,0}, {XK_x, 0,0,0}, ACTION##stack, { .i = 0 } }, \
- { {MOD,0,0,0}, {XK_a, 0,0,0}, ACTION##stack, { .i = 1 } }, \
- { {MOD,0,0,0}, {XK_s, 0,0,0}, ACTION##stack, { .i = 2 } }, \
- { {MOD,0,0,0}, {XK_z, 0,0,0}, ACTION##stack, { .i = -1 } },
-
-/* 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 const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb",
-// normbgcolor, "-nf", normfgcolor, "-sb",
-// selbordercolor, "-sf", selfgcolor, NULL };
-static const char *termcmd[] = { TERMINAL, NULL };
-
-/* Xresources preferences to load at startup */
-ResourcePref resources[] = {
- { "color0", STRING, &normbordercolor },
- { "color8", STRING, &selbordercolor },
- { "color0", STRING, &normbgcolor },
- { "color4", STRING, &normfgcolor },
- { "color0", STRING, &selfgcolor },
- { "color4", STRING, &selbgcolor },
- { "borderpx", INTEGER, &borderpx },
- { "snap", INTEGER, &snap },
- { "showbar", INTEGER, &showbar },
- { "topbar", INTEGER, &topbar },
- { "nmaster", INTEGER, &nmaster },
- { "resizehints", INTEGER, &resizehints },
- { "mfact", FLOAT, &mfact },
- { "gappih", INTEGER, &gappih },
- { "gappiv", INTEGER, &gappiv },
- { "gappoh", INTEGER, &gappoh },
- { "gappov", INTEGER, &gappov },
- { "swallowfloating", INTEGER, &swallowfloating },
- { "smartgaps", INTEGER, &smartgaps },
-};
-
-static const Key keys[] = {
- /* STACKKEYS */
- STACKKEYS(MODKEY, focus)
- STACKKEYS(MODKEY | ShiftMask, push)
-
- /* TAGKEYS */
- 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)
-
- /* modifier key function argument */
- /* AUDIO CONTROL */
- { MODKEY, XK_m, spawn, SHCMD("mpc random on; mpc load entire; mpc play; pkill -RTMIN+11 dwmblocks") },
- { MODKEY | ShiftMask, XK_m, spawn, { .v = (const char *[]){ "playlists", NULL } } },
- { MODKEY | ControlMask, XK_m, spawn, { .v = (const char *[]){ "mpdmenu", NULL } } },
- { MODKEY, XK_p, spawn, { .v = (const char *[]){ "mpc", "toggle", NULL } } },
- { MODKEY | ShiftMask, XK_p, spawn, SHCMD("mpc pause; pauseallmpv") },
- { MODKEY | ControlMask, XK_p, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ControlMask, XK_s, spawn, SHCMD("mpc stop; pkill -RTMIN+11 dwmblocks") },
- { MODKEY, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "prev", NULL } } },
- { MODKEY, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "next", NULL } } },
- { MODKEY | ShiftMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "-10", NULL } } },
- { MODKEY | ShiftMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "seek", "+10", NULL } } },
- { MODKEY | ControlMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "-60", NULL } } },
- { MODKEY | ControlMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "seek", "+60", NULL } } },
- { MODKEY | ShiftMask | ControlMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "0%", NULL } } },
- { MODKEY | ShiftMask | ControlMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "repeat", NULL } } },
- { MODKEY , XK_backslash, spawn, { .v = (const char *[]){ "mpc", "single", NULL } } },
- { MODKEY | ShiftMask, XK_backslash, spawn, { .v = (const char *[]){ "mpc", "random", NULL } } },
- { MODKEY | ControlMask, XK_backslash, spawn, SHCMD("mpc repeat off; mpc random off; mpc single off; pkill -RTMIN+11 dwmblocks") },
-
- /* LAYOUT SIZE */
- { MODKEY | ShiftMask, XK_n, incnmaster, { .i = -1 } },
- { MODKEY | ControlMask, XK_n, incnmaster, { .i = +1 } },
- { MODKEY, XK_f, togglefullscr, {0} },
- { MODKEY, XK_h, setmfact, { .f = -0.05 } },
- { MODKEY, XK_l, setmfact, { .f = +0.05 } },
- { MODKEY, XK_s, togglesticky, {0} },
- { MODKEY, XK_space, zoom, {0} },
- { MODKEY | ControlMask, XK_j, setcfact, { .f = -0.25 } },
- { MODKEY | ControlMask, XK_k, setcfact, { .f = +0.25 } },
- { MODKEY | ControlMask, XK_y, setcfact, { .f = 0.00 } },
- { MODKEY | ShiftMask, XK_c, incrgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_c, incrgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_i, incrigaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_i, incrigaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_o, incrogaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_o, incrogaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_h, incrihgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_h, incrihgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_g, incrivgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_g, incrivgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_b, incrohgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_b, incrohgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_v, incrovgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_v, incrovgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_t, togglegaps, {0} },
- { MODKEY | ControlMask, XK_t, defaultgaps, {0} },
-
- /* FLOATING SIZE */
- { MODKEY2 | ControlMask, XK_h, exresize, { .v = (int []){ -25, 0 } } },
- { MODKEY2 | ControlMask, XK_l, exresize, { .v = (int []){ 25, 0 } } },
- { MODKEY2 | ControlMask, XK_j, exresize, { .v = (int []){ 0, 25 } } },
- { MODKEY2 | ControlMask, XK_k, exresize, { .v = (int []){ 0, -25 } } },
- { MODKEY2 | ControlMask, XK_comma, exresize, { .v = (int []){ -25, -25 } } },
- { MODKEY2 | ControlMask, XK_period, exresize, { .v = (int []){ 25, 25 } } },
-
- /* MEDIA CONTROL */
- { 0, XF86XK_Battery, spawn, SHCMD("pkill -RTMIN+3 dwmblocks") },
- { 0, XF86XK_WWW, spawn, { .v = (const char *[]){ BROWSER, NULL } } },
- { 0, XF86XK_DOS, spawn, { .v = termcmd } },
- { 0, XF86XK_AudioMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%- && wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%+; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%+ && wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%-; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioPrev, spawn, { .v = (const char *[]){ "mpc", "prev", NULL } } },
- { 0, XF86XK_AudioNext, spawn, { .v = (const char *[]){ "mpc", "next", NULL } } },
- { 0, XF86XK_AudioPause, spawn, { .v = (const char *[]){ "mpc", "pause", NULL } } },
- { 0, XF86XK_AudioPlay, spawn, { .v = (const char *[]){ "mpc", "play", NULL } } },
- { 0, XF86XK_AudioStop, spawn, { .v = (const char *[]){ "mpc", "stop", NULL } } },
- { 0, XF86XK_AudioRewind, spawn, { .v = (const char *[]){ "mpc", "seek", "-10", NULL } } },
- { 0, XF86XK_AudioForward, spawn, { .v = (const char *[]){ "mpc", "seek", "+10", NULL } } },
- { 0, XF86XK_AudioMedia, spawn, { .v = (const char *[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
- { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") },
- { 0, XF86XK_PowerOff, spawn, { .v = (const char*[]){ "sysact", NULL } } },
- { 0, XF86XK_Calculator, spawn, { .v = (const char *[]){ TERMINAL, "-e", "bc", "-l", NULL } } },
- { 0, XF86XK_Sleep, spawn, { .v = (const char *[]){ "sudo", "-A", "zzz", NULL } } },
- { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
- { 0, XF86XK_TaskPane, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") },
- { 0, XF86XK_MyComputer, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", "/", NULL } } },
- { 0, XF86XK_Launch1, spawn, { .v = (const char *[]){ "xset", "dpms", "force", "off", NULL } } },
- { 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") },
- { 0, XF86XK_TouchpadOff, spawn, { .v = (const char *[]){ "synclient", "TouchpadOff=1", NULL } } },
- { 0, XF86XK_TouchpadOn, spawn, { .v = (const char *[]){ "synclient", "TouchpadOff=0", NULL } } },
- { 0, XF86XK_MonBrightnessUp, spawn, { .v = (const char *[]){ "brillo", "-U", "5", "-q", NULL } } },
- { 0, XF86XK_MonBrightnessDown, spawn, { .v = (const char *[]){ "brillo", "-A", "5", "-q", NULL } } },
-
- /* MODE */
- { MODKEY, XK_Escape, setkeymode, { .ui = ModeCommand } },
-
- /* PROGRAM */
- { MODKEY, XK_d, spawn, { .v = (const char *[]){ "dmenu_run", NULL } } },
- { MODKEY, XK_e, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook 2>/dev/null") },
- { MODKEY, XK_n, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") },
- { MODKEY, XK_r, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", NULL } } },
- { MODKEY | ShiftMask, XK_r, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { MODKEY, XK_w, spawn, { .v = (const char *[]){ BROWSER, NULL } } },
- { MODKEY, XK_c, togglescratch, { .ui = 1 } }, /* calculator */
- { MODKEY, XK_u, spawn, { .v = (const char *[]){ "dmenuunicode", NULL } } },
- { MODKEY, XK_Return, spawn, { .v = termcmd } },
- { MODKEY | ShiftMask, XK_Return, spawn, { .v = (const char *[]){ "sd", NULL } } },
- { MODKEY | ControlMask, XK_Return, togglescratch, { .ui = 0 } }, /* terminal */
-
- /* SCRIPT */
- { MODKEY | ShiftMask, XK_d, spawn, { .v = (const char *[]){ "passmenu", NULL } } },
- { MODKEY | ControlMask, XK_d, spawn, { .v = (const char *[]){ "passmenu2", NULL } } },
- { MODKEY | ShiftMask, XK_f, spawn, { .v = (const char *[]){ "fecrypt", NULL } } },
- { MODKEY, XK_v, spawn, { .v = (const char *[]){ "mpvplay", NULL } } },
- { MODKEY, XK_Insert, spawn, SHCMD("xdotool type $(grep -v '^#' ~/.local/share/thesiah/snippets | dmenu -i -l 50 | cut -d' ' -f1)") },
- { 0, XK_Print, spawn, SHCMD("maim | tee ~/Pictures/screenshot-$(date '+%y%m%d-%H%M-%S').png | xclip -selection clipboard") },
- { ShiftMask, XK_Print, spawn, { .v = (const char *[]){ "maimpick", NULL } } },
- { MODKEY, XK_Print, spawn, { .v = (const char *[]){ "dmenurecord", NULL } } },
- { MODKEY, XK_Delete, spawn, { .v = (const char *[]){ "dmenurecord", "kill", NULL } } },
- { MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey -t 3 -p fixed -s small -g 20%x5%+40%-5% --key-mode keysyms --bak-mode normal --mods-mode normal -f ttf-font-awesome --opacity 0.5 &") },
- { MODKEY, XK_F1, spawn, SHCMD("groff -mom /home/si/.local/share/man/thesiah/thesiah.mom -Tpdf | zathura -") },
- { MODKEY | ShiftMask, XK_F1, spawn, SHCMD("nsxiv ~/Pictures/resources") },
- { MODKEY | ControlMask, XK_F1, spawn, { .v = (const char *[]){ TERMINAL, "-e", "dman", NULL } } },
- { MODKEY, XK_F2, spawn, { .v = (const char *[]){ "tutorialvids", NULL } } },
- { MODKEY, XK_F3, spawn, { .v = (const char *[]){ "displayselect", NULL } } },
- { MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") },
- { MODKEY, XK_F5, xrdb, { .v = NULL } },
- { MODKEY | ShiftMask, XK_F5, spawn, SHCMD("stw ~/.dotfiles/arch -d") },
- { MODKEY | ControlMask, XK_F5, spawn, { .v = (const char *[]){ "pacupgrade", NULL } } },
- { MODKEY, XK_F6, spawn, { .v = (const char *[]){ "qndl", "-v", NULL } } },
- { MODKEY | ShiftMask, XK_F6, spawn, { .v = (const char *[]){ "qndl", "-m", NULL } } },
- { MODKEY, XK_F7, spawn, { .v = (const char *[]){ "td-toggle", NULL } } },
- { MODKEY | ShiftMask, XK_F7, spawn, { .v = (const char *[]){ "transadd", NULL } } },
- { MODKEY, XK_F8, spawn, { .v = (const char *[]){ "mailsync", NULL } } },
- { MODKEY, XK_F9, spawn, { .v = (const char *[]){ "mounter", NULL } } },
- { MODKEY, XK_F10, spawn, { .v = (const char *[]){ "unmounter", NULL } } },
- { MODKEY, XK_F11, spawn, SHCMD("mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls " "/dev/video[0,2,4,6,8] | tail -n 1)") },
- { MODKEY, XK_F12, spawn, SHCMD("remaps") },
- { MODKEY | ShiftMask, XK_F12, spawn, { .v = (const char *[]){ "fcitx5-configtool", NULL } } },
-
- /* SYSTEM */
- { MODKEY | ControlMask, XK_f, spawn, SHCMD("pkill -f firefox") },
- { MODKEY | ControlMask, XK_k, spawn, SHCMD("pkill -f kakaotalk") },
- { MODKEY, XK_q, killclient, {0} },
- { MODKEY | ShiftMask, XK_q, killclient, { .ui = 1 } },
- { MODKEY | ControlMask, XK_q, killclient, { .ui = 2 } },
- { MODKEY, XK_BackSpace, spawn, { .v = (const char *[]){ "slock", NULL } } },
- { MODKEY | ShiftMask, XK_BackSpace, spawn, { .v = (const char *[]){ "sysact", NULL } } },
- { MODKEY, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -44 $(pidof dwmblocks)") },
- { MODKEY, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ShiftMask, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%-; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ShiftMask, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%+; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ControlMask, XK_minus, spawn, { .v = (const char *[]){ "brillo", "-U", "5", "-q", NULL } } },
- { MODKEY | ControlMask, XK_equal, spawn, { .v = (const char *[]){ "brillo", "-A", "5", "-q", NULL } } },
- { 0, XK_Alt_R, spawn, SHCMD("fcitx5-remote -t; pkill -RTMIN+29 dwmblocks") },
- { ControlMask, XK_F5, quit, {1} },
- { ShiftMask | ControlMask, XK_F5, spawn, SHCMD("killall -q dwmblocks; setsid -f dwmblocks") },
-
- /* TRAVERSAL */
- { MODKEY | ShiftMask, XK_0, tag, { .ui = ~0 } },
- { MODKEY2, XK_comma, shiftview, { .i = -1 } },
- { MODKEY2, XK_period, shiftview, { .i = 1 } },
- { MODKEY2 | ShiftMask, XK_comma, shifttag, { .i = -1 } },
- { MODKEY2 | ShiftMask, XK_period, shifttag, { .i = 1 } },
- { MODKEY, XK_comma, shiftviewclients, { .i = -1 } },
- { MODKEY, XK_period, shiftviewclients, { .i = +1 } },
- { MODKEY | ShiftMask, XK_comma, shifttagclients, { .i = -1 } },
- { MODKEY | ShiftMask, XK_period, shifttagclients, { .i = +1 } },
- { MODKEY | ControlMask, XK_comma, shiftboth, { .i = -1 } },
- { MODKEY | ControlMask, XK_period, shiftboth, { .i = +1 } },
- { MODKEY | ShiftMask | ControlMask, XK_comma, shiftswaptags, { .i = -1 } },
- { MODKEY | ShiftMask | ControlMask, XK_period, shiftswaptags, { .i = +1 } },
- { MODKEY, XK_Left, focusmon, { .i = -1 } },
- { MODKEY, XK_Right, focusmon, { .i = +1 } },
- { MODKEY | ShiftMask, XK_Left, tagmon, { .i = -1 } },
- { MODKEY | ShiftMask, XK_Right, tagmon, { .i = +1 } },
- { MODKEY | ShiftMask, XK_Tab, view, {0} },
-
- /* { MODKEY | ShiftMask, XK_apostrophe, togglesmartgaps, {0} }, */
-
-};
-
-static Key cmdkeys[] = {
- /* modifier keys function argument */
- { 0, XK_Escape, clearcmd, {0} },
- { ControlMask, XK_c, clearcmd, {0} },
- { ControlMask, XK_x, setkeymode, { .ui = ModeInsert } },
-};
-
-static Command commands[] = {
- /* STACKKEYS */
- CSTACKKEYS(MODKEY, focus)
- CSTACKKEYS(MODKEY | ShiftMask, push)
-
- /* TAGKEYS */
- CTAGKEYS(XK_1, 0)
- CTAGKEYS(XK_2, 1)
- CTAGKEYS(XK_3, 2)
- CTAGKEYS(XK_4, 3)
- CTAGKEYS(XK_5, 4)
- CTAGKEYS(XK_6, 5)
- CTAGKEYS(XK_7, 6)
- CTAGKEYS(XK_8, 7)
- CTAGKEYS(XK_9, 8)
-
- /* Modifier (4 keys) keysyms (4 keys) function argument */
- /* APPEARANCE */
- { { ShiftMask, 0, 0, 0 }, { XK_b, 0, 0, 0 }, togglebar, {0} },
- { { ControlMask, 0, 0, 0 }, { XK_b, 0, 0, 0 }, togglebar, { .i = 1 } },
- { { ShiftMask, 0, 0, 0 }, { XK_o, 0, 0, 0 }, toggleborder, {0} },
- { { ShiftMask, 0, 0, 0 }, { XK_f, 0, 0, 0 }, togglefloating, {0} },
- { { ShiftMask, 0, 0, 0 }, { XK_g, 0, 0, 0 }, togglegaps, {0} },
- { { ControlMask, 0, 0, 0 }, { XK_g, 0, 0, 0 }, defaultgaps, {0} },
-
- /* LAYOUT */
- { { 0, 0, 0, 0 }, { XK_l, XK_t, 0, 0 }, setlayout, { .v = &layouts[0] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_m, 0, 0 }, setlayout, { .v = &layouts[1] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_l, 0 }, setlayout, { .v = &layouts[2] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_s, 0, 0 }, setlayout, { .v = &layouts[3] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_w, 0, 0 }, setlayout, { .v = &layouts[4] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_d, 0, 0 }, setlayout, { .v = &layouts[5] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_b, XK_e, 0 }, setlayout, { .v = &layouts[6] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_b, XK_h, 0 }, setlayout, { .v = &layouts[7] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_e, 0 }, setlayout, { .v = &layouts[8] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_r, 0 }, setlayout, { .v = &layouts[9] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_h, 0 }, setlayout, { .v = &layouts[10] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_g, 0 }, setlayout, { .v = &layouts[11] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_m, 0 }, setlayout, { .v = &layouts[12] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_f, 0 }, setlayout, { .v = &layouts[13] } },
-
- { { 0, 0, 0, 0 }, { XK_f, XK_u, 0, 0 }, explace, { .ui = EX_NW } },
- { { 0, 0, 0, 0 }, { XK_f, XK_i, 0, 0 }, explace, { .ui = EX_N } },
- { { 0, 0, 0, 0 }, { XK_f, XK_o, 0, 0 }, explace, { .ui = EX_NE } },
- { { 0, 0, 0, 0 }, { XK_f, XK_h, 0, 0 }, explace, { .ui = EX_W } },
- { { 0, 0, 0, 0 }, { XK_f, XK_k, 0, 0 }, explace, { .ui = EX_C } },
- { { 0, 0, 0, 0 }, { XK_f, XK_l, 0, 0 }, explace, { .ui = EX_E } },
- { { 0, 0, 0, 0 }, { XK_f, XK_m, 0, 0 }, explace, { .ui = EX_SW } },
- { { 0, 0, 0, 0 }, { XK_f, XK_comma, 0, 0 }, explace, { .ui = EX_S } },
- { { 0, 0, 0, 0 }, { XK_f, XK_period, 0, 0 }, explace, { .ui = EX_SE } },
-
- /* FLOATING SIZE */
- { { ControlMask, 0, 0, 0 }, { XK_j, 0, 0, 0 }, exresize, { .v = (int []){ 0, 25 } } },
- { { ControlMask, 0, 0, 0 }, { XK_k, 0, 0, 0 }, exresize, { .v = (int []){ 0, -25 } } },
- { { ControlMask, 0, 0, 0 }, { XK_l, 0, 0, 0 }, exresize, { .v = (int []){ 25, 0 } } },
- { { ControlMask, 0, 0, 0 }, { XK_h, 0, 0, 0 }, exresize, { .v = (int []){ -25, 0 } } },
- { { ControlMask, 0, 0, 0 }, { XK_comma, 0, 0, 0 }, exresize, { .v = (int []){ -25, -25 } } },
- { { ControlMask, 0, 0, 0 }, { XK_period, 0, 0, 0 }, exresize, { .v = (int []){ 25, 25 } } },
-
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_h, 0 }, togglehorizontalexpand, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_h, 0 }, togglehorizontalexpand, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_h, 0 }, togglehorizontalexpand, { .i = -1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_v, 0 }, toggleverticalexpand, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_v, 0 }, toggleverticalexpand, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_v, 0 }, toggleverticalexpand, { .i = -1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_m, 0 }, togglemaximize, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_m, 0 }, togglemaximize, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_m, 0 }, togglemaximize, { .i = -1 } },
-
- /* PROGRAM */
- { { 0, 0, 0, 0 }, { XK_a, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e abook -C ~/.abook/abookrc --datafile ~/.abook/addressbook") },
- { { 0, 0, 0, 0 }, { XK_e, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook 2>/dev/null") },
- { { 0, 0, 0, 0 }, { XK_g, 0, 0, 0 }, spawn, { .v = (const char *[]){ "gimp", NULL } } },
- { { 0, 0, 0, 0 }, { XK_h, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { { 0, 0, 0, 0 }, { XK_k, 0, 0, 0 }, spawn, { .v = (const char *[]){ "kakaotalk", NULL } } },
- { { 0, 0, 0, 0 }, { XK_m, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
- { { 0, 0, 0, 0 }, { XK_n, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") },
- { { 0, 0, 0, 0 }, { XK_p, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "profanity", NULL } } },
- { { 0, 0, 0, 0 }, { XK_r, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", NULL } } },
- { { 0, 0, 0, 0 }, { XK_s, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e sc-im /home/si/.dotfiles/THESIAH/progs.csv") },
- { { 0, 0, 0, 0 }, { XK_t, XK_h, 0, 0 }, spawn, { .v = (const char *[]){ "thunderbird", NULL } } },
- { { 0, 0, 0, 0 }, { XK_t, XK_w, 0, 0 }, spawn, { .v = (const char *[]){ "torwrap", NULL } } },
- { { 0, 0, 0, 0 }, { XK_v, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "nvim", "-c", "VimwikiIndex", "1", NULL } } },
- { { 0, 0, 0, 0 }, { XK_w, XK_e, 0, 0 }, spawn, SHCMD(TERMINAL " -e less -Sf ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport") },
- { { 0, 0, 0, 0 }, { XK_w, XK_f, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "sudo", "nmtui", NULL } } },
-};
-
-/* button definitions */
-/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
- * ClkClientWin, or ClkRootWin */
-static const Button buttons[] = {
-/* click event mask button function argument */
-#ifndef __OpenBSD__
- { ClkWinTitle, 0, Button2, zoom, {0} },
- { ClkStatusText, 0, Button1, sigdwmblocks, { .i = 1 } },
- { ClkStatusText, 0, Button2, sigdwmblocks, { .i = 2 } },
- { ClkStatusText, 0, Button3, sigdwmblocks, { .i = 3 } },
- { ClkStatusText, 0, Button4, sigdwmblocks, { .i = 4 } },
- { ClkStatusText, 0, Button5, sigdwmblocks, { .i = 5 } },
- { ClkStatusText, ShiftMask, Button1, sigdwmblocks, { .i = 6 } },
-#endif
- { ClkStatusText, ShiftMask, Button3, spawn, SHCMD(TERMINAL " -e nvim ~/.local/src/suckless/dwmblocks/config.h") },
- { ClkClientWin, MODKEY, Button1, movemouse, {0} },
- { ClkClientWin, MODKEY, Button2, defaultgaps, {0} },
- { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
- { ClkClientWin, MODKEY, Button4, incrgaps, { .i = +1 } },
- { ClkClientWin, MODKEY, Button5, incrgaps, { .i = -1 } },
- { ClkTagBar, 0, Button1, view, {0} },
- { ClkTagBar, 0, Button3, toggleview, {0} },
- { ClkTagBar, MODKEY, Button1, tag, {0} },
- { ClkTagBar, MODKEY, Button3, toggletag, {0} },
- { ClkTagBar, 0, Button4, shiftview, { .i = -1 } },
- { ClkTagBar, 0, Button5, shiftview, { .i = 1 } },
- { ClkRootWin, 0, Button2, togglebar, {0} },
-};
diff --git a/dwm/config.def.h.bak b/dwm/config.def.h.bak
deleted file mode 100644
index e4ac330..0000000
--- a/dwm/config.def.h.bak
+++ /dev/null
@@ -1,487 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-/* constants */
-#define TERMINAL "st"
-#define TERMCLASS "St"
-#define BROWSER "firefox"
-#define BROWSERCLASS "Firefox"
-#define GAP 6
-
-/* appearance */
-static unsigned int borderpx = 3; /* border pixel of windows */
-static unsigned int snap = 32; /* snap pixel */
-static unsigned int gappih = GAP; /* horiz inner gap between windows */
-static unsigned int gappiv = GAP; /* vert inner gap between windows */
-static unsigned int gappoh = GAP; /* horiz outer gap between windows and screen edge */
-static unsigned int gappov = GAP; /* vert outer gap between windows and screen edge */
-static int swallowfloating = 0; /* 1 means swallow floating windows by default */
-static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
-static int showbar = 1; /* 0 means no bar */
-static int topbar = 1; /* 0 means bottom bar */
-static const int vertpad = GAP; /* vertical padding of bar */
-static const int sidepad = GAP; /* horizontal padding of bar */
-static char *fonts[] = {
- "monospace:size=10",
- "NotoColorEmoji:pixelsize=10:antialias=true:autohint=true" };
-static char normbgcolor[] = "#222222";
-static char normbordercolor[] = "#555555";
-static char normfgcolor[] = "#bbbbbb";
-static char selfgcolor[] = "#eeeeee";
-static char selbordercolor[] = "#4CBB17";
-static char selbgcolor[] = "#005577";
-static const unsigned int baralpha = 0xd0;
-static const unsigned int borderalpha = OPAQUE;
-static char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },
- [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor },
-};
-static const unsigned int alphas[][3] = {
- /* fg bg border */
- [SchemeNorm] = { OPAQUE, baralpha, borderalpha },
- [SchemeSel] = { OPAQUE, baralpha, borderalpha },
-};
-
-typedef struct {
- const char *name;
- const void *cmd;
-} Sp;
-
-/* scratchpads */
-const char *spcmd1[] = { TERMINAL, "-n", "spterm", "-g", "120x34", NULL };
-const char *spcmd2[] = { TERMINAL, "-n", "spcalc", "-f", "monospace:size=16",
- "-g", "50x20", "-e", "bc", "-lq", NULL };
-static Sp scratchpads[] = {
- /* name cmd */
- { "spterm", spcmd1 },
- { "spcalc", spcmd2 },
-};
-
-/* 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 isterminal noswallow monitor */
- { "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1 },
- { "kakaotalk", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
- { TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1 },
- { BROWSERCLASS, NULL, NULL, 0, 0, 0, -1, -1 },
- { TERMCLASS, "floatterm", NULL, 0, 1, 1, 0, -1 },
- { TERMCLASS, "bg", NULL, 1 << 7, 0, 1, 0, -1 },
- { TERMCLASS, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 },
- { TERMCLASS, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 },
- { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
-};
-
-/* layout(s) */
-static float mfact = 0.55; /* factor of master area size [0.05..0.95] */
-static int nmaster = 1; /* number of clients in master area */
-static int resizehints = 0; /* 1 means respect size hints in tiled resizals */
-static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
-
-#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
-#include "vanitygaps.c"
-
-static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile }, /* 0: Default: Master on left, slaves on right */
- { "[M]", monocle }, /* 1: All windows on top of eachother */
- { "|||", col }, /* 2: Column */
- { "[@]", spiral }, /* 3: Fibonacci spiral */
- { "[\\]", dwindle }, /* 4: Decreasing in size right and leftward */
- { "H[]", deck }, /* 5: Master on left, slaves in monocle-like mode on right */
- { "TTT", bstack }, /* 6: Master on top, slaves on bottom horizontally */
- { "===", bstackhoriz }, /* 7: Master on top, slaves on bottom vertically */
- { "HHH", grid }, /* 8: Equal grid */
- { "###", nrowgrid }, /* 9: Number of row grid */
- { "---", horizgrid }, /* 10: Horizontal grid */
- { ":::", gaplessgrid }, /* 11: Gapless grid */
- { "|M|", centeredmaster }, /* 12: Master in middle, slaves on sides */
- { ">M>", centeredfloatingmaster }, /* 13: Same but master floats */
- { "><>", NULL }, /* 14: no layout function means floating behavior */
- { NULL, NULL },
-};
-
-/* imports */
-#include <X11/XF86keysym.h>
-#include "shift-tools-scratchpads.c"
-#include "tagandview.c"
-#include "exresize.c"
-
-/* key definitions */
-#define MODKEY Mod4Mask
-#define MODKEY2 Mod1Mask
-
-#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 } }, \
- { MODKEY2 | ShiftMask, KEY, tagandview, { .ui = 1 << TAG } },
-
-#define CTAGKEYS(KEY, TAG) \
- { {0,0,0,0}, {KEY,0,0,0}, view, { .ui = 1 << TAG} }, \
- { {ControlMask,0,0,0}, {KEY,0,0,0}, toggleview, { .ui = 1 << TAG} }, \
- { {ShiftMask,0,0,0}, {KEY,0,0,0}, tag, { .ui = 1 << TAG} }, \
- { {ControlMask|ShiftMask,0,0,0}, {KEY,0,0,0}, toggletag, { .ui = 1 << TAG} },
-
-#define STACKKEYS(MOD, ACTION) \
- { MOD, XK_j, ACTION##stack, { .i = INC(+1) } }, \
- { MOD, XK_k, ACTION##stack, { .i = INC(-1) } }, \
- { MOD, XK_Tab, ACTION##stack, { .i = PREVSEL } }, \
- { MOD, XK_x, ACTION##stack, { .i = 0 } }, \
- { MOD, XK_a, ACTION##stack, { .i = 1 } }, \
- { MOD, XK_s, ACTION##stack, { .i = 2 } }, \
- { MOD, XK_z, ACTION##stack, { .i = -1 } },
-
-#define CSTACKKEYS(MOD, ACTION) \
- { {MOD,0,0,0}, {XK_j, 0,0,0}, ACTION##stack, { .i = INC(+1) } }, \
- { {MOD,0,0,0}, {XK_k, 0,0,0}, ACTION##stack, { .i = INC(-1) } }, \
- { {MOD,0,0,0}, {XK_Tab,0,0,0}, ACTION##stack, { .i = PREVSEL } }, \
- { {MOD,0,0,0}, {XK_x, 0,0,0}, ACTION##stack, { .i = 0 } }, \
- { {MOD,0,0,0}, {XK_a, 0,0,0}, ACTION##stack, { .i = 1 } }, \
- { {MOD,0,0,0}, {XK_s, 0,0,0}, ACTION##stack, { .i = 2 } }, \
- { {MOD,0,0,0}, {XK_z, 0,0,0}, ACTION##stack, { .i = -1 } },
-
-/* 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 const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb",
-// normbgcolor, "-nf", normfgcolor, "-sb",
-// selbordercolor, "-sf", selfgcolor, NULL };
-static const char *termcmd[] = { TERMINAL, NULL };
-
-/* Xresources preferences to load at startup */
-ResourcePref resources[] = {
- { "color0", STRING, &normbordercolor },
- { "color8", STRING, &selbordercolor },
- { "color0", STRING, &normbgcolor },
- { "color4", STRING, &normfgcolor },
- { "color0", STRING, &selfgcolor },
- { "color4", STRING, &selbgcolor },
- { "borderpx", INTEGER, &borderpx },
- { "snap", INTEGER, &snap },
- { "showbar", INTEGER, &showbar },
- { "topbar", INTEGER, &topbar },
- { "nmaster", INTEGER, &nmaster },
- { "resizehints", INTEGER, &resizehints },
- { "mfact", FLOAT, &mfact },
- { "gappih", INTEGER, &gappih },
- { "gappiv", INTEGER, &gappiv },
- { "gappoh", INTEGER, &gappoh },
- { "gappov", INTEGER, &gappov },
- { "swallowfloating", INTEGER, &swallowfloating },
- { "smartgaps", INTEGER, &smartgaps },
-};
-
-static const Key keys[] = {
- /* STACKKEYS */
- STACKKEYS(MODKEY, focus)
- STACKKEYS(MODKEY | ShiftMask, push)
-
- /* TAGKEYS */
- 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)
-
- /* modifier key function argument */
- /* AUDIO CONTROL */
- { MODKEY, XK_m, spawn, SHCMD("mpc random on; mpc load entire; mpc play; pkill -RTMIN+11 dwmblocks") },
- { MODKEY | ShiftMask, XK_m, spawn, { .v = (const char *[]){ "playlists", NULL } } },
- { MODKEY | ControlMask, XK_m, spawn, { .v = (const char *[]){ "mpdmenu", NULL } } },
- { MODKEY, XK_p, spawn, { .v = (const char *[]){ "mpc", "toggle", NULL } } },
- { MODKEY | ShiftMask, XK_p, spawn, SHCMD("mpc pause; pauseallmpv") },
- { MODKEY | ControlMask, XK_p, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ControlMask, XK_s, spawn, SHCMD("mpc stop; pkill -RTMIN+11 dwmblocks") },
- { MODKEY, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "prev", NULL } } },
- { MODKEY, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "next", NULL } } },
- { MODKEY | ShiftMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "-10", NULL } } },
- { MODKEY | ShiftMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "seek", "+10", NULL } } },
- { MODKEY | ControlMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "-60", NULL } } },
- { MODKEY | ControlMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "seek", "+60", NULL } } },
- { MODKEY | ShiftMask | ControlMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "0%", NULL } } },
- { MODKEY | ShiftMask | ControlMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "repeat", NULL } } },
- { MODKEY , XK_backslash, spawn, { .v = (const char *[]){ "mpc", "single", NULL } } },
- { MODKEY | ShiftMask, XK_backslash, spawn, { .v = (const char *[]){ "mpc", "random", NULL } } },
- { MODKEY | ControlMask, XK_backslash, spawn, SHCMD("mpc repeat off; mpc random off; mpc single off; pkill -RTMIN+11 dwmblocks") },
-
- /* LAYOUT SIZE */
- { MODKEY | ShiftMask, XK_n, incnmaster, { .i = -1 } },
- { MODKEY | ControlMask, XK_n, incnmaster, { .i = +1 } },
- { MODKEY, XK_f, togglefullscr, {0} },
- { MODKEY, XK_h, setmfact, { .f = -0.05 } },
- { MODKEY, XK_l, setmfact, { .f = +0.05 } },
- { MODKEY, XK_s, togglesticky, {0} },
- { MODKEY, XK_space, zoom, {0} },
- { MODKEY | ControlMask, XK_j, setcfact, { .f = -0.25 } },
- { MODKEY | ControlMask, XK_k, setcfact, { .f = +0.25 } },
- { MODKEY | ControlMask, XK_y, setcfact, { .f = 0.00 } },
- { MODKEY | ShiftMask, XK_c, incrgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_c, incrgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_i, incrigaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_i, incrigaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_o, incrogaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_o, incrogaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_h, incrihgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_h, incrihgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_g, incrivgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_g, incrivgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_b, incrohgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_b, incrohgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_v, incrovgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_v, incrovgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_t, togglegaps, {0} },
- { MODKEY | ControlMask, XK_t, defaultgaps, {0} },
-
- /* FLOATING SIZE */
- { MODKEY2 | ControlMask, XK_h, exresize, { .v = (int []){ -25, 0 } } },
- { MODKEY2 | ControlMask, XK_l, exresize, { .v = (int []){ 25, 0 } } },
- { MODKEY2 | ControlMask, XK_j, exresize, { .v = (int []){ 0, 25 } } },
- { MODKEY2 | ControlMask, XK_k, exresize, { .v = (int []){ 0, -25 } } },
- { MODKEY2 | ControlMask, XK_comma, exresize, { .v = (int []){ -25, -25 } } },
- { MODKEY2 | ControlMask, XK_period, exresize, { .v = (int []){ 25, 25 } } },
-
- /* MEDIA CONTROL */
- { 0, XF86XK_Battery, spawn, SHCMD("pkill -RTMIN+3 dwmblocks") },
- { 0, XF86XK_WWW, spawn, { .v = (const char *[]){ BROWSER, NULL } } },
- { 0, XF86XK_DOS, spawn, { .v = termcmd } },
- { 0, XF86XK_AudioMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%- && wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%+; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%+ && wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%-; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioPrev, spawn, { .v = (const char *[]){ "mpc", "prev", NULL } } },
- { 0, XF86XK_AudioNext, spawn, { .v = (const char *[]){ "mpc", "next", NULL } } },
- { 0, XF86XK_AudioPause, spawn, { .v = (const char *[]){ "mpc", "pause", NULL } } },
- { 0, XF86XK_AudioPlay, spawn, { .v = (const char *[]){ "mpc", "play", NULL } } },
- { 0, XF86XK_AudioStop, spawn, { .v = (const char *[]){ "mpc", "stop", NULL } } },
- { 0, XF86XK_AudioRewind, spawn, { .v = (const char *[]){ "mpc", "seek", "-10", NULL } } },
- { 0, XF86XK_AudioForward, spawn, { .v = (const char *[]){ "mpc", "seek", "+10", NULL } } },
- { 0, XF86XK_AudioMedia, spawn, { .v = (const char *[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
- { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") },
- { 0, XF86XK_PowerOff, spawn, { .v = (const char*[]){ "sysact", NULL } } },
- { 0, XF86XK_Calculator, spawn, { .v = (const char *[]){ TERMINAL, "-e", "bc", "-l", NULL } } },
- { 0, XF86XK_Sleep, spawn, { .v = (const char *[]){ "sudo", "-A", "zzz", NULL } } },
- { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
- { 0, XF86XK_TaskPane, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") },
- { 0, XF86XK_MyComputer, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", "/", NULL } } },
- { 0, XF86XK_Launch1, spawn, { .v = (const char *[]){ "xset", "dpms", "force", "off", NULL } } },
- { 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") },
- { 0, XF86XK_TouchpadOff, spawn, { .v = (const char *[]){ "synclient", "TouchpadOff=1", NULL } } },
- { 0, XF86XK_TouchpadOn, spawn, { .v = (const char *[]){ "synclient", "TouchpadOff=0", NULL } } },
- { 0, XF86XK_MonBrightnessUp, spawn, { .v = (const char *[]){ "brillo", "-U", "5", "-q", NULL } } },
- { 0, XF86XK_MonBrightnessDown, spawn, { .v = (const char *[]){ "brillo", "-A", "5", "-q", NULL } } },
-
- /* MODE */
- { MODKEY, XK_Escape, setkeymode, { .ui = ModeCommand } },
-
- /* PROGRAM */
- { MODKEY, XK_d, spawn, { .v = (const char *[]){ "dmenu_run", NULL } } },
- { MODKEY, XK_e, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook 2>/dev/null") },
- { MODKEY, XK_n, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") },
- { MODKEY, XK_r, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", NULL } } },
- { MODKEY | ShiftMask, XK_r, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { MODKEY, XK_w, spawn, { .v = (const char *[]){ BROWSER, NULL } } },
- { MODKEY, XK_c, togglescratch, { .ui = 1 } }, /* calculator */
- { MODKEY, XK_u, spawn, { .v = (const char *[]){ "dmenuunicode", NULL } } },
- { MODKEY, XK_Return, spawn, { .v = termcmd } },
- { MODKEY | ShiftMask, XK_Return, spawn, { .v = (const char *[]){ "sd", NULL } } },
- { MODKEY | ControlMask, XK_Return, togglescratch, { .ui = 0 } }, /* terminal */
-
- /* SCRIPT */
- { MODKEY | ShiftMask, XK_d, spawn, { .v = (const char *[]){ "passmenu", NULL } } },
- { MODKEY | ControlMask, XK_d, spawn, { .v = (const char *[]){ "passmenu2", NULL } } },
- { MODKEY | ShiftMask, XK_f, spawn, { .v = (const char *[]){ "fecrypt", NULL } } },
- { MODKEY, XK_v, spawn, { .v = (const char *[]){ "mpvplay", NULL } } },
- { MODKEY, XK_Insert, spawn, SHCMD("xdotool type $(grep -v '^#' ~/.local/share/thesiah/snippets | dmenu -i -l 50 | cut -d' ' -f1)") },
- { 0, XK_Print, spawn, SHCMD("maim | tee ~/Pictures/screenshot-$(date '+%y%m%d-%H%M-%S').png | xclip -selection clipboard") },
- { ShiftMask, XK_Print, spawn, { .v = (const char *[]){ "maimpick", NULL } } },
- { MODKEY, XK_Print, spawn, { .v = (const char *[]){ "dmenurecord", NULL } } },
- { MODKEY, XK_Delete, spawn, { .v = (const char *[]){ "dmenurecord", "kill", NULL } } },
- { MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey -t 3 -p fixed -s small -g 20%x5%+40%-5% --key-mode keysyms --bak-mode normal --mods-mode normal -f ttf-font-awesome --opacity 0.5 &") },
- { MODKEY, XK_F1, spawn, SHCMD("groff -mom /home/si/.local/share/man/thesiah/thesiah.mom -Tpdf | zathura -") },
- { MODKEY | ShiftMask, XK_F1, spawn, SHCMD("nsxiv ~/Pictures/resources") },
- { MODKEY | ControlMask, XK_F1, spawn, { .v = (const char *[]){ TERMINAL, "-e", "dman", NULL } } },
- { MODKEY, XK_F2, spawn, { .v = (const char *[]){ "tutorialvids", NULL } } },
- { MODKEY, XK_F3, spawn, { .v = (const char *[]){ "displayselect", NULL } } },
- { MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") },
- { MODKEY, XK_F5, xrdb, { .v = NULL } },
- { MODKEY | ShiftMask, XK_F5, spawn, SHCMD("stw ~/.dotfiles/arch -d") },
- { MODKEY | ControlMask, XK_F5, spawn, { .v = (const char *[]){ "pacupgrade", NULL } } },
- { MODKEY, XK_F6, spawn, { .v = (const char *[]){ "qndl", "-v", NULL } } },
- { MODKEY | ShiftMask, XK_F6, spawn, { .v = (const char *[]){ "qndl", "-m", NULL } } },
- { MODKEY, XK_F7, spawn, { .v = (const char *[]){ "td-toggle", NULL } } },
- { MODKEY | ShiftMask, XK_F7, spawn, { .v = (const char *[]){ "transadd", NULL } } },
- { MODKEY, XK_F8, spawn, { .v = (const char *[]){ "mailsync", NULL } } },
- { MODKEY, XK_F9, spawn, { .v = (const char *[]){ "mounter", NULL } } },
- { MODKEY, XK_F10, spawn, { .v = (const char *[]){ "unmounter", NULL } } },
- { MODKEY, XK_F11, spawn, SHCMD("mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls " "/dev/video[0,2,4,6,8] | tail -n 1)") },
- { MODKEY, XK_F12, spawn, SHCMD("remaps") },
- { MODKEY | ShiftMask, XK_F12, spawn, { .v = (const char *[]){ "fcitx5-configtool", NULL } } },
-
- /* SYSTEM */
- { MODKEY | ControlMask, XK_f, spawn, SHCMD("pkill -f firefox") },
- { MODKEY | ControlMask, XK_k, spawn, SHCMD("pkill -f kakaotalk") },
- { MODKEY, XK_q, killclient, {0} },
- { MODKEY | ShiftMask, XK_q, killclient, { .ui = 1 } },
- { MODKEY | ControlMask, XK_q, killclient, { .ui = 2 } },
- { MODKEY, XK_BackSpace, spawn, { .v = (const char *[]){ "slock", NULL } } },
- { MODKEY | ShiftMask, XK_BackSpace, spawn, { .v = (const char *[]){ "sysact", NULL } } },
- { MODKEY, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -44 $(pidof dwmblocks)") },
- { MODKEY, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ShiftMask, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%-; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ShiftMask, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%+; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ControlMask, XK_minus, spawn, { .v = (const char *[]){ "brillo", "-U", "5", "-q", NULL } } },
- { MODKEY | ControlMask, XK_equal, spawn, { .v = (const char *[]){ "brillo", "-A", "5", "-q", NULL } } },
- { 0, XK_Alt_R, spawn, SHCMD("fcitx5-remote -t; pkill -RTMIN+29 dwmblocks") },
- { ControlMask, XK_F5, quit, {1} },
- { ShiftMask | ControlMask, XK_F5, spawn, SHCMD("killall -q dwmblocks; setsid -f dwmblocks") },
-
- /* TRAVERSAL */
- { MODKEY | ShiftMask, XK_0, tag, { .ui = ~0 } },
- { MODKEY2, XK_comma, shiftview, { .i = -1 } },
- { MODKEY2, XK_period, shiftview, { .i = 1 } },
- { MODKEY2 | ShiftMask, XK_comma, shifttag, { .i = -1 } },
- { MODKEY2 | ShiftMask, XK_period, shifttag, { .i = 1 } },
- { MODKEY, XK_comma, shiftviewclients, { .i = -1 } },
- { MODKEY, XK_period, shiftviewclients, { .i = +1 } },
- { MODKEY | ShiftMask, XK_comma, shifttagclients, { .i = -1 } },
- { MODKEY | ShiftMask, XK_period, shifttagclients, { .i = +1 } },
- { MODKEY | ControlMask, XK_comma, shiftboth, { .i = -1 } },
- { MODKEY | ControlMask, XK_period, shiftboth, { .i = +1 } },
- { MODKEY | ShiftMask | ControlMask, XK_comma, shiftswaptags, { .i = -1 } },
- { MODKEY | ShiftMask | ControlMask, XK_period, shiftswaptags, { .i = +1 } },
- { MODKEY, XK_Left, focusmon, { .i = -1 } },
- { MODKEY, XK_Right, focusmon, { .i = +1 } },
- { MODKEY | ShiftMask, XK_Left, tagmon, { .i = -1 } },
- { MODKEY | ShiftMask, XK_Right, tagmon, { .i = +1 } },
- { MODKEY | ShiftMask, XK_Tab, view, {0} },
-
- /* { MODKEY | ShiftMask, XK_apostrophe, togglesmartgaps, {0} }, */
-
-};
-
-static Key cmdkeys[] = {
- /* modifier keys function argument */
- { 0, XK_Escape, clearcmd, {0} },
- { ControlMask, XK_c, clearcmd, {0} },
- { ControlMask, XK_x, setkeymode, { .ui = ModeInsert } },
-};
-
-static Command commands[] = {
- /* STACKKEYS */
- CSTACKKEYS(MODKEY, focus)
- CSTACKKEYS(MODKEY | ShiftMask, push)
-
- /* TAGKEYS */
- CTAGKEYS(XK_1, 0)
- CTAGKEYS(XK_2, 1)
- CTAGKEYS(XK_3, 2)
- CTAGKEYS(XK_4, 3)
- CTAGKEYS(XK_5, 4)
- CTAGKEYS(XK_6, 5)
- CTAGKEYS(XK_7, 6)
- CTAGKEYS(XK_8, 7)
- CTAGKEYS(XK_9, 8)
-
- /* Modifier (4 keys) keysyms (4 keys) function argument */
- /* APPEARANCE */
- { { ShiftMask, 0, 0, 0 }, { XK_b, 0, 0, 0 }, togglebar, {0} },
- { { ControlMask, 0, 0, 0 }, { XK_b, 0, 0, 0 }, togglebar, { .i = 1 } },
- { { ShiftMask, 0, 0, 0 }, { XK_o, 0, 0, 0 }, toggleborder, {0} },
- { { ShiftMask, 0, 0, 0 }, { XK_f, 0, 0, 0 }, togglefloating, {0} },
- { { ShiftMask, 0, 0, 0 }, { XK_g, 0, 0, 0 }, togglegaps, {0} },
- { { ControlMask, 0, 0, 0 }, { XK_g, 0, 0, 0 }, defaultgaps, {0} },
-
- /* LAYOUT */
- { { 0, 0, 0, 0 }, { XK_l, XK_t, 0, 0 }, setlayout, { .v = &layouts[0] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_m, 0, 0 }, setlayout, { .v = &layouts[1] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_l, 0 }, setlayout, { .v = &layouts[2] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_s, 0, 0 }, setlayout, { .v = &layouts[3] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_w, 0, 0 }, setlayout, { .v = &layouts[4] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_d, 0, 0 }, setlayout, { .v = &layouts[5] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_b, XK_e, 0 }, setlayout, { .v = &layouts[6] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_b, XK_h, 0 }, setlayout, { .v = &layouts[7] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_e, 0 }, setlayout, { .v = &layouts[8] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_r, 0 }, setlayout, { .v = &layouts[9] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_h, 0 }, setlayout, { .v = &layouts[10] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_g, 0 }, setlayout, { .v = &layouts[11] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_m, 0 }, setlayout, { .v = &layouts[12] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_f, 0 }, setlayout, { .v = &layouts[13] } },
-
- { { 0, 0, 0, 0 }, { XK_f, XK_u, 0, 0 }, explace, { .ui = EX_NW } },
- { { 0, 0, 0, 0 }, { XK_f, XK_i, 0, 0 }, explace, { .ui = EX_N } },
- { { 0, 0, 0, 0 }, { XK_f, XK_o, 0, 0 }, explace, { .ui = EX_NE } },
- { { 0, 0, 0, 0 }, { XK_f, XK_h, 0, 0 }, explace, { .ui = EX_W } },
- { { 0, 0, 0, 0 }, { XK_f, XK_k, 0, 0 }, explace, { .ui = EX_C } },
- { { 0, 0, 0, 0 }, { XK_f, XK_l, 0, 0 }, explace, { .ui = EX_E } },
- { { 0, 0, 0, 0 }, { XK_f, XK_m, 0, 0 }, explace, { .ui = EX_SW } },
- { { 0, 0, 0, 0 }, { XK_f, XK_comma, 0, 0 }, explace, { .ui = EX_S } },
- { { 0, 0, 0, 0 }, { XK_f, XK_period, 0, 0 }, explace, { .ui = EX_SE } },
-
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_h, 0 }, togglehorizontalexpand, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_h, 0 }, togglehorizontalexpand, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_h, 0 }, togglehorizontalexpand, { .i = -1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_v, 0 }, toggleverticalexpand, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_v, 0 }, toggleverticalexpand, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_v, 0 }, toggleverticalexpand, { .i = -1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_m, 0 }, togglemaximize, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_m, 0 }, togglemaximize, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_m, 0 }, togglemaximize, { .i = -1 } },
-
- /* PROGRAM */
- { { 0, 0, 0, 0 }, { XK_a, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e abook -C ~/.abook/abookrc --datafile ~/.abook/addressbook") },
- { { 0, 0, 0, 0 }, { XK_e, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook 2>/dev/null") },
- { { 0, 0, 0, 0 }, { XK_g, 0, 0, 0 }, spawn, { .v = (const char *[]){ "gimp", NULL } } },
- { { 0, 0, 0, 0 }, { XK_h, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { { 0, 0, 0, 0 }, { XK_k, 0, 0, 0 }, spawn, { .v = (const char *[]){ "kakaotalk", NULL } } },
- { { 0, 0, 0, 0 }, { XK_m, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
- { { 0, 0, 0, 0 }, { XK_n, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") },
- { { 0, 0, 0, 0 }, { XK_p, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "profanity", NULL } } },
- { { 0, 0, 0, 0 }, { XK_r, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", NULL } } },
- { { 0, 0, 0, 0 }, { XK_s, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e sc-im /home/si/.dotfiles/THESIAH/progs.csv") },
- { { 0, 0, 0, 0 }, { XK_t, XK_h, 0, 0 }, spawn, { .v = (const char *[]){ "thunderbird", NULL } } },
- { { 0, 0, 0, 0 }, { XK_t, XK_w, 0, 0 }, spawn, { .v = (const char *[]){ "torwrap", NULL } } },
- { { 0, 0, 0, 0 }, { XK_v, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "nvim", "-c", "VimwikiIndex", "1", NULL } } },
- { { 0, 0, 0, 0 }, { XK_w, XK_e, 0, 0 }, spawn, SHCMD(TERMINAL " -e less -Sf ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport") },
- { { 0, 0, 0, 0 }, { XK_w, XK_f, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "sudo", "nmtui", NULL } } },
-};
-
-/* button definitions */
-/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
- * ClkClientWin, or ClkRootWin */
-static const Button buttons[] = {
-/* click event mask button function argument */
-#ifndef __OpenBSD__
- { ClkWinTitle, 0, Button2, zoom, {0} },
- { ClkStatusText, 0, Button1, sigdwmblocks, { .i = 1 } },
- { ClkStatusText, 0, Button2, sigdwmblocks, { .i = 2 } },
- { ClkStatusText, 0, Button3, sigdwmblocks, { .i = 3 } },
- { ClkStatusText, 0, Button4, sigdwmblocks, { .i = 4 } },
- { ClkStatusText, 0, Button5, sigdwmblocks, { .i = 5 } },
- { ClkStatusText, ShiftMask, Button1, sigdwmblocks, { .i = 6 } },
-#endif
- { ClkStatusText, ShiftMask, Button3, spawn, SHCMD(TERMINAL " -e nvim ~/.local/src/suckless/dwmblocks/config.h") },
- { ClkClientWin, MODKEY, Button1, movemouse, {0} },
- { ClkClientWin, MODKEY, Button2, defaultgaps, {0} },
- { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
- { ClkClientWin, MODKEY, Button4, incrgaps, { .i = +1 } },
- { ClkClientWin, MODKEY, Button5, incrgaps, { .i = -1 } },
- { ClkTagBar, 0, Button1, view, {0} },
- { ClkTagBar, 0, Button3, toggleview, {0} },
- { ClkTagBar, MODKEY, Button1, tag, {0} },
- { ClkTagBar, MODKEY, Button3, toggletag, {0} },
- { ClkTagBar, 0, Button4, shiftview, { .i = -1 } },
- { ClkTagBar, 0, Button5, shiftview, { .i = 1 } },
- { ClkRootWin, 0, Button2, togglebar, {0} },
-};
diff --git a/dwm/config.h.bak b/dwm/config.h.bak
deleted file mode 100644
index dec3915..0000000
--- a/dwm/config.h.bak
+++ /dev/null
@@ -1,495 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-/* constants */
-#define TERMINAL "st"
-#define TERMCLASS "St"
-#define BROWSER "firefox"
-#define BROWSERCLASS "Firefox"
-#define GAP 6
-
-/* appearance */
-static unsigned int borderpx = 3; /* border pixel of windows */
-static unsigned int snap = 32; /* snap pixel */
-static unsigned int gappih = GAP; /* horiz inner gap between windows */
-static unsigned int gappiv = GAP; /* vert inner gap between windows */
-static unsigned int gappoh = GAP; /* horiz outer gap between windows and screen edge */
-static unsigned int gappov = GAP; /* vert outer gap between windows and screen edge */
-static int swallowfloating = 0; /* 1 means swallow floating windows by default */
-static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
-static int showbar = 1; /* 0 means no bar */
-static int topbar = 1; /* 0 means bottom bar */
-static const int vertpad = GAP; /* vertical padding of bar */
-static const int sidepad = GAP; /* horizontal padding of bar */
-static char *fonts[] = {
- "monospace:size=10",
- "NotoColorEmoji:pixelsize=10:antialias=true:autohint=true" };
-static char normbgcolor[] = "#222222";
-static char normbordercolor[] = "#555555";
-static char normfgcolor[] = "#bbbbbb";
-static char selfgcolor[] = "#eeeeee";
-static char selbordercolor[] = "#4CBB17";
-static char selbgcolor[] = "#005577";
-static const unsigned int baralpha = 0xd0;
-static const unsigned int borderalpha = OPAQUE;
-static char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },
- [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor },
-};
-static const unsigned int alphas[][3] = {
- /* fg bg border */
- [SchemeNorm] = { OPAQUE, baralpha, borderalpha },
- [SchemeSel] = { OPAQUE, baralpha, borderalpha },
-};
-
-typedef struct {
- const char *name;
- const void *cmd;
-} Sp;
-
-/* scratchpads */
-const char *spcmd1[] = { TERMINAL, "-n", "spterm", "-g", "120x34", NULL };
-const char *spcmd2[] = { TERMINAL, "-n", "spcalc", "-f", "monospace:size=16",
- "-g", "50x20", "-e", "bc", "-lq", NULL };
-static Sp scratchpads[] = {
- /* name cmd */
- { "spterm", spcmd1 },
- { "spcalc", spcmd2 },
-};
-
-/* 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 isterminal noswallow monitor */
- { "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1 },
- { "kakaotalk", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
- { TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1 },
- { BROWSERCLASS, NULL, NULL, 0, 0, 0, -1, -1 },
- { TERMCLASS, "floatterm", NULL, 0, 1, 1, 0, -1 },
- { TERMCLASS, "bg", NULL, 1 << 7, 0, 1, 0, -1 },
- { TERMCLASS, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 },
- { TERMCLASS, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 },
- { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
-};
-
-/* layout(s) */
-static float mfact = 0.55; /* factor of master area size [0.05..0.95] */
-static int nmaster = 1; /* number of clients in master area */
-static int resizehints = 0; /* 1 means respect size hints in tiled resizals */
-static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
-
-#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
-#include "vanitygaps.c"
-
-static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile }, /* 0: Default: Master on left, slaves on right */
- { "[M]", monocle }, /* 1: All windows on top of eachother */
- { "|||", col }, /* 2: Column */
- { "[@]", spiral }, /* 3: Fibonacci spiral */
- { "[\\]", dwindle }, /* 4: Decreasing in size right and leftward */
- { "H[]", deck }, /* 5: Master on left, slaves in monocle-like mode on right */
- { "TTT", bstack }, /* 6: Master on top, slaves on bottom horizontally */
- { "===", bstackhoriz }, /* 7: Master on top, slaves on bottom vertically */
- { "HHH", grid }, /* 8: Equal grid */
- { "###", nrowgrid }, /* 9: Number of row grid */
- { "---", horizgrid }, /* 10: Horizontal grid */
- { ":::", gaplessgrid }, /* 11: Gapless grid */
- { "|M|", centeredmaster }, /* 12: Master in middle, slaves on sides */
- { ">M>", centeredfloatingmaster }, /* 13: Same but master floats */
- { "><>", NULL }, /* 14: no layout function means floating behavior */
- { NULL, NULL },
-};
-
-/* imports */
-#include <X11/XF86keysym.h>
-#include "shift-tools-scratchpads.c"
-#include "tagandview.c"
-#include "exresize.c"
-
-/* key definitions */
-#define MODKEY Mod4Mask
-#define MODKEY2 Mod1Mask
-
-#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 } }, \
- { MODKEY2 | ShiftMask, KEY, tagandview, { .ui = 1 << TAG } },
-
-#define CTAGKEYS(KEY, TAG) \
- { {0,0,0,0}, {KEY,0,0,0}, view, { .ui = 1 << TAG} }, \
- { {ControlMask,0,0,0}, {KEY,0,0,0}, toggleview, { .ui = 1 << TAG} }, \
- { {ShiftMask,0,0,0}, {KEY,0,0,0}, tag, { .ui = 1 << TAG} }, \
- { {ControlMask|ShiftMask,0,0,0}, {KEY,0,0,0}, toggletag, { .ui = 1 << TAG} },
-
-#define STACKKEYS(MOD, ACTION) \
- { MOD, XK_j, ACTION##stack, { .i = INC(+1) } }, \
- { MOD, XK_k, ACTION##stack, { .i = INC(-1) } }, \
- { MOD, XK_Tab, ACTION##stack, { .i = PREVSEL } }, \
- { MOD, XK_x, ACTION##stack, { .i = 0 } }, \
- { MOD, XK_a, ACTION##stack, { .i = 1 } }, \
- { MOD, XK_s, ACTION##stack, { .i = 2 } }, \
- { MOD, XK_z, ACTION##stack, { .i = -1 } },
-
-#define CSTACKKEYS(MOD, ACTION) \
- { {MOD,0,0,0}, {XK_j, 0,0,0}, ACTION##stack, { .i = INC(+1) } }, \
- { {MOD,0,0,0}, {XK_k, 0,0,0}, ACTION##stack, { .i = INC(-1) } }, \
- { {MOD,0,0,0}, {XK_Tab,0,0,0}, ACTION##stack, { .i = PREVSEL } }, \
- { {MOD,0,0,0}, {XK_x, 0,0,0}, ACTION##stack, { .i = 0 } }, \
- { {MOD,0,0,0}, {XK_a, 0,0,0}, ACTION##stack, { .i = 1 } }, \
- { {MOD,0,0,0}, {XK_s, 0,0,0}, ACTION##stack, { .i = 2 } }, \
- { {MOD,0,0,0}, {XK_z, 0,0,0}, ACTION##stack, { .i = -1 } },
-
-/* 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 const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb",
-// normbgcolor, "-nf", normfgcolor, "-sb",
-// selbordercolor, "-sf", selfgcolor, NULL };
-static const char *termcmd[] = { TERMINAL, NULL };
-
-/* Xresources preferences to load at startup */
-ResourcePref resources[] = {
- { "color0", STRING, &normbordercolor },
- { "color8", STRING, &selbordercolor },
- { "color0", STRING, &normbgcolor },
- { "color4", STRING, &normfgcolor },
- { "color0", STRING, &selfgcolor },
- { "color4", STRING, &selbgcolor },
- { "borderpx", INTEGER, &borderpx },
- { "snap", INTEGER, &snap },
- { "showbar", INTEGER, &showbar },
- { "topbar", INTEGER, &topbar },
- { "nmaster", INTEGER, &nmaster },
- { "resizehints", INTEGER, &resizehints },
- { "mfact", FLOAT, &mfact },
- { "gappih", INTEGER, &gappih },
- { "gappiv", INTEGER, &gappiv },
- { "gappoh", INTEGER, &gappoh },
- { "gappov", INTEGER, &gappov },
- { "swallowfloating", INTEGER, &swallowfloating },
- { "smartgaps", INTEGER, &smartgaps },
-};
-
-static const Key keys[] = {
- /* STACKKEYS */
- STACKKEYS(MODKEY, focus)
- STACKKEYS(MODKEY | ShiftMask, push)
-
- /* TAGKEYS */
- 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)
-
- /* modifier key function argument */
- /* AUDIO CONTROL */
- { MODKEY, XK_m, spawn, SHCMD("mpc random on; mpc load entire; mpc play; pkill -RTMIN+11 dwmblocks") },
- { MODKEY | ShiftMask, XK_m, spawn, { .v = (const char *[]){ "playlists", NULL } } },
- { MODKEY | ControlMask, XK_m, spawn, { .v = (const char *[]){ "mpdmenu", NULL } } },
- { MODKEY, XK_p, spawn, { .v = (const char *[]){ "mpc", "toggle", NULL } } },
- { MODKEY | ShiftMask, XK_p, spawn, SHCMD("mpc pause; pauseallmpv") },
- { MODKEY | ControlMask, XK_p, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ControlMask, XK_s, spawn, SHCMD("mpc stop; pkill -RTMIN+11 dwmblocks") },
- { MODKEY, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "prev", NULL } } },
- { MODKEY, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "next", NULL } } },
- { MODKEY | ShiftMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "-10", NULL } } },
- { MODKEY | ShiftMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "seek", "+10", NULL } } },
- { MODKEY | ControlMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "-60", NULL } } },
- { MODKEY | ControlMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "seek", "+60", NULL } } },
- { MODKEY | ShiftMask | ControlMask, XK_bracketleft, spawn, { .v = (const char *[]){ "mpc", "seek", "0%", NULL } } },
- { MODKEY | ShiftMask | ControlMask, XK_bracketright, spawn, { .v = (const char *[]){ "mpc", "repeat", NULL } } },
- { MODKEY , XK_backslash, spawn, { .v = (const char *[]){ "mpc", "single", NULL } } },
- { MODKEY | ShiftMask, XK_backslash, spawn, { .v = (const char *[]){ "mpc", "random", NULL } } },
- { MODKEY | ControlMask, XK_backslash, spawn, SHCMD("mpc repeat off; mpc random off; mpc single off; pkill -RTMIN+11 dwmblocks") },
-
- /* LAYOUT SIZE */
- { MODKEY | ShiftMask, XK_n, incnmaster, { .i = -1 } },
- { MODKEY | ControlMask, XK_n, incnmaster, { .i = +1 } },
- { MODKEY, XK_f, togglefullscr, {0} },
- { MODKEY, XK_h, setmfact, { .f = -0.05 } },
- { MODKEY, XK_l, setmfact, { .f = +0.05 } },
- { MODKEY, XK_s, togglesticky, {0} },
- { MODKEY, XK_space, zoom, {0} },
- { MODKEY | ControlMask, XK_j, setcfact, { .f = -0.25 } },
- { MODKEY | ControlMask, XK_k, setcfact, { .f = +0.25 } },
- { MODKEY | ControlMask, XK_y, setcfact, { .f = 0.00 } },
- { MODKEY | ShiftMask, XK_c, incrgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_c, incrgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_i, incrigaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_i, incrigaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_o, incrogaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_o, incrogaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_h, incrihgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_h, incrihgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_g, incrivgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_g, incrivgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_b, incrohgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_b, incrohgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_v, incrovgaps, { .i = -5 } },
- { MODKEY | ControlMask, XK_v, incrovgaps, { .i = +5 } },
- { MODKEY | ShiftMask, XK_t, togglegaps, {0} },
- { MODKEY | ControlMask, XK_t, defaultgaps, {0} },
-
- /* FLOATING SIZE */
- { MODKEY2 | ControlMask, XK_h, exresize, { .v = (int []){ -25, 0 } } },
- { MODKEY2 | ControlMask, XK_l, exresize, { .v = (int []){ 25, 0 } } },
- { MODKEY2 | ControlMask, XK_j, exresize, { .v = (int []){ 0, 25 } } },
- { MODKEY2 | ControlMask, XK_k, exresize, { .v = (int []){ 0, -25 } } },
- { MODKEY2 | ControlMask, XK_comma, exresize, { .v = (int []){ -25, -25 } } },
- { MODKEY2 | ControlMask, XK_period, exresize, { .v = (int []){ 25, 25 } } },
-
- /* MEDIA CONTROL */
- { 0, XF86XK_Battery, spawn, SHCMD("pkill -RTMIN+3 dwmblocks") },
- { 0, XF86XK_WWW, spawn, { .v = (const char *[]){ BROWSER, NULL } } },
- { 0, XF86XK_DOS, spawn, { .v = termcmd } },
- { 0, XF86XK_AudioMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%- && wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%+; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%+ && wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%-; kill -44 $(pidof dwmblocks)") },
- { 0, XF86XK_AudioPrev, spawn, { .v = (const char *[]){ "mpc", "prev", NULL } } },
- { 0, XF86XK_AudioNext, spawn, { .v = (const char *[]){ "mpc", "next", NULL } } },
- { 0, XF86XK_AudioPause, spawn, { .v = (const char *[]){ "mpc", "pause", NULL } } },
- { 0, XF86XK_AudioPlay, spawn, { .v = (const char *[]){ "mpc", "play", NULL } } },
- { 0, XF86XK_AudioStop, spawn, { .v = (const char *[]){ "mpc", "stop", NULL } } },
- { 0, XF86XK_AudioRewind, spawn, { .v = (const char *[]){ "mpc", "seek", "-10", NULL } } },
- { 0, XF86XK_AudioForward, spawn, { .v = (const char *[]){ "mpc", "seek", "+10", NULL } } },
- { 0, XF86XK_AudioMedia, spawn, { .v = (const char *[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
- { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") },
- { 0, XF86XK_PowerOff, spawn, { .v = (const char*[]){ "sysact", NULL } } },
- { 0, XF86XK_Calculator, spawn, { .v = (const char *[]){ TERMINAL, "-e", "bc", "-l", NULL } } },
- { 0, XF86XK_Sleep, spawn, { .v = (const char *[]){ "sudo", "-A", "zzz", NULL } } },
- { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
- { 0, XF86XK_TaskPane, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") },
- { 0, XF86XK_MyComputer, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", "/", NULL } } },
- { 0, XF86XK_Launch1, spawn, { .v = (const char *[]){ "xset", "dpms", "force", "off", NULL } } },
- { 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") },
- { 0, XF86XK_TouchpadOff, spawn, { .v = (const char *[]){ "synclient", "TouchpadOff=1", NULL } } },
- { 0, XF86XK_TouchpadOn, spawn, { .v = (const char *[]){ "synclient", "TouchpadOff=0", NULL } } },
- { 0, XF86XK_MonBrightnessUp, spawn, { .v = (const char *[]){ "brillo", "-U", "5", "-q", NULL } } },
- { 0, XF86XK_MonBrightnessDown, spawn, { .v = (const char *[]){ "brillo", "-A", "5", "-q", NULL } } },
-
- /* MODE */
- { MODKEY, XK_Escape, setkeymode, { .ui = ModeCommand } },
-
- /* PROGRAM */
- { MODKEY, XK_d, spawn, { .v = (const char *[]){ "dmenu_run", NULL } } },
- { MODKEY, XK_e, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook 2>/dev/null") },
- { MODKEY, XK_n, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") },
- { MODKEY, XK_r, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", NULL } } },
- { MODKEY | ShiftMask, XK_r, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { MODKEY, XK_w, spawn, { .v = (const char *[]){ BROWSER, NULL } } },
- { MODKEY, XK_c, togglescratch, { .ui = 1 } }, /* calculator */
- { MODKEY, XK_u, spawn, { .v = (const char *[]){ "dmenuunicode", NULL } } },
- { MODKEY, XK_Return, spawn, { .v = termcmd } },
- { MODKEY | ShiftMask, XK_Return, spawn, { .v = (const char *[]){ "sd", NULL } } },
- { MODKEY | ControlMask, XK_Return, togglescratch, { .ui = 0 } }, /* terminal */
-
- /* SCRIPT */
- { MODKEY | ShiftMask, XK_d, spawn, { .v = (const char *[]){ "passmenu", NULL } } },
- { MODKEY | ControlMask, XK_d, spawn, { .v = (const char *[]){ "passmenu2", NULL } } },
- { MODKEY | ShiftMask, XK_f, spawn, { .v = (const char *[]){ "fecrypt", NULL } } },
- { MODKEY, XK_v, spawn, { .v = (const char *[]){ "mpvplay", NULL } } },
- { MODKEY, XK_Insert, spawn, SHCMD("xdotool type $(grep -v '^#' ~/.local/share/thesiah/snippets | dmenu -i -l 50 | cut -d' ' -f1)") },
- { 0, XK_Print, spawn, SHCMD("maim | tee ~/Pictures/screenshot-$(date '+%y%m%d-%H%M-%S').png | xclip -selection clipboard") },
- { ShiftMask, XK_Print, spawn, { .v = (const char *[]){ "maimpick", NULL } } },
- { MODKEY, XK_Print, spawn, { .v = (const char *[]){ "dmenurecord", NULL } } },
- { MODKEY, XK_Delete, spawn, { .v = (const char *[]){ "dmenurecord", "kill", NULL } } },
- { MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey -t 3 -p fixed -s small -g 20%x5%+40%-5% --key-mode keysyms --bak-mode normal --mods-mode normal -f ttf-font-awesome --opacity 0.5 &") },
- { MODKEY, XK_F1, spawn, SHCMD("groff -mom /home/si/.local/share/man/thesiah/thesiah.mom -Tpdf | zathura -") },
- { MODKEY | ShiftMask, XK_F1, spawn, SHCMD("nsxiv ~/Pictures/resources") },
- { MODKEY | ControlMask, XK_F1, spawn, { .v = (const char *[]){ TERMINAL, "-e", "dman", NULL } } },
- { MODKEY, XK_F2, spawn, { .v = (const char *[]){ "tutorialvids", NULL } } },
- { MODKEY, XK_F3, spawn, { .v = (const char *[]){ "displayselect", NULL } } },
- { MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") },
- { MODKEY, XK_F5, xrdb, { .v = NULL } },
- { MODKEY | ShiftMask, XK_F5, spawn, SHCMD("stw ~/.dotfiles/arch -d") },
- { MODKEY | ControlMask, XK_F5, spawn, { .v = (const char *[]){ "pacupgrade", NULL } } },
- { MODKEY, XK_F6, spawn, { .v = (const char *[]){ "qndl", "-v", NULL } } },
- { MODKEY | ShiftMask, XK_F6, spawn, { .v = (const char *[]){ "qndl", "-m", NULL } } },
- { MODKEY, XK_F7, spawn, { .v = (const char *[]){ "td-toggle", NULL } } },
- { MODKEY | ShiftMask, XK_F7, spawn, { .v = (const char *[]){ "transadd", NULL } } },
- { MODKEY, XK_F8, spawn, { .v = (const char *[]){ "mailsync", NULL } } },
- { MODKEY, XK_F9, spawn, { .v = (const char *[]){ "mounter", NULL } } },
- { MODKEY, XK_F10, spawn, { .v = (const char *[]){ "unmounter", NULL } } },
- { MODKEY, XK_F11, spawn, SHCMD("mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls " "/dev/video[0,2,4,6,8] | tail -n 1)") },
- { MODKEY, XK_F12, spawn, SHCMD("remaps") },
- { MODKEY | ShiftMask, XK_F12, spawn, { .v = (const char *[]){ "fcitx5-configtool", NULL } } },
-
- /* SYSTEM */
- { MODKEY | ControlMask, XK_f, spawn, SHCMD("pkill -f firefox") },
- { MODKEY | ControlMask, XK_k, spawn, SHCMD("pkill -f kakaotalk") },
- { MODKEY, XK_q, killclient, {0} },
- { MODKEY | ShiftMask, XK_q, killclient, { .ui = 1 } },
- { MODKEY | ControlMask, XK_q, killclient, { .ui = 2 } },
- { MODKEY, XK_BackSpace, spawn, { .v = (const char *[]){ "slock", NULL } } },
- { MODKEY | ShiftMask, XK_BackSpace, spawn, { .v = (const char *[]){ "sysact", NULL } } },
- { MODKEY, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -44 $(pidof dwmblocks)") },
- { MODKEY, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ShiftMask, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%-; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ShiftMask, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%+; kill -44 $(pidof dwmblocks)") },
- { MODKEY | ControlMask, XK_minus, spawn, { .v = (const char *[]){ "brillo", "-U", "5", "-q", NULL } } },
- { MODKEY | ControlMask, XK_equal, spawn, { .v = (const char *[]){ "brillo", "-A", "5", "-q", NULL } } },
- { 0, XK_Alt_R, spawn, SHCMD("fcitx5-remote -t; pkill -RTMIN+29 dwmblocks") },
- { ControlMask, XK_F5, quit, {1} },
- { ShiftMask | ControlMask, XK_F5, spawn, SHCMD("killall -q dwmblocks; setsid -f dwmblocks") },
-
- /* TRAVERSAL */
- { MODKEY | ShiftMask, XK_0, tag, { .ui = ~0 } },
- { MODKEY2, XK_comma, shiftview, { .i = -1 } },
- { MODKEY2, XK_period, shiftview, { .i = 1 } },
- { MODKEY2 | ShiftMask, XK_comma, shifttag, { .i = -1 } },
- { MODKEY2 | ShiftMask, XK_period, shifttag, { .i = 1 } },
- { MODKEY, XK_comma, shiftviewclients, { .i = -1 } },
- { MODKEY, XK_period, shiftviewclients, { .i = +1 } },
- { MODKEY | ShiftMask, XK_comma, shifttagclients, { .i = -1 } },
- { MODKEY | ShiftMask, XK_period, shifttagclients, { .i = +1 } },
- { MODKEY | ControlMask, XK_comma, shiftboth, { .i = -1 } },
- { MODKEY | ControlMask, XK_period, shiftboth, { .i = +1 } },
- { MODKEY | ShiftMask | ControlMask, XK_comma, shiftswaptags, { .i = -1 } },
- { MODKEY | ShiftMask | ControlMask, XK_period, shiftswaptags, { .i = +1 } },
- { MODKEY, XK_Left, focusmon, { .i = -1 } },
- { MODKEY, XK_Right, focusmon, { .i = +1 } },
- { MODKEY | ShiftMask, XK_Left, tagmon, { .i = -1 } },
- { MODKEY | ShiftMask, XK_Right, tagmon, { .i = +1 } },
- { MODKEY | ShiftMask, XK_Tab, view, {0} },
-
- /* { MODKEY | ShiftMask, XK_apostrophe, togglesmartgaps, {0} }, */
-
-};
-
-static Key cmdkeys[] = {
- /* modifier keys function argument */
- { 0, XK_Escape, clearcmd, {0} },
- { ControlMask, XK_c, clearcmd, {0} },
- { ControlMask, XK_x, setkeymode, { .ui = ModeInsert } },
-};
-
-static Command commands[] = {
- /* STACKKEYS */
- CSTACKKEYS(MODKEY, focus)
- CSTACKKEYS(MODKEY | ShiftMask, push)
-
- /* TAGKEYS */
- CTAGKEYS(XK_1, 0)
- CTAGKEYS(XK_2, 1)
- CTAGKEYS(XK_3, 2)
- CTAGKEYS(XK_4, 3)
- CTAGKEYS(XK_5, 4)
- CTAGKEYS(XK_6, 5)
- CTAGKEYS(XK_7, 6)
- CTAGKEYS(XK_8, 7)
- CTAGKEYS(XK_9, 8)
-
- /* Modifier (4 keys) keysyms (4 keys) function argument */
- /* APPEARANCE */
- { { ShiftMask, 0, 0, 0 }, { XK_b, 0, 0, 0 }, togglebar, {0} },
- { { ControlMask, 0, 0, 0 }, { XK_b, 0, 0, 0 }, togglebar, { .i = 1 } },
- { { ShiftMask, 0, 0, 0 }, { XK_o, 0, 0, 0 }, toggleborder, {0} },
- { { ShiftMask, 0, 0, 0 }, { XK_f, 0, 0, 0 }, togglefloating, {0} },
- { { ShiftMask, 0, 0, 0 }, { XK_g, 0, 0, 0 }, togglegaps, {0} },
- { { ControlMask, 0, 0, 0 }, { XK_g, 0, 0, 0 }, defaultgaps, {0} },
-
- /* LAYOUT */
- { { 0, 0, 0, 0 }, { XK_l, XK_t, 0, 0 }, setlayout, { .v = &layouts[0] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_m, 0, 0 }, setlayout, { .v = &layouts[1] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_l, 0 }, setlayout, { .v = &layouts[2] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_s, 0, 0 }, setlayout, { .v = &layouts[3] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_w, 0, 0 }, setlayout, { .v = &layouts[4] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_d, 0, 0 }, setlayout, { .v = &layouts[5] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_b, XK_e, 0 }, setlayout, { .v = &layouts[6] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_b, XK_h, 0 }, setlayout, { .v = &layouts[7] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_e, 0 }, setlayout, { .v = &layouts[8] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_r, 0 }, setlayout, { .v = &layouts[9] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_h, 0 }, setlayout, { .v = &layouts[10] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_g, XK_g, 0 }, setlayout, { .v = &layouts[11] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_m, 0 }, setlayout, { .v = &layouts[12] } },
- { { 0, 0, 0, 0 }, { XK_l, XK_c, XK_f, 0 }, setlayout, { .v = &layouts[13] } },
-
- { { 0, 0, 0, 0 }, { XK_f, XK_u, 0, 0 }, explace, { .ui = EX_NW } },
- { { 0, 0, 0, 0 }, { XK_f, XK_i, 0, 0 }, explace, { .ui = EX_N } },
- { { 0, 0, 0, 0 }, { XK_f, XK_o, 0, 0 }, explace, { .ui = EX_NE } },
- { { 0, 0, 0, 0 }, { XK_f, XK_h, 0, 0 }, explace, { .ui = EX_W } },
- { { 0, 0, 0, 0 }, { XK_f, XK_k, 0, 0 }, explace, { .ui = EX_C } },
- { { 0, 0, 0, 0 }, { XK_f, XK_l, 0, 0 }, explace, { .ui = EX_E } },
- { { 0, 0, 0, 0 }, { XK_f, XK_m, 0, 0 }, explace, { .ui = EX_SW } },
- { { 0, 0, 0, 0 }, { XK_f, XK_comma, 0, 0 }, explace, { .ui = EX_S } },
- { { 0, 0, 0, 0 }, { XK_f, XK_period, 0, 0 }, explace, { .ui = EX_SE } },
-
- /* FLOATING SIZE */
- { { ControlMask, 0, 0, 0 }, { XK_j, 0, 0, 0 }, exresize, { .v = (int []){ 0, 25 } } },
- { { ControlMask, 0, 0, 0 }, { XK_k, 0, 0, 0 }, exresize, { .v = (int []){ 0, -25 } } },
- { { ControlMask, 0, 0, 0 }, { XK_l, 0, 0, 0 }, exresize, { .v = (int []){ 25, 0 } } },
- { { ControlMask, 0, 0, 0 }, { XK_h, 0, 0, 0 }, exresize, { .v = (int []){ -25, 0 } } },
- { { ControlMask, 0, 0, 0 }, { XK_comma, 0, 0, 0 }, exresize, { .v = (int []){ -25, -25 } } },
- { { ControlMask, 0, 0, 0 }, { XK_period, 0, 0, 0 }, exresize, { .v = (int []){ 25, 25 } } },
-
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_h, 0 }, togglehorizontalexpand, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_h, 0 }, togglehorizontalexpand, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_h, 0 }, togglehorizontalexpand, { .i = -1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_v, 0 }, toggleverticalexpand, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_v, 0 }, toggleverticalexpand, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_v, 0 }, toggleverticalexpand, { .i = -1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_i, XK_m, 0 }, togglemaximize, { .i = +1 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_r, XK_m, 0 }, togglemaximize, { .i = 0 } },
- { { ControlMask, 0, 0, 0 }, { XK_f, XK_d, XK_m, 0 }, togglemaximize, { .i = -1 } },
-
- /* PROGRAM */
- { { 0, 0, 0, 0 }, { XK_a, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e abook -C ~/.abook/abookrc --datafile ~/.abook/addressbook") },
- { { 0, 0, 0, 0 }, { XK_e, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook 2>/dev/null") },
- { { 0, 0, 0, 0 }, { XK_g, 0, 0, 0 }, spawn, { .v = (const char *[]){ "gimp", NULL } } },
- { { 0, 0, 0, 0 }, { XK_h, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "htop", NULL } } },
- { { 0, 0, 0, 0 }, { XK_k, 0, 0, 0 }, spawn, { .v = (const char *[]){ "kakaotalk", NULL } } },
- { { 0, 0, 0, 0 }, { XK_m, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
- { { 0, 0, 0, 0 }, { XK_n, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") },
- { { 0, 0, 0, 0 }, { XK_p, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "profanity", NULL } } },
- { { 0, 0, 0, 0 }, { XK_r, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "lfub", NULL } } },
- { { 0, 0, 0, 0 }, { XK_s, 0, 0, 0 }, spawn, SHCMD(TERMINAL " -e sc-im /home/si/.dotfiles/THESIAH/progs.csv") },
- { { 0, 0, 0, 0 }, { XK_t, XK_h, 0, 0 }, spawn, { .v = (const char *[]){ "thunderbird", NULL } } },
- { { 0, 0, 0, 0 }, { XK_t, XK_w, 0, 0 }, spawn, { .v = (const char *[]){ "torwrap", NULL } } },
- { { 0, 0, 0, 0 }, { XK_v, 0, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "nvim", "-c", "VimwikiIndex", "1", NULL } } },
- { { 0, 0, 0, 0 }, { XK_w, XK_e, 0, 0 }, spawn, SHCMD(TERMINAL " -e less -Sf ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport") },
- { { 0, 0, 0, 0 }, { XK_w, XK_f, 0, 0 }, spawn, { .v = (const char *[]){ TERMINAL, "-e", "sudo", "nmtui", NULL } } },
-};
-
-/* button definitions */
-/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
- * ClkClientWin, or ClkRootWin */
-static const Button buttons[] = {
-/* click event mask button function argument */
-#ifndef __OpenBSD__
- { ClkWinTitle, 0, Button2, zoom, {0} },
- { ClkStatusText, 0, Button1, sigdwmblocks, { .i = 1 } },
- { ClkStatusText, 0, Button2, sigdwmblocks, { .i = 2 } },
- { ClkStatusText, 0, Button3, sigdwmblocks, { .i = 3 } },
- { ClkStatusText, 0, Button4, sigdwmblocks, { .i = 4 } },
- { ClkStatusText, 0, Button5, sigdwmblocks, { .i = 5 } },
- { ClkStatusText, ShiftMask, Button1, sigdwmblocks, { .i = 6 } },
-#endif
- { ClkStatusText, ShiftMask, Button3, spawn, SHCMD(TERMINAL " -e nvim ~/.local/src/suckless/dwmblocks/config.h") },
- { ClkClientWin, MODKEY, Button1, movemouse, {0} },
- { ClkClientWin, MODKEY, Button2, defaultgaps, {0} },
- { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
- { ClkClientWin, MODKEY, Button4, incrgaps, { .i = +1 } },
- { ClkClientWin, MODKEY, Button5, incrgaps, { .i = -1 } },
- { ClkTagBar, 0, Button1, view, {0} },
- { ClkTagBar, 0, Button3, toggleview, {0} },
- { ClkTagBar, MODKEY, Button1, tag, {0} },
- { ClkTagBar, MODKEY, Button3, toggletag, {0} },
- { ClkTagBar, 0, Button4, shiftview, { .i = -1 } },
- { ClkTagBar, 0, Button5, shiftview, { .i = 1 } },
- { ClkRootWin, 0, Button2, togglebar, {0} },
-};
diff --git a/dwmblocks/config.def.h b/dwmblocks/config.def.h
deleted file mode 100644
index d664850..0000000
--- a/dwmblocks/config.def.h
+++ /dev/null
@@ -1,34 +0,0 @@
-static const Block blocks[] = {
- /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
- {"", "sb-music", 0, 11},
- // {"⌨", "sb-kbselect", 0, 30},
- {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9},
- {"", "sb-tasks", 10, 26},
- {"", "sb-torrent", 20, 7},
- {"", "sb-pacpackages", 0, 8},
- {"", "sb-news", 0, 6},
- {"", "sb-mailbox", 180, 12},
- /* {"", "sb-price xmr-btc \"Monero to Bitcoin\" πŸ”’ 25", 9000, 25}, */
- /* {"", "sb-price xmr Monero πŸ”’ 24", 9000, 24}, */
- /* {"", "sb-price eth Ethereum 🍸 23", 9000, 23}, */
- /* {"", "sb-price btc Bitcoin πŸ’° 21", 9000, 21}, */
- {"", "sb-doppler", 0, 13},
- {"", "sb-forecast", 10800, 5},
- {"", "sb-cpu", 10, 18},
- {"", "sb-memory", 10, 14},
- // {"", "sb-nettraf", 1, 16},
- {"", "sb-volume", 0, 10},
- {"", "sb-battery", 5, 3},
- {"", "sb-inputs", 1, 29},
- /* {"", "sb-moonphase", 18000, 17}, */
- {"", "sb-clock", 60, 1},
- {"", "sb-internet", 5, 4},
- /* {"", "sb-iplocate", 0, 27}, */
- {"", "sb-ecrypt", 0, 19},
- {"", "sb-help-icon", 0, 15},
-
-};
-
-// Sets delimiter between status commands. NULL character ('\0') means no
-// delimiter.
-static char *delim = " ";
diff --git a/dwmblocks/config.def.h.bak b/dwmblocks/config.def.h.bak
deleted file mode 100644
index 4b00496..0000000
--- a/dwmblocks/config.def.h.bak
+++ /dev/null
@@ -1,33 +0,0 @@
-static const Block blocks[] = {
- /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
- {"", "sb-music", 0, 11},
- // {"⌨", "sb-kbselect", 0, 30},
- {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9},
- {"", "sb-tasks", 10, 26},
- {"", "sb-torrent", 20, 7},
- {"", "sb-pacpackages", 0, 8},
- {"", "sb-news", 0, 6},
- {"", "sb-mailbox", 180, 12},
- /* {"", "sb-price xmr-btc \"Monero to Bitcoin\" πŸ”’ 25", 9000, 25}, */
- /* {"", "sb-price xmr Monero πŸ”’ 24", 9000, 24}, */
- /* {"", "sb-price eth Ethereum 🍸 23", 9000, 23}, */
- /* {"", "sb-price btc Bitcoin πŸ’° 21", 9000, 21}, */
- {"", "sb-doppler", 0, 13},
- {"", "sb-forecast", 10800, 5},
- {"", "sb-cpu", 10, 18},
- {"", "sb-memory", 10, 14},
- // {"", "sb-nettraf", 1, 16},
- {"", "sb-volume", 0, 10},
- {"", "sb-battery", 5, 3},
- {"", "sb-inputs", 1, 29},
- /* {"", "sb-moonphase", 18000, 17}, */
- {"", "sb-clock", 60, 1},
- {"", "sb-internet", 5, 4},
- /* {"", "sb-iplocate", 0, 27}, */
- {"", "sb-help-icon", 0, 15},
-
-};
-
-// Sets delimiter between status commands. NULL character ('\0') means no
-// delimiter.
-static char *delim = " ";
diff --git a/dwmblocks/config.h.bak b/dwmblocks/config.h.bak
deleted file mode 100644
index d664850..0000000
--- a/dwmblocks/config.h.bak
+++ /dev/null
@@ -1,34 +0,0 @@
-static const Block blocks[] = {
- /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
- {"", "sb-music", 0, 11},
- // {"⌨", "sb-kbselect", 0, 30},
- {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9},
- {"", "sb-tasks", 10, 26},
- {"", "sb-torrent", 20, 7},
- {"", "sb-pacpackages", 0, 8},
- {"", "sb-news", 0, 6},
- {"", "sb-mailbox", 180, 12},
- /* {"", "sb-price xmr-btc \"Monero to Bitcoin\" πŸ”’ 25", 9000, 25}, */
- /* {"", "sb-price xmr Monero πŸ”’ 24", 9000, 24}, */
- /* {"", "sb-price eth Ethereum 🍸 23", 9000, 23}, */
- /* {"", "sb-price btc Bitcoin πŸ’° 21", 9000, 21}, */
- {"", "sb-doppler", 0, 13},
- {"", "sb-forecast", 10800, 5},
- {"", "sb-cpu", 10, 18},
- {"", "sb-memory", 10, 14},
- // {"", "sb-nettraf", 1, 16},
- {"", "sb-volume", 0, 10},
- {"", "sb-battery", 5, 3},
- {"", "sb-inputs", 1, 29},
- /* {"", "sb-moonphase", 18000, 17}, */
- {"", "sb-clock", 60, 1},
- {"", "sb-internet", 5, 4},
- /* {"", "sb-iplocate", 0, 27}, */
- {"", "sb-ecrypt", 0, 19},
- {"", "sb-help-icon", 0, 15},
-
-};
-
-// Sets delimiter between status commands. NULL character ('\0') means no
-// delimiter.
-static char *delim = " ";
diff --git a/slock/config.def.h b/slock/config.def.h
deleted file mode 100644
index 6fbd851..0000000
--- a/slock/config.def.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* user and group to drop privileges to */
-static const char *group = "wheel";
-static int personalblur = 0;
-
-static const char *colorname[NUMCOLS] = {
- [INIT] = "#3c3836", /* after initialization */
- [INPUT] = "#005577", /* during input */
- [INPUT_ALT] = "#227799", /* during input, second color */
- [FAILED] = "#CC3333", /* wrong password */
- [CAPS] = "#FF0000", /* CapsLock on */
- [CAPS_ALT] = "#FFA666", /* hypothetical alternate color for CapsLock on */
- [PAM] = "#9400D3", /* waiting for PAM */
-};
-
-/* treat a cleared input like a wrong password (color) */
-static const int failonclear = 1;
-
-/* Background image path, should be available to the user above */
-static const char* background_image = "/home/si/Pictures/wallpaper/yejin-wall.png";
-
-/* default message */
-static const char *message = "THESIAH";
-
-/* text color */
-static const char *text_color = "#131313";
-
-/* text size */
-static const char *font_name = "monospace:size=18:bold";
-
-/* time in seconds before the monitor shuts down */
-static const int monitortime = 600;
-
-/* PAM service that's used for authentication */
-static const char* pam_service = "login";
-
-/* insert grid pattern with scale 1:1, the size can be changed with logosize */
-static const int logosize = 75;
-/* grid width and height for right center alignment */
-static const int logow = 12;
-static const int logoh = 6;
-
-static XRectangle rectangles[9] = {
- /* x y w h */
- { 0, 3, 1, 3 },
- { 1, 3, 2, 1 },
- { 0, 5, 8, 1 },
- { 3, 0, 1, 5 },
- { 5, 3, 1, 2 },
- { 7, 3, 1, 2 },
- { 8, 3, 4, 1 },
- { 9, 4, 1, 2 },
- { 11, 4, 1, 2 },
-};
-
-/*Enable blur*/
-#define BLUR
-/*Set blur radius*/
-static int blurRadius=5;
-/*Enable Pixelation*/
-//#define PIXELATION
-/*Set pixelation radius*/
-static const int pixelSize=0;
-
-/*
- * Xresources preferences to load at startup
- */
-ResourcePref resources[] = {
- { "color0", STRING, &colorname[INIT] },
- { "color4", STRING, &colorname[INPUT] },
- { "color12", STRING, &colorname[INPUT_ALT] },
- { "color1", STRING, &colorname[FAILED] },
- { "color3", STRING, &colorname[CAPS] },
- { "color11", STRING, &colorname[CAPS_ALT] },
- { "color13", STRING, &colorname[PAM] },
- { "color0", STRING, &text_color },
-};
-
diff --git a/slock/config.def.h.bak b/slock/config.def.h.bak
deleted file mode 100644
index 946c17d..0000000
--- a/slock/config.def.h.bak
+++ /dev/null
@@ -1,77 +0,0 @@
-/* user and group to drop privileges to */
-static const char *group = "wheel";
-static int personalblur = 0;
-
-static const char *colorname[NUMCOLS] = {
- [INIT] = "#3c3836", /* after initialization */
- [INPUT] = "#005577", /* during input */
- [INPUT_ALT] = "#227799", /* during input, second color */
- [FAILED] = "#CC3333", /* wrong password */
- [CAPS] = "#FF0000", /* CapsLock on */
- [CAPS_ALT] = "#FFA666", /* hypothetical alternate color for CapsLock on */
- [PAM] = "#9400D3", /* waiting for PAM */
-};
-
-/* treat a cleared input like a wrong password (color) */
-static const int failonclear = 1;
-
-/* Background image path, should be available to the user above */
-static const char* background_image = "/home/si/Pictures/yejin-wall.png";
-
-/* default message */
-static const char *message = "THESIAH";
-
-/* text color */
-static const char *text_color = "#131313";
-
-/* text size */
-static const char *font_name = "monospace:size=18:bold";
-
-/* time in seconds before the monitor shuts down */
-static const int monitortime = 600;
-
-/* PAM service that's used for authentication */
-static const char* pam_service = "login";
-
-/* insert grid pattern with scale 1:1, the size can be changed with logosize */
-static const int logosize = 75;
-/* grid width and height for right center alignment */
-static const int logow = 12;
-static const int logoh = 6;
-
-static XRectangle rectangles[9] = {
- /* x y w h */
- { 0, 3, 1, 3 },
- { 1, 3, 2, 1 },
- { 0, 5, 8, 1 },
- { 3, 0, 1, 5 },
- { 5, 3, 1, 2 },
- { 7, 3, 1, 2 },
- { 8, 3, 4, 1 },
- { 9, 4, 1, 2 },
- { 11, 4, 1, 2 },
-};
-
-/*Enable blur*/
-#define BLUR
-/*Set blur radius*/
-static int blurRadius=5;
-/*Enable Pixelation*/
-//#define PIXELATION
-/*Set pixelation radius*/
-static const int pixelSize=0;
-
-/*
- * Xresources preferences to load at startup
- */
-ResourcePref resources[] = {
- { "color0", STRING, &colorname[INIT] },
- { "color4", STRING, &colorname[INPUT] },
- { "color12", STRING, &colorname[INPUT_ALT] },
- { "color1", STRING, &colorname[FAILED] },
- { "color3", STRING, &colorname[CAPS] },
- { "color11", STRING, &colorname[CAPS_ALT] },
- { "color13", STRING, &colorname[PAM] },
- { "color0", STRING, &text_color },
-};
-
diff --git a/slock/config.h.bak b/slock/config.h.bak
deleted file mode 100644
index 6fbd851..0000000
--- a/slock/config.h.bak
+++ /dev/null
@@ -1,77 +0,0 @@
-/* user and group to drop privileges to */
-static const char *group = "wheel";
-static int personalblur = 0;
-
-static const char *colorname[NUMCOLS] = {
- [INIT] = "#3c3836", /* after initialization */
- [INPUT] = "#005577", /* during input */
- [INPUT_ALT] = "#227799", /* during input, second color */
- [FAILED] = "#CC3333", /* wrong password */
- [CAPS] = "#FF0000", /* CapsLock on */
- [CAPS_ALT] = "#FFA666", /* hypothetical alternate color for CapsLock on */
- [PAM] = "#9400D3", /* waiting for PAM */
-};
-
-/* treat a cleared input like a wrong password (color) */
-static const int failonclear = 1;
-
-/* Background image path, should be available to the user above */
-static const char* background_image = "/home/si/Pictures/wallpaper/yejin-wall.png";
-
-/* default message */
-static const char *message = "THESIAH";
-
-/* text color */
-static const char *text_color = "#131313";
-
-/* text size */
-static const char *font_name = "monospace:size=18:bold";
-
-/* time in seconds before the monitor shuts down */
-static const int monitortime = 600;
-
-/* PAM service that's used for authentication */
-static const char* pam_service = "login";
-
-/* insert grid pattern with scale 1:1, the size can be changed with logosize */
-static const int logosize = 75;
-/* grid width and height for right center alignment */
-static const int logow = 12;
-static const int logoh = 6;
-
-static XRectangle rectangles[9] = {
- /* x y w h */
- { 0, 3, 1, 3 },
- { 1, 3, 2, 1 },
- { 0, 5, 8, 1 },
- { 3, 0, 1, 5 },
- { 5, 3, 1, 2 },
- { 7, 3, 1, 2 },
- { 8, 3, 4, 1 },
- { 9, 4, 1, 2 },
- { 11, 4, 1, 2 },
-};
-
-/*Enable blur*/
-#define BLUR
-/*Set blur radius*/
-static int blurRadius=5;
-/*Enable Pixelation*/
-//#define PIXELATION
-/*Set pixelation radius*/
-static const int pixelSize=0;
-
-/*
- * Xresources preferences to load at startup
- */
-ResourcePref resources[] = {
- { "color0", STRING, &colorname[INIT] },
- { "color4", STRING, &colorname[INPUT] },
- { "color12", STRING, &colorname[INPUT_ALT] },
- { "color1", STRING, &colorname[FAILED] },
- { "color3", STRING, &colorname[CAPS] },
- { "color11", STRING, &colorname[CAPS_ALT] },
- { "color13", STRING, &colorname[PAM] },
- { "color0", STRING, &text_color },
-};
-
diff --git a/st/config.h.bak b/st/config.h.bak
deleted file mode 100644
index 0eb1dbd..0000000
--- a/st/config.h.bak
+++ /dev/null
@@ -1,567 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-/*
- * appearance
- *
- * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
- */
-static char *font = "mono:pixelsize=16:antialias=true:autohint=true";
-static char *font2[] = { "NotoColorEmoji:pixelsize=10:antialias=true:autohint=true" };
-static int borderpx = 2;
-
-/*
- * What program is execed by st depends of these precedence rules:
- * 1: program passed with -e
- * 2: scroll and/or utmp
- * 3: SHELL environment variable
- * 4: value of shell in /etc/passwd
- * 5: value of shell in config.h
- */
-static char *shell = "/bin/sh";
-char *utmp = NULL;
-/* scroll program: to enable use a string like "scroll" */
-char *scroll = NULL;
-char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
-
-/* identification sequence returned in DA and DECID */
-char *vtiden = "\033[?6c";
-
-/* Kerning / character bounding-box multipliers */
-static float cwscale = 1.0;
-static float chscale = 1.0;
-
-/*
- * word delimiter string
- *
- * More advanced example: L" `'\"()[]{}"
- */
-wchar_t *worddelimiters = L" ";
-
-/* selection timeouts (in milliseconds) */
-static unsigned int doubleclicktimeout = 300;
-static unsigned int tripleclicktimeout = 600;
-
-/* alt screens */
-int allowaltscreen = 1;
-
-/* allow certain non-interactive (insecure) window operations such as:
- setting the clipboard text */
-int allowwindowops = 0;
-
-/*
- * draw latency range in ms - from new content/keypress/etc until drawing.
- * within this range, st draws when content stops arriving (idle). mostly it's
- * near minlatency, but it waits longer for slow updates to avoid partial draw.
- * low minlatency will tear/flicker more, as it can "detect" idle too early.
- */
-static double minlatency = 8;
-static double maxlatency = 33;
-
-/*
- * blinking timeout (set to 0 to disable blinking) for the terminal blinking
- * attribute.
- */
-static unsigned int blinktimeout = 800;
-
-/*
- * thickness of underline and bar cursors
- */
-static unsigned int cursorthickness = 2;
-
-/*
- * 1: render most of the lines/blocks characters without using the font for
- * perfect alignment between cells (U2500 - U259F except dashes/diagonals).
- * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored.
- * 0: disable (render all U25XX glyphs normally from the font).
- */
-const int boxdraw = 1;
-const int boxdraw_bold = 0;
-
-/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */
-const int boxdraw_braille = 0;
-
-/*
- * bell volume. It must be a value between -100 and 100. Use 0 for disabling
- * it
- */
-static int bellvolume = 0;
-
-/* default TERM value */
-char *termname = "st-256color";
-
-/*
- * spaces per tab
- *
- * When you are changing this value, don't forget to adapt the Β»itΒ« value in
- * the st.info and appropriately install the st.info in the environment where
- * you use this st version.
- *
- * it#$tabspaces,
- *
- * Secondly make sure your kernel is not expanding tabs. When running `stty
- * -a` Β»tab0Β« should appear. You can tell the terminal to not expand tabs by
- * running following command:
- *
- * stty tabs
- */
-unsigned int tabspaces = 8;
-
-/* bg opacity */
-float alpha = 0.8;
-float alphaOffset = 0.02;
-float alphaUnfocus;
-
-/* Terminal colors (16 first used in escape sequence) */
-static const char *colorname[] = {
- "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
- "#cc241d",
- "#839E45",
- "#d79921",
- "#458588",
- "#b16286",
- "#689d6a",
- "#a89984",
- "#928374",
- "#fb4934",
- "#b8bb26",
- "#fabd2f",
- "#83a598",
- "#d3869b",
- "#8ec07c",
- "#ebdbb2",
- [255] = 0,
- /* more colors can be added after 255 to use with DefaultXX */
- "#add8e6", /* 256 -> cursor */
- "#555555", /* 257 -> rev cursor*/
- "#282828", /* 258 -> bg */
- "#ebdbb2", /* 259 -> fg */
-};
-
-/*
- * Default colors (colorname index)
- * foreground, background, cursor, reverse cursor
- */
-unsigned int defaultfg = 259;
-unsigned int defaultbg = 258;
-unsigned int defaultcs = 256;
-unsigned int defaultrcs = 257;
-unsigned int background = 258;
-
-/*
- * Default shape of cursor
- * 2: Block ("β–ˆ")
- * 4: Underline ("_")
- * 6: Bar ("|")
- * 7: Snowman ("β˜ƒ")
- */
-static unsigned int cursorshape = 2;
-
-/*
- * Default columns and rows numbers
- */
-
-static unsigned int cols = 80;
-static unsigned int rows = 24;
-
-/*
- * Default colour and shape of the mouse cursor
- */
-static unsigned int mouseshape = XC_xterm;
-static unsigned int mousefg = 7;
-static unsigned int mousebg = 0;
-
-/*
- * Color used to display font attributes when fontconfig selected a font which
- * doesn't match the ones requested.
- */
-static unsigned int defaultattr = 11;
-
-/*
- * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
- * Note that if you want to use ShiftMask with selmasks, set this to an other
- * modifier, set to 0 to not use it.
- */
-static uint forcemousemod = ShiftMask;
-
-/*
- * Xresources preferences to load at startup
- */
-ResourcePref resources[] = {
- { "font", STRING, &font },
- { "fontalt0", STRING, &font2[0] },
- { "color0", STRING, &colorname[0] },
- { "color1", STRING, &colorname[1] },
- { "color2", STRING, &colorname[2] },
- { "color3", STRING, &colorname[3] },
- { "color4", STRING, &colorname[4] },
- { "color5", STRING, &colorname[5] },
- { "color6", STRING, &colorname[6] },
- { "color7", STRING, &colorname[7] },
- { "color8", STRING, &colorname[8] },
- { "color9", STRING, &colorname[9] },
- { "color10", STRING, &colorname[10] },
- { "color11", STRING, &colorname[11] },
- { "color12", STRING, &colorname[12] },
- { "color13", STRING, &colorname[13] },
- { "color14", STRING, &colorname[14] },
- { "color15", STRING, &colorname[15] },
- { "background", STRING, &colorname[258] },
- { "foreground", STRING, &colorname[259] },
- { "cursorColor", STRING, &colorname[256] },
- { "termname", STRING, &termname },
- { "shell", STRING, &shell },
- { "minlatency", INTEGER, &minlatency },
- { "maxlatency", INTEGER, &maxlatency },
- { "blinktimeout", INTEGER, &blinktimeout },
- { "bellvolume", INTEGER, &bellvolume },
- { "tabspaces", INTEGER, &tabspaces },
- { "borderpx", INTEGER, &borderpx },
- { "cwscale", FLOAT, &cwscale },
- { "chscale", FLOAT, &chscale },
- { "alpha", FLOAT, &alpha },
- { "alphaOffset", FLOAT, &alphaOffset },
-};
-
-/*
- * Internal mouse shortcuts.
- * Beware that overloading Button1 will disable the selection.
- */
-static MouseShortcut mshortcuts[] = {
- /* mask button function argument release */
- { XK_NO_MOD, Button4, kscrollup, { .i = 1 } },
- { XK_NO_MOD, Button5, kscrolldown, { .i = 1 } },
- { XK_ANY_MOD, Button2, selpaste, { .i = 0 }, 1 },
- { ShiftMask, Button4, ttysend, { .s = "\033[5;2~" } },
- { XK_ANY_MOD, Button4, ttysend, { .s = "\031" } },
- { ShiftMask, Button5, ttysend, { .s = "\033[6;2~" } },
- { XK_ANY_MOD, Button5, ttysend, { .s = "\005" } },
-};
-
-/* Internal keyboard shortcuts. */
-#define MODKEY Mod1Mask
-#define MODKEY2 Mod4Mask
-#define TERMMOD (MODKEY | ShiftMask)
-
-static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -o", "externalpipe", NULL };
-static char *copyurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -c", "externalpipe", NULL };
-static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
-
-static Shortcut shortcuts[] = {
- /* mask keysym function argument */
- /* APPEAREANCE */
- { MODKEY, XK_a, changealpha, { .f = +0.05 } },
- { MODKEY, XK_s, changealpha, { .f = -0.05 } },
- { TERMMOD, XK_Down, zoom, { .f = -1 } },
- { TERMMOD, XK_Up, zoom, { .f = +1 } },
- { TERMMOD, XK_Next, zoom, { .f = -1 } },
- { TERMMOD, XK_Prior, zoom, { .f = +1 } },
- { TERMMOD, XK_J, zoom, { .f = -1 } },
- { TERMMOD, XK_K, zoom, { .f = +1 } },
- { TERMMOD, XK_D, zoom, { .f = -2 } },
- { TERMMOD, XK_U, zoom, { .f = +2 } },
- { TERMMOD, XK_parenright, zoomreset, { .f = 0 } },
-
- /* COPY */
- { MODKEY, XK_y, clipcopy, { .i = 0 } },
- { TERMMOD, XK_Y, clipcopy, { .i = 0 } },
- { MODKEY, XK_c, externalpipe, { .v = copyurlcmd } },
- { MODKEY, XK_o, externalpipe, { .v = copyoutput } },
-
- /* PASTE */
- { MODKEY, XK_p, clippaste, { .i = 0 } },
- { TERMMOD, XK_P, clippaste, { .i = 0 } },
- { ShiftMask, XK_Insert, clippaste, { .i = 0 } },
- { ShiftMask, XK_Insert, selpaste, { .i = 0 } },
- { MODKEY, XK_v, externalpipe, { .v = openurlcmd } },
-
- /* PRINTER */
- { ShiftMask, XK_Print, printscreen, { .i = 0 } },
- { XK_ANY_MOD, XK_Print, printsel, { .i = 0 } },
- { ControlMask, XK_Print, toggleprinter, { .i = 0 } },
-
- /* TRAVERSAL */
- { MODKEY, XK_k, kscrollup, { .i = 1 } },
- { MODKEY, XK_j, kscrolldown, { .i = 1 } },
- { MODKEY, XK_u, kscrollup, { .i = -1 } },
- { MODKEY, XK_d, kscrolldown, { .i = -1 } },
- { MODKEY, XK_Up, kscrollup, { .i = 1 } },
- { MODKEY, XK_Down, kscrolldown, { .i = 1 } },
- { MODKEY, XK_Page_Up, kscrollup, { .i = -1 } },
- { MODKEY, XK_Page_Down, kscrolldown, { .i = -1 } },
- { ShiftMask, XK_Page_Up, kscrollup, { .i = -1 } },
- { ShiftMask, XK_Page_Down, kscrolldown, { .i = -1 } },
-
- /* EXTRA */
- { TERMMOD, XK_Num_Lock, numlock, { .i = 0 } },
- { XK_ANY_MOD, XK_Break, sendbreak, { .i = 0 } },
-
-};
-
-/*
- * Special keys (change & recompile st.info accordingly)
- *
- * Mask value:
- * * Use XK_ANY_MOD to match the key no matter modifiers state
- * * Use XK_NO_MOD to match the key alone (no modifiers)
- * appkey value:
- * * 0: no value
- * * > 0: keypad application mode enabled
- * * = 2: term.numlock = 1
- * * < 0: keypad application mode disabled
- * appcursor value:
- * * 0: no value
- * * > 0: cursor application mode enabled
- * * < 0: cursor application mode disabled
- *
- * Be careful with the order of the definitions because st searches in
- * this table sequentially, so any XK_ANY_MOD must be in the last
- * position for a key.
- */
-
-/*
- * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
- * to be mapped below, add them to this array.
- */
-static KeySym mappedkeys[] = { -1 };
-
-/*
- * State bits to ignore when matching key or button events. By default,
- * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
- */
-static uint ignoremod = Mod2Mask | XK_SWITCH_MOD;
-
-/*
- * This is the huge key array which defines all compatibility to the Linux
- * world. Please decide about changes wisely.
- */
-static Key key[] = {
- /* keysym mask string appkey appcursor */
- { XK_KP_Home, ShiftMask, "\033[2J", 0, -1 },
- { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1 },
- { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1 },
- { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1 },
- { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0 },
- { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1 },
- { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1 },
- { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0 },
- { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1 },
- { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1 },
- { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0 },
- { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1 },
- { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1 },
- { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0 },
- { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1 },
- { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1 },
- { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0 },
- { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0 },
- { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0 },
- { XK_KP_End, ControlMask, "\033[J", -1, 0 },
- { XK_KP_End, ControlMask, "\033[1;5F", +1, 0 },
- { XK_KP_End, ShiftMask, "\033[K", -1, 0 },
- { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0 },
- { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0 },
- { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0 },
- { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0 },
- { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0 },
- { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0 },
- { XK_KP_Insert, ControlMask, "\033[L", -1, 0 },
- { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0 },
- { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0 },
- { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0 },
- { XK_KP_Delete, ControlMask, "\033[M", -1, 0 },
- { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0 },
- { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0 },
- { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0 },
- { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0 },
- { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0 },
- { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0 },
- { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0 },
- { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0 },
- { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0 },
- { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0 },
- { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0 },
- { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0 },
- { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0 },
- { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0 },
- { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0 },
- { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0 },
- { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0 },
- { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0 },
- { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0 },
- { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0 },
- { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0 },
- { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0 },
- { XK_Up, ShiftMask, "\033[1;2A", 0, 0 },
- { XK_Up, MODKEY, "\033[1;3A", 0, 0 },
- { XK_Up, ShiftMask | MODKEY, "\033[1;4A", 0, 0 },
- { XK_Up, ControlMask, "\033[1;5A", 0, 0 },
- { XK_Up, ShiftMask | ControlMask, "\033[1;6A", 0, 0 },
- { XK_Up, ControlMask | MODKEY, "\033[1;7A", 0, 0 },
- { XK_Up, ShiftMask | ControlMask | MODKEY, "\033[1;8A", 0, 0 },
- { XK_Up, XK_ANY_MOD, "\033[A", 0, -1 },
- { XK_Up, XK_ANY_MOD, "\033OA", 0, +1 },
- { XK_Down, ShiftMask, "\033[1;2B", 0, 0 },
- { XK_Down, MODKEY, "\033[1;3B", 0, 0 },
- { XK_Down, ShiftMask | MODKEY, "\033[1;4B", 0, 0 },
- { XK_Down, ControlMask, "\033[1;5B", 0, 0 },
- { XK_Down, ShiftMask | ControlMask, "\033[1;6B", 0, 0 },
- { XK_Down, ControlMask | MODKEY, "\033[1;7B", 0, 0 },
- { XK_Down, ShiftMask | ControlMask | MODKEY, "\033[1;8B", 0, 0 },
- { XK_Down, XK_ANY_MOD, "\033[B", 0, -1 },
- { XK_Down, XK_ANY_MOD, "\033OB", 0, +1 },
- { XK_Left, ShiftMask, "\033[1;2D", 0, 0 },
- { XK_Left, MODKEY, "\033[1;3D", 0, 0 },
- { XK_Left, ShiftMask | MODKEY, "\033[1;4D", 0, 0 },
- { XK_Left, ControlMask, "\033[1;5D", 0, 0 },
- { XK_Left, ShiftMask | ControlMask, "\033[1;6D", 0, 0 },
- { XK_Left, ControlMask | MODKEY, "\033[1;7D", 0, 0 },
- { XK_Left, ShiftMask | ControlMask | MODKEY, "\033[1;8D", 0, 0 },
- { XK_Left, XK_ANY_MOD, "\033[D", 0, -1 },
- { XK_Left, XK_ANY_MOD, "\033OD", 0, +1 },
- { XK_Right, ShiftMask, "\033[1;2C", 0, 0 },
- { XK_Right, MODKEY, "\033[1;3C", 0, 0 },
- { XK_Right, ShiftMask | MODKEY, "\033[1;4C", 0, 0 },
- { XK_Right, ControlMask, "\033[1;5C", 0, 0 },
- { XK_Right, ShiftMask | ControlMask, "\033[1;6C", 0, 0 },
- { XK_Right, ControlMask | MODKEY, "\033[1;7C", 0, 0 },
- { XK_Right, ShiftMask | ControlMask | MODKEY, "\033[1;8C", 0, 0 },
- { XK_Right, XK_ANY_MOD, "\033[C", 0, -1 },
- { XK_Right, XK_ANY_MOD, "\033OC", 0, +1 },
- { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0 },
- { XK_Return, MODKEY, "\033\r", 0, 0 },
- { XK_Return, XK_ANY_MOD, "\r", 0, 0 },
- { XK_Insert, ShiftMask, "\033[4l", -1, 0 },
- { XK_Insert, ShiftMask, "\033[2;2~", +1, 0 },
- { XK_Insert, ControlMask, "\033[L", -1, 0 },
- { XK_Insert, ControlMask, "\033[2;5~", +1, 0 },
- { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0 },
- { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0 },
- { XK_Delete, ControlMask, "\033[M", -1, 0 },
- { XK_Delete, ControlMask, "\033[3;5~", +1, 0 },
- { XK_Delete, ShiftMask, "\033[2K", -1, 0 },
- { XK_Delete, ShiftMask, "\033[3;2~", +1, 0 },
- { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0 },
- { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0 },
- { XK_BackSpace, XK_NO_MOD, "\177", 0, 0 },
- { XK_BackSpace, MODKEY, "\033\177", 0, 0 },
- { XK_Home, ShiftMask, "\033[2J", 0, -1 },
- { XK_Home, ShiftMask, "\033[1;2H", 0, +1 },
- { XK_Home, XK_ANY_MOD, "\033[H", 0, -1 },
- { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1 },
- { XK_End, ControlMask, "\033[J", -1, 0 },
- { XK_End, ControlMask, "\033[1;5F", +1, 0 },
- { XK_End, ShiftMask, "\033[K", -1, 0 },
- { XK_End, ShiftMask, "\033[1;2F", +1, 0 },
- { XK_End, XK_ANY_MOD, "\033[4~", 0, 0 },
- { XK_Prior, ControlMask, "\033[5;5~", 0, 0 },
- { XK_Prior, ShiftMask, "\033[5;2~", 0, 0 },
- { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0 },
- { XK_Next, ControlMask, "\033[6;5~", 0, 0 },
- { XK_Next, ShiftMask, "\033[6;2~", 0, 0 },
- { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0 },
- { XK_F1, XK_NO_MOD, "\033OP", 0, 0 },
- { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0 },
- { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0 },
- { XK_F1, /* F37 */ MODKEY2, "\033[1;6P", 0, 0 },
- { XK_F1, /* F49 */ MODKEY, "\033[1;3P", 0, 0 },
- { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0 },
- { XK_F2, XK_NO_MOD, "\033OQ", 0, 0 },
- { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0 },
- { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0 },
- { XK_F2, /* F38 */ MODKEY2, "\033[1;6Q", 0, 0 },
- { XK_F2, /* F50 */ MODKEY, "\033[1;3Q", 0, 0 },
- { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0 },
- { XK_F3, XK_NO_MOD, "\033OR", 0, 0 },
- { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0 },
- { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0 },
- { XK_F3, /* F39 */ MODKEY2, "\033[1;6R", 0, 0 },
- { XK_F3, /* F51 */ MODKEY, "\033[1;3R", 0, 0 },
- { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0 },
- { XK_F4, XK_NO_MOD, "\033OS", 0, 0 },
- { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0 },
- { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0 },
- { XK_F4, /* F40 */ MODKEY2, "\033[1;6S", 0, 0 },
- { XK_F4, /* F52 */ MODKEY, "\033[1;3S", 0, 0 },
- { XK_F5, XK_NO_MOD, "\033[15~", 0, 0 },
- { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0 },
- { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0 },
- { XK_F5, /* F41 */ MODKEY2, "\033[15;6~", 0, 0 },
- { XK_F5, /* F53 */ MODKEY, "\033[15;3~", 0, 0 },
- { XK_F6, XK_NO_MOD, "\033[17~", 0, 0 },
- { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0 },
- { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0 },
- { XK_F6, /* F42 */ MODKEY2, "\033[17;6~", 0, 0 },
- { XK_F6, /* F54 */ MODKEY, "\033[17;3~", 0, 0 },
- { XK_F7, XK_NO_MOD, "\033[18~", 0, 0 },
- { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0 },
- { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0 },
- { XK_F7, /* F43 */ MODKEY2, "\033[18;6~", 0, 0 },
- { XK_F7, /* F55 */ MODKEY, "\033[18;3~", 0, 0 },
- { XK_F8, XK_NO_MOD, "\033[19~", 0, 0 },
- { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0 },
- { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0 },
- { XK_F8, /* F44 */ MODKEY2, "\033[19;6~", 0, 0 },
- { XK_F8, /* F56 */ MODKEY, "\033[19;3~", 0, 0 },
- { XK_F9, XK_NO_MOD, "\033[20~", 0, 0 },
- { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0 },
- { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0 },
- { XK_F9, /* F45 */ MODKEY2, "\033[20;6~", 0, 0 },
- { XK_F9, /* F57 */ MODKEY, "\033[20;3~", 0, 0 },
- { XK_F10, XK_NO_MOD, "\033[21~", 0, 0 },
- { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0 },
- { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0 },
- { XK_F10, /* F46 */ MODKEY2, "\033[21;6~", 0, 0 },
- { XK_F10, /* F58 */ MODKEY, "\033[21;3~", 0, 0 },
- { XK_F11, XK_NO_MOD, "\033[23~", 0, 0 },
- { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0 },
- { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0 },
- { XK_F11, /* F47 */ MODKEY2, "\033[23;6~", 0, 0 },
- { XK_F11, /* F59 */ MODKEY, "\033[23;3~", 0, 0 },
- { XK_F12, XK_NO_MOD, "\033[24~", 0, 0 },
- { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0 },
- { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0 },
- { XK_F12, /* F48 */ MODKEY2, "\033[24;6~", 0, 0 },
- { XK_F12, /* F60 */ MODKEY, "\033[24;3~", 0, 0 },
- { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0 },
- { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0 },
- { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0 },
- { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0 },
- { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0 },
- { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0 },
- { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0 },
- { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0 },
- { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0 },
- { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0 },
- { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0 },
- { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0 },
- { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0 },
- { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0 },
- { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0 },
- { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0 },
- { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0 },
- { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0 },
- { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0 },
- { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0 },
- { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0 },
- { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0 },
- { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0 },
-};
-
-/*
- * Selection types' masks.
- * Use the same masks as usual.
- * Button1Mask is always unset, to make masks match between ButtonPress.
- * ButtonRelease and MotionNotify.
- * If no match is found, regular selection is used.
- */
-static uint selmasks[] = {
- [SEL_RECTANGULAR] = MODKEY,
-};
-
-/*
- * Printable characters in ASCII, used to estimate the advance width
- * of single wide characters.
- */
-static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?"
- "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
- "`abcdefghijklmnopqrstuvwxyz{|}~";