Personal configuration for speedwm
Go to file
speediegq 5e364af08e fix
2022-10-15 15:28:41 +02:00
docs remove pointless keybind 2022-10-15 14:16:50 +02:00
modules Use status config for module icons, modify docs, add statusbar.h for statuscmd stuff 2022-10-08 18:07:28 +02:00
scripts fix: -- Mouse -- not being sed 2022-10-15 02:49:16 +02:00
toggle update IPC args 2022-09-10 12:42:01 +02:00
.gitignore update .gitignore 2022-10-14 15:42:24 +02:00
actions.h remove pointless keybind 2022-10-15 14:16:50 +02:00
autostart.h fix 2022-10-14 16:36:41 +02:00
colors.h Now use tcc by default 2022-10-08 21:47:30 +02:00
drw.c Add commit https://git.suckless.org/dwm/commit/6613d9f9a1a5630bab30bc2b70bdc793977073ee.html 2022-10-03 00:24:54 +02:00
drw.h Add toggle for window icons 2022-09-03 17:05:20 +02:00
host.mk changes to custom layout, modify host, fsignals 2022-10-11 18:08:16 +02:00
ipc.h fix license, ipc indentation change 2022-10-06 08:24:51 +02:00
keybinds.h remove pointless keybind 2022-10-15 14:16:50 +02:00
layouts.c Fix layouts 2022-10-14 14:39:55 +02:00
layouts.h Fix lots and lots of bugs and remove old layouts that do not have gaps. 2022-10-11 17:11:31 +02:00
LICENSE fix license, add cfact value to xresources.h 2022-10-11 14:02:34 +02:00
Makefile add makefile 2022-10-12 22:41:21 +02:00
mouse.h use cmd() instead of RCMD() 2022-10-15 01:21:54 +02:00
options.h Update fsignal patch, it now sucks less and doesn't shit the status text 2022-10-14 16:14:45 +02:00
options.mk Remove todo as its no longer necessary, bump to 0.8 2022-10-12 22:41:56 +02:00
README.md fix: -- Mouse -- not being sed 2022-10-15 02:49:16 +02:00
rules.h Change some variable names, remove line from TODO because I am not able 2022-10-06 09:52:35 +02:00
signal.h Update fsignal patch, it now sucks less and doesn't shit the status text 2022-10-14 16:14:45 +02:00
speedwm.c fix 2022-10-15 15:28:41 +02:00
speedwm.png Add speedwm, we'll see if I use this repository instead. 2022-08-21 11:53:18 +02:00
status No more xsetroot dependency, we can now set the status using speedwm -s 2022-10-15 02:22:19 +02:00
statusbar.h change statusbar.h and new readme 2022-10-15 02:29:27 +02:00
toggle.h Fix layouts 2022-10-14 14:39:55 +02:00
toggle.mk Small updates 2022-09-08 17:13:41 +02:00
transient.c Add speedwm, we'll see if I use this repository instead. 2022-08-21 11:53:18 +02:00
util.c Implement commit https://git.suckless.org/dwm/commit/e0dee911455cee739a5b05a994828f4a37a2764d.html 2022-09-11 00:47:48 +02:00
util.h Add IPC patch, add as an option. Will likely simplify this soon but for 2022-08-26 11:41:11 +02:00
xresources.h Fix lots and lots of bugs and remove old layouts that do not have gaps. 2022-10-11 17:11:31 +02:00

speedwm is a window manager forked from suckless.org's dwm or dynamic window manager. It manages the user's open windows and tiles them according to a set layout (dynamic).

Just like dwm, speedwm also tries to be minimal but also has functionality and aesthetics as a goal. It is also much more minimal than other window managers like i3-gaps while offering many more features.

Tiling window managers (unlike floating window managers that you may be used to) tile windows based on a set layout making them easy to get productive on. They also encourage the user to use their keyboard instead of the mouse so that the user doesn't have to move their hands much but there are mouse keybinds and more can be added.

Installation

