speedwm-personal/options.h
speediegq a32677a6cc Update: Rounded corners can now be used with borderpx set to <0, add
mouse keybind to move up/down tags, more color options for window
borders
2022-10-03 01:36:47 +02:00

388 lines
26 KiB
C

/* 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.
* speedwm has a bigger codebase than suckless.org's dwm, however is still much more minimal than other tiling window managers such as i3-gaps while providing more features for the user.
*
* 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)
* 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.
* Below is a configuration file. Read the instructions below for information about how to configure it.
*
* 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.
*
* 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.
*
* If you aren't aware of this, do not add anything to your .xinitrc if it is listed in autostart.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 options.mk
* - If you're looking to disable a feature, see toggle.h (Disabling features) and toggle.mk (Disabling libraries the features depend on)
*
* 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'.
*
* Alternatively, you can change some of these in ~/.config/speedwm-de/speedwmrc.
* Software options must be changed in this file though.
******************************************************/
/* Software options
* Note that any software named "speedwm-*" is bundled with this build and does not need to be replaced unless you want to.
*/
#define TERMINAL "st -e " /* Terminal to use */
#define BROWSER "icecat" /* Web browser to use */
#define SYSTEMSTAT "htop" /* System stat viewer to use */
#define RSS "newsboat" /* RSS reader to use */
#define PDF "zathura" /* PDF reader to use */
#define MUSIC "tmux new-session -A -D -s cmus $(which --skip-alias cmus)" /* Music player to use */
#define CHAT "tmux new-session -A -D -s weechat $(which --skip-alias weechat)" /* Chat client to use */
#define VISUALIZER "~/.local/bin/vis || vis" /* Music visualizer to use */
#define EMAIL "aerc" /* Email client to use */
#define EDITOR "nvim" /* Text editor to use */
#define RUN "dmenu_run -l 0 -p 'Run:'" /* Run launcher */
#define RUN_ALT "speedwm-applist" /* Alternative run launcher */
#define RUN_DESKTOP "j4-dmenu-desktop --term=st --dmenu='dmenu -l 20 -p Open'"
#define SCREENSHOT "speedwm-screenshotutil -s" /* How to take screenshots (Selection) */
#define SCREENSHOT_FULL "speedwm-screenshotutil -f" /* How to take screenshots (Full screen) */
#define FILEMANAGER "vifmrun || vifm" /* File manager that will be used */
#define LOCKER "slock" /* Screen locker that will be used */
#define OPENPDF "speedwm-pdfopen ~/Documents zathura || ~/Scripts/speedwm-pdfopen ~/Documents zathura" /* Command to run when listing and opening PDFs. */
#define KILLMUSIC "pkill cmus" /* Command to run when killing the music player */
#define NEXTMUSIC "cmus-remote --next" /* Command to run when skipping to the next track */
#define PREVMUSIC "cmus-remote --prev" /* Command to run when moving back to the previous track */
#define UPMUSIC "cmus-remote --volume +3000" /* Command to run when increasing music volume */
#define DOWNMUSIC "cmus-remote --volume -3000" /* Command to run when decreasing music volume */
#define PAUSEMUSIC "cmus-remote --pause" /* Command to run when pausing the track */
/* Software classes */
#define TERMINAL_CLASS "st" /* Terminal to use for rules */
#define BROWSER_CLASS "Navigator" /* Web browser to use for rules */
#define PDF_CLASS "Zathura" /* PDF reader to use for rules */
#define FILEMANAGER_CLASS "vifmrun" /* File manager that will be used for rules */
/* Audio options */
#define MIXER "speedwm-audioctrl -runmixer" /* Audio mixer to use */
#define VOL_DOWN "speedwm-audioctrl -lower" /* Command to run when decreasing volume */
#define VOL_UP "speedwm-audioctrl -raise" /* Command to run when increasing volume */
#define VOL_MUTE "speedwm-audioctrl -mute" /* Command to run when muting volume */
#define VOL_OUTPUT_SPEAKER "speedwm-audioctrl -switch" /* Command to run when enabling speakers */
/* Modifier keys
* Mod4Mask | Super (Windows/command) key
* Mod1Mask | Alt key
*/
#define MODIFIER1 Mod4Mask
#define MODIFIER2 Mod1Mask
/* Managers */
#define CLIPBOARD "xclip" /* Clipboard to use */
#define COMPOSITOR "picom --experimental-backends" /* Compositor to use */
#define NETWORK "speedwm-netctrl" /* Network manager to use */
#define KILLNETWORK "speedwm-netctrl disconnect" /* Command to run when disconnecting */
#define BLUETOOTH "speedwm-btctrl" /* Bluetooth manager to use */
#define NOTIFICATION "dunst" /* Notification daemon to use */
/* Options
*
* If xrdb is installed, you can simply edit ~/.config/speedwm-de/speedwmrc instead of recompiling.
* Once you're done with your edits, run 'make clean install'.
*
* It should be noted that options in speedwmrc will override the options in here. This means if an option does nothing here, it's likely different in the config file.
*/
/* Window alignment options */
static unsigned int borderpx = 1; /* How big your border is in pixels */
static unsigned int snap = 20; /* Snap pixel */
static int nmaster = 1; /* Number of masters */
static int resizehints = 0;
static int decorhints = 1; /* Respect decoration hints */
static int savefloat = 1; /* Save position of floating windows */
static int refreshrules = 1; /* Refresh rules when a CLASS or TITLE changes */
static int i3nmaster = 0; /* Enable i3-gaps like nmaster (1/0) */
static int mousemfact = 1; /* Enable adjusting mfact using the mouse (1/0) */
static float mfact = 0.50; /* Default mfact value. 0.50 = each gets half the available space */
static float lowestmfact = 0.05; /* Lowest possible mfact value on top of the existing. */
/* Window gap options */
static int enablegaps = 1; /* Enable gaps */
static unsigned int gappih = 10; /* horiz inner gap between windows */
static unsigned int gappiv = 10; /* vert inner gap between windows */
static unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
static unsigned int gappov = 10; /* vert outer gap between windows and screen edge */
static unsigned int smartgapsize = 0; /* Gaps for smartgaps. If set to zero, gaps will be disabled. */
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 = 3; /* 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 = 4; /* 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 */
static int swallowclients = 1; /* Swallow windows or not */
static int swallowfloating = 1; /* Swallow floating windows by default */
static int centerfloating = 1; /* Center floating windows by default */
static int startontag = 1; /* Start on a tag or not? */
static int floatscratchpad = 0; /* Float the scratchpad window on hide (1/0) */
static int focusspawn = 0; /* Automatically focus the next spawned window. If warp is enabled, this is useless and will be disabled. (1/0) */
static int autoresize = 1; /* Allow resizing clients automatically when they request it. */
/* Font options */
static char font[] = { "NotoSans-Regular:size=8:antialiasing=true" }; /* What font should we use? */
static char font2[] = { "fontawesome:size=8" }; /* Second font */
static char font3[] = { "Noto Color Emoji:size=8" }; /* Third font */
static const char *fonts[] = { font, font2, font3 }; /* All fonts */
static char defaultstatus[] = ""; /* What to print when a status bar is not running */
/* Bar options */
static char status[] = "status"; /* Status bar to use, stellar for stellar, dwmblocks for dwmblocks, slstatus for slstatus, etc. */
/* Alternate bar
*
* Some users may prefer to use a different bar than what speedwm provides.
* Polybar users for example might want to use their bspwm bar in speedwm.
* If so, follow these instructions:
* - Use xprop to find the class (WM_CLASS) and add that to altbarclass
* - Set altbarcmd to the bar you want to use.
* - Set altbar to 1 (0 will disable it).
* - Recompile speedwm and restart it using 'speedwm_run -r'
*
* If you didn't do any changes to the source code, just run speedwm_run -r'
* If you use Polybar, the default settings here will work, just set altbar to 1 and set altbarcmd to 'polybar &'.
*/
static char *altbarcmd = "";
static int altbar = 0; /* 1 means use non-speedwm status bar */
static char *altbarclass = "Polybar"; /* Alternate bar class name */
static char *alttrayname = "tray"; /* Polybar tray instance name */
/* Misc */
static char shell[] = "/bin/sh"; /* Shell to use */
static int warpcursor = 1; /* Warp cursor when switching client/monitor */
static int urgentwindows = 1; /* Color urgent tags */
static int pertag = 1; /* Use different mfact and layout for each layout */
static int wmclass = 1; /* Enable (1) workaround for when a class cannot be grabbed */
static int clicktofocus = 0; /* Click to focus, or focus when the mouse moves to another window */
/* Full screen options */
static int movefullscreenmon = 1; /* Move fullscreen windows to another monitor */
static int fullscreenhidebar = 1; /* Hide the bar when full screen */
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: 0, Bottom: 1 */
static int barheight = 5; /* Bar height in px, 0 = calculate automatically */
static int barpaddingv = 10; /* Vertical bar padding in px. */
static int barpaddingh = 10; /* Horizontal bar padding in px. */
/* Layout indicator options */
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) */
static int underlineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */
static int underlinepad = 5; /* Horizontal padding between the underline and tag */
static int underlinestroke = 2; /* Height of the underline */
static int underlinevoffset = 0; /* How far above the bottom of the bar the line should appear */
/* Bar item options */
static int hidebar = 0; /* Hide the bar (1) or show (0) */
static int hidelayout = 0; /* Hide layout indicator (1) or show (0) */
static int hidetitle = 0; /* Hide title (1) or show (0) */
static int hidestatus = 0; /* Hide status bar (1) or show (0) */
static int hideicon = 0; /* Hide icon (1) or show (0) */
static int hidetags = 0; /* Hide status bar (1) or show (0) */
static int hideemptytags = 1; /* Hide empty tags (1) or show (0) */
static int hidefloating = 0; /* Hide floating indicator (1) or show (0) */
static int hidesticky = 0; /* Hide sticky indicator (1) or show (0) */
/* Status options */
static int statusallmons = 1; /* Draw status bar on all monitors */
/* Layout options */
#if LAYOUT_MONOCLE
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
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
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
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
/* Bar colors */
static char col_background[] = "#222222"; /* speedwm bar background and status background color */
static char col_title[] = "#222222"; /* speedwm taskbar background color */
/* General text colors */
static char col_textnorm[] = "#bbbbbb"; /* application title bar/font for norm */
static char col_textsel[] = "#eeeeee"; /* speedwm text/font for selected */
/* Window border colors */
static char col_windowbordernorm[] = "#000000"; /* speedwm norm window border */
static char col_windowbordersel[] = "#eeeeee"; /* speedwm sel window border */
/* Tag text/background colors */
static char col_tag1[] = "#333333"; /* tag 1 background */
static char col_tag1_text[] = "#eeeeee"; /* tag 1 text (fg) */
static char col_tag2[] = "#333333"; /* tag 2 background */
static char col_tag2_text[] = "#eeeeee"; /* tag 2 text (fg) */
static char col_tag3[] = "#333333"; /* tag 3 background */
static char col_tag3_text[] = "#eeeeee"; /* tag 3 text (fg) */
static char col_tag4[] = "#333333"; /* tag 4 background */
static char col_tag4_text[] = "#eeeeee"; /* tag 4 text (fg) */
static char col_tag5[] = "#333333"; /* tag 5 background */
static char col_tag5_text[] = "#eeeeee"; /* tag 5 text (fg) */
static char col_tag6[] = "#333333"; /* tag 6 background */
static char col_tag6_text[] = "#eeeeee"; /* tag 6 text (fg) */
static char col_tag7[] = "#333333"; /* tag 7 background */
static char col_tag7_text[] = "#eeeeee"; /* tag 7 text (fg) */
static char col_tag8[] = "#333333"; /* tag 8 background */
static char col_tag8_text[] = "#eeeeee"; /* tag 8 text (fg) */
static char col_tag9[] = "#333333"; /* tag 9 background */
static char col_tag9_text[] = "#eeeeee"; /* tag 9 text (fg) */
/* Layout indicator colors */
static char col_layouttext[] = "#000000"; /* Layout indicator text (fg) */
static char col_layoutbgnorm[] = "#222222"; /* Layout indicator background (norm) */
static char col_layoutbgsel[] = "#bbbbbb"; /* Layout indicator background (norm) */
/* status2d colors */
static char col_status0[] = "#131210";
static char col_status1[] = "#bf616a";
static char col_status2[] = "#A16F9D";
static char col_status3[] = "#68ABAA";
static char col_status4[] = "#A89F93";
static char col_status5[] = "#D3A99B";
static char col_status6[] = "#AFC9AC";
static char col_status7[] = "#eae1cb";
static char col_status8[] = "#a39d8e";
static char col_status9[] = "#6D5E8E";
static char col_status10[] = "#A16F9D";
static char col_status11[] = "#D3A99B";
static char col_status12[] = "#AFC9AC";
static char col_status13[] = "#eae1cb";
static char col_status14[] = "#6D5E8E";
static char col_status15[] = "#ffffff";
/* Opacity settings
* These options set the opacity of the status bar modules.
* They can be anything from 0 (fully transparent) to 255 (fully opaque).
*
* You can also set OPAQUE and TRANSPARENT which are the same as 0 and 255 respectively.
* To completely disable alpha, disable it in toggle.h.
*/
static const unsigned int baropacity = 160; /* Opacity for the overall bar */
static const unsigned int layoutopacity = 160; /* Opacity for the layout indicator */
static const unsigned int tagnormopacity = OPAQUE; /* Opacity for other tags */
static const unsigned int tagselopacity = 160; /* Opacity for the selected tag */
static const unsigned int normtitleopacity = 160; /* Opacity for all other windows in the speedwm bar */
static const unsigned int seltitleopacity = 160; /* Opacity for the focused window in the speedwm bar */
static const unsigned int normborderopacity = OPAQUE; /* Opacity for the all window borders except selected */
static const unsigned int selborderopacity = OPAQUE; /* Opacity for the selected window border */
static const unsigned int hiddenopacity = 0; /* Opacity for hidden/minimized windows */
static const unsigned int statusopacity = 160; /* Opacity for speedwm status bar */
/* Tag text options
*
* These two variables allow you to change the tag text/icons.
* tags is the text/icons for empty tags, as in tags without any open windows.
* usedtags is the text/icons for occupied tags, as in tags with open windows.
*
* 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 *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 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'
* For feature toggles, see 'toggle.h'
*/