st/options.h
2022-09-08 12:05:36 +02:00

236 lines
9.1 KiB
C

/* speedie.gq's build of suckless.org's simple terminal (st).
*
* This is a fork of suckless's st, a minimal in design, just works terminal emulator that by default does nothing more.
* Note that this terminal has a list of fonts (See 'Font options') that must be changed before installing.
*
* Additionally, if you use OpenBSD or FreeBSD, you must edit 'config.mk'.
* If you use GNU/Linux, you should be able to recompile st.
*
* To find out what to enter in the font and font2 chars, run 'fc-list | grep <fontname>'.
*/
/* Options
*
* This configuration file (options.h) contains the many options you can change about this terminal.
* It is configured in C syntax and needs to be recompiled after a change has been made.
*
* You can also configure st using .Xresources.
* In order to do this, create a .Xresources file somewhere.
*
* If you prefer, you can copy 'docs/example.Xresources' somewhere and add 'xrdb /path/to/.Xresources' to a script that auto starts such as .xinitrc.
* If you use Pywal, it should "just work" out of the box without any additional configuration necessary.
*
* Recompiling is done by running the command 'make clean install' when in the source code directory.
*
* If recompiling fails, check config.mk.
*/
/* Modifier key options */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static uint forcemousemod = ShiftMask; /* Force mouse select/shortcuts while mask is active when MODE_MOUSE is set. */
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/* Font options
*/
static char *font = "DejaVuSansMono Nerd Font:style=Bold:pixelsize=12:antialias=true:autohint=true"; /* Main font to use */
/* This font should be bundled with st. Install it manually or with fontctrl (available here: https://codeberg.org/speedie/fontctrl)
* If it is not available, you may need to 'fontctrl install <font file> --global'.
*/
/* Secondary fonts
*
* These will be picked if the *font does not exist, or doesn't contain the glyphs necessary.
* You can add multiple fonts if you wish.
*
* For best compatibility, have one Emoji font, one regular font, one Powerline font and one Nerd font.
* If you don't need these, you can of course omit them.
*/
static char *font2[] = { "DejaVu Sans Mono:pixelsize=12:antialias=true:autohint=true",
// "Noto Color Emoji:pixelsize=12:antialias=true:autohint=true",
"JoyPixels:pixelsize=12:antialias=true:autohint=true",
"fontawesome:pixelsize=12:antialias=true:autohint=true",
};
/* Appearance
*
* This is where most appearance related options can be found and changed.
*/
/* Window options */
static int borderpx = 0; /* Size of a small border around the text. */
int allowaltscreen = 1; /* Allow alt screen (1) */
int allowwindowops = 1; /* Allow (insecure) window operations such as setting the clipboard text */
int windowdecorations = 1; /* Display window decoration (1) */
/*
* Override/adjust fontsize of choosen monitors:
*/
MonitorConfig monitors_config[] = {
/* skip = fixed relative points size (monitor dpi) */
/* =0 : fixed absolute pixel size (default screen dpi) */
/* >0 : auto absolute pixel size (monitor dpi) */
/* <0 : auto relative points size (monitor dpi) */
{"HDMI-0~2", -14},
{"LVDS1", -8},
{"DVI-D", -10},
};
float winmovethreshold = 0.6;
/* Cursor options */
/* List of cursor styles:
*
* 0: blinking block
* 1: blinking block (default)
* 2: steady block ("█")
* 3: blinking underline
* 4: steady underline ("_")
* 5: blinking bar
* 6: steady bar ("|")
* 7: blinking st cursor
* 8: steady st cursor
*/
static Rune stcursor = 0x2603; /* snowman ("☃") */
static unsigned int cursorstyle = 1;
static unsigned int mouseshape = XC_xterm; /* Shape of the mouse cursor */
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
static unsigned int blinktimeout = 800; /* Blink timeout for the cursor in milliseconds */
static unsigned int cursorthickness = 2; /* Thickness of the cursor in pixels. */
static unsigned int dctimeout = 300; /* Double click timeout in milliseconds */
static unsigned int tctimeout = 600; /* Triple click timeout in milliseconds */
static unsigned int defaultattr = 11;
/* Text rendering options */
static float cwscale = 1.0;
static float chscale = 1.0;
static short cxoffset = 0; /* Horizontal character rendering offsets in pixels */
static short cyoffset = 0; /* Vertical character rendering offsets in pixels */
static double minlatency = 8; /* Minimum draw latency in milliseconds */
static double maxlatency = 33; /* Max draw latency in milliseconds */
static uint su_timeout = 200; /* Synchronized timeout in milliseconds */
/* URL options
*
* This build of st allows you to click on links with your mouse.
* These will then be opened in whatever you define below.
*
* This could be a web browser or a clipboard if you prefer to copy the link.
*
* 'xdg-open' is the default but this could be set to 'firefox' or 'chrome'.
*/
static char *url_opener = "xdg-open"; /* Open the URL in this char */
static int clickeditalic = 1; /* Should clicked links show up as italic (1) or not (0) */
static int clickedunderline = 1; /* Should clicked links show up underlined (1) or not (0) */
/* Color options
* Regular colors (1-8)
*/
#define col_1 "#5c5c5c" /* regular color 1 */
#define col_2 "#e57373" /* regular color 2 */
#define col_3 "#02982e" /* regular color 3 */
#define col_4 "#fac863" /* regular color 4 */
#define col_5 "#6699cc" /* regular color 5 */
#define col_6 "#a36ac7" /* regular color 6 */
#define col_7 "#5fb3b3" /* regular color 7 */
#define col_8 "#c0c5ce" /* regular color 8 */
/* Bright colors (9-16) */
#define col_9 "#00ffaa" /* bright color 1 */
#define col_10 "#e57373" /* bright color 2 */
#define col_11 "#a6bc69" /* bright color 3 */
#define col_12 "#6699cc" /* bright color 4 */
#define col_13 "#c594c5" /* bright color 5 */
#define col_14 "#ffffff" /* bright color 6 */
#define col_15 "#cccccc" /* bright color 7 */
#define col_16 "#555555" /* bright color 8 */
/* Default foreground/background colors */
unsigned int defaultfg = 258; /* Default foreground (text) color */
unsigned int defaultbg = 232; /* Default background (bg) color */
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
/* Alpha options */
float alpha = 0.8; /* Background opacity (0 is transparent, 1 is opaque, 0.8 is default) */
/* Boxdraw options
*
* 1: render most of the lines/blocks characters without using the font for
* perfect alignment between cells (U2500 - U259F except dashes/diagonals).
* Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored.
* 0: disable (render all U25XX glyphs normally from the font).
*
* Boxdraw can cause some compatibility issues so do not enable this unless you want to use it.
*/
const int boxdraw = 0; /* Enable (1) or disable boxdraw (0) */
const int boxdraw_bold = 0; /* Enable (1) or disable bold boxdraw (0) */
const int boxdraw_braille = 0; /* Render as adjacent "pixels" (1) or use the fonts (0) */
/* Undercurl options
*
* Undercurl allows your terminal and TUI software to draw undercurl instead of an underline.
* This looks nice to a lot of people.
*
* Curly:
* _ _ _ _
* ( ) ( ) ( ) ( )
* (_) (_) (_) (_)
*
* To use Curly:
* Set undercurl to 1
*
* Spiky:
* /\ /\ /\ /\
* \/ \/ \/
*
* To use Spiky:
* Set undercurl to 2
*
* Capped:
* _ _ _
* / \ / \ / \
* \_/ \_/
*
* To use Capped:
* Set undercurl to 3
*
* To use the default (underline), set undercurl to 0.
*/
static char *understyle = "1"; /* Undercurl style to use */
/* Default column and row options */
static unsigned int cols = 80; /* Number of columns to have by default */
static unsigned int rows = 24; /* Number of rows to have by default */
static unsigned int width = 564;
static unsigned int height = 364;
/* Bell options */
static int bellvolume = 0; /* Bell volume. It must be a value between -100 and 100. 0 will disable it. */
/* Shell options
*
* This is where most options related to the Shell can be found and changed.
*/
static char *shell = "/bin/sh";
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* $TERM options
* Some software uses the TERM export variable to determine what features the terminal supports.
* 'st-256color' is the default and will work for most but if you're having compatibility issues
* try setting it to 'xterm-256color'.
*
* You can also set it to 'st-mono' if you want to disable colors completely.
*/
char *termname = "st-256color"; /* $TERM value */
/* Tab space options */
unsigned int tabspaces = 8;
/* Misc */
#define USEXRESOURCES 1 /* Use .Xresources. Set to 0 if you do not want .Xresources support. */