In order to install this build of speedwm, all dependencies must be installed. You can see (Dependencies) for a list of all dependencies required to use this fork.

  • git clone https://codeberg.org/speedie/speedwm
  • cd speedwm
  • make clean install
    • If any warnings show up, fix it by installing the missing dependency.
  • If a .xinitrc is used, add 'speedwm_run' to the end.
    • NOTE: Your .xinitrc should ONLY contain 'speedwm_run'. speedwm will automatically start everything else. If not, edit autostart.h and 'make clean install'. If a .xinitrc is not used then you don't need to worry. A .desktop file is automatically created when you run 'make clean install'.

Layouts

speedwm comes with the following layouts:

  • Tile
  • Monocle
  • Grid
  • Deck
  • Centered Master
  • Centered Floating Master
  • Spiral
  • Dwindle
  • Bottom Stack
  • Horizontal Bottom Stack
  • Horizonal Grid
  • Dynamic Grid
  • Custom

They can be switched between using a little menu (See Keybinds for more information) or by right clicking the Layout indicator. The more commonly used layouts can be switched between using a quick keybind. Do note that these may be disabled through the toggle.h header.

Keybinds

This is a full list of keybinds. Please let me know if any keybinds are missing as these have been manually added.

Applications

Keybinds for regular applications

  • Super+Shift+Enter | Opens a terminal
  • Super+Shift+Colon | Opens a dmenu prompt
  • Super+Shift+s | Opens 'maim' to take a screenshot and copies it to the clipboard using 'xclip'
  • Super+Shift+f | Opens the defined file manager
  • Super+Shift+w | Opens the defined web browser
  • Super+Shift+o | Opens the bundled dfmpeg dmenu script to record your screen.
  • Super+Shift+t | Opens the defined editor in your terminal
  • Super+Shift+m | Kills the defined music player
  • Super+Shift+a | Opens the defined mixer in your terminal
  • Super+Shift+m | Opens the defined music player
  • Super+Shift+x | Opens the defined system process viewer in your terminal
  • Super+Shift+c | Opens the defined chat client
  • Super+Shift+i | Open a dmenu prompt and open the file the user picks in Zathura
  • Super+Shift+p | Open a dmenu prompt and open the file the user picks in Vim
  • Super+Shift+d | Opens iron in the terminal if it is installed.
  • Super+Shift+u | Opens the defined RSS reader
  • Super+Shift+r | Opens the defined email client

Navigation

