From 0510b0fe4883ac6f62808df08e62d7eadd2bad19 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Sat, 3 Feb 2024 16:11:18 +0100 Subject: [PATCH] remove unneeded patches --- config.h | 108 ++++++++++++++++++++++++++---------------------------- patches.h | 6 +-- 2 files changed, 55 insertions(+), 59 deletions(-) diff --git a/config.h b/config.h index 3de7fbf..7c10b51 100644 --- a/config.h +++ b/config.h @@ -7,7 +7,7 @@ #define STATUSBAR "dwmblocks" #define BROWSER "brave-browser" -#define BROWSER_FLAG_INCOG "" +#define BROWSER_FLAG_INCOG "--incognito" #define BROWSER_FLAG_1 "--enable-blink-features=MiddleClickAutoscroll" /* appearance */ @@ -15,33 +15,29 @@ static const unsigned int borderpx = 2; static const unsigned int snap = 33; static const int swallowfloating = 1; static const int showbar = 1; -static const int topbar = 1; +static const int topbar = 0; static const int focusonwheel = 1; static int floatposgrid_x = 5; static int floatposgrid_y = 3; -static const unsigned int systrayspacing = 0; /* systray spacing */ -static const int showsystray = 1; /* 0 means no systray */ -static const char ptagf[] = "[%s %s]"; /* format of a tag label */ -static const char etagf[] = "[%s]"; /* format of an empty tag */ -static const int lcaselbl = 0; /* 1 means make tag label lowercase */ -static const unsigned int ulinepad = 4; /* horizontal padding between the underline and tag */ -static const unsigned int ulinestroke = 2; /* thickness / height of the underline */ -static const unsigned int ulinevoffset = 4; /* how far above the bottom of the bar the line should appear */ -static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */ - -/* alt-tab configuration */ -static const unsigned int tabmodkey = 0x40; /* (Alt) when this key is held down the alt-tab functionality stays active. Must be the same modifier as used to run alttabstart */ -static const unsigned int tabcyclekey = 0x17; /* (Tab) when this key is hit the menu moves one position forward in client stack. Must be the same key as used to run alttabstart */ -static const unsigned int tabposy = 1; /* tab position on Y axis, 0 = top, 1 = center, 2 = bottom */ -static const unsigned int tabposx = 1; /* tab position on X axis, 0 = left, 1 = center, 2 = right */ -static const unsigned int maxwtab = 600; /* tab menu width */ -static const unsigned int maxhtab = 200; /* tab menu height */ +static const unsigned int systrayspacing = 0; +static const int showsystray = 1; +static const unsigned int ulinepad = 5; /* horizontal padding between the underline and tag */ +static const unsigned int ulinestroke = 2; /* thickness / height of the underline */ +static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */ +static const int ulineall = 0; /* Indicators: see patch/bar_indicators.h for options */ -static int tagindicatortype = INDICATOR_TOP_LEFT_SQUARE; +static int tagindicatortype = INDICATOR_NONE; static int tiledindicatortype = INDICATOR_NONE; -static int floatindicatortype = INDICATOR_TOP_LEFT_SQUARE; -static const char font[] = "FiraCode Nerd Font Mono:pixelsize=14"; +static int floatindicatortype = INDICATOR_NONE; + +static const char *fonts[] = { + "FiraCode Nerd Font Mono:pixelsize=14", + "FiraCode Nerd Font Mono:pixelsize=20", + "FiraCode Nerd Font Mono:pixelsize=30", + "Noto Color Emoji:pixelsize=14", + "FontAwesome:pixelsize=14" +}; static const char dmenufont[] = "FiraCode Nerd Font Mono:pixelsize=14"; #define NOCOLOR "#FF0000" @@ -134,17 +130,17 @@ static const unsigned int alphas[][3] = { }; static char *colors[][ColCount] = { - /* fg bg border float */ - [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor, normfloatcolor }, - [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor, selfloatcolor }, - [SchemeTitleNorm] = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor }, - [SchemeTitleSel] = { titleselfgcolor, titleselbgcolor, titleselbordercolor, titleselfloatcolor }, - [SchemeTagsNorm] = { tagsnormfgcolor, tagsnormbgcolor, tagsnormbordercolor, tagsnormfloatcolor }, - [SchemeTagsSel] = { tagsselfgcolor, tagsselbgcolor, tagsselbordercolor, tagsselfloatcolor }, - [SchemeHidNorm] = { hidnormfgcolor, hidnormbgcolor, NOCOLOR, NOCOLOR }, - [SchemeHidSel] = { hidselfgcolor, hidselbgcolor, NOCOLOR, NOCOLOR }, - [SchemeUrg] = { urgfgcolor, urgbgcolor, urgbordercolor, urgfloatcolor }, - [SchemeScratchSel] = { scratchselfgcolor, scratchselbgcolor, scratchselbordercolor, scratchselfloatcolor }, + /* fg bg border float */ + [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor, normfloatcolor }, + [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor, selfloatcolor }, + [SchemeTitleNorm] = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor }, + [SchemeTitleSel] = { titleselfgcolor, titleselbgcolor, titleselbordercolor, titleselfloatcolor }, + [SchemeTagsNorm] = { tagsnormfgcolor, tagsnormbgcolor, tagsnormbordercolor, tagsnormfloatcolor }, + [SchemeTagsSel] = { tagsselfgcolor, tagsselbgcolor, tagsselbordercolor, tagsselfloatcolor }, + [SchemeHidNorm] = { hidnormfgcolor, hidnormbgcolor, NOCOLOR, NOCOLOR }, + [SchemeHidSel] = { hidselfgcolor, hidselbgcolor, NOCOLOR, NOCOLOR }, + [SchemeUrg] = { urgfgcolor, urgbgcolor, urgbordercolor, urgfloatcolor }, + [SchemeScratchSel] = { scratchselfgcolor, scratchselbgcolor, scratchselbordercolor, scratchselfloatcolor }, [SchemeScratchNorm] = { scratchnormfgcolor, scratchnormbgcolor, scratchnormbordercolor, scratchnormfloatcolor }, }; @@ -152,13 +148,14 @@ static const char *layoutmenu_cmd = "xmenulayout"; // static const char *layoutxmenu = "$HOME/.local/libexec/dwm/xmenulayout"; // TODO: Patch layoutmenu to accept arguments // static const char *layoutdmenu = "$HOME/.local/libexec/dwm/dmenulayout"; // TODO: Patch layoutmenu to accept shell commands +// TODO: Enable this when ready static const char *const autostart[] = { - "exec runsvdir $SVDIR", NULL, - "sh", "-c", "$XDG_CONFIG_HOME/dwm/autostart.sh", NULL, - "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh gpgconf --launch gpg-agent", NULL, - "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh pipewire", NULL, - "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh dwmblocks", NULL, - "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh dunst", NULL, + // "exec runsvdir $SVDIR", NULL, + // "sh", "-c", "$XDG_CONFIG_HOME/dwm/autostart.sh", NULL, + // "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh gpgconf --launch gpg-agent", NULL, + // "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh pipewire", NULL, + // "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh dwmblocks", NULL, + // "sh", "-c", "$XDG_CONFIG_HOME/dwm/start.sh dunst", NULL, NULL }; @@ -212,22 +209,21 @@ static const Rule rules[] = { * name - does nothing, intended for visual clue and for logging / debugging */ static const BarRule barrules[] = { - /* monitor bar alignment widthfunc drawfunc clickfunc hoverfunc name */ - { -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, hover_tags, "tags" }, - { -1, 0, BAR_ALIGN_LEFT, width_taglabels, draw_taglabels, click_taglabels, hover_taglabels, "taglabels" }, - { 'A', 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" }, - { -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" }, - { 'A', 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_statuscmd, NULL, "status" }, - { -1, 0, BAR_ALIGN_NONE, width_wintitle, draw_wintitle, click_wintitle, NULL, "wintitle" }, + /* monitor bar alignment widthfunc drawfunc clickfunc hoverfunc name */ + { -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, hover_tags, "tags" }, + { 'A', 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" }, + { -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" }, + { 'A', 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_statuscmd, NULL, "status" }, + { -1, 0, BAR_ALIGN_NONE, width_wintitle, draw_wintitle, click_wintitle, NULL, "wintitle" }, }; /* 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 nstack = 0; /* number of clients in primary stack area */ -static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ +static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */ +static const int nmaster = 1; /* number of clients in master area */ +static const int nstack = 0; /* number of clients in primary stack area */ +static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ -static const int decorhints = 1; /* 1 means respect decoration hints */ +static const int decorhints = 1; /* 1 means respect decoration hints */ @@ -322,7 +318,7 @@ static const Key keys[] = { // { MODKEY | ShiftMask, XK_bracketright, spawn, {.v = (const char *[]){NULL}} }, { MODKEY, XK_BackSpace, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenusys") }, // { MODKEY | ShiftMask, XK_BackSpace, spawn, {.v = (const char *[]){NULL}} }, - { MODKEY, XK_Tab, alttabstart, {0} }, + // { MODKEY, XK_Tab, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY | ShiftMask, XK_Tab, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_apostrophe, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY | ShiftMask, XK_apostrophe, spawn, {.v = (const char *[]){NULL}} }, @@ -343,7 +339,7 @@ static const Key keys[] = { { MODKEY, XK_r, cyclelayout, {.i = +1} }, { MODKEY | ShiftMask, XK_r, rotatelayoutaxis, {.i = +1} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, - { MODKEY | ShiftMask, XK_l, setcfact, {.f = +0.05} }, + { MODKEY | ShiftMask, XK_l, setcfact, {.f = +0.1} }, // { MODKEY, XK_slash, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY | ShiftMask, XK_slash, spawn, {.v = (const char *[]){NULL}} }, // { MODKEY, XK_equal, spawn, {.v = (const char *[]){NULL}} }, @@ -361,7 +357,7 @@ static const Key keys[] = { { MODKEY, XK_d, spawn, {.v = (const char *[]){"dunstctl", "context", NULL}} }, { MODKEY | ShiftMask, XK_d, spawn, {.v = (const char *[]){"dunstctl", "action", "0", NULL}} }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY | ShiftMask, XK_h, setcfact, {.f = -0.05} }, + { MODKEY | ShiftMask, XK_h, setcfact, {.f = -0.1} }, { MODKEY, XK_t, spawn, {.v = (const char *[]){BROWSER, BROWSER_FLAG_1, NULL}} }, { MODKEY | ShiftMask, XK_t, spawn, {.v = (const char *[]){BROWSER, BROWSER_FLAG_1, BROWSER_FLAG_INCOG, NULL}} }, { MODKEY, XK_n, focusstack, {.i = PREVSEL} }, @@ -470,8 +466,8 @@ static const Button buttons[] = { { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, - // { ClkClientWin, MODKEY|ShiftMask, Button1, dragmfact, {0} }, - // { ClkClientWin, MODKEY|ShiftMask, Button3, dragcfact, {0} }, + { ClkClientWin, MODKEY|ShiftMask, Button1, dragmfact, {0} }, + { ClkClientWin, MODKEY|ShiftMask, Button3, dragcfact, {0} }, { ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} }, // { ClkTagBar, MODKEY, Button1, tag, {0} }, diff --git a/patches.h b/patches.h index 3794a7b..8d1984a 100644 --- a/patches.h +++ b/patches.h @@ -175,7 +175,7 @@ /* Show tag symbols + class of master window in the bar. * https://dwm.suckless.org/patches/taglabels/ */ -#define BAR_TAGLABELS_PATCH 1 +#define BAR_TAGLABELS_PATCH 0 /* This patch underlines the selected tag, or optionally all tags. * https://dwm.suckless.org/patches/underlinetags/ @@ -388,7 +388,7 @@ * https://lists.suckless.org/hackers/2004/17285.html * https://dwm.suckless.org/patches/pango/ */ -#define BAR_PANGO_PATCH 1 +#define BAR_PANGO_PATCH 0 /* This patch allows the status text to be fixed to the bar on a specific * monitor rather than being drawn on the focused monitor. @@ -441,7 +441,7 @@ /* Adds a window task switcher toggled using alt-tab. * https://dwm.suckless.org/patches/alt-tab/ */ -#define ALT_TAB_PATCH 1 +#define ALT_TAB_PATCH 0 /* All floating windows are centered, like the center patch, but without a rule. * The center patch takes precedence over this patch.