#pragma once #include /* See LICENSE file for copyright and license details. */ /* appearance */ 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 char *fonts[] = { "JetBrains Mono Nerd Font Propo:size=11" }; static const char dmenufont[] = "JetBrains Mono Nerd Font Propo:size=11"; static MAYBE_CONST char normbgcolor[] = "#222222"; static MAYBE_CONST char normbordercolor[] = "#444444"; static MAYBE_CONST char normfgcolor[] = "#bbbbbb"; static MAYBE_CONST char selfgcolor[] = "#eeeeee"; static MAYBE_CONST char selbordercolor[] = "#005577"; static MAYBE_CONST char selbgcolor[] = "#005577"; static MAYBE_CONST char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor }, [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor }, }; #define CENTER_NEW_FLOATING_WINDOWS 1 // so, basically, it does what it says. (make 0 to turn off) #define NEW_FLOATING_WINDOWS_APPEAR_UNDER_CURSOR 0 // so, basically, it does what it says. (make 0 to turn off) #if GAPS static const unsigned int gappx = 5; #endif #if BAR_HEIGHT static const int user_bh = 0; #endif #if BAR_PADDING static const int vertpad = 5; /* vertical padding of bar */ static const int sidepad = 5; /* horizontal padding of bar */ #endif /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; #if OCCUPIED_TAGS_DECORATION static const char *occupiedtags[] = { "1+", "2+", "3+", "4+", "5+", "6+", "7+", "8+", "9+" }; #endif #if INFINITE_TAGS #define MOVE_CANVAS_STEP 120 /* Defines how many pixel will be jumped when using movecanvas function */ #endif #if INFINITE_TAGS && IT_SHOW_COORDINATES_IN_BAR #define COORDINATES_DIVISOR 10 /* Defines by what number coordinates on the bar will be divided, can be used for making numbers smaller which makes navigation easier */ #endif #if MOVE_RESIZE_WITH_KEYBOARD #define MOVE_WITH_KEYBOARD_STEP 50 /* Defines by how many pixels windows will be resized with keyboard */ #define RESIZE_WITH_KEYBOARD_STEP 50 /* Defines by how many pixels windows will be resized with keyboard */ #endif #if AUTOSTART /* vxwm will execute this on startup (can be skipped with -ignoreautostart vxwm flag). */ static const char *const autostart[] = { "feh --bg-fill /usr/share/backgrounds/meine/wallhaven-gjxqve.jpg", "xrandr --output DisplayPort-0 --mode 2560x1440 -r 240", "picom", "slstatus", NULL /* must end with NULL */ }; #endif static const Rule rules[] = { /* xprop(1): * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating monitor */ { "Gimp", NULL, NULL, 0, 1, -1 }, { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, { "steam", NULL, NULL, 1 << 6, 0, -1 }, }; /* layout(s) */ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ #if LOCK_MOVE_RESIZE_REFRESH_RATE static const int refreshrate = 360; /* refresh rate (per second) for client move/resize, set it to your monitor refresh rate or double of that*/ #endif //LOCK_MOVE_RESIZE_REFRESH_RATE static const Layout layouts[] = { /* symbol arrange function */ { "><>", NULL }, /* no layout function means floating behavior */ { "[]=", tile }, /* first entry is default */ { "[M]", monocle }, }; /* key definitions */ #define MODKEY Mod4Mask #define ALTERNATE_MODKEY 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} }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL }; static const char *termcmd[] = { "st", NULL }; static const char *menualt[] = { "rofi", "-show", "drun", NULL }; static const char *screencmd[] = { "xrandr", "--output", "DisplayPort-0", "--mode", "2560x1440", "-r", "240", NULL }; static const char *altscreen[] = { "xrandr", "--output", "DisplayPort-0", "--mode", "2560x1440", "-r", "260", NULL }; static const char *dolphin[] = { "/usr/local/bin/dolphinfix.sh", NULL }; static const char *filebrowser[]= { "dolphin" ,NULL }; static const char *browsercmd[] = { "firefox", NULL }; static const char *wallcmd[] = { "/bin/bash", "-c", "feh --bg-fill \"$(find /home/nikita/Walls/normal -type f ! -name \"$(basename \"$CURRENT_WALL\")\" | shuf -n 1)\"", NULL }; static const char *brighter[] = { "/usr/local/bin/dwm-scripts/bright.sh", "5", NULL }; static const char *dimmer[] = { "/usr/local/bin/dwm-scripts/bright.sh", "-5", NULL }; static const char *steam[] = { "steam" ,NULL }; static const char *minecraft[] = { "prismlauncher", NULL }; static const char *downvol[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL }; static const char *upvol[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL }; static const char *mutevol[] = { "pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL }; static const char *lockcmd[] = { "bash", "-c", "slock -m \"$(cowsay \"$(fortune)\" | lolcat -ft)\"", NULL }; static const char *screensht[] = { "/usr/local/bin/dwm-scripts/screenshot.sh", NULL }; static const char *scripts[] = { "/usr/local/bin/dwm-scripts/scripts.sh", NULL }; static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_d, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_d, spawn, {.v = menualt } }, { MODKEY, XK_w, spawn, {.v = wallcmd } }, { MODKEY, XK_e, spawn, {.v = filebrowser } }, { MODKEY|ShiftMask, XK_e, spawn, {.v = dolphin } }, { MODKEY|ShiftMask, XK_n, spawn, {.v = altscreen } }, { MODKEY, XK_n, spawn, {.v = screencmd } }, { MODKEY, XK_s, spawn, {.v = steam } }, { MODKEY, XK_f, spawn, {.v = browsercmd } }, { MODKEY|Mod1Mask, XK_l, spawn, {.v = lockcmd } }, { MODKEY|Mod1Mask, XK_s, spawn, {.v = screensht } }, { MODKEY|ShiftMask, XK_s, spawn, {.v = scripts } }, { MODKEY, XK_p, spawn, {.v = minecraft } }, { MODKEY, XK_n, spawn, {.v = screencmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_F11, spawn, {.v = dimmer } }, { MODKEY, XK_F12, spawn, {.v = brighter } }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_i, incnmaster, {.i = +1 } }, { MODKEY, XK_o, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY|ShiftMask, XK_Return, zoom, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY, XK_q, killclient, {0} }, { MODKEY, XK_v, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_t, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, //default toggle floating bind. { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) TAGKEYS( XK_4, 3) TAGKEYS( XK_5, 4) TAGKEYS( XK_6, 5) TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, #if XRDB { MODKEY, XK_F5, xrdb, {.v = NULL } }, #endif #if FULLSCREEN { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, #endif #if ENHANCED_TOGGLE_FLOATING { MODKEY|ShiftMask, XK_t, enhancedtogglefloating, {0} }, //enhanced toggle floating bind. #endif #if GAPS { MODKEY, XK_minus, setgaps, {.i = -1 } }, { MODKEY, XK_equal, setgaps, {.i = +1 } }, { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, #endif #if MOVE_RESIZE_WITH_KEYBOARD { MODKEY, XK_Down, moveresize, {.v = (int []){ 0, MOVE_WITH_KEYBOARD_STEP, 0, 0 }}}, // Move window to down { MODKEY, XK_Up, moveresize, {.v = (int []){ 0, -MOVE_WITH_KEYBOARD_STEP, 0, 0 }}}, // Move window to up { MODKEY, XK_Right, moveresize, {.v = (int []){ MOVE_WITH_KEYBOARD_STEP, 0, 0, 0 }}}, // Move window to right { MODKEY, XK_Left, moveresize, {.v = (int []){ -MOVE_WITH_KEYBOARD_STEP, 0, 0, 0 }}}, // Move window to left { MODKEY|ControlMask, XK_Down, moveresize, {.v = (int []){ 0, 0, 0, RESIZE_WITH_KEYBOARD_STEP }}}, // Resize window { MODKEY|ControlMask, XK_Up, moveresize, {.v = (int []){ 0, 0, 0, -RESIZE_WITH_KEYBOARD_STEP }}}, // Resize window { MODKEY|ControlMask, XK_Right, moveresize, {.v = (int []){ 0, 0, RESIZE_WITH_KEYBOARD_STEP, 0 }}}, // Resize window { MODKEY|ControlMask, XK_Left, moveresize, {.v = (int []){ 0, 0, -RESIZE_WITH_KEYBOARD_STEP, 0 }}}, // Resize window #endif #if INFINITE_TAGS { MODKEY, XK_r, homecanvas, {0} }, // Return to x:0, y:0 position { MODKEY|ShiftMask, XK_Left, movecanvas, {.i = 0} }, // Move your position to left { MODKEY|ShiftMask, XK_Right, movecanvas, {.i = 1} }, // Move your position to right { MODKEY|ShiftMask, XK_Up, movecanvas, {.i = 2} }, // Move your position up { MODKEY|ShiftMask, XK_Down, movecanvas, {.i = 3} }, // Move your position down { MODKEY, XK_x, centerwindow, {0} }, #endif #if DIRECTIONAL_FOCUS { ALTERNATE_MODKEY, XK_Left, focusdir, {.i = 0 } }, // left { ALTERNATE_MODKEY, XK_Right, focusdir, {.i = 1 } }, // right { ALTERNATE_MODKEY, XK_Up, focusdir, {.i = 2 } }, // up { ALTERNATE_MODKEY, XK_Down, focusdir, {.i = 3 } }, // down #endif }; /* button definitions */ /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static const Button buttons[] = { /* click event mask button function argument */ #if INFINITE_TAGS { ClkRootWin, MODKEY|ShiftMask, Button1, movecanvasmouse, {.f = 1.5 } }, { ClkClientWin, MODKEY|ShiftMask, Button1, movecanvasmouse, {.f = 1.5 } }, /* .f = 1 is moving multiplier, for example if set to 0.5, canvas will move 2 times slower, if set to 2, canvas will move 2 times faster. If you want inverted canvas move then set the value to a negative value. */ #endif { 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} }, };