These keybinds are for navigating speedwm

  • Super+t | Reorganize tags and move windows
  • Super+f | Full-screen the selected window
  • Super+b | Show/hide the speedwm bar
  • Super+s | Show/hide the systray
  • Super+j/k | Move focus between visible windows
  • Super+m | Moves focus to the Master window (or back if Master is already focused)
  • Super+Control+z/x | Increase/decrease gaps between windows by 5
  • Super+Control+j/k | Move focus between hidden windows (Can then 'Show')
  • Super+a/d | Increase/decrease size of each window
  • Super+o | Hide a window
  • Super+Control+o | Show a hidden focused window
  • Super+Control+Shift+o | Show all hidden windows
  • Super+Control+Shift+p | Hide all windows
  • Super+Control+a/d | Move to the next/previous tag
  • Super+Control+Shift+z/c | Move to the next/previous tag skipping any without windows open
  • Super+Minus | Show the scratchpad
  • Super+Equal | Remove the scratchpad
  • Super+Enter | Switch order of windows
  • Super+Shift+q | Close the current window
  • Super+Colon | Open a list of desktop entries in dmenu
  • Super+0 | Reset mfact
  • Super+r | Reset number of masters
  • Super+t | Disable inactive fade
  • Super+Shift+Equal | Toggle scratchpads
  • Super+Shift+Minus | Hide the scratchpad
  • Super+Shift+Space | Unfloat floating windows
  • Super+Shift+Arrow | Resizes a window in floating mode
  • Super+1 | Move to tag 1
  • Super+2 | Move to tag 2
  • Super+3 | Move to tag 3
  • Super+4 | Move to tag 4
  • Super+5 | Move to tag 5
  • Super+6 | Move to tag 6
  • Super+7 | Move to tag 7
  • Super+8 | Move to tag 8
  • Super+9 | Move to tag 9
  • Super+Shift+1 | Preview tag 1
  • Super+Shift+2 | Preview tag 2
  • Super+Shift+3 | Preview tag 3
  • Super+Shift+4 | Preview tag 4
  • Super+Shift+5 | Preview tag 5
  • Super+Shift+6 | Preview tag 6
  • Super+Shift+7 | Preview tag 7
  • Super+Shift+8 | Preview tag 8
  • Super+Shift+9 | Preview tag 9
  • Super+Shift+h/j/k/l | Rotates a stack.
  • Super+Shift+Escape | Ask the user if they want to shutdown or reboot or nothing
  • Super+Control+1 | Combine the current tag with tag 1
  • Super+Control+2 | Combine the current tag with tag 2
  • Super+Control+3 | Combine the current tag with tag 3
  • Super+Control+4 | Combine the current tag with tag 4
  • Super+Control+5 | Combine the current tag with tag 5
  • Super+Control+6 | Combine the current tag with tag 6
  • Super+Control+7 | Combine the current tag with tag 7
  • Super+Control+8 | Combine the current tag with tag 8
  • Super+Control+9 | Combine the current tag with tag 9
  • Super+Control+Shift+Colon | Open a list of extra software in dmenu
  • Super+Control+q | Mutes your audio
  • Super+Control+w | Increases your volume
  • Super+Control+e | Decreases your volume
  • Super+Control+0 | Tag all tags at once.
  • Super+Control+Arrow | Moves a window to any corner of your screen (Arrow key)
  • Super+Control+Tab | Open a dmenu prompt asking the user what layout to switch to
  • Super+Control+h | Open a list of all keybinds in your terminal using less
  • Super+Control+Shift+a/d | Move between available layouts
  • Super+Control+Shift+1 | Move the focused window to tag 1
  • Super+Control+Shift+2 | Move the focused window to tag 2
  • Super+Control+Shift+3 | Move the focused window to tag 3
  • Super+Control+Shift+4 | Move the focused window to tag 4
  • Super+Control+Shift+5 | Move the focused window to tag 5
  • Super+Control+Shift+6 | Move the focused window to tag 6
  • Super+Control+Shift+7 | Move the focused window to tag 7
  • Super+Control+Shift+8 | Move the focused window to tag 8
  • Super+Control+Shift+9 | Move the focused window to tag 9
  • Super+Control+Shift+Esc | Open speedwm-utils
  • Super+Control+Shift+Arrow | Resize the window to the screen size.
  • Super+Control+Shift+s | Set a wallpaper
  • Super+Control+Shift+n | Connect to WLAN (Using iwd)
  • Super+Control+Shift+b | Connect to a Bluetooth device (Using bluez)
  • Super+Control+Shift+f | Open up a list of speedwm config files in dmenu that you can edit.
  • Super+Control+Shift+q | Pauses your music
  • Super+Control+Shift+w | Decreases your music volume
  • Super+Control+Shift+e | Increase your music volume
  • Super+Control+Shift+r | Restart speedwm
  • Super+w/e | Resize the window keeping the aspect ratio of it.
  • Super+Tab | Switch between windows and tags.
  • Super+Control+Shift+j/k | Change window size vertically (cfact)

Chained keybinds

  • Super+c & w | Get the weather (Using wttr.in)
  • Super+c & n | Switch to the next track
  • Super+c & p | Switch to the previous track
  • Super+g & t | Toggle gaps
  • Super+g & 0 | Reset gaps
  • Super+g & i | Increase inner gaps by 1
  • Super+g & o | Increase outer gaps by 1
  • Super+g & j/k | Increase/decrease gaps between windows by 1
  • Super+Shift+g & i | Decrease inner gaps by 1
  • Super+Shift+g & o | Decrease outer gaps by 1
  • Super+r & v | Open the defined music visualizer
  • Super+r & s | Run screenkey if it is installed
  • Super+r & d | Kill screenkey
  • Super+Shift+e & a | Open the virtual keyboard
  • Super+Shift+e & e | Open a list of all emojis and copy the selection
  • Super+Shift+k & o | Kill every window except the focused
  • Super+t & s | Make the current selected window sticky
  • Super+w & r | Randomize wallpaper
  • Super+w & p | Set wallpaper to the previous

Extras

These will only work if your keyboard has special multimedia buttons.

  • Mute button | Mutes your audio
  • Up Volume button | Increases your volume
  • Next/Previous song button | Switch to the next/previous track
  • Down Volume button | Decreases your volume
  • Pause button | Pauses the current track
  • Stop button | Stops your defined music player
  • Browser button | Opens your defined web browser
  • Power button | Ask if you wanna shut down, restart or lock your computer.
  • Email button | Open your defined email client
  • System button | Open your defined status viewer in a terminal
  • Music button | Open your defined music player
  • WLAN button | Disconnect from WLAN

Mouse

These binds can be activated using your mouse

  • Tag (Left click) | Switch to tag
  • Tag (Scrolling up/down) | Switch to the next/previous tag
  • Layout indicator (Left click) | Switch to the next layout
  • Layout indicator (Middle click) | Switch to the next layout
  • Layout indicator (Right click) | Open a dmenu list of all layouts
  • Window title (Left click) | Hide/Show the window
  • Window title (Right click) | Open speedwm-utils
  • Focused window (Super+Alt+Left click) | Move the focused window around
  • Focused window (Super+Alt+Middle click) | Make the focused window floating
  • Focused window title (Middle click) | Rotate stack
  • Dragging (Super+Right click) | Increase/decrease size of each window (mfact)
  • Dragging (SuperControl+Right click) | Increase/decrease cfact
  • Root window (Right click) | List .desktop entries and open them

There are also keybinds for statuscmd, but you must implement it into your own status bar. See mouse.h for more information.

Dependencies

These are absolutely necessary, speedwm will NOT compile without them

  • libxft
  • libXinerama
    • Can be disabled through editing toggle.mk if you're not interested in multiple monitors.
  • imlib2
    • Tag previews, Window icons. Can be disabled through editing toggle.mk and toggle.h if you don't want these features.
  • yajl
    • Required for the IPC patch. If the IPC patch is disabled, you do not need this.
  • tcc
    • Very minimal C compiler that speedwm uses to speed up compile times. If you don't want this dependency, edit host.mk and set CC to 'cc' (or what you prefer).

Features

These are necessary for certain features. By default speedwm will prevent an installation without them but you can bypass these if you want. If you want to use an alternative, change it in options.h.

  • dmenu
    • NOTE: dmenu is required for most scripts included with this build of speedwm. My build is required for proper Pywal support.
    • If you do not have the password, grid and center patches, you must disable them in ~/.config/speedwm-de/global/config by setting two variables to false.
  • picom
    • Optional but speedwm looks sort of ugly without it.
  • xclip (Required for clipboard support by a few scripts, will start automatically)
  • xwallpaper (Required to set wallpapers)
  • xmodmap
    • Required if you want the Alt+Tab to have proper keybinds.
  • xrdb (Install if you want .Xresources support)
  • pywal (Install if you want pywal support. Requires swal aka the default way to set wallpapers)
  • wmctrl (Needed for proper window management)
  • slock (Required for screen locking)
    • If you want to display a message, you need the text patch.
    • If you have the background image patch, you can set the image to ~/.config/speedwm-de/swal/CurrentWallpaper. It is a symlink to the current wallpaper.
  • maim (Required for built in 'speedwm-screenshotutil' script)
  • j4-dmenu-desktop
    • Required for dmenu desktop entries. speedwm will not prevent installation without this because it doesn't provide much functionality.

Software

