Personal dotfiles for Arch Linux with support for both X11 (i3) and Wayland (Sway) environments.
- Dual Configuration: Supports both X11 (i3) and Wayland (Sway)
- Easy Switching: Toggle between X11 and Wayland with a single command
- Unified Setup: Single script handles both configurations
- Preserved Keybindings: Identical keybindings across both environments
- Status Bar: i3blocks (X11) / Waybar (Wayland)
- Terminal: urxvt (X11) / Foot (Wayland)
Choose your preferred environment:
# For X11 (i3) setup
./setup.sh x11
# For Wayland (Sway) setup
./setup.sh wayland./setup.sh status./setup.sh switchWindow Manager: i3-wm Status Bar: i3blocks Terminal: urxvt (daemon mode) Compositor: picom Launcher: rofi Notifications: dunst Wallpaper: nitrogen
Keybindings: All custom keybindings preserved Integration: Optional Plasma integration
sudo pacman -S i3-wm i3blocks dunst nitrogen rofi picom rxvt-unicodeWindow Manager: Sway Status Bar: Waybar Terminal: Foot Compositor: Built into Sway Launcher: rofi (with Wayland support) Notifications: mako Screenshots: grim + slurp
Keybindings: Identical to i3 setup Mode: Standalone (no DE integration)
sudo pacman -S sway waybar foot mako rofi grim slurp wl-clipboard brightnessctldotfiles/
├── i3/ # i3 window manager config
│ ├── config # Main i3 config
│ ├── i3blocks.conf # Status bar config
│ └── i3blocks-nomedia.conf
├── sway/ # Sway window manager config
│ └── config # Main Sway config
├── waybar/ # Waybar status bar
│ ├── config # Waybar config (JSON)
│ ├── style.css # Waybar styling
│ └── scripts/ # Custom scripts
├── foot/ # Foot terminal config
│ └── foot.ini
├── rofi/ # Application launcher
│ └── android_notification.rasi
├── powerline/ # Powerline themes
├── .bashrc # Main bash configuration
├── .bashrc-wayland # Wayland-specific env vars
├── .Xresources # X11 terminal colors
├── picom.conf # X11 compositor
├── dunstrc # Notification daemon (X11)
├── setup.sh # Unified setup script ⭐
├── setup_init.sh # Legacy X11 setup (deprecated)
├── setup_wayland.sh # Legacy Wayland setup (deprecated)
├── README.md # This file
└── WAYLAND-MIGRATION.md # Detailed migration guide
$ ./setup.sh status
Current Configuration Status
==========================================
Active Configuration: X11 (i3)
Linked Configurations:
i3: ✓ Linked
sway: ✗ Not linked
waybar: ✗ Not linked
foot: ✗ Not linked
Shell Environment:
.bashrc: No Wayland detection
.bashrc link: ✓ Linked to dotfiles$ ./setup.sh switch
Switching Configuration
==========================================
Switching from X11 (i3) to Wayland (Sway)...
Setting Up Wayland (Sway) Configuration
==========================================
✓ Packages already installed
✓ Sway configuration linked
✓ Waybar configuration linked
✓ Foot terminal configuration linked
✓ Wayland detection added to .bashrc
Configuration switched to: Wayland (Sway)$ ./setup.sh switch
Switching Configuration
==========================================
Switching from Wayland (Sway) to X11 (i3)...
[Setup process continues...]All keybindings are identical between i3 and Sway:
Modifier: Mod4+Mod1+Shift+Ctrl (Super+Alt+Shift+Ctrl)
Meh: Mod1+Shift+Ctrl (Alt+Shift+Ctrl)
| Action | Keybinding |
|---|---|
| Terminal | $mod+space or $mod+t |
| Launcher | $mod+o |
| Kill window | $meh+q |
| Workspaces | $mod+[1-0] |
| Move to workspace | $meh+[1-0] |
| File manager | $mod+e |
| Screenshot | Print |
| Volume up/down | XF86AudioRaiseVolume/LowerVolume |
| Brightness up/down | XF86MonBrightnessUp/Down |
Persistent workspaces with icons:
- Chromium
- Chromium
- Code
- Code
- Bash
- General
- General
- Teams
- General
Automatically set when running under Wayland:
XDG_SESSION_TYPE=waylandXDG_CURRENT_DESKTOP=swayQT_QPA_PLATFORM=waylandMOZ_ENABLE_WAYLAND=1ELECTRON_OZONE_PLATFORM_HINT=wayland
| Function | X11 | Wayland |
|---|---|---|
| Window Manager | i3 | Sway |
| Terminal | urxvt | Foot |
| Status Bar | i3blocks | Waybar |
| Clipboard | xclip | wl-copy/wl-paste |
| Screenshots | flameshot | grim + slurp |
| Brightness | xbacklight | brightnessctl |
| Wallpaper | nitrogen | swaybg |
| Compositor | picom | (built-in) |
For detailed migration instructions, see WAYLAND-MIGRATION.md.
Key steps:
- Run
./setup.sh wayland - Check output names:
swaymsg -t get_outputs - Edit
~/.config/sway/configto update outputs - Test from TTY or select "Sway" from display manager
Your original configurations are always preserved:
- Backups are created with timestamp suffixes (
.backup.YYYYMMDD-HHMMSS) - Symlinks are used, so your dotfiles repo is never modified
- You can always switch back:
./setup.sh switch - Original branch structure is preserved in git
# Check what's linked
./setup.sh status
# Re-run setup
./setup.sh x11 # or waylandCheck environment variables:
echo $XDG_SESSION_TYPE # Should be "wayland"
echo $WAYLAND_DISPLAY # Should be setRe-source shell configuration:
source ~/.bashrcCheck output names:
swaymsg -t get_outputsUpdate in ~/.config/sway/config (search for "TODO").
This is a personal dotfiles repository, but feel free to:
- Report issues
- Suggest improvements
- Fork and adapt for your own use
See LICENSE file.
master: Stable X11 (i3) configurationconfig-wayland: Wayland (Sway) configuration- Both are kept in sync and can be easily switched