/* speedwm options * * -- 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. * 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. * While there are VERY likely going to be patch conflicts, this is still dwm, just modified. I suggest you take the time to learn the codebase for dwm as it can be applied to speedwm. * * 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. * * -- What is this file for? -- * * The header you are currently reading is for changing options for various features. * * If you are a user of a display manager, you may not be able to use .xinitrc. Because of this you can autostart shell scripts using the $HOME/.config/speedwm/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. There is also the autostart-once.sh script in the same directory which is only started once. * * -- 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 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 signal signum, it can be done in the signal.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. * * 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-tileipatch for an example). * * Also note that: * * speedwm.c = dwm.c * host.mk = config.mk * Rest of the 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. * * Alternatively, you can change some of these in ~/.config/speedwm/speedwmrc. * * 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 behavior, you may add "rm -f $HOME/.config/speedwm/speedwmrc" to autostart.sh which will make sure the speedwmrc options are not used. * ******************************************************/ /* Options * * If xrdb is installed, you can simply edit ~/.config/speedwm/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 int bordersize = 1; /* How big your border is in pixels */ static int snap = 20; /* Snap pixel */ static int mastercount = 1; /* Number of clients in the master area */ static int stackcount = 0; /* Number of clients in the stack area */ static int resizehints = 0; /* Show resize hints */ 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 i3mastercount = 0; /* Enable i3-gaps like mastercount (1/0) */ static int mousemfact = 1; /* Enable adjusting mfact using the mouse (1/0) */ static int mousecfact = 1; /* Enable adjusting cfact 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 int gapsizeih = 10; /* Horizontal inner gap between windows */ static int gapsizeiv = 10; /* Vertical inner gap between windows */ static int gapsizeoh = 10; /* Horizontal outer gap between windows and screen edge */ static int gapsizeov = 10; /* Vertical outer gap between windows and screen edge */ static 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 */ static int fadewindows = 1; /* Starts with opacity on any focused/unfocused windows */ 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) */ /* Rounded corners */ 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. */ /* Tag preview options */ 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. */ /* Window spawning options */ static int allowurgent = 1; /* Allow windows to have the 'urgent' status */ 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 autofocus = 0; /* Allow clients to automatically be focused when they request it. This comes with the side effect of potentially being annoying */ static int automove = 0; /* Allow clients to automatically move when they request it */ static int autoresize = 0; /* Allow resizing clients automatically when they request it. */ /* Font options */ static char font[] = "Noto Sans Regular 8"; /* Status options */ static char status[] = "speedwm_status &"; /* Status bar to run on startup. Set this to nothing to run nothing and run your own status bar. */ static char defaultstatus[] = ""; /* What to print when a status bar is not running */ /* 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 int altbar = 0; /* Use alternative bar (0/1) */ static char *altbarcmd = ""; /* Command to run instead of the speedwm bar */ static char *altbarclass = "Polybar"; /* Alternate bar class name */ static char *alttrayname = "tray"; /* Tray instance name */ /* Task switcher options * NOTE: The modifier and cycle key is a constant and because of this, it cannot be changed in speedwmrc/.Xresources. */ static const int switchmodifier = 0x85; /* Modifier to be used for the task switcher. Once this key is no longer held down, the task is selected. This is a keycode. */ static const int switchcyclekey = 0x17; /* Key to cycle forward in the task list. This is a keycode. */ static int menupositionv = 1; /* Menu position vertically. 0 bottom, 1 center, 2 top */ static int menupositionh = 1; /* Menu position horizontally, 0 left, 1 center, 2 right */ static int maxwidth = 600; /* Max menu width */ static int maxheight = 200; /* Max menu height */ /* 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 */ static int iconsize = 10; /* Size of the icon */ static int iconspacing = 5; /* Spacing between the title and icon */ /* Bar options */ static int barposition = 1; /* Bar position. Top: 1, Bottom: 0 */ static int barheight = 4; /* Bar height in pixels, 0 = calculate automatically */ static int barpaddingv = 10; /* Vertical bar padding in pixels. */ static int barpaddingh = 10; /* Horizontal bar padding in pixels. */ /* Layout indicator options */ static int layoutposition = 1; /* Layout indicator on the left (1) or on the right (0) */ /* Systray options */ static int systraypinning = 0; /* Show systray on focused monitor (0) or () to pin to a specific monitor */ static int systrayposition = 0; /* Systray position. (0: Right, 1: Left) */ static int systrayspacing = 2; /* Systray spacing in pixels */ /* 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 the title part of the bar (1) or show (0) */ static int hideunselectedtitle = 0; /* Hide unselected 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 hidesystray = 1; /* Hide systray by default (1) or show (0) */ static int hideemptytags = 1; /* Hide empty tags (1) or show (0) */ static int hidetagpowerline = 0; /* Hide tag powerline (1) or show (0) */ static int hidetitlepowerline = 0; /* Hide title powerline (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 * * Monocle layout */ static int monocleclientcount = 0; /* Display client count in the Monocle layout */ static 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. */ /* Deck layout */ static 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. */ /* Custom layout */ #define customhistfile ".config/speedwm/history" /* History file */ #define customprompt "dmenu -i -l 10 -p 'Enter an S expression >' <" /* Run launcher to use for the custom 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 */ /* Colors * * Bar colors */ static char col_background[] = "#222222"; /* Bar background and status background color */ static char col_titlenorm[] = "#222222"; /* Normal taskbar background color */ static char col_titlesel[] = "#99b3ff"; /* Selected taskbar background color */ static char col_titlehid[] = "#222222"; /* Hidden taskbar background color */ /* General text colors */ static char col_textnorm[] = "#bbbbbb"; /* Normal Application title bar/font */ static char col_textsel[] = "#222222"; /* Selected Text/Font color */ /* Window border colors */ static char col_windowbordernorm[] = "#000000"; /* Normal window border */ static char col_windowbordersel[] = "#eeeeee"; /* Selected window border */ static char col_windowborderurg[] = "#f0e68c"; /* Urgent window border */ /* Tag text/background colors */ static char col_tag1[] = "#99b3ff"; /* Tag 1 background */ static char col_tag1_text[] = "#eeeeee"; /* Tag 1 text */ static char col_tag2[] = "#99b3ff"; /* Tag 2 background */ static char col_tag2_text[] = "#eeeeee"; /* Tag 2 text */ static char col_tag3[] = "#99b3ff"; /* Tag 3 background */ static char col_tag3_text[] = "#eeeeee"; /* Tag 3 text */ static char col_tag4[] = "#99b3ff"; /* Tag 4 background */ static char col_tag4_text[] = "#eeeeee"; /* Tag 4 text */ static char col_tag5[] = "#99b3ff"; /* Tag 5 background */ static char col_tag5_text[] = "#eeeeee"; /* Tag 5 text */ static char col_tag6[] = "#99b3ff"; /* Tag 6 background */ static char col_tag6_text[] = "#eeeeee"; /* Tag 6 text */ static char col_tag7[] = "#99b3ff"; /* Tag 7 background */ static char col_tag7_text[] = "#eeeeee"; /* Tag 7 text */ static char col_tag8[] = "#99b3ff"; /* Tag 8 background */ static char col_tag8_text[] = "#eeeeee"; /* Tag 8 text */ static char col_tag9[] = "#99b3ff"; /* Tag 9 background */ static char col_tag9_text[] = "#eeeeee"; /* Tag 9 text */ static char col_tagurgent[] = "#f0e68c"; /* Urgent tag color */ /* Layout indicator colors */ static char col_layouttext[] = "#000000"; /* Layout indicator text */ static char col_layout[] = "#99b3ff"; /* Layout indicator background */ /* Systray colors */ static char col_systray[] = "#222222"; /* Systray background color */ /* Status colors */ static char col_status0[] = "#131210"; /* Status color 0 */ static char col_status1[] = "#bf616a"; /* Status color 1 */ static char col_status2[] = "#A16F9D"; /* Status color 2 */ static char col_status3[] = "#68ABAA"; /* Status color 3 */ static char col_status4[] = "#A89F93"; /* Status color 4 */ static char col_status5[] = "#D3A99B"; /* Status color 5 */ static char col_status6[] = "#AFC9AC"; /* Status color 6 */ static char col_status7[] = "#eae1cb"; /* Status color 7 */ static char col_status8[] = "#a39d8e"; /* Status color 8 */ static char col_status9[] = "#6D5E8E"; /* Status color 9 */ static char col_status10[] = "#A16F9D"; /* Status color 10 */ static char col_status11[] = "#D3A99B"; /* Status color 11 */ static char col_status12[] = "#AFC9AC"; /* Status color 12 */ static char col_status13[] = "#eae1cb"; /* Status color 13 */ static char col_status14[] = "#6D5E8E"; /* Status color 14 */ static char col_status15[] = "#ffffff"; /* Status color 15 */ /* Color options * * Title */ static int colorselectedtitle = 1; /* Color the selected title. If you're going to be using Powerlines, the title looks better with this set to 0. */ static int colorhiddentitle = 0; /* Color the hidden title. */ /* Layout */ static int colorlayout = 0; /* Color the layout indicator. If you're going to be using Powerlines, the tags look better with this set to 0. */ /* Powerline options */ static int tagplshape = 0; /* Shape of the tag powerlines (0: >, 1: /) */ static int titleplshape = 1; /* Shape of the title powerlines (0: >, 1: /) */ /* Text options * * Unused/empty tags */ static char text_tag1_empty[] = "1"; /* Text for tag 1 when empty */ static char text_tag2_empty[] = "2"; /* Text for tag 2 when empty */ static char text_tag3_empty[] = "3"; /* Text for tag 3 when empty */ static char text_tag4_empty[] = "4"; /* Text for tag 4 when empty */ static char text_tag5_empty[] = "5"; /* Text for tag 5 when empty */ static char text_tag6_empty[] = "6"; /* Text for tag 6 when empty */ static char text_tag7_empty[] = "7"; /* Text for tag 7 when empty */ static char text_tag8_empty[] = "8"; /* Text for tag 8 when empty */ static char text_tag9_empty[] = "9"; /* Text for tag 9 when empty */ /* Used/occupied tags */ static char text_tag1_used[] = "[1]"; /* Text for tag 1 when used */ static char text_tag2_used[] = "[2]"; /* Text for tag 2 when used */ static char text_tag3_used[] = "[3]"; /* Text for tag 3 when used */ static char text_tag4_used[] = "[4]"; /* Text for tag 4 when used */ static char text_tag5_used[] = "[5]"; /* Text for tag 5 when used */ static char text_tag6_used[] = "[6]"; /* Text for tag 6 when used */ static char text_tag7_used[] = "[7]"; /* Text for tag 7 when used */ static char text_tag8_used[] = "[8]"; /* Text for tag 8 when used */ static char text_tag9_used[] = "[9]"; /* Text for tag 9 when used */ /* Layouts */ static char text_layout1[] = "(L1)"; /* Text for layout 1 */ static char text_layout2[] = "(L2)"; /* Text for layout 2 */ static char text_layout3[] = "(L3)"; /* Text for layout 3 */ static char text_layout4[] = "(L4)"; /* Text for layout 4 */ static char text_layout5[] = "(L5)"; /* Text for layout 5 */ static char text_layout6[] = "(L6)"; /* Text for layout 6 */ static char text_layout7[] = "(L7)"; /* Text for layout 7 */ static char text_layout8[] = "(L8)"; /* Text for layout 8 */ static char text_layout9[] = "(L9)"; /* Text for layout 9 */ static char text_layout10[] = "(L10)"; /* Text for layout 10 */ static char text_layout11[] = "(L11)"; /* Text for layout 11 */ static char text_layout12[] = "(L12)"; /* Text for layout 12 */ static char text_layout13[] = "(L13)"; /* Text for layout 13 */ static char text_layout14[] = "(L14)"; /* Text for layout 14 */ static char text_layout15[] = "(L15)"; /* Text for layout 15 */ /* Alpha/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. */ #define baropacity 160 /* Opacity for the overall bar */ #define layoutopacity 160 /* Opacity for the layout indicator */ #define tagnormopacity OPAQUE /* Opacity for other tags */ #define tagselopacity 160 /* Opacity for the selected tag */ #define normtitleopacity 160 /* Opacity for all other windows in the speedwm bar */ #define seltitleopacity 160 /* Opacity for the focused window in the speedwm bar */ #define normborderopacity OPAQUE /* Opacity for the all window borders except selected */ #define selborderopacity OPAQUE /* Opacity for the selected window border */ #define hiddenopacity 0 /* Opacity for hidden/minimized windows */ #define statusopacity 160 /* Opacity for speedwm status bar */ #define systrayopacity 160 /* Opacity for the speedwm built in systray */ /* Icon misc options * * Sticky */ 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' */