This build of speedwm comes with binds for software. These must be installed by default but you can change what software is required by editing 'options.h' and running 'make clean install'. You can also remove keybinds by editing 'keybinds.h' and running 'make clean install'.

  • st (Terminal)
  • GNU IceCat (Web browser)
  • htop (Status monitor)
  • newsboat (RSS reader)
  • zathura (PDF reader)
  • alsa-utils (Required for audio controls)
  • cmus (Default music player)
  • neovim (Text editor)
  • aerc (Email client)
  • maim (Screenshot tool, automatically copies to clipboard using xclip)
  • vifm (File manager)
  • slock (Lock screen) And everything under 'Features'.

Important

If you're used to dwm, speedwm might be a little unfamiliar to you at first. This is because speedwm doesn't use config.h (or config.def.h). Instead, config.h is split into different parts to make it easier to edit. Instead of editing config.h you'll want to edit:

  • autostart.h for starting stuff right before speedwm (For example xclip, pywal, etc.)
  • options.h for changing colors and applications to use with keybinds.
  • signal.h for adding fake signals
  • colors.h for changing alpha options and color options, most users won't need to edit it.
  • xresources.h for adding/removing .Xresources options
  • rules.h for adding/removing rules
  • keybinds.h for adding/removing keybinds.
  • mouse.h for adding/removing mouse binds.
  • statusbar.h for adding/removing statuscmd clicks.
  • ipc.h for adding/removing IPC commands. (If support is compiled in)
  • toggle.h for adding/removing features from getting compiled in.
  • actions.h for changing classes/defines used by keybinds and rules.

After you've edited one of the files, you need to run 'make clean install' to reinstall speedwm. Remember that you can change colors through your .Xresources file (see .Xresources and Pywal) meaning you do not need to recompile speedwm.

Another important detail you must keep in mind is that this build comes with a status bar simply named 'status'. It can be found in the speedwm source code directory. It is just a shell script which adds stuff to your status bar. It will automatically be started when speedwm starts.

You can edit the status bar simply by editing 'status' and running 'make clean install'. You can also configure it by editing '~/.config/speedwm-de/status/config'.

If you want to change status bar, edit options.h and set 'static char status' to your status bar binary (must be in $PATH). Alternatively, you can also set "speedwm.status: " in .Xresources (See .Xresources and Pywal).

.Xresources and Pywal

This fork of speedwm has .Xresources support thanks to the .Xresources patch. It also has pywal support (tool which grabs colors based on your wallpaper).

Colors can be reloaded on-the-fly using the built in wallpaper utility. In order to implement speedwm reloading support to your own wallpaper utility, run shell command (/bin/sh) 'speedwm_run -r' to reload colors automatically.

Note that the 'xrdb' dependency is required for both pywal and .Xresources support.

Below is a list of all .Xresources values you can define. The .Xresources file should be placed in ~ or ~/.config by the user. If it is not or you want it somewhere else, you can edit 'autostart.h' and 'make clean install'.

Signals

Thanks to the 'fsignal' patch available on suckless.org's website, we can easily write shell scripts to interact with dwm and therefore speedwm. I made some changes to this patch, because it has some.. questionable behaviour in my opinion.

To use signals, simply use the speedwm-utils script. Syntax is speedwm-utils -exec

Below is a list of all signums and what they do.

  • 1 | Switch to the Tiling layout
  • 2 | Switch to the Floating layout
  • 3 | Switch to the Monocle layout
  • 4 | Switch to the Grid layout
  • 5 | Switch to the Deck layout
  • 6 | Switch to the Centered Master layout
  • 7 | Switch to the Centered Floating Master layout
  • 8 | Switch to the Fibonacci Spiral layout
  • 9 | Switch to the Fibonacci Dwindle layout
  • 10 | Switch to the Bottom Stack Vertical layout
  • 11 | Switch to the Bottom Stack Horizontal layout
  • 12 | Switch to the Horizontal Grid layout
  • 13 | Switch to the Dynamic Grid layout
  • 14 | Switch to the Custom layout
  • 15 | Custom layout options
  • 16 | Switch to the next layout
  • 17 | Switch to the previous layout
  • 18 | Increase mfact by 0.05
  • 19 | Decrease mfact by 0.05
  • 20 | Toggle sticky
  • 21 | Toggle the bar
  • 22 | Toggle fullscreen
  • 23 | Toggle floating
  • 24 | Swap the current window with the next
  • 25 | Reorganize tags (Reorder them)
  • 26 | Shutdown speedwm
  • 27 | Restart speedwm
  • 28 | Show the focused window
  • 29 | Hide the focused window
  • 30 | Kill the focused window
  • 31 | Rotate the stack up
  • 32 | Rotate the stack down
  • 33 | Increase number of clients in the master stack
  • 34 | Decrease number of clients in the master stack
  • 35 | Focus the Master client
  • 36 | Switch focus between windows +1
  • 37 | Switch focus between windows -1
  • 38 | Switch focus between hidden windows +1
  • 39 | Switch focus between hidden windows -1
  • 40 | Toggle opacity for windows
  • 41 | Increase cfact by 0.05
  • 42 | Decrease cfact by 0.05
  • 43 | Switch to the previous tag
  • 44 | Switch to the next tag
  • 45 | Reset gaps to the default size
  • 46 | Toggle gaps
  • 47 | Increase gaps by 1
  • 48 | Decrease gaps by 1
  • 49 | Increase inner gaps by 1
  • 50 | Decrease inner gaps by 1
  • 51 | Increase outer gaps by 1
  • 52 | Decrease outer gaps by 1
  • 53 | Kill all clients except focused
  • 54 | Focus the next monitor
  • 55 | Focus the previous monitor
  • 56 | Show the scratchpad
  • 57 | Hide the scratchpad
  • 58 | Remove the scratchpad
  • 59 | Reset layout/mfact
  • 60 | Reset nmaster
  • 61 | Show/Hide systray
  • 62 | Hide all windows
  • 63 | Show all windows
  • 64 | Reset mfact
  • 65 | Reload .Xresources on the fly
  • 66 | Switch to the previous tag, skipping empty tags
  • 67 | Switch to the next tag, skipping empty tags

Switching run launcher

Some users may prefer to use a different run launcher than dmenu. Previously all scripts bundled would only run dmenu from $PATH but you can now switch run launcher very easily.

  • Edit options.h and change RUN to your run launcher
  • Add "export RUNLAUNCHER=" to your .rc

Run launchers must support dmenu arguments because otherwise scripts are going to be incompatible. It must also support the additional '-g' argument that the dmenu grid patch provides unless you modify the scripts bundled. Keep in mind that if you use a different run launcher, it may not support Pywal/.Xresources.

Maintaining settings easily

speedwm is a personal fork of dwm and will therefore likely have keybinds and other options you may not like. Because of this, I recommend that you use the patching system to manage your "custom" settings speedwm has a patching system. It allows you to create a patch with your changes to options.h, options.mk, toggle.h and toggle.mk. To create a patch, simply make clean install once and then the docs folder will contain backups of your source code. If you perform changes to any of these four files, run make patch to create patches against the backups in docs and your modified files. Then once you're updating, do make patch_remove, git pull, make patch_install, and make clean install and all your settings will be there. The only (obvious) problem with doing this is that eventually the backup files patches are being created against will be pretty old causing patches to no longer apply correctly. If this is the case you will need to create new patches and backups.

If this seems like more effort than it is worth, maintaining your own fork is always an option. This allows you to perform any options you want yourself. This however doesn't allow you to grab any updates so this should be your second choice.

Additional note on autostart

If you wish to add autostart entries without recompiling, consider using $HOME/.config/speedwm-de/autostart.sh. This is a path added to autostart.h and you can fill it with anything you want.

Do note that it will NOT just run once. It will run every time you restart and start speedwm (signum 30 and 31 count as well). To get around this, you may wrap stuff in a function in the script and have some way of checking if it has ran before. If it hasn't, call the function.

An alternative is to use the $HOME/.config/speedwm-de/autostart_once.sh path. This one is autostarted by speedwm_run and is therefore not hardcoded and not affected by speedwm restarting. Just like the previous autostart script, it does not exist so you need to create it.