refine options.h

This commit is contained in:
speedie 2022-10-06 12:07:10 +02:00
parent 97a516d790
commit db36493a61

148
options.h
View file

@ -1,4 +1,6 @@
/* speedwm
*
* -- What is speedwm --
*
* speedwm is a fork of suckless.org's dwm, a window manager for X.
* Unlike the original 'dwm' window manager, speedwm tries to be minimal, just like dwm but also has functionality and aesthetics as a goal.
@ -6,37 +8,77 @@
*
* Keep in mind that speedwm is a personal window manager and therefore comes with keybinds for software I use and find appealing.
* If you do not like these keybinds or other features, speedwm has a patch feature in the makefile so consider:
* - make patch | This creates patches with your changes compared to what it looked like when you first installed it. (Same as diff -up)
* - make patch_install | This installs your patches from the source code. (Same as patch <)
* - make patch_remove | This removes your patches from the source code. (Same as patch -R)
* - make patch_clean | This removes your patches completely (Same as rm *.patch)
*
* - make patch This creates patches with your changes compared to what it looked like when you first installed it. (Same as diff -up)
* - make patch_install This installs your patches from the source code. (Same as patch <)
* - make patch_remove This removes your patches from the source code. (Same as patch -R)
* - make patch_clean This removes your patches completely (Same as rm *.patch)
*
* Otherwise you may maintain your own fork of speedwm if you prefer.
*
* In addition to this, if speedwm doesn't have a feature you want, there's nothing stopping you from adding it as it still follows the suckless philosophy somewhat.
* While there are VERY likely going to be patch conflicts, this is still dwm, just modified.
*
* Below is a configuration file. Read the instructions below for information about how to configure it.
*
* -- Usage --
*
* To use speedwm, you must first install all the dependencies. See 'speedwm-help -a' for a list of dependencies.
* Then, you need to run 'speedwm_run' after X has started. This can usually be done by adding 'speedwm_run' to ~/.xinitrc and running 'startx'.
* If you use a display manger/login manager like sddm, lightdm or something that uses entries, the entry should be created after installation.
*
* The header you are currently reading is for changing what software you want to use.
* -- What is this file for? --
*
* Because this build of speedwm auto-starts software such as your compositor, you may want to change this by changing '#define COMPOSITOR'. Same goes for other software.
* The header you are currently reading is for changing what software you want to use. An important thing to note is that because this build of speedwm auto-starts software such as your compositor, you may want to change this by changing '#define COMPOSITOR' for example. Same goes for other software.
*
* If you aren't aware of this, do not add anything to your .xinitrc if it is listed in autostart.h
* You can also autostart shell scripts using the $HOME/.config/speedwm-de/autostart.sh script. It is not there by default but if you want to use it, just create the file, chmod +x it and add your shell script to it.
*
* -- What are all the headers about? --
*
* speedwm unlike dwm doesn't just have a single header, config.h but rather multiple. Below is a list of them
*
* - If you were looking for the software options, colors, and other options, they can be found here in options.h
* - If you were looking for the keybinds, they can be found in keybinds.h
* - If you use another operating system such as OpenBSD, FreeBSD or Solaris (Not GNU/Linux), edit host.mk
* - If you're looking to disable a feature, see toggle.h (Disabling features) and toggle.mk (Disabling libraries the features depend on)
* - If you want to change IPC settings, you can find the IPC options in ipc.h (speedwm-msg source in toggle/)
* - If you want to add .Xresources values (All of them have already been added), that's in the xresources.h header.
* - If you want to add an fsignal signum, it can be done in the fsignal.h header.
* - If you want to add/remove autostart lines, that can be found in the autostart.h header.
* - If you want to modify mouse binds, edit mouse.h.
* - If you want to extensively change alpha and color options (probably not necessary), you can modify the colors.h header.
*
* This build comes with defines for common software such as your web browser or terminal.
* The goal of this is to decrease the size of headers and make it easier to find what you want to find, because if I were to combine all of this into one big file, it would be really difficult to hack on it (see dwm-flexipatch for an example).
*
* Also note that:
* speedwm.c = dwm.c
* host.mk = config.mk
* keybinds, options, colors, mouse and layouts headers = config.h/config.def.h
*
* -- Note on patching --
*
* I do not recommend that you attempt to use the patch coreutil as it is not likely to patch successfully.
* There are however a few speedwm specific patches available on my Codeberg (https://codeberg.org/speedie/patches). These were created when I removed a feature that I decided was not worth keeping in.
*
* -- Bindings --
*
* This build comes with #defines for common software such as your web browser or terminal.
* If you wish to use a different browser for example, simply change the values.
*
* You do not need to edit 'keybinds.h' or 'rules.h' because that's where these are used.
* Once you're done with your edits, run 'make clean install'.
*
* For example if you wanted to change icecat to firefox:
* #define BROWSER "icecat" -> #define BROWSER "firefox"
*
* You do not need to edit 'keybinds.h' or 'rules.h' because that's where the values we defined are actually used.
* Once you're done with your edits, run 'make clean install' to install it.
*
* Alternatively, you can change some of these in ~/.config/speedwm-de/speedwmrc.
* Software options must be changed in this file though.
*
* Do note that settings in speedwmrc will override the settings in all of the headers (as long as the file is valid).
* If you do not like this behaviour, you may add "rm -f $HOME/.config/speedwm-de/speedwmrc" to autostart.sh which will make sure the speedwmrc options are not used.
*
* Software options (#define) must be changed in this file though and recompiled using the 'make clean install' command.
*
******************************************************/
/* Software options
@ -125,29 +167,23 @@ static unsigned int smartgapsize = 0; /* Gaps for smartgaps. If set
static int smartgaps = 0; /* 1 means use different gap size when there is only one window */
/* Window aesthetic options */
#if USEFADE
static int fadeinactive = 1; /* Fade inactive windows */
static double activeopacity = 1.0f; /* Window opacity when it's focused (0 <= opacity <= 1) */
static double inactiveopacity = 0.875f; /* Window opacity when it's inactive (0 <= opacity <= 1) */
static Bool bUseOpacity = True; /* Starts with opacity on any unfocused windows */
#endif
/* Rounded corners
*/
#if USEROUNDCORNERS
static int roundedcorners = 0; /* Enable (1) rounded corners or disable (0) rounded corners. */
static int cornerradius = 2; /* Radius of rounded corners, 10 is the default. */
#endif
/* Tag preview options */
#if USETAGPREVIEW
static int tagpreview = 1; /* Enable tag previews */
static int tagpreviewpaddingv = 0; /* Vertical tag padding */
static int tagpreviewpaddingh = 0; /* Horizontal tag padding */
static int mousepreview = 1; /* Display tag previews if hovering over a tag */
static int barpreview = 0; /* Display the bar in the preview */
static int scalepreview = 2; /* Size of tag preview. Lower is bigger, higher is smaller. */
#endif
/* Window spawning options */
static int attachdirection = 3; /* 0 default, 1 above, 2 aside, 3 below, 4 bottom, 5 top */
@ -201,10 +237,8 @@ static int fullscreenhidebar = 1; /* Hide the bar when full scr
static int lockfullscreen = 1;
/* Window icon options */
#if USEWINICON
static int iconsize = 10; /* size of the icon */
static int iconspacing = 5; /* spacing between the title and icon */
#endif
/* Bar options */
static int barposition = 1; /* Bar position. Top: 1, Bottom: 0 */
@ -216,12 +250,10 @@ static int barpaddingh = 10; /* Horizontal bar padding in
static int layoutposition = 1; /* Layout indicator on the left (1) or on the right (0) */
/* Systray options */
#if USESYSTRAY
static int systraypinning = 0; /* Show systray on focused monitor (0) or (<monitor number>) to pin to a specific monitor */
static int systrayonleft = 0; /* Systray position. Right: 0, Left: 1. */
static int systrayspacing = 2; /* Systray spacing in pixels */
static int showsystray = 0; /* Show systray by default (0) or show (1) */
#endif
/* Tag text options */
static int underline = 0; /* Underline tags (1) or not (0) */
@ -245,29 +277,31 @@ static int hidesticky = 0; /* Hide sticky indicator (1)
static int statusallmons = 1; /* Draw status bar on all monitors */
/* Layout options
*
* The ifs are here so that you can toggle them. If you don't want/need a layout, you can disable it in the toggle.h header file.
*/
#if LAYOUT_MONOCLE
/* Monocle layout */
static unsigned int monocleclientcount = 0; /* Display client count in the Monocle layout */
static unsigned int monoclecount = 0; /* Display focused client and number of total clients in the Monocle layout */
static char monocleformat[] = "[%d/%d]"; /* Format of the monocle count. Unsigned integer monoclecount must be set to 1 for this to be used. */
#endif
#if LAYOUT_DECK
/* Deck layout */
static unsigned int deckcount = 0; /* Display deck count in the deck layout */
static char deckformat[] = "[%d]"; /* Format of the deck count. deckcount must be set to 1 for this to be used. */
#endif
#if LAYOUT_STAIRS
/* Stair layout */
static unsigned int stairpx = 20; /* Depth of the stairs layout */
static int stairdirection = 1; /* 0: Left-aligned, 1: Right-aligned */
static int stairsamesize = 1; /* 1 means shrink all the staired windows to the same size */
#endif
/* Dynamic Grid layout */
static int forcevsplit = 1; /* Force two clients to always split vertically in the dynamic grid layout */
/* Resetting */
static int resetlayout = 1; /* Reset layout when there is only one client visible */
static int resetmfact = 1; /* Reset mfact when there is only one client visible */
static int resetgaps = 1; /* Reset gaps when there is only one client visible */
#if LAYOUT_DGRID
static int forcevsplit = 1; /* Force two clients to always split vertically in the dynamic grid layout */
#endif
/* Colors */
/* Bar colors */
static char col_background[] = "#222222"; /* speedwm bar background and status background color */
@ -355,37 +389,37 @@ static const unsigned int systrayopacity = 160; /* Opacity for the speedwm
* Do note that usedtags are not going to be used if tag labels are enabled.
*
*/
static char *tags[] = { "1", /* Tag 1 text (empty) */
"2", /* Tag 2 text (empty) */
"3", /* Tag 3 text (empty) */
"4", /* Tag 4 text (empty) */
"5", /* Tag 5 text (empty) */
"6", /* Tag 6 text (empty) */
"7", /* Tag 7 text (empty) */
"8", /* Tag 8 text (empty) */
"9", /* Tag 9 text (empty) */
static char *tags[] = { "1", /* Tag 1 text (empty) */
"2", /* Tag 2 text (empty) */
"3", /* Tag 3 text (empty) */
"4", /* Tag 4 text (empty) */
"5", /* Tag 5 text (empty) */
"6", /* Tag 6 text (empty) */
"7", /* Tag 7 text (empty) */
"8", /* Tag 8 text (empty) */
"9", /* Tag 9 text (empty) */
};
static char *usedtags[] = { "[1]", /* Tag 1 text (occupied) */
"[2]", /* Tag 2 text (occupied) */
"[3]", /* Tag 3 text (occupied) */
"[4]", /* Tag 4 text (occupied) */
"[5]", /* Tag 5 text (occupied) */
"[6]", /* Tag 6 text (occupied) */
"[7]", /* Tag 7 text (occupied) */
"[8]", /* Tag 8 text (occupied) */
"[9]", /* Tag 9 text (occupied) */
static char *usedtags[] = { "[1]", /* Tag 1 text (occupied) */
"[2]", /* Tag 2 text (occupied) */
"[3]", /* Tag 3 text (occupied) */
"[4]", /* Tag 4 text (occupied) */
"[5]", /* Tag 5 text (occupied) */
"[6]", /* Tag 6 text (occupied) */
"[7]", /* Tag 7 text (occupied) */
"[8]", /* Tag 8 text (occupied) */
"[9]", /* Tag 9 text (occupied) */
};
/* Icon misc */
static XPoint stickyicon[] = { {0,0}, /* represents the icon as an array of vertices */
{4,0},
{4,8},
{2,6},
{0,8},
{0,0},
static XPoint stickyicon[] = { {0,0}, /* Represents the icon as an array of vertices */
{4,0},
{4,8},
{2,6},
{0,8},
{0,0},
};
static XPoint stickyiconbb = {4,8}; /* defines the bottom right corner of the polygon's bounding box (speeds up scaling) */
static XPoint stickyiconbb = {4,8}; /* Defines the bottom right corner of the polygon's bounding box (speeds up scaling) */
/* You have reached the end of the configuration file.
* For keybinds, see 'keybinds.h'