summaryrefslogtreecommitdiff
path: root/files/config/suckless/st/config.def.h
diff options
context:
space:
mode:
authorshipwreckt <me@shipwreckt.co.uk>2025-10-16 22:13:02 +0100
committershipwreckt <me@shipwreckt.co.uk>2025-10-16 22:13:02 +0100
commite63a16b509b05993fc7900b6296ba8601e343976 (patch)
treeb9e1d57e09a111981427bafe3b3223384e358830 /files/config/suckless/st/config.def.h
parente8b5675eb77aa20027f369ca278457b6a7c2e142 (diff)
More small changes, added thunderbird items.
Diffstat (limited to 'files/config/suckless/st/config.def.h')
-rw-r--r--files/config/suckless/st/config.def.h42
1 files changed, 37 insertions, 5 deletions
diff --git a/files/config/suckless/st/config.def.h b/files/config/suckless/st/config.def.h
index 73f0706..e47e401 100644
--- a/files/config/suckless/st/config.def.h
+++ b/files/config/suckless/st/config.def.h
@@ -8,6 +8,13 @@
static char *font = "Hack Nerd Font:pixelsize=10:antialias=true:autohint=true";
static int borderpx = 2;
+/* How to align the content in the window when the size of the terminal
+ * doesn't perfectly match the size of the window. The values are percentages.
+ * 50 means center, 0 means flush left/top, 100 means flush right/bottom.
+ */
+static int anysize_halign = 50;
+static int anysize_valign = 50;
+
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
@@ -23,7 +30,8 @@ char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
-char *vtiden = "\033[?6c";
+/* By default, use the same one as kitty. */
+char *vtiden = "\033[?62c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
@@ -176,18 +184,46 @@ static unsigned int mousebg = 0;
static unsigned int defaultattr = 11;
/*
+ * Graphics configuration
+ */
+
+/// The template for the cache directory.
+const char graphics_cache_dir_template[] = "/tmp/st-images-XXXXXX";
+/// The max size of a single image file, in bytes.
+unsigned graphics_max_single_image_file_size = 20 * 1024 * 1024;
+/// The max size of the cache, in bytes.
+unsigned graphics_total_file_cache_size = 300 * 1024 * 1024;
+/// The max ram size of an image or placement, in bytes.
+unsigned graphics_max_single_image_ram_size = 100 * 1024 * 1024;
+/// The max total size of all images loaded into RAM.
+unsigned graphics_max_total_ram_size = 300 * 1024 * 1024;
+/// The max total number of image placements and images.
+unsigned graphics_max_total_placements = 4096;
+/// The ratio by which limits can be exceeded. This is to reduce the frequency
+/// of image removal.
+double graphics_excess_tolerance_ratio = 0.05;
+/// The minimum delay between redraws caused by animations, in milliseconds.
+unsigned graphics_animation_min_delay = 20;
+
+/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
+/* Internal keyboard shortcuts. */
+#define MODKEY Mod1Mask
+#define TERMMOD (ControlMask|ShiftMask)
+
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
+ { TERMMOD, Button3, previewimage, {.s = "feh"} },
+ { TERMMOD, Button2, showimageinfo, {}, 1 },
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
@@ -195,10 +231,6 @@ static MouseShortcut mshortcuts[] = {
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
-/* Internal keyboard shortcuts. */
-#define MODKEY Mod1Mask
-#define TERMMOD (ControlMask|ShiftMask)
-
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },