summaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-28 17:00:36 +0100
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-28 17:00:36 +0100
commit6384c9e3fe3b5ac2ec1af25aef237bedc2d3f229 (patch)
tree0ad8570d037681d9497ae3e9c7fdbfb039cb551a /config.def.h
parentf68ec7323c44aa33f12934f0914ff5f0fa8d57eb (diff)
replace sprintf and strcpy with snprintf and strlcpy
Diffstat (limited to 'config.def.h')
-rwxr-xr-xconfig.def.h140
1 files changed, 0 insertions, 140 deletions
diff --git a/config.def.h b/config.def.h
deleted file mode 100755
index f93406a..0000000
--- a/config.def.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-/* Constants */
-#define TERMINAL "st"
-#define BROWSER "icecat"
-
-/* appearance */
-static const unsigned int borderpx = 3; /* border pixel of windows */
-static const unsigned int snap = 16; /* snap pixel */
-static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
-static const char *fonts[] = { "Terminess Nerd Font Mono:pixelsize=14, fontawesome:size=16" };
-static const char dmenufont[] = "Terminess Nerd Font Mono:pixelsize=14";
-static const char col_gray1[] = "#000000";
-static const char col_gray2[] = "#000000";
-static const char col_gray3[] = "#bbbbbb";
-static const char col_gray4[] = "#eeeeee";
-static const char col_cyan[] = "#bbbbbb";
-static const char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
- [SchemeSel] = { col_gray4, col_cyan, col_cyan },
-};
-
-/* tagging */
-static const char *tags[] = { "1", "2", "3", "4", "5" };
-
-static const Rule rules[] = {
- /* xprop(1):
- * WM_CLASS(STRING) = instance, class
- * WM_NAME(STRING) = title
- */
- /* class instance title tags mask isfloating isterminal noswallow monitor */
- { "steam", "steamwebhelper", NULL, 0, 1, 0, 0, -1 },
- { "Steam", "Steam", NULL, 0, 1, 0, 0, -1 },
- { "steam", "steamwebhelper", "Steam", 0, 0, 0, 0, -1 },
- { "steam", NULL, "Steam Settings", 0, 1, 0, 0, -1 },
- { "qemu-system-x86_64","qemu-system-x86_64",NULL, 0, 1, 0, 0, -1 },
- { "Virt-manager",NULL, NULL, 0, 0, 0, 0, -1 },
- { "qBittorrent", NULL, NULL, 0, 1, 0, 0, -1 },
- { "qBittorrent", "qbittorrent", NULL, 0, 1, 0, 0, -1 },
- { "St", "st", NULL, 0, 0, 1, 1, -1 },
- { "stfloat", "st", NULL, 0, 1, 1, 1, -1 },
- { "mpv", NULL, NULL, 0, 1, 0, 0, -1 },
- { "Nsxiv", NULL, NULL, 0, 1, 0, 0, -1 },
- { "scrcpy", NULL, NULL, 0, 1, 0, 0, -1 },
- { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
-};
-
-/* 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 = 0; /* 1 means respect size hints in tiled resizals */
-static const int lockfullscreen = 0; /* 1 will force focus on the fullscreen window */
-
-static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile }, /* first entry is default */
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
-};
-
-/* key definitions */
-#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 */
-static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
-static const char *termcmd[] = { "st", NULL };
-
-#include <X11/XF86keysym.h>
-static const Key keys[] = {
- /* modifier key function argument */
- { MODKEY, XK_d, spawn, {.v = dmenucmd } },
- { MODKEY, XK_space, spawn, {.v = termcmd } },
- { MODKEY|ShiftMask, XK_space, spawn, SHCMD(TERMINAL" -e su") },
- { Mod1Mask, XK_space, spawn, SHCMD(TERMINAL" -c stfloat") },
- { Mod1Mask|ShiftMask, XK_space, spawn, SHCMD(TERMINAL" -c stfloat -e su") },
- { MODKEY, XK_j, focusstack, {.i = +1 } },
- { MODKEY, XK_k, focusstack, {.i = -1 } },
- { MODKEY, XK_i, incnmaster, {.i = +1 } },
- { MODKEY, XK_u, incnmaster, {.i = -1 } },
- { MODKEY, XK_h, setmfact, {.f = -0.05} },
- { MODKEY, XK_l, setmfact, {.f = +0.05} },
- { Mod1Mask, XK_Tab, zoom, {0} },
- { MODKEY, XK_Tab, view, {0} },
- { MODKEY, XK_q, killclient, {0} },
- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
- // { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
- { MODKEY|ShiftMask, XK_f, togglefloating, {0} },
- { MODKEY, XK_f, togglefullscr, {0} },
- { MODKEY, XK_grave, view, {.ui = ~0 } },
- { MODKEY|ShiftMask, XK_grave, 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)
- { MODKEY|ShiftMask, XK_End, quit, {0} },
- { MODKEY|ShiftMask, XK_r, quit, {1} },
-
- { MODKEY, XK_e, spawn, SHCMD(TERMINAL" -e mc --nosubshell") },
- { Mod1Mask, XK_e, spawn, SHCMD(TERMINAL" -c stfloat -e mc --nosubshell") },
- { MODKEY|ShiftMask, XK_m, spawn, SHCMD(TERMINAL" -e neomutt") },
- { MODKEY, XK_n, spawn, SHCMD(TERMINAL" -e newsboat") },
- { MODKEY, XK_Escape, spawn, SHCMD(TERMINAL" -e htop") },
- { Mod1Mask, XK_Escape, spawn, SHCMD(TERMINAL" -c stfloat -e htop") },
- { MODKEY, XK_x, spawn, SHCMD("xkill") },
- { MODKEY, XK_s, spawn, SHCMD("steam") },
- { MODKEY|ShiftMask, XK_s, spawn, SHCMD("pkill -9 steam") },
- { MODKEY, XK_w, spawn, SHCMD(BROWSER) },
- { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("amixer sset Master 5%+") },
- { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("amixer sset Master 5%-") },
- { 0, XF86XK_AudioMute, spawn, SHCMD("amixer sset Master toggle") },
- { 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 10") },
- { 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 10") },
- { MODKEY, XK_Print, spawn, SHCMD("maimpick") },
-};
-
-/* button definitions */
-/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
-static const Button buttons[] = {
- /* click event mask button function argument */
- { ClkClientWin, MODKEY, Button1, movemouse, {0} },
- { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
- { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
-};
-