├── README.md ├── assets ├── example.gif ├── screenshot.png └── video.mkv ├── autostart ├── herbstScripts ├── menu └── panel.sh ├── keyBinds ├── monitors ├── theme └── winRules /README.md: -------------------------------------------------------------------------------- 1 | # Herbstluftwm Configuration 2 | 3 | ![system shot](./assets/screenshot.png) 4 | 5 | Welcome to my Herbstluftwm configuration repository! This setup is designed to provide an efficient, minimalist tiling window manager experience, customized with themes, scripts, and keybindings to suit my workflow. 6 | 7 | ![my setup in action](assets/example.gif) 8 | 9 | --- 10 | 11 | ## About Herbstluftwm 12 | 13 | [Herbstluftwm](https://herbstluftwm.org/) is a dynamic tiling window manager for X11 that emphasizes manual tiling and simplicity. Unlike many other tiling window managers, it uses a single monitor-independent tag-based workspace system. 14 | 15 | ### Benefits 16 | - **Manual tiling**: Complete control over your window layout. 17 | - **Minimal dependencies**: Lightweight and fast. 18 | - **Highly customizable**: Adjust to your preferences with a shell script-based configuration. 19 | - **Tag-based workflow**: Independent of monitor constraints. 20 | 21 | ### Drawbacks 22 | - **Steeper learning curve**: Requires manual setup and understanding of the tiling workflow. 23 | - **Limited out-of-the-box features**: Most functionality must be configured or scripted. 24 | - **X11 only**: No native Wayland support. 25 | 26 | --- 27 | 28 | ## Configuration Overview 29 | 30 | This configuration is modular and organized into several files for clarity and maintainability: 31 | 32 | - **`autostart`**: Main entry point for configuring Herbstluftwm. Initializes settings, keybindings, and themes. 33 | - **`theme`**: Handles visual customization, including colors, fonts, and borders. 34 | - **`winrules`**: Defines rules for window placement and behavior based on window class or instance. 35 | - **`herbstScripts`**: Contains utility scripts to extend functionality. 36 | - **`keybinds`**: Centralizes keybinding definitions for window management, launching applications, and more. 37 | 38 | --- 39 | 40 | ## Tools Used 41 | 42 | This configuration leverages the following tools to enhance usability and aesthetics: 43 | 44 | - **[Rofi](https://github.com/davatorium/rofi)**: A versatile application launcher and dmenu replacement. 45 | - **[Vim/Neovim](https://neovim.io/)**: My preferred text editors for editing configuration files. 46 | - **[Polybar](https://polybar.github.io/)**: A customizable status bar for system information and quick actions. 47 | - **[Compfy](https://github.com/allusive-dev/compfy)**: A compositor fo X11 with animations similar to picom ( no longer actively maintained ) 48 | 49 | --- 50 | 51 | ## Getting Started 52 | 53 | 1. Clone this repository: 54 | ```bash 55 | git clone https://github.com/yourusername/herbstluftwm-config.git 56 | 57 | -------------------------------------------------------------------------------- /assets/example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdpedersen1/Void-Herbstluftwm/b59dada198214249e68815c069dac6b19e5888b3/assets/example.gif -------------------------------------------------------------------------------- /assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdpedersen1/Void-Herbstluftwm/b59dada198214249e68815c069dac6b19e5888b3/assets/screenshot.png -------------------------------------------------------------------------------- /assets/video.mkv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdpedersen1/Void-Herbstluftwm/b59dada198214249e68815c069dac6b19e5888b3/assets/video.mkv -------------------------------------------------------------------------------- /autostart: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # this is a simple config for herbstluftwm 4 | 5 | hc() { 6 | herbstclient "$@" 7 | } 8 | 9 | hc emit_hook reload 10 | 11 | ### Autostart 12 | nm-applet & 13 | compfy --daemon 14 | xfce4-power-manager & 15 | mpd --no-daemon "$HOME"/.config/mpd/mpd.conf & 16 | mpDris2 -c "$HOME"/.config/mpDris2/mpDris2.conf & 17 | blueman-applet & 18 | $HOME/.config/herbstluftwm/herbstScripts/panel.sh & 19 | 20 | # Keybindings 21 | . "$HOME"/.config/herbstluftwm/keyBinds 22 | # Theme 23 | . "$HOME"/.config/herbstluftwm/theme 24 | # Rules 25 | . "$HOME"/.config/herbstluftwm/winRules 26 | # Monitors 27 | . "$HOME"/.config/herbstluftwm/monitors 28 | 29 | # tags 30 | tag_names=( {1..9} ) 31 | tag_keys=( {1..9} 0 ) 32 | 33 | hc rename default "${tag_names[0]}" || true 34 | for i in "${!tag_names[@]}" ; do 35 | hc add "${tag_names[$i]}" 36 | key="${tag_keys[$i]}" 37 | if [ -n "$key" ] ; then 38 | hc keybind "$Mod-$key" use_index "$i" 39 | hc keybind "$Mod-Shift-$key" move_index "$i" 40 | fi 41 | done 42 | hc set tree_style '╾│ ├└╼─┐' 43 | 44 | 45 | hc split vertical 0.6; hc remove 46 | -------------------------------------------------------------------------------- /herbstScripts/menu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Fri 04 Oct 2024 09:32:54 AM CDT 5 | #Project: 6 | 7 | #pkgs="$(ls $HOME/.local/pkgs/void-packages/srcpkgs/)" 8 | 9 | 10 | case "$1" in 11 | menu) 12 | herbstclient split left 0.15; herbstclient focus left; rofi -show run; herbstclient remove 13 | ;; 14 | srcpkgs) 15 | herbstclient split left 0.15; herbstclient focus left; $HOME/.local/scripts/vsp2.sh; herbstclient remove 16 | ;; 17 | vm) 18 | herbstclient use_index 8 && $HOME/.local/instaVM/vmach.sh 19 | ;; 20 | theme) 21 | herbstclient split left 0.15; herbstclient focus left; $HOME/.config/herbstluftwm 22 | esac 23 | 24 | -------------------------------------------------------------------------------- /herbstScripts/panel.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Terminate already running bar instances 4 | pkill -q polybar 5 | 6 | # Wait until the processes have been shut down 7 | while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 8 | 9 | if type "xrandr"; then 10 | for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do 11 | MONITOR=$m polybar --reload -c "$HOME"/.config/polybar/polybar_6/config main 12 | done 13 | else 14 | polybar --reload -c "$HOME"/.config/polybar/polybar_4/config main 15 | fi 16 | 17 | 18 | -------------------------------------------------------------------------------- /keyBinds: -------------------------------------------------------------------------------- 1 | ## Mod key set to alt, use Mod4 to use super key 2 | Mod=Mod1 3 | 4 | ## Remove all existing keybindings 5 | hc keyunbind --all 6 | 7 | ## System Controls 8 | hc keybind $Mod-Shift-c quit 9 | hc keybind $Mod-Shift-r reload 10 | hc keybind $Mod-Shift-q close 11 | 12 | ## Programs 13 | # Terminals 14 | hc keybind $Mod-Shift-Return spawn alacritty 15 | hc keybind $Mod-Shift-k spawn kitty 16 | 17 | 18 | # Scratchpads 19 | hc keybind $Mod-Return spawn $HOME/.local/scripts/scratch scratchpad 20 | hc keybind $Mod-Control-Return spawn $HOME/.local/scripts/scratch notepad 21 | hc keybind $Mod-Control-Shift-Return spawn $HOME/.local/scripts/scratch notes 22 | hc keybind $Mod-Control-Shift-n spawn $HOME/.local/scripts/scratch news 23 | 24 | # Menu 25 | #hc keybind $Mod-Shift-d spawn dmenu_run 26 | hc keybind $Mod-d spawn $HOME/.config/launchers/launchers/type-3/launcher.sh 27 | hc keybind $Mod-Shift-d spawn $HOME/.config/herbstluftwm/herbstScripts/menu menu 28 | hc keybind $Mod-Shift-i spawn $HOME/.config/herbstluftwm/herbstScripts/menu srcpkgs 29 | hc keybind $Mod-Shift-v spawn $HOME/.config/herbstluftwm/herbstScripts/menu vm 30 | 31 | 32 | # Browsers 33 | hc keybind $Mod-Shift-a spawn firefox 34 | hc keybind $Mod-Shift-n spawn nyxt 35 | hc keybind $Mod-Shift-b spawn brave-browser-stable 36 | 37 | ## Multimedia 38 | # Backlight 39 | hc keybind XF86MonBrightnessUp spawn xbacklight -inc 10 40 | hc keybind XF86MonBrightnessDown spawn xbacklight -dec 10 41 | 42 | # Audio 43 | hc keybind XF86AudioRaiseVolume spawn pactl set-sink-volume @DEFAULT_SINK@ +5% 44 | hc keybind XF86AudioLowerVolume spawn pactl set-sink-volume @DEFAULT_SINK@ -5% 45 | hc keybind XF86AudioMute spawn pactl set-sink-mute @DEFAULT_SINK@ toggle 46 | hc keybind $Mod-XF86AudioRaiseVolume spawn pactl set-source-volume @DEFAULT_SOURCE@ +1% 47 | hc keybind $Mod-XF86AudioLowerVolume spawn pactl set-source-volume @DEFAULT_SOURCE@ -1% 48 | hc keybind $Mod-XF86AudioMute spawn pactl set-source-mute @DEFAULT_SOURCE@ toggle 49 | hc keybind XF86AudioPlay spawn playerctl play-pause 50 | hc keybind $Mod-Control-s spawn playerctl stop 51 | hc keybind $Mod-Shift-Control-left spawn playerctl previous 52 | hc keybind $Mod-Shift-Control-right spawn playerctl next 53 | 54 | # basic movement in tiling and floating mode 55 | # focusing clients 56 | hc keybind $Mod-Left focus left 57 | hc keybind $Mod-Down focus down 58 | hc keybind $Mod-Up focus up 59 | hc keybind $Mod-Right focus right 60 | 61 | # moving clients in tiling and floating mode 62 | hc keybind $Mod-Shift-Left shift left 63 | hc keybind $Mod-Shift-Down shift down 64 | hc keybind $Mod-Shift-Up shift up 65 | hc keybind $Mod-Shift-Right shift right 66 | 67 | # splitting frames 68 | # create an empty frame at the specified direction 69 | hc keybind $Mod-u split bottom 0.5 70 | hc keybind $Mod-o split right 0.5 71 | # let the current frame explode into subframes 72 | hc keybind $Mod-Control-space split explode 73 | 74 | # resizing frames and floating clients 75 | resizestep=0.02 76 | hc keybind $Mod-Control-Left resize left +$resizestep 77 | hc keybind $Mod-Control-Down resize down +$resizestep 78 | hc keybind $Mod-Control-Up resize up +$resizestep 79 | hc keybind $Mod-Control-Right resize right +$resizestep 80 | 81 | # cycle through tags 82 | hc keybind $Mod-period use_index +1 --skip-visible 83 | hc keybind $Mod-comma use_index -1 --skip-visible 84 | 85 | # layouting 86 | hc keybind $Mod-r remove 87 | hc keybind $Mod-s floating toggle 88 | hc keybind $Mod-f fullscreen toggle 89 | hc keybind $Mod-Shift-f set_attr clients.focus.floating toggle 90 | hc keybind $Mod-Shift-m set_attr clients.focus.minimized true 91 | hc keybind $Mod-Control-m jumpto last-minimized 92 | hc keybind $Mod-p pseudotile toggle 93 | # The following cycles through the available layouts within a frame, but skips 94 | # layouts, if the layout change wouldn't affect the actual window positions. 95 | # I.e. if there are two windows within a frame, the grid layout is skipped. 96 | hc keybind $Mod-space \ 97 | or , and . compare tags.focus.curframe_wcount = 2 \ 98 | . cycle_layout +1 vertical horizontal max vertical grid \ 99 | , cycle_layout +1 100 | 101 | # mouse 102 | hc mouseunbind --all 103 | hc mousebind $Mod-Button1 move 104 | hc mousebind $Mod-Button2 zoom 105 | hc mousebind $Mod-Button3 resize 106 | 107 | # focus 108 | hc keybind $Mod-Tab cycle_all +1 109 | hc keybind $Mod-Shift-Tab cycle_all -1 110 | hc keybind $Mod-c cycle 111 | hc keybind $Mod-i jumpto urgent 112 | 113 | hc unlock 114 | -------------------------------------------------------------------------------- /monitors: -------------------------------------------------------------------------------- 1 | xrandr --output eDP-1 --mode 2560x1600 --primary \ 2 | --output HDMI-1 --mode 1920x1080 --right-of eDP-1 3 | 4 | herbstclient detect_monitors 5 | 6 | -------------------------------------------------------------------------------- /theme: -------------------------------------------------------------------------------- 1 | source "$HOME"/.config/bash/env_vars 2 | 3 | file=/home/jake/.config/polybar/polybar_6/config 4 | 5 | if [[ "$theme" == "dark" ]]; then 6 | xwallpaper --zoom "$HOME"/Images/wallpapers/lowPoly/darkMtns.jpg 7 | sed -i 's/\b\(dark\|sepia\|light\)\b/dark/g' $file 8 | elif [[ "$theme" == "light" ]]; then 9 | xwallpaper --zoom "$HOME"/Images/wallpapers/City/blurryCity.jpg 10 | sed -i 's/\b\(dark\|sepia\|light\)\b/light/g' $file 11 | elif [[ "$theme" == "sepia" ]]; then 12 | xwallpaper --zoom "$HOME"/Images/wallpapers/Nature/darkHills.jpg 13 | sed -i 's/\b\(dark\|sepia\|light\)\b/sepia/g' $file 14 | fi 15 | 16 | 17 | # theme 18 | hc attr theme.tiling.reset 1 19 | hc attr theme.floating.reset 1 20 | hc set frame_border_active_color '#222222cc' 21 | hc set frame_border_normal_color '#101010cc' 22 | hc set frame_bg_normal_color '#565656aa' 23 | hc set frame_bg_active_color '#345F0Caa' 24 | hc set frame_border_width 0 25 | hc set show_frame_decorations 'focused_if_multiple' 26 | hc set frame_bg_transparent on 27 | hc set frame_transparent_width 0 28 | hc set frame_gap 5 29 | 30 | 31 | ## WINDOW TITLE BARS 32 | hc attr theme.title_height 15 33 | hc attr theme.title_when never 34 | hc attr theme.title_font 'Dejavu Sans:pixelsize=12' # example using Xft 35 | # hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*' 36 | hc attr theme.title_depth 3 # space below the title's baseline 37 | hc attr theme.active.color '#345F0Cef' 38 | hc attr theme.title_color '#ffffff' 39 | 40 | 41 | 42 | hc attr theme.normal.color '#323232dd' 43 | hc attr theme.urgent.color '#7811A1dd' 44 | hc attr theme.tab_color '#1F1F1Fdd' 45 | hc attr theme.active.tab_color '#2B4F0Add' 46 | hc attr theme.active.tab_outer_color '#6C8257dd' 47 | hc attr theme.active.tab_title_color '#ababab' 48 | hc attr theme.normal.title_color '#898989' 49 | hc attr theme.inner_width 0 50 | hc attr theme.inner_color white 51 | hc attr theme.border_width 0 52 | hc attr theme.floating.border_width 0 53 | hc attr theme.floating.outer_width 0 54 | hc attr theme.floating.outer_color black 55 | hc attr theme.active.inner_color '#789161' 56 | hc attr theme.urgent.inner_color '#9A65B0' 57 | hc attr theme.normal.inner_color '#606060' 58 | # copy inner color to outer_color 59 | for state in active urgent normal ; do 60 | hc substitute C theme.${state}.inner_color \ 61 | attr theme.${state}.outer_color C 62 | done 63 | hc attr theme.tiling.outer_width 0 64 | hc attr theme.background_color '#141414' 65 | 66 | hc set window_gap 5 67 | hc set frame_padding 0 68 | hc set smart_window_surroundings off 69 | hc set smart_frame_surroundings off 70 | hc set mouse_recenter_gap 0 71 | 72 | 73 | -------------------------------------------------------------------------------- /winRules: -------------------------------------------------------------------------------- 1 | # rules 2 | hc unrule -F 3 | 4 | hc attr settings.default_frame_layout masterstack0 5 | hc foreach T tags.by-name. sprintf ATTR '%c.tiling.root.algorithm' T set_attr ATTR masterstack 6 | 7 | hc rule title~'scratchpad' floating=on floatplacement=center floating_geometry=1380x600 8 | hc rule title~'notepad' floating=on floatplacement=center floating_geometry=1500x700 9 | hc rule title~'addvm' floating=on floatplacement=center floating_geometry=1380x600 10 | hc rule title~'notes' floating=on floatplacement=center floating_geometry=2000x700 11 | hc rule title~'news' floating=on floatplacement=center floating_geometry=1800x700 12 | 13 | hc rule focus=on # normally focus new clients 14 | hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on 15 | hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on 16 | hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off 17 | hc rule fixedsize floating=on 18 | 19 | 20 | --------------------------------------------------------------------------------