My configs and dotfiles for Hyprland
and SWAYWM. Sway is almost a drop-in replacement for i3, but you may have to make a few changes to get everything working correctly. There is an i3 Migration Guide
on Sway
wiki. Most of the tools and configurations on Sway
work properly on Hyprland
, because they both are based on wlroots
.
I prefer to keep most of my system configs in my $HOME
. But some of them are needed to be done in root
directory. So I add those into root branch. These configs are needed to add a few functions for my laptop and in most cases you don't need them.(eg: A udev rule to set charging threshold for battery.)
I use us, ir-mz (a custom Persian layout with minor modifications to Persian standard) layouts for may keyboard and there are some configs related to that. you may not need those too.
Most of them are in .local/bin
. You can use them in both Wayland
and X
. I used to switch between Sway
in tty1
and DWM
in tty2
without any problem. But nowadays I switch totally to wayland and mostly use Sway
and Hyprland
.
I moved all of my configs that should be in home directory to home branch and all root related configs to root branch. I'm using a bare git repository to manage my configs. You can read more about this method in these links:
In all of these articles it's recommended to use different branches to manage the configs which are differ depending on the system hardware, OS, ... I don't have many files among my dotfiles which depend on the system.
There is a few lines in my Sway
config which I put them in system specific files:
Also a few lines in my Hyprland
config:
I just make symlinks to the related files and source them in the base config file. e.g: In my Thinkpad
for Sway
I make the symlink with ln -s $HOME/.config/sway/thinkpad.conf $HOME/.config/sway/config.d/10-sys.conf
and it is sourced with include config.d/*
line in Sway
config and for Hyprland
the symlink is made by ln -s $HOME/.config/hypr/thinkpad.conf $HOME/.config/hypr/config.d/09-sys.conf
and sourced with source = ~/.config/hypr/config.d/09-sys.conf
in Hyprland
config.
And then there are a few modules in my yambar config which need hardware names or specifications. I use this script to generate the config file everytime I change the Yambar
configs or update my configs using git pull
.
Most of my key bindings in Sway
, DWM
and Hyprland
are similar and you can find a help at the end of my Sway config.
I've been using fuzzel
since sway
became my daily driver. lbnon fork of rofi
works in both Wayland
and X11
and if you want to use other menu (app launcher) apps I recommend you use dmenu on X11
and on sway you can have bemenu
, wofi
or even there are forks of dmenu
which run on native wayland.
Here are some example configs for sway:
set {
# Your preferred application launcher.
### dmenu ###
#$menu dmenu_path | dmenu | xargs swaymsg exec --
#$menu dmenu_path | dmenu -fn "Terminus (TTF):pixelsize=28" | xargs swaymsg exec
#$menu j4-dmenu-desktop --dmenu='bemenu -i --nb "#3f3f3f" --nf "#dcdccc" --fn "pango:DejaVu Sans Mono 12"' --term='termite'
### bemenu ###
#$menu bemenu-run -i -p "Run:" --fn "monospace 14" --hb "#89cff0" --hf "#000000" --tf "#000000" --tb "#2dc7bc" -l 10
### rofi ###
$menu rofi -modi drun,run -show
### Another alternative use wofi ###
#$menu wofi --show drun,run
}