From ab67b9cecdc76b57d3d1beac51da9621ef15f7eb Mon Sep 17 00:00:00 2001 From: besya Date: Thu, 25 Dec 2025 12:09:51 +0000 Subject: [PATCH] Upload files to "/" --- bootstrap.sh | 35 +++ config.h | 700 ++++++++++++++++++++++++++++++++++++++++++++++++++ patches.def.h | 532 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 1267 insertions(+) create mode 100644 bootstrap.sh create mode 100644 config.h create mode 100644 patches.def.h diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..4988eed --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,35 @@ +#!/bin/sh -e + +echo "Install Spice/QEMU" +sudo apt install -y spice-vdagent spice-webdavd qemu-guest-agent + +echo "Install utilities" +sudo apt install -y bat btop dbus fish git hx sudo clang make + +echo "Install Desktop dependencies" +sudo apt install -y libconfig11 libconfig-dev libdbus-1-dev libx11-dev libx11-xcb-dev libxcb-res0-dev libxinerama-dev libimlib2-dev libyajl-dev libxft-dev libxfixes-dev lib-xi-dev libfribidi-dev + + +mkdir ~/src +mkdir ~/src/dusk +mkdir ~/src/st +mkdir ~/src/slstatus +mkdir ~/src/dmenu + +git clone https://github.com/besya/dusk ~/src/dusk +git clone https://github.com/besya/st-flexipatch ~/src/st +git clone https://github.com/besya/slstatus-for-dusk ~/src/slstatus +git clone https://github.com/besya/dmenu ~/src/dmenu + +cp configs/st/* ~/src/st +cp configs/dusk/* ~/src/dusk +cp configs/dmenu/* ~/src/dmenu + +cd ~/src/dusk +sudo make install clean + +cd ~/src/st +sudo make install clean + +cd ~/src/dmenu +sudo make install clean diff --git a/config.h b/config.h new file mode 100644 index 0000000..3a6244e --- /dev/null +++ b/config.h @@ -0,0 +1,700 @@ +/* See LICENSE file for copyright and license details. */ + +#include + +/* appearance */ +static const unsigned int borderpx = 2; /* border pixel of windows */ +static const unsigned int snap = 32; /* snap pixel */ +static const unsigned int gappih = 5; /* horiz inner gap between windows */ +static const unsigned int gappiv = 5; /* vert inner gap between windows */ +static const unsigned int gappoh = 5; /* horiz outer gap between windows and screen edge */ +static const unsigned int gappov = 5; /* vert outer gap between windows and screen edge */ +static const unsigned int gappfl = 5; /* gap between floating windows (when relevant) */ +static const unsigned int smartgaps_fact = 0; /* smartgaps factor when there is only one client; 0 = no gaps, 3 = 3x outer gaps */ + +static unsigned int attachdefault = AttachAside; // AttachMaster, AttachAbove, AttachAside, AttachBelow, AttachBottom + +static const int initshowbar = 1; /* 0 means no bar */ + +static const int bar_height = 0; /* 0 means derive from font, >= 1 explicit height */ +static const int vertpad = 5; /* vertical (outer) padding of bar */ +static const int sidepad = 5; /* horizontal (outer) padding of bar */ + +static const int iconsize = 16; /* icon size */ +static const int iconspacing = 5; /* space between icon and title */ + +static const float pfact = 0.25; /* size of workspace previews relative to monitor size */ + +static int floatposgrid_x = 5; /* float grid columns */ +static int floatposgrid_y = 5; /* float grid rows */ + +static const int horizpadbar = 6; /* horizontal (inner) padding for statusbar (increases lrpad) */ +static const int vertpadbar = 6; /* vertical (inner) padding for statusbar (increases bh, overridden by bar_height) */ + +static const char slopspawnstyle[] = "-t 0 -c 0.92,0.85,0.69,0.3 -o"; /* do NOT define -f (format) here */ +static const char slopresizestyle[] = "-t 0 -c 0.92,0.85,0.69,0.3"; /* do NOT define -f (format) here */ +static const unsigned int systrayspacing = 0; /* systray spacing */ +static const char *toggle_float_pos = "50% 50% 80% 80%"; // default floating position when triggering togglefloating +static const double defaultopacity = 0.9; /* client default opacity, e.g. 0.75. 0 means don't apply opacity */ +static const double moveopacity = 0.6; /* client opacity when being moved, 0 means don't apply opacity */ +static const double resizeopacity = 0.6; /* client opacity when being resized, 0 means don't apply opacity */ +static const double placeopacity = 0.6; /* client opacity when being placed, 0 means don't apply opacity */ + +/* Indicators: see lib/bar_indicators.h for options */ +static int indicators[IndicatorLast] = { + [IndicatorWs] = INDICATOR_NONE, + [IndicatorPinnedWs] = INDICATOR_NONE, + [IndicatorFakeFullScreen] = INDICATOR_PLUS, + [IndicatorFakeFullScreenActive] = INDICATOR_PLUS_AND_LARGER_SQUARE, + [IndicatorFloatFakeFullScreen] = INDICATOR_PLUS, + [IndicatorFloatFakeFullScreenActive] = INDICATOR_PLUS_AND_LARGER_SQUARE, + [IndicatorTiled] = INDICATOR_NONE, + [IndicatorFloating] = INDICATOR_TOP_LEFT_LARGER_SQUARE, +}; + +/* Custom indicators using status2d markup, e.g. enabled via INDICATOR_CUSTOM_3 */ +static char *custom_2d_indicator_1 = "^c#00A523^^r0,h,w,2^"; // green underline +static char *custom_2d_indicator_2 = "^c#55cdfc^^r3,3,4,4^^c#E72608^^r4,4,2,2^"; // blue rectangle +static char *custom_2d_indicator_3 = "^f-10^^c#E72608^𐄛"; // example using a character as an indicator +static char *custom_2d_indicator_4 = "^c#E26F0B^^r0,h,w,1^^r0,0,1,h^^r0,0,w,1^^rw,0,1,h^"; // orange box +static char *custom_2d_indicator_5 = "^c#CB9700^^r0,h,w,1^^r0,0,w,1^"; // top and bottom lines +static char *custom_2d_indicator_6 = "^c#F0A523^^r6,2,1,-4^^r-6,2,1,-4^"; // orange vertical bars + +/* The below are only used if the WorkspaceLabels functionality is enabled */ +static char *occupied_workspace_label_format = "%s: %s"; /* format of a workspace label */ +static char *vacant_workspace_label_format = "%s"; /* format of an empty / vacant workspace */ +static int lowercase_workspace_labels = 1; /* whether to change workspace labels to lower case */ +static int prefer_window_icons_over_workspace_labels = 1; /* whether to use window icons instead of labels if present */ +static int swap_occupied_workspace_label_format_strings = 0; /* 0 gives "icon: label", 1 gives "label: icon" */ + +/* This determines what happens with pinned workspaces on a monitor when that monitor is removed. + * 0 - the workspaces becomes unpinned and is moved to another monitor or + * 1 - the workspace clients are moved to the selected workspace on the first monitor, but + * the workspace itself is hidden + * + * Non-pinned workspaces are always redistributed among the remaining monitors. + */ +static const int workspaces_per_mon = 0; + +/* See util.h for options */ +static uint64_t functionality = 0 +// |AutoReduceNmaster // automatically reduce the number of master clients if one is closed + |BanishMouseCursor // like xbanish, hides mouse cursor when using the keyboard +// |BanishMouseCursorToCorner // makes BanishMouseCursor move the cursor to one of the corners of the focused window + // |SmartGaps // enables no or increased gaps if there is only one visible window +// |SmartGapsMonocle // enforces no gaps in monocle layout + |Systray // enables a systray in the bar + |SystrayNoAlpha // disables the use of transparency for the systray, enable if you do not use a compositor + |Swallow // allows X applications started from the command line to swallow the terminal + |SwallowFloating // allow floating windows to swallow the terminal by default + // |CenteredWindowName // center the window titles on the bar +// |BarActiveGroupBorderColor // use border color of active group for the bar, otherwise normal scheme is used +// |BarMasterGroupBorderColor // use border color of master group for the bar, otherwise normal scheme is used +// |FlexWinBorders // use the SchemeFlex* color schemes, falls back to SchemeTitle* if disabled + |SpawnCwd // spawn applications in the currently selected client's working directory + |ColorEmoji // enables color emoji support (removes Xft workaround) +// |Status2DNoAlpha // option to not use alpha when drawing status2d status + // |BarBorder // draw a border around the bar + |BarBorderColBg // optionally use the bar background colour for the bar border (rather than border colour) + |BarPadding // add vertical and side padding as per vertpad and sidepad variables above +// |NoBorders // as per the noborder patch, show no border when only one client in tiled mode + |Warp // warp cursor to currently focused window +// |DecorationHints // omit drawing the window border if the applications asks not to +// |FocusedOnTop // allows focused window to stay on top of other windows +// |FocusedOnTopTiled // additional toggle to allow focused tiled clients to show on top of floating windows + |FocusFollowMouse // allow window under the mouse cursor to get focus when changing views or killing clients +// |FocusOnClick // only allow focus change when the user clicks on windows (disables sloppy focus) + |FocusOnNetActive // allow windows demanding attention to receive focus automatically + |AllowNoModifierButtons // allow some window operations, like move and resize, to work without having to hold down a modifier key + |CenterSizeHintsClients // center tiled clients subject to size hints within their tiled area +// |ResizeHints // respect size hints also when windows are tiled + |SnapToWindows // snap to windows when moving floating clients + |SnapToGaps // snap to outer gaps when moving floating clients +// |SortScreens // monitors are numbered from left to right +// |ViewOnWs // follow a window to the workspace it is being moved to + |Xresources // add support for changing colours via Xresources +// |Debug // enables additional debug output + |AltWindowTitles // show alternate window titles, if present +// |AltWorkspaceIcons // show the workspace name instead of the icons +// |GreedyMonitor // disables swap of workspaces between monitors + |SmartLayoutConversion // automatically adjust layout based on monitor orientation when moving a workspace from one monitor to another +// |AutoHideScratchpads // automatically hide open scratchpads when moving to another workspace +// |RioDrawIncludeBorders // indicates whether the area drawn using slop includes the window borders +// |RioDrawSpawnAsync // spawn the application alongside rather than after drawing area using slop +// |RestrictFocusstackToMonitor // restrict focusstack to only operate within the monitor, otherwise focus can drift between monitors + |WinTitleIcons // adds application icons to window titles in the bar +// |StackerIcons // adds a stacker icon hints in window titles + // |WorkspaceLabels // adds the class of the master client next to the workspace icon + // |WorkspacePreview // adds preview images when hovering workspace icons in the bar +; + +static int flexwintitle_masterweight = 15; // master weight compared to hidden and floating window titles +static int flexwintitle_stackweight = 4; // stack weight compared to hidden and floating window titles +static int flexwintitle_hiddenweight = 0; // hidden window title weight +static int flexwintitle_floatweight = 0; // floating window title weight, set to 0 to not show floating windows +static int flexwintitle_separator = 0; // width of client separator + +static const char *fonts[] = { "Hack Nerd Font:size=12:antialias=true:autohint=true" }; +static char dmenufont[60] = "Hack Nerd Font:size=12:antialias=true:autohint=true"; + +static char dmenunormfgcolor[] = "#D9CFC5"; +static char dmenunormbgcolor[] = "#492B2D"; +static char dmenuselfgcolor[] = "#D9CFC5"; +static char dmenuselbgcolor[] = "#82363A"; +static char dmenubordercolor[] = "#492B2D"; + +/* Xresources preferences to load at startup. */ +static const ResourcePref resources[] = { + { "dmenu.norm.fg.color", STRING, &dmenunormfgcolor }, + { "dmenu.norm.bg.color", STRING, &dmenunormbgcolor }, + { "dmenu.sel.fg.color", STRING, &dmenuselfgcolor }, + { "dmenu.sel.bg.color", STRING, &dmenuselbgcolor }, + { "dmenu.border.bg.color", STRING, &dmenubordercolor }, + { "dmenu.font", STRING, &dmenufont }, +}; + +/* Default opacity levels fg bg border */ +unsigned int default_alphas[] = { OPAQUE, 0xd0U, OPAQUE }; + +static char *colors[SchemeLast][4] = { + /* fg bg border */ + [SchemeNorm] = { "#D9CFC5", "#492B2D", "#492B2D" }, + [SchemeTitleNorm] = { "#D9CFC5", "#492B2D", "#643B3E" }, + [SchemeTitleSel] = { "#D9CFC5", "#82363A", "#82363A" }, + [SchemeFlexInaFloat] = { "#D9CFC5", "#492B2D", "#643B3E" }, + [SchemeFlexSelFloat] = { "#D9CFC5", "#82363A", "#82363A" }, + [SchemeScratchNorm] = { "#D9CFC5", "#492B2D", "#CAD3F5" }, + [SchemeScratchSel] = { "#D9CFC5", "#82363A", "#CAD3F5" }, + [SchemeHidNorm] = { "#D9CFC5", "#492B2D", "#000000" }, + [SchemeHidSel] = { "#D9CFC5", "#82363A", "#000000" }, + [SchemeUrg] = { "#E0E0E0", "#A23419", "#A23419" }, + [SchemeMarked] = { "#DDC470", "#724559", "#724559" }, + [SchemeWsNorm] = { "#D9CFC5", "#492B2D", "#000000" }, + [SchemeWsVisible] = { "#D9CFC5", "#82363A", "#000000" }, + [SchemeWsSel] = { "#D9CFC5", "#82363A", "#000000" }, + [SchemeWsOcc] = { "#D9CFC5", "#492B2D", "#000000" }, +}; + +/* List of programs to start automatically during startup only. Note that these will not be + * executed again when doing a restart. */ +static const char *const autostart[] = { +// "st", NULL, + NULL /* terminate */ +}; + +/* List of programs to start automatically during a restart only. These should usually be short + * scripts that perform specific operations, e.g. changing a wallpaper. */ +static const char *const autorestart[] = { + NULL /* terminate */ +}; + +/* There are two options when it comes to per-client rules: + * - a traditional struct table or + * - specifying the fields used + * + * A traditional struct table looks like this: + * // class role instance title wintype opacity flags floatpos scratchkey workspace + * { "Gimp", NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, "4" }, + * { "Firefox", NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, "9" }, + * + * Alternatively you can specify the fields that are relevant to your rule, e.g. + * + * { .class = "Gimp", .workspace = "5" }, + * { .class = "Firefox", .workspace = "9" }, + * + * Any fields that you do not specify will default to 0 or NULL. + * + * Refer to the Rule struct definition for the list of available fields. + */ +static const Rule clientrules[] = { + /* xprop(1): + * WM_CLASS(STRING) = instance, class + * WM_NAME(STRING) = title + * WM_WINDOW_ROLE(STRING) = role + * _NET_WM_WINDOW_TYPE(ATOM) = wintype + */ + { .wintype = "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", .flags = Unmanaged }, + { .wintype = WTYPE "DESKTOP", .flags = Unmanaged|Lower }, + { .wintype = WTYPE "DOCK", .flags = Unmanaged|Raise }, + { .wintype = WTYPE "DIALOG", .flags = AlwaysOnTop|Centered|Floating }, + { .wintype = WTYPE "UTILITY", .flags = AlwaysOnTop|Centered|Floating }, + { .wintype = WTYPE "TOOLBAR", .flags = AlwaysOnTop|Centered|Floating }, + { .wintype = WTYPE "SPLASH", .flags = AlwaysOnTop|Centered|Floating }, + { .instance = "spterm (w)", .scratchkey = 'w', .flags = Floating }, + { .instance = "spterm (e)", .scratchkey = 'e', .flags = Floating }, + { .instance = "spfm (r)", .scratchkey = 'r', .flags = Floating }, + { .instance = "spyt (y)", .scratchkey = 'y', .flags = Floating }, + { .class = "Gimp", .workspace = "5", .opacity = 0, .flags = Floating|SwitchWorkspace }, + { .class = "firefox", .workspace = "4", .opacity = 1, .flags = AttachMaster|SwitchWorkspace }, + { .class = "Mullvad Browser", .workspace = "4", .opacity = 1, .flags = AttachMaster|SwitchWorkspace }, + { .class = "REAPER", .workspace = "3", .opacity = 1, .flags = AttachMaster|SwitchWorkspace }, + { .class = "Steam", .flags = Floating|Centered }, + { .class = "steam_app_", .flags = SteamGame|Floating|Centered }, + { .class = "Google-chrome", .role = "GtkFileChooserDialog", .floatpos = "50% 50%", .flags = AlwaysOnTop|Floating }, + { .role = "pop-up", .flags = AlwaysOnTop|Floating|Centered }, + { .role = "browser", .workspace = "4", .opacity = 1, .flags = AttachBelow|OnlyModButtons|SwitchWorkspace }, + { .class = "Gnome-terminal", .role = "gnome-terminal-preferences", .flags = Centered }, + // { .class = "Diffuse", .workspace = "4", .flags = NoSwallow|SwitchWorkspace|RevertWorkspace }, + { .class = "File-roller", .workspace = "9", .flags = Centered|Floating|SwitchWorkspace|RevertWorkspace }, + { .class = "Alacritty", .flags = Terminal }, + { .class = "st-256color", .flags = Terminal|AttachBottom }, + { .class = "XTerm", .flags = Terminal }, + { .class = "Xephyr", .flags = NoSwallow|Floating|Centered }, + { .class = "feh", .opacity = 1 }, + { .class = "mpv", .opacity = 1 }, + { .title = "Event Tester", .flags = NoSwallow }, +}; + +/* Bar settings, this defines what bars exists, their position, and what attributes they have. + * + * monitor - the exact monitor number the bar should be created on + * (0 - primary, 1 - secondary, 2 - tertiary) + * idx - the bar index, used in relation to bar rules below + * (bar indexes can be reused across monitors) + * vert - whether the bar is horizontal (0) or vertical (1), not + * all bar modules will have support for being displayed + * in a vertical bar + * name - this is just a reference that can be used for logging + * purposes + * ext class - WM class to match on for external bars + * ext inst - WM instance to match on for external bars + * ext name - WM name to match on for external bars + * + * Bar positioning consists of four values, x, y, w and h which, + * similarly to floatpos, can have different meaning depending on + * the characters used. Absolute positioning (as in cross-monitor) + * is not supported, but exact positions relative to the monitor + * can be used. Percentage values are recommended for portability. + * + * All values can be a percentage relative to the space available + * on the monitor or they can be exact values, here are some example + * values: + * x + * 0% - left aligned (default) + * 100% - right aligned + * 50% - bar is centered on the screen + * 0x - exact position relative to the monitor + * -1x - value < 0 means use default + * y + * 0% - top bar (default) + * 100% - bottom bar + * 0y - exact position relative to the monitor + * -1y - value < 0 means use default + * w + * 100% - bar takes up the full width of the screen (default) + * 20% - small bar taking a fifth of the width of the screen + * 500w - the bar is 500 pixels wide (including border) + * -1w - value <= 0 means use default + * h + * 100% - bar takes up the full height of the screen + * 20% - small bar taking a fifth of the height of screen + * 30h - the bar is 30 pixels high (including border) + * -1h - value <= 0 means use the default (deduced by font size) + * + * Note that vertical and horizontal side padding are controlled by the + * vertpad and sidepad variables towards the top of this configuration file. + */ +static const BarDef bars[] = { + /* monitor idx vert x y w h name ext class ext inst ext name */ + { 0, 0, 0, "0% 0% 100% -1h ", "Primary top" }, + // { 0, 1, 0, "0% 100% 100% -1h ", "Primary bottom" }, + { 1, 0, 0, "0% 0% 100% -1h ", "Secondary top" }, + // { 1, 1, 0, "0% 100% 100% -1h ", "Secondary bottom" }, + { 2, 0, 0, "0% 0% 100% -1h ", "Tertiary top" }, + // { 2, 1, 0, "0% 100% 100% -1h ", "Tertiary bottom" }, +}; + +/* Bar rules allow you to configure what is shown where on the bar, as well as + * introducing your own bar modules. + * + * monitor: + * -1 show on all monitors + * 0 show on monitor 0 + * 'A' show on active monitor (i.e. focused / selected) (or just -1 for active?) + * bar - bar index, 0 is default, 1 is extrabar + * scheme - defines the default scheme for the bar module + * lpad - adds artificial spacing on the left hand side of the module + * rpad - adds artificial spacing on the right hand side of the module + * value - arbitrary value where the interpretation is module specific + * alignment - how the module is aligned compared to other modules + * sizefunc, drawfunc, clickfunc - providing bar module width, draw and click functions + * name - does nothing, intended for visual clue and for logging / debugging + */ +#define PWRL PwrlForwardSlash +static const BarRule barrules[] = { + /* monitor bar scheme lpad rpad value alignment sizefunc drawfunc clickfunc hoverfunc name */ + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_LEFT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_LEFT, size_workspaces, draw_workspaces, click_workspaces, hover_workspaces, "workspaces" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_LEFT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { -1, 0, 5, 0, 0, 0, BAR_ALIGN_LEFT, size_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_LEFT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 6, 5, 5, 0, BAR_ALIGN_RIGHT, size_systray, draw_systray, click_systray, NULL, "systray" }, + { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 0, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status0" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 1, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status1" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 2, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status2" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 3, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status3" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 4, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status4" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 5, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status5" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 6, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status6" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 7, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status7" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 0, 8, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status8" }, + // { 0, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { 0, 0, 0, 0, 5, 9, BAR_ALIGN_RIGHT, size_status, draw_status, click_status, NULL, "status9" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT, size_powerline, draw_powerline, NULL, NULL, "powerline join" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_NONE, size_wintitle_sticky, draw_wintitle_sticky, click_wintitle_sticky, NULL, "wintitle_sticky" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_CENTER, size_pwrl_ifhidfloat, draw_powerline, NULL, NULL, "powerline join" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT_RIGHT, size_wintitle_hidden, draw_wintitle_hidden, click_wintitle_hidden, NULL, "wintitle_hidden" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_RIGHT_RIGHT, size_wintitle_floating, draw_wintitle_floating, click_wintitle_floating, NULL, "wintitle_floating" }, + { -1, 0, 0, 0, 0, PWRL, BAR_ALIGN_NONE, size_flexwintitle, draw_flexwintitle, click_flexwintitle, NULL, "flexwintitle" }, +}; + +/* Workspace rules define what workspaces are available and their properties. + * + * name - the name of the workspace, this is a reference used for keybindings - see WSKEYS + * monitor - the monitor number the workspace starts on by default, -1 means assign freely + * pinned - whether the workspace is pinned on the assigned monitor + * layout - the layout index the workspace should start with, refer to the layouts array + * mfact - factor of master area size, -1 means use global config + * nmaster - number of clients in master area, -1 means use global config + * nstack - number of clients in primary stack area, -1 means use global config + * gaps - whether gaps are enabled for the workspace, -1 means use global config + * + * icons: + * def - the default icon shown for the workspace, if empty string then the workspace is + * hidden by default, if NULL then the workspace name is used for the icon + * vac - the vacant icon shows if the workspace is selected, the default icon is an empty + * string (hidden by default) and the workspace has no clients + * occ - the occupied icon shows if the workspace has clients + * + */ +static const WorkspaceRule wsrules[] = { + /* ------------------------------- schemes ------------------------------- ------ icons ------ + name, monitor, pinned, layout, mfact, nmaster, nstack, gaps, default, visible, selected, occupied, def, vac, occ, */ + { "1", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "1", "", "[1]", }, + { "2", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "2", "", "[2]", }, + { "3", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "3", "", "[3]", }, + { "4", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "4", "", "[4]", }, + { "5", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "5", "", "[5]", }, + { "6", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "6", "", "[6]", }, + { "7", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "7", "", "[7]", }, + { "8", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "8", "", "[8]", }, + { "9", -1, 0, 0, -1, -1, -1, -1, SchemeWsNorm, SchemeWsVisible, SchemeWsSel, SchemeWsOcc, "9", "", "[9]", }, +}; + +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 enablegaps = 1; /* whether gaps are enabled by default or not */ + +/* layout(s) */ +static const Layout layouts[] = { + /* symbol arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis, symbol func }, name */ + { "[]=", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL }, "tile" }, + { "|||", flextile, { -1, -1, NO_SPLIT, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL }, "columns" }, + { "===", flextile, { -1, -1, NO_SPLIT, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL }, "rows" }, + { "[M]", flextile, { -1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL }, "monocle" }, + { "||=", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL }, "col" }, + { ">M>", flextile, { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL }, "floating master" }, + { "[D]", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL }, "deck" }, + { "TTT", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL }, "bstack" }, + { "===", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL }, "bstackhoriz" }, + { "==#", flextile, { -1, -1, SPLIT_HORIZONTAL, TOP_TO_BOTTOM, GAPLESSGRID_CFACTS, 0, NULL }, "bstackgrid" }, + { "|M|", flextile, { -1, -1, SPLIT_CENTERED_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, TOP_TO_BOTTOM, NULL }, "centeredmaster" }, + { "-M-", flextile, { -1, -1, SPLIT_CENTERED_HORIZONTAL, TOP_TO_BOTTOM, LEFT_TO_RIGHT, LEFT_TO_RIGHT, NULL }, "centeredmaster horiz" }, + { ":::", flextile, { -1, -1, NO_SPLIT, GAPLESSGRID_CFACTS, GAPLESSGRID_CFACTS, 0, NULL }, "gapless grid" }, + { "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE_CFACTS, DWINDLE_CFACTS, 0, NULL }, "fibonacci dwindle" }, + { "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL_CFACTS, SPIRAL_CFACTS, 0, NULL }, "fibonacci spiral" }, + { "[T]", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TATAMI_CFACTS, 0, NULL }, "tatami mats" }, + { "><>", NULL, { -1, -1 }, "floating" }, /* no layout function means floating behavior */ +}; + +#define Shift ShiftMask +#define Ctrl ControlMask +#define Alt Mod1Mask +#define AltGr Mod3Mask +#define Super Mod4Mask +#define ShiftGr Mod5Mask + +/* key definitions */ +#define MODKEY Super + +#define SCRATCHKEYS(MOD,KEY,CMD) \ + { KeyPress, MOD, KEY, togglescratch, {.v = CMD } }, \ + { KeyPress, MOD|Ctrl, KEY, setscratch, {.v = CMD } }, \ + { KeyPress, MOD|Ctrl|Shift, KEY, removescratch, {.v = CMD } }, \ + +#define WSKEYS(MOD,KEY,NAME) \ + { KeyPress, MOD, KEY, comboviewwsbyname, {.v = NAME} }, \ + { KeyPress, MOD|Alt, KEY, enablewsbyname, {.v = NAME} }, \ + { KeyPress, MOD|Shift, KEY, movetowsbyname, {.v = NAME} }, \ + { KeyPress, MOD|Ctrl, KEY, sendtowsbyname, {.v = NAME} }, \ + { KeyPress, MOD|Ctrl|Shift, KEY, movealltowsbyname, {.v = NAME} }, \ + { KeyPress, MOD|Ctrl|Alt, KEY, moveallfromwsbyname, {.v = NAME} }, \ + { KeyPress, MOD|Ctrl|Alt|Shift, KEY, swapwsbyname, {.v = NAME} }, \ + +#define STACKKEYS(MOD,ACTION) \ + { KeyPress, MOD, XK_j, ACTION, {.i = INC(+1) } }, \ + { KeyPress, MOD, XK_k, ACTION, {.i = INC(-1) } }, \ + { KeyPress, MOD, XK_s, ACTION, {.i = PREVSEL } }, \ + { KeyPress, MOD, XK_w, ACTION, {.i = 1 } }, \ + { KeyPress, MOD, XK_e, ACTION, {.i = 2 } }, \ + { KeyPress, MOD, XK_a, ACTION, {.i = 3 } }, \ + { KeyPress, MOD, XK_z, ACTION, {.i = LASTTILED } }, + +/* This relates to the StackerIcons functionality and should mirror the STACKKEYS list above. */ +static const StackerIcon stackericons[] = { + { "[j]", {.i = INC(+1) } }, + { "[k]", {.i = INC(-1) } }, + { "[s]", {.i = PREVSEL } }, + { "[w]", {.i = 1 } }, + { "[e]", {.i = 2 } }, + { "[a]", {.i = 3 } }, + { "[z]", {.i = LASTTILED } }, +}; + +/* Helper macros for spawning commands */ +#define SHCMD(cmd) { .v = (const char*[]){ NULL, "/bin/sh", "-c", cmd, NULL } } +#define CMD(...) { .v = (const char*[]){ NULL, __VA_ARGS__, NULL } } + +/* Scratch/Spawn commands: NULL (scratchkey), command, argument, argument, ..., NULL */ +static const char *termcmd[] = { "st", NULL }; +static const char *dmenucmd[] = { + "dmenu_run", + "-fn", dmenufont, + "-nb", dmenunormbgcolor, + "-nf", dmenunormfgcolor, + "-sb", dmenuselbgcolor, + "-sf", dmenuselfgcolor, +// "-bb", dmenubordercolor, + NULL +}; +static const char *spcmd_w[] = {"w", "st", "-n", "spterm (w)", "-g", "120x34", NULL }; +static const char *spcmd_e[] = {"e", "st", "-n", "spterm (e)", "-g", "120x34", NULL }; +static const char *spcmd_r[] = {"r", "st", "-n", "spfm (r)", "-g", "144x41", "-e", "ranger", NULL }; +static const char *spcmd_y[] = {"y", "st", "-n", "spyt (y)", "-g", "144x41", "-e", "yt-x", NULL }; +static const char *statusclickcmd[] = { "~/bin/statusbar/statusclick.sh", NULL }; + +static Key keys[] = { + /* type modifier key function argument */ + + { KeyPress, 0, XF86XK_MonBrightnessUp, spawn, SHCMD("brightnessctl set +5%") }, + { KeyPress, 0, XF86XK_MonBrightnessDown,spawn, SHCMD("brightnessctl set 5%-") }, + { KeyPress, 0, XF86XK_KbdBrightnessUp, spawn, SHCMD("brightnessctl -d smc::kbd_backlight set +10%") }, + { KeyPress, 0, XF86XK_KbdBrightnessDown,spawn, SHCMD("brightnessctl -d smc::kbd_backlight set 10%-") }, + { KeyPress, 0, XF86XK_AudioPrev, spawn, SHCMD("mpc prev") }, + { KeyPress, 0, XF86XK_AudioPlay, spawn, SHCMD("mpc toggle") }, + { KeyPress, 0, XF86XK_AudioNext, spawn, SHCMD("mpc next") }, + { KeyPress, Shift, XF86XK_AudioRaiseVolume, spawn, SHCMD("mpc volume +5") }, + { KeyPress, Shift, XF86XK_AudioLowerVolume, spawn, SHCMD("mpc volume -5") }, + { KeyPress, 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("amixer set Master 5%+") }, + { KeyPress, 0, XF86XK_AudioLowerVolume, spawn, SHCMD("amixer set Master 5%-") }, + { KeyPress, 0, XF86XK_AudioMute, spawn, SHCMD("amixer set Master toggle") }, + + // { KeyPress, MODKEY, XK_c, clipcopy, {0}}, + // { KeyPress, MODKEY, XK_v, clippaste, {0}}, + // { KeyPress, MODKEY, XK_x, clipcut, {0}}, + + { KeyPress, MODKEY, XK_d, spawn, {.v = dmenucmd } }, // spawn dmenu for launching other programs + { KeyPress, MODKEY, XK_Return, spawn, {.v = termcmd } }, // spawn a terminal + { KeyPress, MODKEY|Shift, XK_Return, riospawn, {.v = termcmd } }, // draw/spawn a terminal + { KeyPress, MODKEY, XK_b, togglebar, {0} }, // toggles the display of the bar(s) on the current monitor + + { KeyPress, MODKEY, XK_j, focusstack, {.i = +1 } }, // focus on the next client in the stack + { KeyPress, MODKEY, XK_k, focusstack, {.i = -1 } }, // focus on the previous client in the stack + { KeyPress, MODKEY|Alt|Shift, XK_j, focusstack, {.i = +2 } }, // allows focusing on hidden clients + { KeyPress, MODKEY|Alt|Shift, XK_k, focusstack, {.i = -2 } }, // allows focusing on hidden clients + { KeyPress, MODKEY, XK_Left, focusdir, {.i = LEFT } }, // focus on the client left of the currently focused client + { KeyPress, MODKEY, XK_Right, focusdir, {.i = RIGHT } }, // focus on the client right of the currently focused client + { KeyPress, MODKEY, XK_Up, focusdir, {.i = UP } }, // focus on the client above the currently focused client + { KeyPress, MODKEY, XK_Down, focusdir, {.i = DOWN } }, // focus on the client below the currently focused client + { KeyPress, MODKEY|Ctrl, XK_Left, placedir, {.i = LEFT } }, // swap places with the client window on the immediate left of the current client + { KeyPress, MODKEY|Ctrl, XK_Right, placedir, {.i = RIGHT } }, // swap places with the client window on the immediate right of the current client + { KeyPress, MODKEY|Ctrl, XK_Up, placedir, {.i = UP } }, // swap places with the client window above the current client + { KeyPress, MODKEY|Ctrl, XK_Down, placedir, {.i = DOWN } }, // swap places with the client window below the current client + + { KeyPress, MODKEY|Ctrl, XK_j, pushdown, {0} }, // move the selected client down the stack + { KeyPress, MODKEY|Ctrl, XK_k, pushup, {0} }, // move the selected client up the stack + { KeyPress, MODKEY, XK_i, incnmaster, {.i = +1 } }, // increase the number of clients in the master area + { KeyPress, MODKEY, XK_u, incnmaster, {.i = -1 } }, // decrease the number of clients in the master area + { KeyPress, MODKEY|Ctrl, XK_i, incnstack, {.i = +1 } }, // increase the number of clients in the primary (first) stack area + { KeyPress, MODKEY|Ctrl, XK_u, incnstack, {.i = -1 } }, // increase the number of clients in the primary (first) stack area + { KeyPress, MODKEY, XK_h, setmfact, {.f = -0.05} }, // decrease the size of the master area compared to the stack area(s) + { KeyPress, MODKEY, XK_l, setmfact, {.f = +0.05} }, // increase the size of the master area compared to the stack area(s) + { KeyPress, MODKEY|Shift, XK_h, setcfact, {.f = +0.25} }, // increase size respective to other windows within the same area + { KeyPress, MODKEY|Shift, XK_l, setcfact, {.f = -0.25} }, // decrease client size respective to other windows within the same area + { KeyPress, MODKEY|Shift, XK_o, setcfact, {0} }, + + { KeyPress, MODKEY, XK_backslash, togglepinnedws, {0} }, // toggle pinning of currently selected workspace on the current monitor + { KeyPress, MODKEY, XK_z, showhideclient, {0} }, // hide the currently selected client (or show if hidden) + { KeyPress, MODKEY, XK_q, killclient, {0} }, // close the currently focused window + { KeyPress, MODKEY|Shift, XK_q, restart, {0} }, // restart dusk + { KeyPress, MODKEY|Ctrl|Alt, XK_q, quit, {0} }, // exit dusk + + // { KeyPress, MODKEY, XK_v, group, {0} }, // groups floating clients together + // { KeyPress, MODKEY|Shift, XK_v, ungroup, {0} }, // ungroups floating clients + + { KeyPress, MODKEY, XK_a, markall, {MARKALL_ALL} }, // marks all clients on the selected workspace + { KeyPress, MODKEY|Ctrl, XK_a, markall, {MARKALL_FLOATING} }, // marks all floating clients on the selected workspace + { KeyPress, MODKEY|Alt, XK_a, markall, {MARKALL_HIDDEN} }, // marks all hidden clients on the selected workspace + { KeyPress, MODKEY|Shift, XK_a, unmarkall, {0} }, // unmarks all clients + { KeyPress, MODKEY, XK_m, togglemark, {0} }, // marks or unmarks the selected client for group action + { KeyPress, MODKEY, XK_n, zoom, {0} }, // moves the currently focused window to/from the master area (for tiled layouts) + + { KeyPress, MODKEY, XK_bracketleft, rotatelayoutaxis, {.i = -1 } }, // cycle through the available layout splits (horizontal, vertical, centered, no split, etc.) + { KeyPress, MODKEY, XK_bracketright, rotatelayoutaxis, {.i = +1 } }, // cycle through the available layout splits (horizontal, vertical, centered, no split, etc.) + { KeyPress, MODKEY|Alt, XK_bracketleft, rotatelayoutaxis, {.i = -2 } }, // cycle through the available tiling arrangements for the master area + { KeyPress, MODKEY|Alt, XK_bracketright, rotatelayoutaxis, {.i = +2 } }, // cycle through the available tiling arrangements for the master area + { KeyPress, MODKEY|Shift, XK_bracketleft, rotatelayoutaxis, {.i = -3 } }, // cycle through the available tiling arrangements for the primary (first) stack area + { KeyPress, MODKEY|Shift, XK_bracketright, rotatelayoutaxis, {.i = +3 } }, // cycle through the available tiling arrangements for the primary (first) stack area + { KeyPress, MODKEY|Ctrl, XK_bracketleft, rotatelayoutaxis, {.i = -4 } }, // cycle through the available tiling arrangements for the secondary stack area + { KeyPress, MODKEY|Ctrl, XK_bracketright, rotatelayoutaxis, {.i = +4 } }, // cycle through the available tiling arrangements for the secondary stack area + { KeyPress, MODKEY|Ctrl, XK_m, mirrorlayout, {0} }, // flip the master and stack areas + { KeyPress, MODKEY|Ctrl|Shift, XK_m, layoutconvert, {0} }, // flip between horizontal and vertical layout + { KeyPress, MODKEY, XK_space, setlayout, {-1} }, // toggles between current and previous layout + + { KeyPress, MODKEY|Ctrl, XK_g, floatpos, {.v = "50% 50% 80% 80%" } }, // center client and take up 80% of the screen + { KeyPress, MODKEY, XK_g, togglefloating, {0} }, // toggles between tiled and floating arrangement for the currently focused client + { KeyPress, MODKEY, XK_f, togglefullscreen, {0} }, // toggles fullscreen for the currently selected client + { KeyPress, MODKEY|Shift, XK_f, togglefakefullscreen, {0} }, // toggles "fake" fullscreen for the selected window + { KeyPress, Ctrl|Alt, XK_Tab, togglenomodbuttons, {0} }, // disables / enables keybindings that are not accompanied by any modifier buttons for a client + { KeyPress, MODKEY|Shift, XK_equal, changeopacity, {.f = +0.05 } }, // increase the client opacity (for compositors that support _NET_WM_OPACITY) + { KeyPress, MODKEY|Shift, XK_minus, changeopacity, {.f = -0.05 } }, // decrease the client opacity (for compositors that support _NET_WM_OPACITY) + + { KeyPress, MODKEY|Shift, XK_comma, focusmon, {.i = -1 } }, // focus on the previous monitor, if any + { KeyPress, MODKEY|Shift, XK_period, focusmon, {.i = +1 } }, // focus on the next monitor, if any + { KeyPress, MODKEY|Alt, XK_comma, clienttomon, {.i = -1 } }, // sends the current client to an adjacent monitor + { KeyPress, MODKEY|Alt, XK_period, clienttomon, {.i = +1 } }, // sends the current client to an adjacent monitor + { KeyPress, MODKEY|Alt|Shift, XK_comma, clientstomon, {.i = +1 } }, // sends all clients to an adjacent monitor + { KeyPress, MODKEY|Alt|Shift, XK_period, clientstomon, {.i = -1 } }, // sends all clients to an adjacent monitor + { KeyPress, MODKEY|Ctrl, XK_0, viewallwsonmon, {0} }, // view all workspaces on the current monitor + { KeyPress, MODKEY, XK_0, viewalloccwsonmon, {0} }, // view all workspaces on the current monitor that has clients + { KeyPress, MODKEY, XK_o, viewselws, {0} }, // view the selected workspace (only relevant when viewing multiple workspaces) + { KeyPress, MODKEY|Ctrl, XK_comma, viewwsdir, {.i = -1 } }, // view the workspace on the immediate left of current workspace (on the current monitor) + { KeyPress, MODKEY|Ctrl, XK_period, viewwsdir, {.i = +1 } }, // view the workspace on the immediate right of current workspace (on the current monitor) + { KeyPress, MODKEY, XK_comma, viewwsdir, {.i = -2 } }, // view the next workspace left of current workspace that has clients (on the current monitor) + { KeyPress, MODKEY, XK_period, viewwsdir, {.i = +2 } }, // view the next workspace right of current workspace that has clients (on the current monitor) + { KeyPress, MODKEY|Shift, XK_Tab, viewwsdir, {.i = -2 } }, // view the next workspace left of current workspace that has clients (on the current monitor) + { KeyPress, MODKEY, XK_Tab, viewwsdir, {.i = +2 } }, // view the next workspace right of current workspace that has clients (on the current monitor) + { KeyPress, MODKEY|Ctrl|Alt, XK_comma, movewsdir, {.i = -1 } }, // move client to workspace on the immediate left of current workspace (on the current monitor) + { KeyPress, MODKEY|Ctrl|Alt, XK_period, movewsdir, {.i = +1 } }, // move client to workspace on the immediate right of current workspace (on the current monitor) + +// STACKKEYS(AltGr|Ctrl, stackfocus) // focus on the nth client in the stack, see the STACKKEYS macro for keybindings +// STACKKEYS(AltGr|Ctrl|Shift, stackpush) // move the currently focused client to the nth place in the stack +// STACKKEYS(AltGr|Shift, stackswap) // swap the currently focused client with the nth client in the stack + + SCRATCHKEYS(MODKEY, XK_w, spcmd_w) + SCRATCHKEYS(MODKEY, XK_e, spcmd_e) + SCRATCHKEYS(MODKEY, XK_r, spcmd_r) + SCRATCHKEYS(MODKEY, XK_y, spcmd_y) + + WSKEYS(MODKEY, XK_1, "1") + WSKEYS(MODKEY, XK_2, "2") + WSKEYS(MODKEY, XK_3, "3") + WSKEYS(MODKEY, XK_4, "4") + WSKEYS(MODKEY, XK_5, "5") + WSKEYS(MODKEY, XK_6, "6") + WSKEYS(MODKEY, XK_7, "7") + WSKEYS(MODKEY, XK_8, "8") + WSKEYS(MODKEY, XK_9, "9") + + /* Unassigned key bindings (available externally via the duskc command) */ +// { KeyPress, MODKEY, XK_Control_R, showbar, {0} }, +// { KeyRelease, MODKEY|AltGr, XK_Control_R, hidebar, {0} }, +// { KeyPress, MODKEY, XK_, incrgaps, {.i = +1 } }, // increase all gaps (outer, inner, horizontal and vertical) +// { KeyPress, MODKEY, XK_, incrgaps, {.i = -1 } }, // decrease all gaps (outer, inner, horizontal and vertical) +// { KeyPress, MODKEY, XK_, incrigaps, {.i = +1 } }, // increase inner gaps (horizontal and vertical) +// { KeyPress, MODKEY, XK_, incrigaps, {.i = -1 } }, // decrease inner gaps (horizontal and vertical) +// { KeyPress, MODKEY, XK_, incrogaps, {.i = +1 } }, // increase outer gaps (horizontal and vertical) +// { KeyPress, MODKEY, XK_, incrogaps, {.i = -1 } }, // decrease outer gaps (horizontal and vertical) +// { KeyPress, MODKEY, XK_, incrihgaps, {.i = +1 } }, // increase inner horizontal gaps +// { KeyPress, MODKEY, XK_, incrihgaps, {.i = -1 } }, // decrease inner horizontal gaps +// { KeyPress, MODKEY, XK_, incrivgaps, {.i = +1 } }, // increase inner vertical gaps +// { KeyPress, MODKEY, XK_, incrivgaps, {.i = -1 } }, // decrease inner vertical gaps +// { KeyPress, MODKEY, XK_, incrohgaps, {.i = +1 } }, // increase outer horizontal gaps +// { KeyPress, MODKEY, XK_, incrohgaps, {.i = -1 } }, // decrease outer horizontal gaps +// { KeyPress, MODKEY, XK_, incrovgaps, {.i = +1 } }, // increase outer vertical gaps +// { KeyPress, MODKEY, XK_, incrovgaps, {.i = -1 } }, // decrease outer vertical gaps +// { KeyPress, MODKEY, XK_, mark, {0} }, // marks the currently selected client +// { KeyPress, MODKEY, XK_, unmark, {0} }, // unmarks the currently selected client +// { KeyPress, MODKEY, XK_, togglegaps, {0} }, // enables and disables the rendering of gaps in tiled layouts +// { KeyPress, MODKEY, XK_, defaultgaps, {0} }, // revert gaps to the default settings +// { KeyPress, MODKEY, XK_, cyclelayout, {.i = -1 } }, // cycle through the available layouts +// { KeyPress, MODKEY, XK_, cyclelayout, {.i = +1 } }, // cycle through the available layouts (in reverse) +// { KeyPress, MODKEY, XK_, viewwsdir, {.i = -1 } }, // move to the workspace on the immediate left of the current workspace on the current monitor (wraps around) +// { KeyPress, MODKEY, XK_, viewwsdir, {.i = +1 } }, // move to the workspace on the immediate right of the current workspace on the current monitor (wraps around) +// { KeyPress, MODKEY, XK_, focusmaster, {0} }, // change focus to the first client in the stack (master) +// { KeyPress, MODKEY, XK_, transfer, {0} }, // move a client between the master and stack area automatically adjusting nmaster +// { KeyPress, MODKEY, XK_, transferall, {0} }, // swaps all clients in the stack area with all clients in the master area +// { KeyPress, MODKEY, XK_, togglesticky, {0} }, // makes a client show on all workspaces) +// { KeyPress, MODKEY, XK_, focusurgent, {0} }, // focus on the client marked as urgent +// { KeyPress, MODKEY, XK_, inplacerotate, {.i = +1} }, // rotate clients within the respective area (master, primary stack, secondary stack) clockwise +// { KeyPress, MODKEY, XK_, inplacerotate, {.i = -1} }, // rotate clients within the respective area (master, primary stack, secondary stack) counter-clockwise +// { KeyPress, MODKEY, XK_, rotatestack, {.i = +1 } }, // rotate all clients (clockwise) +// { KeyPress, MODKEY, XK_, rotatestack, {.i = -1 } }, // rotate all clients (counter-clockwise) +// { KeyPress, MODKEY, XK_, riodraw, {0} }, // use slop to resize the currently selected client +// { KeyPress, MODKEY, XK_, unfloatvisible, {0} }, // makes all floating clients on the currently selected workspace tiled +// { KeyPress, MODKEY, XK_, switchcol, {0} }, // changes focus between the master and the primary stack area +// { KeyPress, MODKEY, XK_, setlayout, {0} }, // sets a specific layout, see the layouts array for indices +// { KeyPress, MODKEY, XK_, xrdb, {0 } }, // reloads colors from XResources +// { KeyPress, MODKEY, XK_, swallow, {0} }, // makes the focused client swallow marked clients +// { KeyPress, MODKEY, XK_, unswallow, {0} }, // makes the focused client unswallow the most recently swallowed client +}; + +/* button definitions */ +/* click can be ClkWorkspaceBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ +static Button buttons[] = { + /* click event mask button function argument */ + { ClkLtSymbol, 0, Button1, setlayout, {-1} }, // toggles between current and previous layout + { ClkLtSymbol, 0, Button4, cyclelayout, {.i = +1 } }, // cycle through the available layouts + { ClkLtSymbol, 0, Button5, cyclelayout, {.i = -1 } }, // cycle through the available layouts (in reverse) + { ClkWinTitle, 0, Button1, focuswin, {0} }, // focus on the given client + { ClkWinTitle, 0, Button3, showhideclient, {0} }, // hide the currently selected client (or show if hidden) + { ClkWinTitle, 0, Button2, zoom, {0} }, // moves the currently focused window to/from the master area (for tiled layouts) + { ClkStatusText, 0, Button1, statusclick, {.i = 1 } }, // sends mouse button presses to statusclick script when clicking on status modules + { ClkStatusText, 0, Button2, statusclick, {.i = 2 } }, + { ClkStatusText, 0, Button3, statusclick, {.i = 3 } }, + { ClkStatusText, 0, Button4, statusclick, {.i = 4 } }, + { ClkStatusText, 0, Button5, statusclick, {.i = 5 } }, + { ClkStatusText, 0, Button6, statusclick, {.i = 6 } }, + { ClkStatusText, 0, Button7, statusclick, {.i = 7 } }, + { ClkStatusText, 0, Button8, statusclick, {.i = 8 } }, + { ClkStatusText, 0, Button9, statusclick, {.i = 9 } }, + { ClkStatusText, Shift, Button1, statusclick, {.i = 10 } }, + { ClkStatusText, Shift, Button2, statusclick, {.i = 11 } }, + { ClkStatusText, Shift, Button3, statusclick, {.i = 12 } }, + { ClkClientWin, MODKEY, Button8, markmouse, {1} }, // toggles marking of clients under the mouse cursor for group action + { ClkClientWin, MODKEY, Button9, markmouse, {0} }, // unmarks clients under the mouse cursor + { ClkClientWin, MODKEY, Button1, moveorplace, {1} }, // moves a client window into a floating or tiled position depending on floating state + { ClkClientWin, MODKEY|Shift, Button1, togglemoveorplace,{0} }, // as above, but forces a tiled client to become floating and vice versa + { ClkClientWin, MODKEY|Alt, Button2, togglefloating, {0} }, // toggles between tiled and floating arrangement for given client + { ClkClientWin, MODKEY, Button3, resizeorfacts, {0} }, // change the size of a floating client window or adjust cfacts and mfacts when tiled + { ClkClientWin, MODKEY|Shift, Button3, resizemouse, {0} }, // change the size of a floating client window + { ClkClientWin, 0, Button8, movemouse, {0} }, // move a client window using extra mouse buttons (previous) + { ClkClientWin, 0, Button9, resizemouse, {0} }, // resize a client window using extra mouse buttons (next) + { ClkClientWin, MODKEY, Button2, zoom, {0} }, // moves the currently focused window to/from the master area (for tiled layouts) + { ClkClientWin, MODKEY|Ctrl, Button1, dragmfact, {0} }, // dynamically change the size of the master area compared to the stack area(s) + { ClkRootWin, MODKEY|Ctrl, Button1, dragmfact, {0} }, // dynamically change the size of the master area compared to the stack area(s) + { ClkClientWin, MODKEY|Ctrl, Button3, dragwfact, {0} }, // dynamically change the size of a workspace relative to other workspaces + { ClkRootWin, MODKEY|Ctrl, Button3, dragwfact, {0} }, // dynamically change the size of a workspace relative to other workspaces + { ClkClientWin, MODKEY, Button4, inplacerotate, {.i = +1 } }, // rotate clients within the respective area (master, primary stack, secondary stack) clockwise + { ClkClientWin, MODKEY, Button5, inplacerotate, {.i = -1 } }, // rotate clients within the respective area (master, primary stack, secondary stack) counter-clockwise + { ClkClientWin, MODKEY|Shift, Button4, rotatestack, {.i = +1 } }, // rotate all clients (clockwise) + { ClkClientWin, MODKEY|Shift, Button5, rotatestack, {.i = -1 } }, // rotate all clients (counter-clockwise) + { ClkWorkspaceBar, 0, Button1, viewws, {0} }, // view the workspace by clicking on workspace icon + { ClkWorkspaceBar, MODKEY, Button1, movews, {0} }, // sends (moves) the currently focused client to given workspace + { ClkWorkspaceBar, MODKEY|Shift|Ctrl, Button1, swapws, {0} }, // swaps all clients on current workspace with that of the given workspace + { ClkWorkspaceBar, 0, Button3, enablews, {0} }, // enables the workspace in addition to other workspaces + { ClkWorkspaceBar, 0, Button4, viewwsdir, {.i = +2 } }, // view the next workspace right of current workspace that has clients (on the current monitor) + { ClkWorkspaceBar, 0, Button5, viewwsdir, {.i = -2 } }, // view the next workspace left of current workspace that has clients (on the current monitor) + { ClkWorkspaceBar, MODKEY, Button2, togglepinnedws, {0} }, // toggles the pinning of a workspace to the current monitor +}; + diff --git a/patches.def.h b/patches.def.h new file mode 100644 index 0000000..f097917 --- /dev/null +++ b/patches.def.h @@ -0,0 +1,532 @@ +/* + * This file contains patch control flags. + * + * In principle you should be able to mix and match any patches + * you may want. In cases where patches are logically incompatible + * one patch may take precedence over the other as noted in the + * relevant descriptions. + */ + +/* Patches */ + +/* The alpha patch adds transparency for the terminal. + * You need to uncomment the corresponding line in config.mk to use the -lXrender library + * when including this patch. + * https://st.suckless.org/patches/alpha/ + */ +#define ALPHA_PATCH 1 + +/* The alpha focus highlight patch allows the user to specify two distinct opacity values or + * background colors in order to easily differentiate between focused and unfocused terminal + * windows. This depends on the alpha patch. + * https://github.com/juliusHuelsmann/st-focus/ + * https://st.suckless.org/patches/alpha_focus_highlight/ + */ +#define ALPHA_FOCUS_HIGHLIGHT_PATCH 1 + +/* Adds gradient transparency to st, depends on the alpha patch. + * https://st.suckless.org/patches/gradient/ + */ +#define ALPHA_GRADIENT_PATCH 0 + +/* Allows for the initial size of the terminal to be specified as pixel width and height + * using the -G command line option. Can be combined with the anysize patch to also allow + * the window to be resized to any pixel size. + * https://st.suckless.org/patches/anygeometry/ + */ +#define ANYGEOMETRY_PATCH 0 + +/* This patch allows st to resize to any pixel size rather than snapping to character width/height. + * https://st.suckless.org/patches/anysize/ + */ +#define ANYSIZE_PATCH 0 + +/* A simple variant of the anysize patch that only changes the resize hints to allow the window to + * be resized to any size. + */ +#define ANYSIZE_SIMPLE_PATCH 0 + +/* Draws a background image in farbfeld format in place of the defaultbg color allowing for pseudo + * transparency. + * https://st.suckless.org/patches/background_image/ + */ +#define BACKGROUND_IMAGE_PATCH 0 + +/* This patch adds the ability to reload the background image config when a SIGUSR1 signal is + * received, e.g.: killall -USR1 st + * Depends on the BACKGROUND_IMAGE_PATCH. + */ +#define BACKGROUND_IMAGE_RELOAD_PATCH 0 + +/* This patch allows the use of a blinking cursor. + * Only cursor styles 0, 1, 3, 5, and 7 blink. Set cursorstyle accordingly. + * Cursor styles are defined here: + * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 + * https://st.suckless.org/patches/blinking_cursor/ + */ +#define BLINKING_CURSOR_PATCH 0 + +/* By default bold text is rendered with a bold font in the bright variant of the current color. + * This patch makes bold text rendered simply as bold, leaving the color unaffected. + * https://st.suckless.org/patches/bold-is-not-bright/ + */ +#define BOLD_IS_NOT_BRIGHT_PATCH 0 + +/* This patch adds custom rendering of lines/blocks/braille characters for gapless alignment. + * https://st.suckless.org/patches/boxdraw/ + */ +#define BOXDRAW_PATCH 0 + +/* By default st only sets PRIMARY on selection. + * This patch makes st set CLIPBOARD on selection. + * https://st.suckless.org/patches/clipboard/ + */ +#define CLIPBOARD_PATCH 0 + +/* This patch allows st to be resized without cutting off text when the terminal window is + * made larger again. Text does not wrap when the terminal window is made smaller, you may + * also want to have a look at the reflow patch. + * + * https://github.com/bakkeby/st-flexipatch/issues/34 + */ +#define COLUMNS_PATCH 0 + +/* Select and copy the last URL displayed with Mod+l. Multiple invocations cycle through the + * available URLs. + * https://st.suckless.org/patches/copyurl/ + */ +#define COPYURL_PATCH 0 + +/* Select and copy the last URL displayed with Mod+l. Multiple invocations cycle through the + * available URLs. This variant also highlights the selected URLs. + * https://st.suckless.org/patches/copyurl/ + */ +#define COPYURL_HIGHLIGHT_SELECTED_URLS_PATCH 0 + +/* This patch adds support for CSI escape sequences 22 and 23, which save and + * restores the window title (for instance nvim does this when opening and closing). + * https://st.suckless.org/patches/csi_22_23/ + */ +#define CSI_22_23_PATCH 0 + +/* According to the specification (see link in BLINKING_CURSOR_PATCH) the "Set cursor style + * (DECSCUSR), VT520." escape sequences define both values of 0 and 1 as a blinking block, + * with 1 being the default. + * + * This patch allows the default cursor to be set when value 0 is used, as opposed to + * setting the cursor to a blinking block. + * + * This allows a command like this to restore the cursor to what st is configured with: + * $ echo -ne "\e[ q" + * + * While many terminal emulators do this it is not adhering to specification. xterm is an + * example terminal that sets a blinking block instead of the configured one, same as st. + */ +#define DEFAULT_CURSOR_PATCH 0 + +/* Return BS on pressing backspace and DEL on pressing the delete key. + * https://st.suckless.org/patches/delkey/ + */ +#define DELKEY_PATCH 0 + +/* This patch adds the option of disabling bold fonts globally. + * https://st.suckless.org/patches/disable_bold_italic_fonts/ + */ +#define DISABLE_BOLD_FONTS_PATCH 0 + +/* This patch adds the option of disabling italic fonts globally. + * https://st.suckless.org/patches/disable_bold_italic_fonts/ + */ +#define DISABLE_ITALIC_FONTS_PATCH 0 + +/* This patch adds the option of disabling roman fonts globally. + * https://st.suckless.org/patches/disable_bold_italic_fonts/ + */ +#define DISABLE_ROMAN_FONTS_PATCH 0 + +/* Allows dragging a file into the terminal and have the path printed. + * https://st.suckless.org/patches/drag-n-drop + */ +#define DRAG_AND_DROP_PATCH 0 + +/* This patch makes the cursor color the inverse of the current cell color. + * https://st.suckless.org/patches/dynamic-cursor-color/ + */ +#define DYNAMIC_CURSOR_COLOR_PATCH 0 + +/* This is a variant of the anysize patch that explicitly do not change the size increment hints, + * i.e. only keeping the dynamic padding which is the main thing the anysize patch introduces. + * In practice this means that the dynamic padding / anysize functionality only ever comes into + * effect when the size hints are intentionally ignored. + * An example of this would be dwm respecting the size hints of floating windows, but disrespecting + * the size hints when the window is tiled (provided that resizehints config is set to 0). + * + * Note that this patch depends on ANYSIZE_PATCH being enabled to have an effect. + */ +#define DYNAMIC_PADDING_PATCH 0 + +/* Reading and writing st's screen through a pipe, e.g. pass info to dmenu. + * https://st.suckless.org/patches/externalpipe/ + */ +#define EXTERNALPIPE_PATCH 0 + +/* This patch improves and extends the externalpipe patch in two ways: + * - it prevents the reset of the signal handler set on SIGCHILD, when + * the forked process that executes the external process exits and + * - it adds the externalpipein function to redirect the standard output + * of the external command to the slave size of the pty, that is, as if + * the external program had been manually executed on the terminal + * + * It can be used to send desired escape sequences to the terminal with a + * keyboard shortcut. The patch was created to make use of the dynamic-colors + * tool that uses the OSC escape sequences to change the colors of the terminal. + * + * This patch depends on EXTERNALPIPE_PATCH being enabled. + * + * https://github.com/sos4nt/dynamic-colors + * https://lists.suckless.org/hackers/2004/17218.html + */ +#define EXTERNALPIPEIN_PATCH 0 + +/* This patch allows command line applications to use all the fancy key combinations + * that are available to GUI applications. + * https://st.suckless.org/patches/fix_keyboard_input/ + */ +#define FIXKEYBOARDINPUT_PATCH 0 + +/* This patch allows you to add spare font besides the default. Some glyphs can be not present in + * the default font. For this glyphs st uses font-config and try to find them in font cache first. + * This patch append fonts defined in font2 variable to the beginning of the font cache. + * So they will be used first for glyphs that are absent in the default font. + * https://st.suckless.org/patches/font2/ + */ +#define FONT2_PATCH 0 + +/* This patch adds the ability to toggle st into fullscreen mode. + * Two key bindings are defined: F11 which is typical with other applications and Alt+Enter + * which matches the default xterm behavior. + * https://st.suckless.org/patches/fullscreen/ + */ +#define FULLSCREEN_PATCH 0 + +/* Hide the X cursor whenever a key is pressed and show it back when the mouse is moved in + * the terminal window. + * https://st.suckless.org/patches/hidecursor/ + */ +#define HIDECURSOR_PATCH 0 + +/* This patch hides the terminal cursor when the window loses focus (as opposed to showing a hollow + * cursor). + * https://www.reddit.com/r/suckless/comments/nvee8h/how_to_hide_cursor_in_st_is_there_a_patch_for_it/ + */ +#define HIDE_TERMINAL_CURSOR_PATCH 0 + +/* This patch adds a keybinding that lets you invert the current colorscheme of st. + * This provides a simple way to temporarily switch to a light colorscheme if you use a dark + * colorscheme or visa-versa. + * https://st.suckless.org/patches/invert/ + */ +#define INVERT_PATCH 0 + +/* Pressing the default binding Ctrl+Shift-i will popup dmenu, asking you to enter a unicode + * codepoint that will be converted to a glyph and then pushed to st. + * https://st.suckless.org/patches/iso14755/ + */ +#define ISO14755_PATCH 0 + +/* This patch allows you to select text on the terminal using keyboard shortcuts. + * NB: An improved variant of this patch is enabled if combined with the reflow patch. + * + * https://st.suckless.org/patches/keyboard_select/ + */ +#define KEYBOARDSELECT_PATCH 0 + +/* This patch adds support for drawing ligatures using the Harfbuzz library to transform + * original text of a single line to a list of glyphs with ligatures included. + * This patch depends on the Harfbuzz library and headers to compile. + * You need to uncomment the corresponding lines in config.mk to use the harfbuzz library + * when including this patch. + * https://github.com/cog1to/st-ligatures + * https://st.suckless.org/patches/ligatures/ + */ +#define LIGATURES_PATCH 0 + +/* This patch makes st ignore terminal color attributes by forcing display of the default + * foreground and background colors only - making for a monochrome look. Idea ref. + * https://www.reddit.com/r/suckless/comments/ixbx6z/how_to_use_black_and_white_only_for_st/ + */ +#define MONOCHROME_PATCH 0 + +/* This patch sets the _NET_WM_ICON X property with an icon that is read from a .png file. + * This patch depends on the GD Graphics Library and headers to compile. + * You need to uncomment the corresponding lines in config.mk to use the gd library. + * + * The default location for the .png file is: + * - /usr/local/share/pixmaps/st.png + * + * https://st.suckless.org/patches/netwmicon/ + */ +#define NETWMICON_PATCH 0 + +/* This patch sets the _NET_WM_ICON X property with an icon that is read from a farbfeld image. + * The benefit of this patch is that you do not need an additional dependency on an external + * library to read and convert the farbfeld image. + * + * The default location for the farbfeld image is: + * - /usr/local/share/pixmaps/st.ff + * + * Remember to change the ICONNAME in config.mk from st.png to st.ff when using this patch. + * + * Example command to convert a .png to farbfeld: + * $ png2ff < st.png > st.ff + * + * https://tools.suckless.org/farbfeld/ + * https://github.com/bakkeby/patches/wiki/netwmicon/ + */ +#define NETWMICON_FF_PATCH 0 + +/* This patch sets the _NET_WM_ICON X property with a hardcoded icon for st. This is the + * original version that predates the version that reads the image from a .png file. + * https://st.suckless.org/patches/netwmicon/ + */ +#define NETWMICON_LEGACY_PATCH 0 + +/* This patch allows you to spawn a new st terminal using Ctrl-Shift-Return. It will have the + * same CWD (current working directory) as the original st instance. + * https://st.suckless.org/patches/newterm/ + */ +#define NEWTERM_PATCH 0 + +/* This patch will set the _MOTIF_WM_HINTS property for the st window which, if the window manager + * respects it, will show the st window without window decorations. + * + * In dwm, if the decoration hints patch is applied, then the st window will start out without a + * border. In GNOME and KDE the window should start without a window title. + */ +#define NO_WINDOW_DECORATIONS_PATCH 0 + +/* Open contents of the clipboard in a user-defined browser. + * https://st.suckless.org/patches/open_copied_url/ + */ +#define OPENCOPIED_PATCH 0 + +/* Open the selected text using xdg-open. + * https://st.suckless.org/patches/open_selected_text/ + */ +#define OPEN_SELECTED_TEXT_PATCH 0 + +/* This patch allows for URLs to be opened directly when you click on them. This may not work with + * all terminal applications. + * + * https://www.reddit.com/r/suckless/comments/cc83om/st_open_url/ + */ +#define OPENURLONCLICK_PATCH 0 + +/* This patch allows st to fetch the current working directory through the OSC 7 escape + * sequence emitted by shells. Must be used with newterm patch. + * + * https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory + * https://github.com/veltza/st-sx/commit/817865c2c6ed905af8849580e58bdcf399216fbd + */ +#define OSC7_PATCH 0 + +/* This patch allows jumping between prompts by utilizing the OSC 133 escape sequence + * emitted by shells. Must be used with either reflow or scrollback patch. + * + * https://codeberg.org/dnkl/foot#jumping-between-prompts + */ +#define OSC133_PATCH 0 + +/* Reflow. + * Allows st to be resized without cutting off text when the terminal window is made larger again. + * Text wraps when the terminal window is made smaller. + * Comes with scrollback. + */ +#define REFLOW_PATCH 0 + +/* This patch allows you to specify a border that is relative in size to the width of a cell + * in the terminal. + * https://st.suckless.org/patches/relativeborder/ + */ +#define RELATIVEBORDER_PATCH 0 + +/* This patch allows you to right-click on some selected text to send it to the plumbing + * program of choice, e.g. open a file, view an image, open a URL. + * https://st.suckless.org/patches/right_click_to_plumb/ + */ +#define RIGHTCLICKTOPLUMB_PATCH 0 + +/* Scroll back through terminal output using Shift+{PageUp, PageDown}. + * https://st.suckless.org/patches/scrollback/ + */ +#define SCROLLBACK_PATCH 1 + +/* Scroll back through terminal output using Shift+MouseWheel. + * This variant depends on SCROLLBACK_PATCH being enabled. + * https://st.suckless.org/patches/scrollback/ + */ +#define SCROLLBACK_MOUSE_PATCH 1 + +/* Scroll back through terminal output using mouse wheel (when not in MODE_ALTSCREEN). + * This variant depends on SCROLLBACK_PATCH being enabled. + * https://st.suckless.org/patches/scrollback/ + */ +#define SCROLLBACK_MOUSE_ALTSCREEN_PATCH 1 + +/* This patch adds the two color-settings selectionfg and selectionbg to config.def.h. + * Those define the fore- and background colors which are used when text on the screen is selected + * with the mouse. This removes the default behaviour which would simply reverse the colors. + * https://st.suckless.org/patches/selectioncolors/ + */ +#define SELECTION_COLORS_PATCH 0 + +/* This is the single drawable buffer patch as outlined in the FAQ to get images + * in w3m to display. While this patch does not break the alpha patch it images + * are not shown in w3m if the alpha patch is applied. + */ +#define SINGLE_DRAWABLE_BUFFER_PATCH 0 + +/* This patch adds SIXEL graphics support for st. + * Note that patch/sixel.c/sixel_hls.c come from mintty, licensed under GPL. + * Known issues: + * - Rendering sixel graphics may cause unusual cursor placement, this is + * not specific to this variant of st - the same issue is present in + * the xterm implementation. This is likely an issue of sixel height + * not being detected correctly. + * + * Note that you need to uncomment the corresponding lines in config.mk when including this patch. + * This patch is incompatible with the W3M patch. + * + * https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809 + */ +#define SIXEL_PATCH 0 + +/* This patch allows clients to embed into the st window and is useful if you tend to + * start X applications from the terminal. For example: + * + * $ surf -e $WINDOWID + * + * The behavior is similar to Plan 9 where applications can take over windows. + * URL TBC + */ +#define ST_EMBEDDER_PATCH 0 + +/* Use inverted defaultbg/fg for selection when bg/fg are the same. + * https://st.suckless.org/patches/spoiler/ + */ +#define SPOILER_PATCH 0 + +/* This patch changes the mouse shape to the global default when the running program subscribes + * for mouse events, for instance, in programs like ranger and fzf. It emulates the behaviour + * shown by vte terminals like termite. + * https://st.suckless.org/patches/swapmouse/ + */ +#define SWAPMOUSE_PATCH 0 + +/* This patch adds synchronized-updates/application-sync support in st. + * This will have no effect except when an application uses the synchronized-update escape + * sequences. With this patch nearly all cursor flicker is eliminated in tmux, and tmux detects + * it automatically via terminfo. + * + * Note: this patch alters st.info to promote support for extra escape sequences, which can + * potentially cause application misbehaviour if you do not use this patch. Try removing or + * commenting out the corresponding line in st.info if this is causing issues. + * + * https://st.suckless.org/patches/sync/ + */ +#define SYNC_PATCH 0 + +/* Instead of a default X cursor, use the xterm cursor from your cursor theme. + * You need to uncomment the corresponding line in config.mk to use the -lXcursor library + * when including this patch. + * https://st.suckless.org/patches/themed_cursor/ + */ +#define THEMED_CURSOR_PATCH 0 + +/* Adds support for special underlines. + * + * Example test command: + * $ echo -e "\e[4:3m\e[58:5:10munderline\e[0m" + * ^ ^ ^ ^ ^- sets terminal color 10 + * | | | \- indicates that terminal colors should be used + * | | \- indicates that underline color is being set + * | \- sets underline style to curvy + * \- set underline + * + * Note: this patch alters st.info to promote support for extra escape sequences, which can + * potentially cause application misbehaviour if you do not use this patch. Try removing or + * commenting out the corresponding line in st.info if this is causing issues. + * + * https://st.suckless.org/patches/undercurl/ + */ +#define UNDERCURL_PATCH 0 + +/* Allows mouse scroll without modifier keys for regardless of alt screen using the external + * scroll program. + * https://st.suckless.org/patches/universcroll/ + */ +#define UNIVERSCROLL_PATCH 0 + +/* Use XftFontMatch in place of FcFontMatch. + * + * XftFontMatch calls XftDefaultSubstitute which configures various match properties according + * to the user's configured Xft defaults (xrdb) as well as according to the current display and + * screen. Most importantly, the screen DPI is computed [1]. Without this, st uses a "default" + * DPI of 75 [2]. + * + * [1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-2.3.2#n535 + * [2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n255 + * + * https://git.suckless.org/st/commit/528241aa3835e2f1f052abeeaf891737712955a0.html + */ +#define USE_XFTFONTMATCH_PATCH 0 + +/* Vertically center lines in the space available if you have set a larger chscale in config.h + * https://st.suckless.org/patches/vertcenter/ + */ +#define VERTCENTER_PATCH 0 + +/* Briefly inverts window content on terminal bell event. + * https://st.suckless.org/patches/visualbell/ + */ +#define VISUALBELL_1_PATCH 0 + +/* Adds support for w3m images. + * https://st.suckless.org/patches/w3m/ + */ +#define W3M_PATCH 0 + +/* Adds proper glyphs rendering in st allowing wide glyphs to be drawn as-is as opposed to + * smaller or cut glyphs being rendered. + * https://github.com/Dreomite/st/commit/e3b821dcb3511d60341dec35ee05a4a0abfef7f2 + * https://www.reddit.com/r/suckless/comments/jt90ai/update_support_for_proper_glyph_rendering_in_st/ + */ +#define WIDE_GLYPHS_PATCH 0 + +/* There is a known issue that Google's Variable Fonts (VF) can end up with letter spacing + * that is too wide in programs that use Xft, for example Inconsolata v3.000. + * + * This is intended as a temporary patch / hack until (if) this is fixed in the Xft library + * itself. + * + * https://github.com/googlefonts/Inconsolata/issues/42#issuecomment-737508890 + */ +#define WIDE_GLYPH_SPACING_PATCH 0 + +/* This patch allows user to specify the initial path st should use as the working directory. + * https://st.suckless.org/patches/workingdir/ + */ +#define WORKINGDIR_PATCH 0 + +/* This patch adds the ability to configure st via Xresources. At startup, st will read and + * apply the resources named in the resources[] array in config.h. + * https://st.suckless.org/patches/xresources/ + */ +#define XRESOURCES_PATCH 0 + +/* This patch adds the ability to reload the Xresources config when a SIGUSR1 signal is received + * e.g.: killall -USR1 st + * Depends on the XRESOURCES_PATCH. + */ +#define XRESOURCES_RELOAD_PATCH 0 +