Backup for my configuration of i3WM (X11) and SwayWM (Wayland),
and configurations of applications for the working environment in X11/Wayland.
For now, some functions do not work in Wayland, still searching for solutions or alternatives in Wayland.
For more SwayWM details and i3WM migration progress, please check ./config/sway/README.md
Click to expand/shrink
- I3_Sway_Config
- Context
Created by gh-md-toc
Click to expand/shrink
Click to expand/shrink
Note: the term "window" used in this configuration actually refers to "container" in the i3 window manager
- Dynamic Dwindling Layout: auto-split window in long-side. (Check Section 2)
- Dynamic Master-Stack Layout: auto-split window in master-stack layout. (Check Section 2)
- Window Auto-mark: auto-mark window for moving/swapping. (Check Section 2)
- Pywal Integration: change color theme based on wallpaper. (Check Section 2)
- Keyboard-driven Working Environment: (Check Section 2)
- Customized Rofi: easy-to-use selector/launcher. (Check Section 2)
- Customized Conky: system monitor and keybinding hinter. (Check Section 2)
- Configuration Installer Script: script to apply this configuration. (Check Section 3)
- Various Mode Usage: organize related functions into modes to keep keybindings simple. (Check Section 4)
- Mouse/Trackpad Usage: empower mouse/trackpad to do more things. (Check Section 5)
- Fully Documented Keybinding and i3-userguide-like Cheat sheet: (Check Section 6)
- Configuration Documentation: Document my configuration setup details in ./config directory
- Workflow Demo: theme changing, mode usage, keyboard-driven workflow (Check My Workflow Demo)
Click to expand/shrink
Click to expand/shrink
- Display Manager: GNOME display manager (GDM)
- i3 Window Manager: i3
4.22 - Status Bar: i3 bar
4.20.1+ bumblebee-status2.0.5 - Terminal: kitty
0.26.5 - Shell: fish
3.5.1+ oh-my-fish7+ starship1.2.1 - Terminal Multiplexer: tmux
3.3a+ my configuration - Text Editor: neovim
0.8.2+ my configuration - Application Launcher: rofi
1.7.5 - Theme Configurer: pywal
3.3.1 - GTK Theme Changer: lxappearance
- Qt/KDE Theme Change: Kvantum
- X Compositor: picom
vgit-a8445 - Notification Daemon: dunst
1.9.0 - GUI File Manager: Nautilus
- TUI File Manager: ranger
1.9.3 - Web Browser: Brave browser + vimium
- PDF viewer: zathura + zathura-pywal
Click to expand/shrink
- xrandr: multi-monitor window arrangement
- pywal: color theme autotune by wal
- feh: image viewer, wallpaper changer
- conky: system monitor for X window
- polkit-gnome: GUI software authentication support
- NetworkManger: network manager
- blueman: bluetooth manager
- imwheel: mouse speed manager
- ibus-chewing: input method for chewing
- xss-lock: X session lock
- parcellite: clipboard applet
- flashfocus: flash when changing focus
- dunst: notification daemon
- kdeconnectd: mobile phone connector
- bumblebee-status: i3 status bar information support
- rjekker/i3-battery-popup: battery warning for laptop
- lincheney/i3_automark.py: auto-mark i3 window (with preset mark)
- i3_automark_daemon.py: my modification of
i3_automark.py
- i3_automark_daemon.py: my modification of
- nwg-piotr/autotiling.py: auto-tile i3 window (dwindling, master-stack layout)
- jonaburg/picom: X compositor for blur, transparency, animation support
- Airblader/unclutter-xfixes: auto-hide mouse cursor
Click to expand/shrink
- Fedora 33/34 Built-in Logo: Logos
- Default Wallpapers: Arc Dark Fedora Wallpaper
- Default Lock Screen Wallpaper: Thinkpad Trackpoint Wallpaper
- [Optional] More Wallpapers from dt: Wallpapers
Click to expand/shrink
- Theme: Arc-Dark-solid
- Icon: Papirus dark
- GUI Font: SAN regular
- TUI Font: DroidSansMono Nerd Font Bold
Click to expand/shrink
Click to expand/shrink
- Run the installer in this git repository
./install.sh - Includes
- 1. Add Environment Variables
- Add
I3_SCRIPTto$PATHto dotfile - Add
I3_SCRIPTto dotfile - Add
WALLPAPERI3to dotfile - Note: dotfile here corresponds to
$SHELL, (e.g.bash/zsh->.bashrc/.zshrc, others ->.profile)
- Add
- 2. Backup Old Configuration and Link/Copy New Configuration
- Backup old configuration file
$HOME/.config/*to$HOME/.config_backupdirectory - Link/Copy configuration in git repository
./config/*to$HOME/.configdirectory
- Backup old configuration file
- 3. Install Programs for Work Environment
- You can install them all or go through every packed installation one by one
- 1. Add Environment Variables
Click to expand/shrink
- Optional configuration that you can try
- Includes
-
1. Terminal Emulator Pywal Color Support
-
NO NEED for kitty terminal emulator if using my configuration
./config/kitty/kitty.conf -
Add the following lines to shell (e.g. bash/zsh/fish) dotfile (e.g.
~/.bashrc/~/.zshrc/~/.config/fish/config) for pywal color support[ -f {$HOME}/.cache/wal/sequences ] && /usr/bin/cat {$HOME}/.cache/wal/sequences
-
-
2. Preset Workspace Name Renaming
-
My preset workspace naming style is a combination of a capital letter (A
D) and a one-digit number (19+0), which has 40 workspaces in total -
Workspace name is preset in my configuration
./config/i3/config.d/i3_workspace_name.config, you can modify it using the following syntax (the prefix number will be stripped in i3 bar workspace)-
From
set $ws1 "1:A1" # Change 1:A1 to 1:NEW_NAME_1 set $ws2 "2:A2" # Change 2:A2 to 2:NEW_NAME_2 ... -
To
set $ws1 "1:NEW_NAME_1" # Now workspace 1 is renamed to 1:NEW_NAME_1 set $ws2 "2:NEW_NAME_2" # Now workspace 2 is renamed to 2:NEW_NAME_2 ...
-
-
After finishing renaming process, run
./config/i3/script/i3_genereate_workspace_name_list.sh- This is to generate a workspace name list for rofi selector for further workspace manipulation
-
-
Click to expand/shrink
- i3 has a built-in mode function that overwrites current keybinding with preset mode keybinding
- Like different key mappings in vim insert/normal/visual mode
- When i3 mode is on, mode keybinding instruction shows on the i3 status bar
- Here I use an additional i3 bar to provide more space for text
- Shared keybindings of mode in my configuration
- Press
[Esc]or[Ctrl]+[[](vim-style escape) to exit mode - Press
[Enter]to go to the last level of mode and exit mode if it is already the last one
- Press
- This part configuration can be found in
./config/i3/config.d/i3_mode.config./config/i3/config.d/i3_custom.config./config/i3/config.d/i3_bar.config./config/i3/config.d/i3_gap.config
Click to expand/shrink
- Insert Mode (
[Ctrl]+[Alt]+[i]or[Winkey]+[Ctrl]+[i])- Disable i3 keybindings. Press
[Ctrl]+[[]to get i3 keybindings back
- Disable i3 keybindings. Press
- Vim Keybinding Mode (
[Winkey]+[Ctrl]+[[])- Enable Vim keybindings for navigation, e.g. h/j/k/l. Press
[Ctrl]+[[]to exit mode
- Enable Vim keybindings for navigation, e.g. h/j/k/l. Press
- Mouse Mode (
[Ctrl]+[Alt]+[m])- Mouse emulator using the keyboard, e.g. move, left/right click, cursor auto-hide
- Cursor Mode (
[p])- Cursor auto-hiding (unclutter), focus_follows_cursor, cursor_follows_focus
- Warpd Normal Mode (
[Alt]+[m])- Additional keyboard layer to emulate mouse action
- Cursor Mode (
- Mouse emulator using the keyboard, e.g. move, left/right click, cursor auto-hide
Click to expand/shrink
- System Option Mode (
[Ctrl]+[Alt]+[s])- System command, e.g. exit, power off, reboot, lock, hibernate
- Network Mode (
[d])- Turn on/off RF device, network connection
- Bluetooth Mode (
[b])- Turn on/off RF device, connect/disconnect Bluetooth device, Bluetooth discoverability
- Terminal Mode (
[t])- Gnome-terminal, kitty, alacrity and other terminals
- Network Mode (
- System command, e.g. exit, power off, reboot, lock, hibernate
- Toolkit Mode (
[Ctrl]+[Alt]+[t])- Tool script, e.g. pick up color, take screenshot and do OCR
- Caffeine Mode (
[c])- Enable/Disable caffeine (disable/enable X screen saver)
- Keyboard Mode (
[k])- Map keys for non-HHKB, HHKB, TEX Shinobi keyboards, tune repeat key speed
- KDE Connect Mode (
[Shift]+[k])- KDE Connect pointer daemon
- Flameshot Mode (
[f])- Flameshot screenshot tool
- Recording Mode (
[r])- Screen recording tool e.g. peek, screenkey etc.
- Caffeine Mode (
- Tool script, e.g. pick up color, take screenshot and do OCR
- Display Mode (
[Winkey]+[Shift]+[x])- Modify display configuration, e.g. position, mode, primary, rotation etc.
- Preset Mode (
[p])- Preset monitor configuration e.g. joint monitor, mirror monitor
- Preset Mode (
- Modify display configuration, e.g. position, mode, primary, rotation etc.
- Backlight Mode (
[Ctrl]+[Alt]+[x])- Modify monitor backlight level, blue light filter
- Redshift Mode (
[z])- Screen color temperature tuner, blue light filter
- Redshift Mode (
- Modify monitor backlight level, blue light filter
- Dunst Mode (
[Ctrl]+[Alt]+[n])- Dunst actions, including pausing or resuming Dunst
- Open URL Mode (
[Ctrl]+[Alt]+[o])- Open URL in web browser
Click to expand/shrink
- Player Mode (
[Ctrl]+[Alt]+[p])- Player control (e.g. previous, pause-play, next, fast-forward, rewind, stop) for spt (spotify TUI front-end), MPV, VLC, and all MPRIS players
- Audio Output Mode (
[o])- Speaker volume control with pulsemixer (e.g. volume up/down, mute)
- Audio Input Mode (
[i])- Microphone usage (e.g. recording)
- Spotifyd Mode (
[s])- Spotifyd control (e.g. enable, disable, reload) for spotifyd
- MPV Mode (
[Shift]+[m])- MPV function (e.g. playlist)
- Audio Output Mode (
- Player control (e.g. previous, pause-play, next, fast-forward, rewind, stop) for spt (spotify TUI front-end), MPV, VLC, and all MPRIS players
Click to expand/shrink
- Resize Mode (
[Ctrl]+[Alt]+[r])- Resize focused window
- Title Bar Mode (
[Winkey]+[Shift]+[t])- Modify i3 title bar, e.g. hide/show title bar, font size
- Mark Mode (
[Winkey]+[Shift]+[m])- Mark/Unmark window, go/swap to/with marked window
- Automark Mode (
[a])- Enable/Disable automark daemon
- Automark Mode (
- Mark/Unmark window, go/swap to/with marked window
- Window Layout Mode (
[Winkey]+[Shift]+[w])- Change i3 window layout, e.g. tiling, tabbed, stacking mode, auto-tiling function
- Auto-tiling Mode (
[a])- Set dynamic layout in i3, e.g. dwindling layout, master-stack layout
- Auto-tiling Mode (
- Change i3 window layout, e.g. tiling, tabbed, stacking mode, auto-tiling function
- Workspace Mode (
[Winkey]+[Shift]+[p])- Manipulate i3 workspace, e.g. kill, goto, moveto, swap, save, restore
- Save Workspace Mode (
[s])- Save workspace layout
- Restore Workspace Mode (
[r])- Restore workspace layout
- Save Workspace Mode (
- Manipulate i3 workspace, e.g. kill, goto, moveto, swap, save, restore
Click to expand/shrink
- Gap Mode (
[Ctrl]+[Alt]+[g])- Modify i3 gaps, e.g. inner gaps, outer gaps
- Bar Mode (
[Winkey]+[Shift]+[b])- Show/hide i3 bar, reload i3 bar, set default bar options (e.g. mode, position, font size)
- Customization Mode (
[Winkey]+[Shift]+[c])- Customize i3 wm, e.g. wallpaper, theme, X compositor
- Border Mode (
[b])- Window border width, color scheme, and edge border option
- Conky Mode (
[c])- System monitor, i3 keybinding sheet, color palette, position
- Dunst Mode (
[d])- Dunst position, offset, alignment, font size, icon position
- Picom Mode (
[p])- Blur, transparency support
- Flashfocus Mode (
[f])- Flash window with additional filter provided by picom (overlay picom settings)
- Theme Mode (
[t])- Auto-theme with pywal or theme template
- Wallpaper Mode (
[w])- Select wallpaper, set default wallpaper
- Variety Mode (
[v])- Variety wallpaper selector, set default wallpaper
- Font Mode (
[Shift]+[f])- Set font and font size for i3, kitty, dunst etc
- Reload Mode (
[r])- Reload configuration (e.g. conky) after auto-theming
- Border Mode (
- Customize i3 wm, e.g. wallpaper, theme, X compositor
Click to expand/shrink
- Although the keyboard-driven workflow is favored in i3, there is no harm in keeping mouse function
- This part of the configuration can be found in
./config/i3/config.d/i3_bindkey.config./config/i3/config.d/i3_mode.config
Click to expand/shrink
- 2-finger Gesture
| Gesture | Action | Note |
|---|---|---|
| Tap | Right key click | |
| Swipe Up | Scroll down | Here assuming natural scrolling is enabled |
| Swipe Down | Scroll up | Here assuming natural scrolling is enabled |
| Swipe Up On Border | Hide title bar | Here assuming natural scrolling is enabled |
| Swipe Down On Title Bar | Show title bar | Here assuming natural scrolling is enabled |
| Pinch In | Zoom in | [Ctrl] + [=] |
| Pinch Out | Zoom out | [Ctrl] + [-] |
- 3-finger Gesture
| Gesture | Action | Note |
|---|---|---|
| Tap | Middle key click | |
| Hold On | Toggle sticky window (floating window stays on screen) | [Winkey] + [Shift] + [s] |
| Swipe Up | Toggle window full-screen mode | [Winkey] + [f] |
| Swipe Down | Toggle floating mode | [Winkey] + [Shift] + [Space] |
| Swipe Left | Focus and cursor go to previous marked window | [Winkey] + [i], requires i3-automark with my modification |
| Swipe Right | Focus and cursor go to next marked window | [Winkey] + [n], requires i3-automark with my modification |
| Swipe Left-Up/Down | Switch to previous tab | [Ctrl] + [Shift] + [Tab] |
| Swipe Right-Up/Down | Switch to next tab | [Ctrl] + [Tab] |
- 4-finger Gesture
| Gesture | Action | Note |
|---|---|---|
| Hold On | Toggle i3 bar visibility | Requires libinput >= 1.19 |
| Swipe Up | Bring scratchpad (background workspace) window to foreground | [Winkey] + [=] |
| Swipe Down | Send window to scratchpad (background workspace) | [Winkey] + [-] |
| Swipe Left | Go to previous workspace (create one if it is not existing) | [Winkey] + [Shift] + [Grave] |
| Swipe Right | Go to next workspace (create one if it is not existing) | [Winkey] + [Grave] |
| Swipe Left-Up/Down | Go to previous workspace (existing ones only) | [Winkey] + [Shift] + [Tab] |
| Swipe Right-Up/Down | Go to next workspace (existing ones only) | [Winkey] + [Tab] |
Click to expand/shrink
- Left Button (
Button1)
Left Button (Button1) + |
Action | Note |
|---|---|---|
| Drag Title Bar | Move window |
- Middle Button (
Button2)
Middle Button (Button2) + |
Action | Note |
|---|---|---|
| Click Title Bar | Kill current window | |
[Winkey] + Click Window |
Kill current window |
- Right Button (
[Button3])
Right Button (Button3) + |
Action | Note |
|---|---|---|
| Drag Window Border | Resize window | |
| Click Title Bar | Toggle floating mode | this overwrites i3 default button3 keybinding |
[Winkey] + Click Window |
Toggle floating mode |
- Scroll Wheel Up/Down (
[Button4]/[Button5])
| Mouse Wheel | Action | Note |
|---|---|---|
| Scroll Up On Border | Show title bar | |
| Scroll Down On Title Bar | Hide title bar |
- Thumb Button Up/Down (
[Button8]/[Button9])
| Thumb Button | Action | Note |
|---|---|---|
[Ctrl]+ Thumb Button Up |
Enable cursor auto-hiding | unclutter |
[Ctrl]+ Thumb Button Down |
Disable cursor auto-hiding | unclutter |
Click to expand/shrink
- Cheat sheet format, and color theme here are the same as the i3 user guide
- It is HIGHLY RECOMMENDED to map
caplockstoctrlfor your little finger (default in this configuration)-
caplockscan be mapped toctrlwith the following command in the shellsetxkbmap -option "ctrl:nocaps" -
The remapping command will be automatically activated as you enter i3
- Check
./config/i3/config.d/i3_startup.config
- Check
-
- All following keybindings can be configured in
./config/i3/config.d/i3_bindkey.config./config/i3/config.d/i3_workspace.config./config/i3/config.d/i3_custom.config./config/i3/config.d/i3_gap.config./config/i3/config.d/i3_mode.config./config/i3/config.d/i3_bar.config
Click to expand/shrink
- Application shortcut (
[Ctrl]+[Alt]+[1~9,0,-,=])1: Neovim (text editor)2: Ranger (file manager)3: Pulsemixer (audio manager)4: Htop (system monitor)5: Nmtui (network manager)6: Cava (audio visualizer)7: Nvtop (nvidia gpu monitor)8: Zathura (document viewer)9: Blueman (bluetooth manager)0: Nautilus (GUI file manager)-: Brave browser (web browser)=: Firefox (web browser)
- Application in floating mode shortcut (
[Ctrl]+[Alt]+[Shift]+[1~7])- Note that you will need a kitty terminal for floating windows
Keybindings that are not list in Prefix: Winkey, Prefix: Winkey + Shift, or Prefix: Ctrl + Alt
Click to expand/shrink
- Go to Workspace (Absolutely)
[Winkey]+[Number(#)]: Go to workspace number # (A#) in monitor 1 (eDP1)[Winkey]+[Function(F#)]: Go to workspace number 10+# (B#) in monitor 2 (HDMI1)[Ctrl]+[Function(F#)]: Go to workspace number 20+# (C#) in monitor 3 (VIRTUAL1)[Alt]+[Function(F#)]: Go to workspace number 30+# (D#) in monitor 4 (VIRTUAL2)[Winkey]+[Esc]: Go to selected workspace (interactively)
- Go to Workspace (Relatively)
[Winkey]+ ([Shift]) +[Tab]: Go to (prev)/next existing workspace[Winkey]+ ([Shift]) +[Grave]: Go to (prev)/next workspace (create one if it does not exist)[Winkey]+[Alt]+ ([Shift]) +[Tab]: Go to (prev)/next free workspace (create one if it does not exist)[Winkey]+[Ctrl]+[Tab]: Go to the last visited workspace back and forth[Ctrl]+[Alt]+[Left/Right]: Gnome-like workspace operation. Move to (prev)/next existing workspace (create one if it does not exist)
- Swap Workspace (Relatively)
[Winkey]+ ([Shift]) +[Ctrl]+[Grave]: Swap current workspace with (prev)/next workspace (create one if it does not exist)[Winkey]+[Ctrl]+[Esc]: Swap workspace with selected workspace (interactively)
- Kill Windows
[Winkey]+[Shift]+[Esc]: Kill all windows on current workspace
- List Windows
[Alt]+ ([Shift]) +[Tab]: List all windows on all workspaces i.e. windows-like keybinding[Alt]+ ([Shift]) +[q]: List all windows on all workspaces with thumbnails i.e. my customized GNOME-like keybinding
- Send Window to Workspace (Absolutely)
[Winkey]+[Shift]+[Number(#)]: Send window to workspace number # (A#) in monitor 1 (eDP1), Note: max # is 10[Winkey]+[Shift]+[Function(F#)]: Send window to workspace number 10+# (B#) in monitor 2 (HDMI1), Note: max # is 10[Ctrl]+[Shift]+[Function(F#)]: Send window to workspace number 20+# (C#) in monitor 3 (VIRTUAL1), Note: max # is 10[Alt]+[Shift]+[Function(F#)]: Send window to workspace number 30+# (D#) in monitor 4 (VIRTUAL2), Note: max # is 10[Alt]+ ([Shift]) +[Esc]: Send window (but not focus) to the selected workspace (interactively)
- Send Window to Workspace (Relatively)
[Alt]+ ([Shift]) +[Grave]: Send window to (prev)/next existing workspace[Winkey]+[Alt]+ ([Shift]) +[Grave]: Send window to (prev)/next free workspace[Ctrl]+[Alt]+[Shift]+[Left/Right]: Gnome-like workspace operation. Send window to prev/next workspace (create one if it does not exist)
- Manipulate Scratchpad
[Ctrl]+[Alt]+[z]: List all windows in scratchpad or send current focused window to scratchpad if there are no windows in scratchpad[Winkey]+[-/z]: Send focused window to scratchpad (background workspace)[Winkey]+[Shift]+[-/z]: Send all floating windows to scratchpad (background workspace)[Winkey]+[=/g]: Bring the window in scratchpad to the foreground one by one[Winkey]+[Shift]+[=/g]: Bring all windows in scratchpad to foreground
- Change Gap Size
[Ctrl]+[Alt]+[Shift]+[h/l]: Decrease/Increase horizontal outer gap size[Ctrl]+[Alt]+[Shift]+[j/k]: Decrease/Increase vertical outer gap size[Ctrl]+[Alt]+[Shift]+[-/=]: Decrease/Increase inner gap size[Ctrl]+[Alt]+[Shift]+[u]: Disable all inner and outer gaps[Ctrl]+[Alt]+[Shift]+[i]: Restore to default inner gap size[Ctrl]+[Alt]+[Shift]+[o]: Restore to default outer gap size
- Screenshot
[PrtSc]: Flameshot (screenshot tool)[Winkey]+[PrtSc]: Gnome-screenshot for the current window[Winkey]+[Shift]+[PrtSc]: Gnome-screenshot interactive mode
Click to expand/shrink
- https://i3wm.org/docs/userguide.html
- https://www.reddit.com/r/unixporn/
- https://www.reddit.com/r/i3wm/
- https://www.reddit.com/r/Fedora/
- https://wiki.archlinux.org/title/I3
- https://github.com/Airblader/i3 (i3-gap has been merged to i3 since ver 4.22)
- https://github.com/levinit/i3wm-config (written in Chinese)
- https://www.itread01.com/p/142448.html (written in Chinese)
- https://segmentfault.com/a/1190000022083424 (written in Chinese)
- https://github.com/alberto-santini/i3-configuration-x1
- https://pypi.org/project/i3-resurrect/
- https://pypi.org/project/i3-workspace-swap/
- https://github.com/rjekker/i3-battery-popup
- https://github.com/lincheney/i3-automark
- https://www.youtube.com/watch?v=j1I63wGcvU4&list=PL5ze0DjYv5DbCv9vNEzFmP6sU7ZmkGzcf
- https://regolith-linux.org/
- https://arcolinux.com/
- https://github.com/endeavouros-team/endeavouros-i3wm-setup
- https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-i3-settings/-/tree/master/
- https://www.hugchange.life/posts/i3wm.html




