/* 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. * 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. * * 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 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, they can be found here in actions.h * - 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-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. * * Alternatively, you can change some of these in ~/.config/speedwm-de/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-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. * ******************************************************/ /* 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 int bordersize = 1; /* How big your border is in pixels */ static int snap = 20; /* Snap pixel */ static int mastercount = 1; /* Number of masters */ 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 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:antialiasing=true" }; /* Second font */ static char font3[] = { "Noto Color Emoji:size=8:antialiasing=true" }; /* Third font */ static 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 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 unsigned 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 unsigned int switchcyclekey = 0x17; /* Key to cycle forward in the task list. This is a keycode. */ static unsigned int menupositionv = 1; /* Tab position vertically. 0 bottom, 1 center, 2 top */ static unsigned int menupositionh = 1; /* Tab position horizontally, 0 left, 1 center, 2 right */ static unsigned int maxwidth = 600; /* Max menu width */ static unsigned 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 = 8; /* 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 systrayonleft = 0; /* Systray position. Right: 0, Left: 1. */ static int systrayspacing = 2; /* Systray spacing in pixels */ static int showsystray = 0; /* Show systray by default (1) or hide (1) */ /* 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 hideemptytags = 1; /* Hide empty tags (1) or show (0) */ static int hidetagpowerline = 1; /* Hide tag 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 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. */ /* 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. */ /* 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 */ /* Colors * * Bar colors */ static char col_background[] = "#222222"; /* speedwm bar background and status background color */ static char col_title[] = "#99b3ff"; /* 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[] = "#99b3ff"; /* tag 1 background */ static char col_tag1_text[] = "#eeeeee"; /* tag 1 text (fg) */ static char col_tag2[] = "#99b3ff"; /* tag 2 background */ static char col_tag2_text[] = "#eeeeee"; /* tag 2 text (fg) */ static char col_tag3[] = "#99b3ff"; /* tag 3 background */ static char col_tag3_text[] = "#eeeeee"; /* tag 3 text (fg) */ static char col_tag4[] = "#99b3ff"; /* tag 4 background */ static char col_tag4_text[] = "#eeeeee"; /* tag 4 text (fg) */ static char col_tag5[] = "#99b3ff"; /* tag 5 background */ static char col_tag5_text[] = "#eeeeee"; /* tag 5 text (fg) */ static char col_tag6[] = "#99b3ff"; /* tag 6 background */ static char col_tag6_text[] = "#eeeeee"; /* tag 6 text (fg) */ static char col_tag7[] = "#99b3ff"; /* tag 7 background */ static char col_tag7_text[] = "#eeeeee"; /* tag 7 text (fg) */ static char col_tag8[] = "#99b3ff"; /* tag 8 background */ static char col_tag8_text[] = "#eeeeee"; /* tag 8 text (fg) */ static char col_tag9[] = "#99b3ff"; /* tag 9 background */ static char col_tag9_text[] = "#eeeeee"; /* tag 9 text (fg) */ /* Layout indicator colors */ static char col_layouttext[] = "#000000"; /* Layout indicator text */ static char col_layout[] = "#99b3ff"; /* Layout indicator background */ /* Systray colors */ static char col_systraybg[] = "#222222"; /* Systray background color */ /* Status 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"; /* Color options * * Title */ static int colortitle = 1; /* Color the unselected 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 = 1; /* Color the hidden title. */ /* Layout */ static int colorlayout = 1; /* Color the layout indicator. If you're going to be using Powerlines, the tags look better with this set to 0. */ /* 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 */ /* 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) */ }; /* Text for tags with windows open */ 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 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' */