2023-05-26 06:32:03 +00:00
|
|
|
/* appearance */
|
2022-12-20 00:15:21 +00:00
|
|
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
|
|
|
static const unsigned int snap = 32; /* snap pixel */
|
|
|
|
static const int showbar = 1; /* 0 means no bar */
|
|
|
|
static const int topbar = 1; /* 0 means bottom bar */
|
|
|
|
static const int horizpadbar = 2; /* horizontal padding for statusbar */
|
2023-05-27 04:52:32 +00:00
|
|
|
static const int vertpadbar = 4; /* vertical padding for statusbar */
|
2023-05-26 06:32:03 +00:00
|
|
|
static const char *fonts[] = {"Symbols Nerd Font Mono:size=12", "mononoki Nerd Font:size=12"};
|
|
|
|
static const char dmenufont[] = {"mononoki Nerd Font:size=12"};
|
2022-12-20 00:15:21 +00:00
|
|
|
static const char col_gray1[] = "#1d2021";
|
|
|
|
static const char col_gray2[] = "#32302f";
|
|
|
|
static const char col_gray3[] = "#d5c4a1";
|
|
|
|
static const char col_gray4[] = "#fbf1c7";
|
|
|
|
static const char col_cyan[] = "#cc241d";
|
2023-05-27 04:52:32 +00:00
|
|
|
static const unsigned int baralpha = 0xd0;
|
|
|
|
static const unsigned int borderalpha = OPAQUE;
|
2022-12-20 00:15:21 +00:00
|
|
|
static const char *colors[][3] = {
|
|
|
|
/* fg bg border */
|
|
|
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
|
|
|
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
|
|
|
};
|
2023-05-27 04:52:32 +00:00
|
|
|
static const unsigned int alphas[][3] = {
|
|
|
|
/* fg bg border*/
|
|
|
|
[SchemeNorm] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
[SchemeSel] = { OPAQUE, baralpha, borderalpha },
|
|
|
|
};
|
2022-12-20 00:15:21 +00:00
|
|
|
|
2023-05-26 06:32:03 +00:00
|
|
|
/* scratchpads */
|
2022-12-20 00:15:21 +00:00
|
|
|
typedef struct {
|
|
|
|
const char *name;
|
|
|
|
const void *cmd;
|
|
|
|
} Sp;
|
2023-05-23 23:54:34 +00:00
|
|
|
const char *spcmd1[] = {"st", "-n", "sptrm", "-g", "140x35", NULL };
|
|
|
|
const char *spcmd2[] = {"st", "-n", "sptop", "-g", "140x35", "-e", "btop", NULL };
|
|
|
|
const char *spcmd3[] = {"st", "-n", "spfli", "-g", "140x35", "-e", "flix-cli", NULL };
|
|
|
|
const char *spcmd4[] = {"st", "-n", "spani", "-g", "140x35", "-e", "ani-cli", NULL };
|
|
|
|
const char *spcmd5[] = {"st", "-n", "spytf", "-g", "140x35", "-e", "ytfzf", "-flst", NULL };
|
|
|
|
const char *spcmd6[] = {"st", "-n", "spamx", "-g", "140x35", "-e", "alsamixer", NULL };
|
|
|
|
const char *spcmd7[] = {"st", "-n", "sppmx", "-g", "140x35", "-e", "pulsemixer", NULL };
|
2023-06-24 17:07:05 +00:00
|
|
|
const char *spcmd8[] = {"st", "-n", "spmsc", "-g", "140x35", "-e", "cmus", NULL };
|
2023-05-23 23:54:34 +00:00
|
|
|
const char *spcmd9[] = {"st", "-n", "spflm", "-g", "140x35", "-e", ".config/vifm/scripts/vifmrun", NULL };
|
2023-05-28 06:21:31 +00:00
|
|
|
const char *spcmd10[] = {"st", "-n", "spytm", "-g", "140x35", "-e", "ytfzf", "-mlst", NULL };
|
|
|
|
const char *spcmd11[] = {"st", "-n", "sprss", "-g", "140x35", "-e", "newsboat", NULL };
|
|
|
|
const char *spcmd12[] = {"st", "-n", "spgkk", "-g", "140x35", "-e", "geek-life", NULL };
|
2022-12-20 00:15:21 +00:00
|
|
|
static Sp scratchpads[] = {
|
|
|
|
/* name cmd */
|
|
|
|
{"sptrm", spcmd1},
|
|
|
|
{"sptop", spcmd2},
|
|
|
|
{"spfli", spcmd3},
|
|
|
|
{"spani", spcmd4},
|
|
|
|
{"spytf", spcmd5},
|
|
|
|
{"spamx", spcmd6},
|
|
|
|
{"sppmx", spcmd7},
|
2023-02-04 04:44:45 +00:00
|
|
|
{"spmsc", spcmd8},
|
|
|
|
{"spflm", spcmd9},
|
2023-05-28 06:21:31 +00:00
|
|
|
{"spytm", spcmd10},
|
|
|
|
{"sprss", spcmd11},
|
|
|
|
{"spgkk", spcmd12},
|
2022-12-20 00:15:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* tagging */
|
|
|
|
static const char *tags[] = {
|
2023-05-26 06:32:03 +00:00
|
|
|
"", // EDITOR
|
|
|
|
"", // TESTING
|
2023-05-23 23:54:34 +00:00
|
|
|
"", // WEB BROWSER
|
|
|
|
"", // CHAT
|
|
|
|
"", // AUDIO TOOLS
|
|
|
|
"", // VIDEO
|
|
|
|
"", // IMAGE/EDIT TOOLS
|
|
|
|
"", // OFFICE
|
|
|
|
"" // GAMES
|
2022-12-20 00:15:21 +00:00
|
|
|
};
|
|
|
|
|
2023-05-23 23:54:34 +00:00
|
|
|
// rules
|
2022-12-20 00:15:21 +00:00
|
|
|
static const Rule rules[] = {
|
|
|
|
/* xprop(1):
|
|
|
|
* WM_CLASS(STRING) = instance, class
|
|
|
|
* WM_NAME(STRING) = title
|
|
|
|
*/
|
|
|
|
// class instance title tags mask isfloating monitor
|
|
|
|
// no workspace
|
|
|
|
{ "Galculator", NULL, NULL, 0, 1, -1 },
|
|
|
|
// code tag
|
|
|
|
{ "Emacs", NULL, NULL, 1, 0, -1 },
|
|
|
|
{ "Godot", NULL, NULL, 1, 0, -1 },
|
|
|
|
{ "neovim", NULL, NULL, 1, 0, -1 },
|
|
|
|
{ "neovide", NULL, NULL, 1, 0, -1 },
|
|
|
|
// test tag
|
2023-05-26 06:52:32 +00:00
|
|
|
{ "Virt-manager", NULL, NULL, 1 << 1, 0, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
// web tag
|
2023-02-04 04:44:45 +00:00
|
|
|
{ "LibreWolf", NULL, NULL, 1 << 2, 0, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
{ "firefox", NULL, NULL, 1 << 2, 0, -1 },
|
|
|
|
{ "qutebrowser", NULL, NULL, 1 << 2, 0, -1 },
|
|
|
|
{ "Chromium", NULL, NULL, 1 << 2, 0, -1 },
|
|
|
|
{ "Brave-browser", NULL, NULL, 1 << 2, 0, -1 },
|
|
|
|
{ "Bitwarden", NULL, NULL, 1 << 2, 0, -1 },
|
2023-05-26 06:32:03 +00:00
|
|
|
{ "newsboat", NULL, NULL, 1 << 2, 0, -1 },
|
2023-05-23 23:54:34 +00:00
|
|
|
// chat tag
|
|
|
|
{ "Signal", NULL, NULL, 1 << 3, 0, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
// audio tools tag
|
2023-05-23 23:54:34 +00:00
|
|
|
{ "Audacity", NULL, NULL, 1 << 4, 0, -1 },
|
|
|
|
{ "Ardour", NULL, NULL, 1 << 4, 0, -1 },
|
|
|
|
{ "Carla2", NULL, NULL, 1 << 4, 0, -1 },
|
|
|
|
{ "Carla2-Control", NULL, NULL, 1 << 4, 0, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
{ "QjackCtl", NULL, NULL, 1 << 4, 1, -1 },
|
|
|
|
{ "lsp-plugins", NULL, NULL, 1 << 4, 1, -1 },
|
|
|
|
{ "qpwgraph", NULL, NULL, 1 << 4, 0, -1 },
|
|
|
|
{ "Cadence", NULL, NULL, 1 << 4, 0, -1 },
|
|
|
|
// video tag
|
|
|
|
{ "kdenlive", NULL, NULL, 1 << 5, 0, -1 },
|
2023-02-04 04:44:45 +00:00
|
|
|
{ "Pitivi", NULL, NULL, 1 << 5, 0, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
{ "Blender", NULL, NULL, 1 << 5, 0, -1 },
|
|
|
|
{ "Natron", NULL, NULL, 1 << 5, 0, -1 },
|
|
|
|
{ "SimpleScreenRecorder", NULL, NULL, 1 << 5, 0, -1 },
|
|
|
|
{ "Ghb", NULL, NULL, 1 << 5, 0, -1 },
|
|
|
|
{ "obs", NULL, NULL, 1 << 5, 0, -1 },
|
2023-05-23 23:54:34 +00:00
|
|
|
{ "mpv", NULL, NULL, 1 << 5, 0, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
// graphics/extra tools tag
|
|
|
|
{ "Gimp-2.10", NULL, NULL, 1 << 6, 0, -1 },
|
|
|
|
{ "krita", NULL, NULL, 1 << 6, 0, -1 },
|
|
|
|
{ "Inkscape", NULL, NULL, 1 << 6, 0, -1 },
|
|
|
|
{ "Xournalpp", NULL, NULL, 1 << 6, 0, -1 },
|
|
|
|
// office tag
|
|
|
|
{ "DesktopEditors", NULL, NULL, 1 << 7, 0, -1 },
|
|
|
|
{ "Soffice", "soffice", NULL, 1 << 7, 0, -1 },
|
|
|
|
{ "libreoffice-startcenter", NULL, NULL, 1 << 7, 0, -1 },
|
2023-05-23 23:54:34 +00:00
|
|
|
{ "libreoffice-calc", NULL, NULL, 1 << 7, 0, -1 },
|
|
|
|
{ "libreoffice-writer", NULL, NULL, 1 << 7, 0, -1 },
|
|
|
|
{ "libreoffice-impress", NULL, NULL, 1 << 7, 0, -1 },
|
|
|
|
{ "libreoffice-base", NULL, NULL, 1 << 7, 0, -1 },
|
|
|
|
{ "libreoffice-draw", NULL, NULL, 1 << 7, 0, -1 },
|
|
|
|
{ "libreoffice-math", NULL, NULL, 1 << 7, 0, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
{ "Joplin", NULL, NULL, 1 << 7, 0, -1 },
|
|
|
|
// games tag
|
|
|
|
{ "retroarch", NULL, NULL, 1 << 8, 0, -1 },
|
|
|
|
{ "steam", NULL, NULL, 1 << 8, 0, -1 },
|
|
|
|
// scratchpads
|
|
|
|
{ NULL, "sptrm", NULL, SPTAG(0), 1, -1 },
|
|
|
|
{ NULL, "sptop", NULL, SPTAG(1), 1, -1 },
|
|
|
|
{ NULL, "spfli", NULL, SPTAG(2), 1, -1 },
|
|
|
|
{ NULL, "spani", NULL, SPTAG(3), 1, -1 },
|
|
|
|
{ NULL, "spytf", NULL, SPTAG(4), 1, -1 },
|
|
|
|
{ NULL, "spamx", NULL, SPTAG(5), 1, -1 },
|
|
|
|
{ NULL, "sppmx", NULL, SPTAG(6), 1, -1 },
|
2023-02-04 04:44:45 +00:00
|
|
|
{ NULL, "spmsc", NULL, SPTAG(7), 1, -1 },
|
|
|
|
{ NULL, "spflm", NULL, SPTAG(8), 1, -1 },
|
2023-05-28 06:21:31 +00:00
|
|
|
{ NULL, "spytm", NULL, SPTAG(9), 1, -1 },
|
|
|
|
{ NULL, "sprss", NULL, SPTAG(10), 1, -1 },
|
|
|
|
{ NULL, "spgkk", NULL, SPTAG(11), 1, -1 },
|
2022-12-20 00:15:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// layout(s)
|
|
|
|
static const float mfact = 0.5; /* factor of master area size [0.05..0.95] */
|
|
|
|
static const int nmaster = 1; /* number of clients in master area */
|
|
|
|
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
|
|
|
|
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
|
|
|
|
|
|
|
#include "tcl.c"
|
|
|
|
static const Layout layouts[] = {
|
|
|
|
/* symbol arrange function */
|
|
|
|
{ "[]=", tile }, /* first entry is default */
|
|
|
|
{ "><>", NULL }, /* no layout function means floating behavior */
|
|
|
|
{ "[M]", monocle },
|
|
|
|
{ "|||", tcl },
|
|
|
|
};
|
|
|
|
|
2023-05-23 23:54:34 +00:00
|
|
|
// key definitions
|
2022-12-20 00:15:21 +00:00
|
|
|
#define MODKEY Mod4Mask
|
|
|
|
#define TAGKEYS(KEY,TAG) \
|
|
|
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
|
|
|
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
|
|
|
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
|
|
|
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
|
|
|
|
|
|
|
// helper for spawning shell commands in the pre dwm-5.0 fashion
|
|
|
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
|
|
|
|
|
|
|
/* commands */
|
2023-05-26 06:32:03 +00:00
|
|
|
// dmenu
|
2022-12-20 00:15:21 +00:00
|
|
|
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
2023-05-26 06:32:03 +00:00
|
|
|
// terminal
|
2023-05-23 23:54:34 +00:00
|
|
|
static const char *termcmd[] = { "st", NULL };
|
2022-12-20 00:15:21 +00:00
|
|
|
|
2023-02-04 04:44:45 +00:00
|
|
|
#include "movestack.c"
|
|
|
|
|
2022-12-20 00:15:21 +00:00
|
|
|
static const Key keys[] = {
|
|
|
|
/* modifier key function argument */
|
2023-05-26 06:32:03 +00:00
|
|
|
|
|
|
|
/* main apps*/
|
|
|
|
// terminal
|
|
|
|
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
|
|
|
// text editor
|
2023-06-24 17:07:05 +00:00
|
|
|
{ MODKEY, XK_e, spawn, SHCMD("emacsclient -c -a 'emacs'")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// web browser
|
2023-06-24 17:07:05 +00:00
|
|
|
{ MODKEY, XK_w, spawn, SHCMD("firefox")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// chat
|
2023-06-24 17:07:05 +00:00
|
|
|
{ MODKEY, XK_s, spawn, SHCMD("org.signal.Signal")},
|
2023-05-26 06:32:03 +00:00
|
|
|
|
|
|
|
/* keyboard layout */
|
|
|
|
// set keyboard layout to es
|
2023-05-27 04:52:32 +00:00
|
|
|
{ MODKEY|ControlMask, XK_e, spawn, SHCMD("setxkbmap -layout es && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// set keyboard layout to us
|
2023-05-27 04:52:32 +00:00
|
|
|
{ MODKEY|ControlMask, XK_u, spawn, SHCMD("setxkbmap -layout us && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
|
|
|
|
/* XF86 Keys */
|
|
|
|
// increase volume
|
2023-05-27 04:52:32 +00:00
|
|
|
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 5 && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// decrease volume
|
2023-05-27 04:52:32 +00:00
|
|
|
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 5 && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// mute volume
|
2023-05-27 04:52:32 +00:00
|
|
|
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// mute microphone
|
2023-05-27 04:52:32 +00:00
|
|
|
{ 0, XF86XK_AudioMicMute, spawn, SHCMD("pamixer --default-source -t && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// increase brightness
|
2023-05-27 04:52:32 +00:00
|
|
|
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 10 && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// decrease brightness
|
2023-05-27 04:52:32 +00:00
|
|
|
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 10 && pkill -RTMIN+10 dwmblocks")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// display settings
|
2022-12-20 00:15:21 +00:00
|
|
|
{ 0, XF86XK_Display, spawn, SHCMD("arandr")},
|
2023-05-26 06:32:03 +00:00
|
|
|
// play/pause
|
|
|
|
{ 0, XF86XK_AudioPause, spawn, SHCMD("playerctl play-pause")},
|
|
|
|
// play/pause
|
|
|
|
{ 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause")},
|
|
|
|
// next
|
|
|
|
{ 0, XF86XK_AudioNext, spawn, SHCMD("playerctl next")},
|
|
|
|
// previous
|
|
|
|
{ 0, XF86XK_AudioPrev, spawn, SHCMD("playerctl previous")},
|
|
|
|
// stop
|
|
|
|
{ 0, XF86XK_AudioStop, spawn, SHCMD("playerctl stop")},
|
|
|
|
// news
|
|
|
|
{ 0, XF86XK_News, spawn, SHCMD("st -n newsboat -c newsboat -e newsboat")},
|
|
|
|
|
|
|
|
/* dmenu */
|
|
|
|
// launcher
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_r, spawn, {.v = dmenucmd } },
|
2023-05-26 06:32:03 +00:00
|
|
|
// desktop launcher
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_d, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_drun") },
|
2023-05-26 06:32:03 +00:00
|
|
|
// wifi config
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_i, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wifi") },
|
2023-05-26 06:32:03 +00:00
|
|
|
// screenshots
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_scrot") },
|
2023-05-26 06:32:03 +00:00
|
|
|
// wallpapers
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wall") },
|
2023-05-26 06:32:03 +00:00
|
|
|
// edit
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_edit") },
|
2023-05-26 06:32:03 +00:00
|
|
|
// bluetooth
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_b, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_blue") },
|
2023-05-26 06:32:03 +00:00
|
|
|
// power manager
|
|
|
|
{ MODKEY|ShiftMask, XK_q, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_power")},
|
|
|
|
|
|
|
|
/* window management */
|
|
|
|
// window focusing
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
|
|
|
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
2023-05-26 06:32:03 +00:00
|
|
|
// increase and decrease master clients count
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
|
|
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
2023-05-26 06:32:03 +00:00
|
|
|
// increase and decrease master client size
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
|
|
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// move windows on stack
|
2023-02-04 04:44:45 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
|
|
|
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
2023-05-26 06:32:03 +00:00
|
|
|
// switch master window
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY|ControlMask, XK_Return, zoom, {0} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// switch to latest tag
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_Tab, view, {0} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// close focused client
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_q, killclient, {0} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// switch to tiling layout
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// switch to floating layout
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// switch to monocle layout
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// switch to three-column layout
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// switch to latest layout
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_space, setlayout, {0} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// toggle floating mode on focused window
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY|ControlMask, XK_space, togglefloating, {0} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// view all opened clients on current tag
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
|
|
|
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
2023-05-26 06:32:03 +00:00
|
|
|
// focus next or previous screen
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
|
|
|
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
2023-05-26 06:32:03 +00:00
|
|
|
// move focused client to next or previous screen
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
|
|
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
2023-05-26 06:32:03 +00:00
|
|
|
|
|
|
|
/* tags */
|
|
|
|
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)
|
|
|
|
|
|
|
|
/* scratchpads */
|
2023-05-23 23:54:34 +00:00
|
|
|
{ MODKEY|Mod1Mask, XK_Return, togglescratch, {.ui = 0 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_b, togglescratch, {.ui = 1 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_f, togglescratch, {.ui = 2 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_a, togglescratch, {.ui = 3 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_y, togglescratch, {.ui = 4 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_o, togglescratch, {.ui = 5 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_p, togglescratch, {.ui = 6 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_m, togglescratch, {.ui = 7 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_v, togglescratch, {.ui = 8 } },
|
2023-05-28 06:21:31 +00:00
|
|
|
{ MODKEY|Mod1Mask, XK_n, togglescratch, {.ui = 9 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_r, togglescratch, {.ui = 10 } },
|
|
|
|
{ MODKEY|Mod1Mask, XK_g, togglescratch, {.ui = 11 } },
|
2023-05-26 06:32:03 +00:00
|
|
|
|
|
|
|
/* misc */
|
|
|
|
// logout
|
2022-12-20 00:15:21 +00:00
|
|
|
//{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
2023-05-26 06:32:03 +00:00
|
|
|
// toogle the bar
|
|
|
|
{ MODKEY, XK_b, togglebar, {0} },
|
|
|
|
// restart dwm
|
2022-12-20 00:15:21 +00:00
|
|
|
{ MODKEY|ControlMask, XK_r, quit, {1} },
|
|
|
|
};
|
|
|
|
|
|
|
|
/* button definitions */
|
|
|
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
|
|
|
// mouse bindings
|
|
|
|
static const Button buttons[] = {
|
|
|
|
/* click event mask button function argument */
|
|
|
|
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
|
|
|
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
|
|
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
|
|
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
|
|
|
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
|
|
|
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
|
|
|
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
|
|
|
{ ClkTagBar, 0, Button1, view, {0} },
|
|
|
|
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
|
|
|
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
|
|
|
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
|
|
|
};
|
|
|
|
|