Hyprland is a wlroots-based tiling Wayland compositor written in C++. Noteworthy features of Hyprland include dynamic tiling, tabbed windows, a clean and readable C++ code-base, and a custom renderer that provides window animations, rounded corners, and Dual-Kawase Blur on transparent windows. General usage and configuration is thoroughly documented at Hyprland wiki1.

Starting Hyprland

Hyprland can be started via a display manager (GDM, Lightdm etc), or via the command line (in archlinux it’s /usr/bin/Hyprland, notice the capital H).

Configuration

The default configuration file is ~/.config/hypr/hyprland.conf, though it support splitting the configuration into multiple files and including them in the main file (hyprland.conf). If you’re familiar with i3wm, this configuration is similar to that. Either way, the wiki provides enough information to start configuring.

Default configuration file

# This is an example Hyprland config file.
#
# Refer to the wiki for more information.

#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto


# See https://wiki.hyprland.org/Configuring/Keywords/ for more

# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox

# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

# Set programs that you use
$terminal = kitty
$fileManager = dolphin
$menu = wofi --show drun

# Some default env vars.
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = false
    }

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 5
    gaps_out = 20
    border_size = 2
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = dwindle

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 10

    blur {
        enabled = true
        size = 3
        passes = 1

        vibrancy = 0.1696
    }

    drop_shadow = true
    shadow_range = 4
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)
}

animations {
    enabled = true

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = true # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_is_master = true
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = false
}

misc {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device:epic-mouse-v1 {
    sensitivity = -0.5
}

# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.


# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
Code Snippet 1: default configuration file

If you’re planning to start from the default configuration file, here are the packages neccessary:

kitty
a terminal emulator.
dolphin
File manager used in KDE.
wofi
Launcher/menu program for wlroots based wayland compositors such as sway.

Other packages needed: a text editor and web browser.

Split configuration file

source = ./hypr.d/monitors.conf
source = ./hypr.d/autostart.conf
source = ./hypr.d/variables.conf
source = ./hypr.d/input.conf
source = ./hypr.d/general.conf
source = ./hypr.d/decoration.conf
source = ./hypr.d/animations.conf
source = ./hypr.d/dwindle.conf
source = ./hypr.d/master.conf
source = ./hypr.d/gestures.conf
source = ./hypr.d/binds.conf
source = ./hypr.d/misc.conf
source = ./hypr.d/devices.conf
source = ./hypr.d/windowrule.conf
source = ./hypr.d/workspaces.conf
source = ./hypr.d/keybindings.conf
Code Snippet 2: my split configuration for Hyprland (~/.config/hypr/hyprland.conf)

monitors

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,highrr,auto,1
monitor=eDP-1,1920x1080@60,auto,1
monitor=DP-1,preferred,auto,1
monitor=DP-2,preferred,auto,1
monitor=DP-3,preferred,auto,1
monitor=DP-4,preferred,auto,1
monitor=DP-5,preferred,auto,1

# laptop
monitor = HDMI-A-1, highres, auto, 1
Code Snippet 3: monitor configuration

This is my monitors from all the machines that uses Hyprland.

Autostarting applications

exec-once can also be use to auto start applications that should be run at the start of the sessions.

# Execute your favorite apps at launch
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME
exec-once=dbus-update-activation-environment --systemd --all &
exec-once=blueman-applet &
exec-once=nm-applet --indicator &
exec-once=/usr/lib/polkit-kde-authentication-agent-1 &
exec-once=gnome-keyring-daemon --components=pkcs11,secrets,ssh -r -d &
exec-once=dbus-launch --sh-syntax --exit-with-session udiskie -t &
exec-once=dbus-launch --sh-syntax --exit-with-session dunst -conf ~/.config/dunst/dunstrc &
exec-once=/usr/lib/kdeconnectd &
exec-once=kdeconnect-indicator &
exec-once=waybar &
exec-once=hyprpaper &
exec-once = wl-paste --type text --watch cliphist store &
exec-once = wl-paste --type image --watch cliphist store &
exec-once=hyprctl setcursor Bibata-Modern-Classic 24
exec-once=hyprshade auto &
exec-once=thunar --daemon &
exec-once = hypridle

# gtk settings
exec-once = gsettings set org.gnome.desktop.interface font-name "JetBrainsMonoNL Nerd Font Mono 10"
exec-once = gsettings set org.gnome.desktop.interface cursor-theme Bibata-Modern-Classic
exec-once = gsettings set org.gnome.desktop.interface cursor-size 24
exec-once = gsettings set org.gnome.desktop.interface gtk-theme Breeze
exec-once = gsettings set org.gnome.desktop.interface gtk-key-theme Emacs
exec-once = gsettings set org.gnome.desktop.interface icon-theme Papirus
exec-once = gsettings set org.gnome.desktop.sound theme-name freedesktop
exec-once = gsettings set org.gnome.desktop.sound input-feedback-sounds true
exec-once = gsettings set org.gnome.desktop.sound allow-volume-above-100-percent true
Code Snippet 4: autostarting apps in Hyprland

Not so sure if the & is needed, it is for script (shells, or xprofile, etc.).

Environment variables

Unlike other window manager where usually environment variables are set from the shell, in Hyprland we can set the variables from within the configuration files2. Common variables:

# Set programs that you use
$terminal = alacritty
$fileManager = thunar
$menu = rofi -show drun -theme apps
$editor = emacsclient -c -a emacs
$mail = thunderbird
$browser = firefox

# Some default env vars.
env = QT_QPA_PLATFORM,xcb
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = GTK_THEME,Breeze-Dark
env = GTK2_RC_FILES,/usr/share/themes/Breeze-Dark/gtk-2.0
env = XCURSOR_THEME,Bibata-Modern-Classic
env = XCURSOR_SIZE,24

# wallpapers
$w1 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/ign_duaAnime.png"
$w2 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/ign_chainsaw-man.png"
$w3 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/ign_animeGirlSleeping.png"
$w4 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/ign_girlWithHeadphones.png"
$w5 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/manga/Sora-no-Otoshimono/kazane_hiyori_angel_by_sakurakiel_d4cnyy6.png"
$w6 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/nord_scenary.png"
$w7 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/wild.png"
$w8 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/waves.jpg"
$w9 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/subtle_ferns.jpg"
$w10 = hyprctl hyprpaper wallpaper ",~/.local/share/wallpapers/nord/street_blues.png"
Code Snippet 5: example of setting environment variable in Hyprland (~/.config/hypr/hypr.d/variables.conf)

but try to start Hyprland without any variables set and see which is missing. Some variables such as GTK_THEME, XCURSOR_THEME, and XCURSOR_SIZE can be set via other methods (gsettings, GTK configuration file, etc).

Packages used:

hyprpaper
wallpaper utility for hyprland.
Breeze theme
Breeze and breeze-icons.
bibata-cursor-theme
Material Based Cursor Theme.
Alacritty
GPU-accelerated terminal emulator written in Rust.
rofi
use this version of rofi for wayland.
Thunar
modern file manager for the Xfce Desktop Environment.
Emacs
obviously.
Thunderbird
open source email, news, and chat client previously developed by the Mozilla Foundation.
Firefox
popular open source graphical web browser from Mozilla.
My wallpaper collection
mostly from deviantart.

In case you’re not using any display managers, it’s important to also import the environment variables into systemd (assuming your distribution uses systemd, which is the norm nowadays). Add this into the configuration file:

exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME
Code Snippet 6: systemd: environment import

exec-once, just like the name, will only execute the command once, only when Hyprland is started. And while we’re at it, also update environment used for D-bus session service:

exec-once = dbus-update-activation-environment --systemd --all
Code Snippet 7: activating dbus environment

In case you’re wondering what kind of variables are used, run dbus-update-activation-environment --systemd --all --verbose from the terminal to see the output.

Input settings

input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    repeat_rate = 25
    repeat_delay = 600

    follow_mouse = 1

    touchpad {
        natural_scroll = true
        disable_while_typing = true
        tap-to-click = true
    }

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
Code Snippet 8: input settings

The touchpad section is useful, but this only sets for hyprland, if you use any display managers, it needs to be configured inside the display manager configuration.

    workspace_swipe = true
    workspace_swipe_fingers = 3
}
Code Snippet 9: gestures

general section

#+caption: general section
general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 5
    gaps_out = 5
    border_size = 2
    #col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.active_border = rgba(88c0d0ff) rgba(b48eadff) rgba(ebcb8bff) rgba(a3be8cff) 45deg
    #col.inactive_border = rgba(595959aa)
    col.inactive_border=0xff434c5e
    col.nogroup_border=0xff89dceb
    col.nogroup_border_active=0xfff9e2af

    layout = master

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false
}

Aside from the colors, I just copy everything from the default configuration file.

group section

group {
    insert_after_current = true
    focus_removed_window = true
    col.border_active = 0x66ffff00
    col.border_inactive = 0x66777700
    col.border_locked_active = 0x66ff5500
    col.border_locked_inactive = 0x66775500
    groupbar {
        enabled = true
        font_family = "JetBrainsMonoNL Nerd Font Mono 10"
        font_size = 10
        gradients = true
        height = 14
        priority = 3
        render_titles = true
        scrolling = true
        text_color = 0xffeceff4
        col.active = 0x554c566a
        col.inactive = 0x55434c5e
        col.locked_active = 0x66ff5500
        col.locked_inactive = 0x66775500
    }
}
Code Snippet 10: group

decoration

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 10

    blur {
        enabled = true
        size = 3
        passes = 1
    }

    drop_shadow = yes
    shadow_range = 4
    shadow_render_power = 3
    #col.shadow = rgba(1a1a1aee)
    col.shadow=0xee1a1a1a
    col.shadow_inactive=0xee1a1a1a
}
Code Snippet 11: decoration section

I suppose the decoration section is also from the default.

animation section

animations {
    enabled = true

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}
Code Snippet 12: animation

Dwindle layout

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
    smart_split = yes
}
Code Snippet 13: dwindle layout

Dwindle layout is also using the default.

Master layout

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_is_master = true
}
Code Snippet 14: master layout

The same for the master layout

gestures section

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = true
    workspace_swipe_fingers = 3
}
Code Snippet 15: gestures

binds section

binds {
    workspace_back_and_forth = false
    allow_workspace_cycles = true
}
Code Snippet 16: binds

misc section

misc {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
    disable_hyprland_logo = false
    disable_splash_rendering = false
    mouse_move_enables_dpms = true
    key_press_enables_dpms = true
    animate_manual_resizes = true
    mouse_move_focuses_monitor = true
}
Code Snippet 17: misc section

I set force_default_wallpaper to -1 to disable the anime mascot.

devices section

# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic-mouse-v1 {
    sensitivity = -0.5
}
Code Snippet 18: devices

Window rules

windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.
windowrulev2 = opacity 0.8, class:.*
windowrulev2 = float,class:^(pavucontrol)$
windowrulev2 = size 50%,class:^(pavucontrol)$
windowrulev2 = center,class:^(pavucontrol)$
windowrulev2 = float,class:(org.kde.polkit-kde-authentication-agent-1)
windowrulev2 = center,class:(org.kde.polkit-kde-authentication-agent-1)
windowrulev2 = float,class:(blueman)
windowrulev2 = center,class:(blueman)
windowrulev2 = size 50%,class:(blueman)
windowrulev2 = float,class:(thunderbird),title:(status)
windowrulev2 = float,class:(thunderbird),title:(.*)(Reminders)
windowrulev2 = float,class:(thunderbird),title:(Write:.*)
windowrulev2 = float,class:(thunderbird),title:(Send.*)
windowrulev2 = float,class:(thunderbird),title:(Inbox.*)
windowrulev2 = tile,class:(thunderbird),initialTitle(Mozilla Thunderbird)
windowrulev2 = float,class:(thunderbird)
windowrulev2 = float,class:(Msgcompose.*)
windowrulev2 = idleinhibit always, class:firefox title:(.*)(- YouTube)
windowrulev2 = opacity 1, class:firefox title:(.*)(- YouTube)
windowrulev2 = float, class:(thunderbird),title(.*)(Reminders)$
windowrulev2 = float,class:(QtPass)
windowrulev2 = float,class:(zoom)
windowrulev2 = float, class:(file-roller)
windowrulev2 = float,class:(ncmpcpp)
windowrulev2 = center,class:(ncmpcpp)
windowrulev2 = size 50%,class:(ncmpcpp)
windowrulev2 = float, class:(khal)
windowrulev2 = size 40%, class:(khal)
windowrulev2 = move onscreen cursor 50% 10%, class:(khal)
windowrulev2 = workspace 4, class:(astroid)
windowrulev2 = maximize, class:(astroid)
windowrulev2 = workspace 4, class:(thunderbird)
windowrulev2 = maximize, class:(thunderbird)
windowrulev2 = workspace 5, class:(thunar)
windowrulev2 = workspace 7,class:(vlc)
windowrulev2 = opacity 1,class:(vlc)
windowrulev2 = idleinhibit always,class:(vlc)
windowrulev2 = float, workspace 8, class:(org.remmina.Remmina)
windowrulev2 = workspace 9,class:^(com.transmissionbt.transmission).*
windowrulev2 = float,title:(Torrent.*)
windowrulev2 = opacity 1, class:(zoom)
windowrulev2 = workspace 10, class:(zoom)
windowrulev2 = opacity 1, class:(zoom), title:(Settings)
windowrulev2 = opacity 1, class:(zoom), title:(Zoom Meeting)
windowrulev2 = float, class:(org.kde.kdeconnect.app)
windowrulev2 = float, title:(File Operation Progress)
windowrulev2 = float, class:(htop)
windowrulev2 = size 100% 40%, class:(htop)
windowrulev2 = move 0 40, class:(htop)
windowrulev2 = float, class:(nmtui)
#windowrulev2 = size 100% 40%, class:(htop)
#windowrulev2 = move 0 40, class:(htop)
windowrulev2 = float, class:(vim)
windowrulev2 = maximize, class:(vim)
windowrulev2 = maximize, class:(nw-emacs)
windowrulev2 = float, class:(one.alynx.showmethekey), title:(Show Me The Key)
windowrulev2 = nofocus, class:(showmethekey-gtk), title:(Floating Window - Show Me The Key)
windowrulev2 = opacity 0.4, class:(showmethekey-gtk), title:(Floating Window - Show Me The Key)
windowrulev2 = center, class:(showmethekey-gtk), title:(Floating Window - Show Me The Key)
windowrulev2 = float, class:(showmethekey-gtk), title:(Floating Window - Show Me The Key)
windowrulev2 = pin, class:(showmethekey-gtk), title:(Floating Window - Show Me The Key)
windowrulev2 = size 100% 10%, class:(showmethekey-gtk), title:(Floating Window - Show Me The Key)
windowrulev2 = move 0 90%, class:(showmethekey-gtk), title:(Floating Window - Show Me The Key)
Code Snippet 19: window rules

I think this section of the configuration file that I change the most. Always refer to the wiki in case there’s an update. I use idleinhibit for window that should not activate the screensaver. Use hyprprop which function just like xprop in Xorg to determine the window class or title.

workspaces

binds {
    workspace_back_and_forth = false
    allow_workspace_cycles = true
}
Code Snippet 20: bind configuration
workspace = 1, name:terminal, monitor:eDP-1 #, on-created-empty:alacritty
workspace = 2, name:code, monitor:eDP-1 #, on-created-empty:emacsclient -c -a emacs
workspace = 3, name:web, monitor:eDP-1 #, on-created-empty:firefox
workspace = 4, name:message, monitor:eDP-1
workspace = 5, name:file, monitor:HDMI-A-1, monitor:DP-1, default:true
workspace = 6, name:office, monitor:HDMI-A-1
workspace = 7, name:fun, monitor:HDMI-A-1
workspace = 8, name:remote, monitor:HDMI-A-1
workspace = 9, name:torrent, monitor:HDMI-A-1
workspace = 10, name:zoom, monitor:HDMI-A-1
workspace = special:scratchpad
Code Snippet 21: workspaces

This section still needs tweaking. Basically, it’s fine when I’m on a single monitor. But I haven’t got the time to test it in multi monitors setup, it would be better if I can assign multiple monitors into a workspace.

Keybindings

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Return, exec, $terminal
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, F4, killactive,
bind = ALT, F4, killactive,
bind = $mainMod, Q, exec, ~/.local/bin/rofi-logout
bind = $mainMod Alt, Q, exec, hyprlock
bind = $mainMod, D, exec, $menu
bind = $mainMod, C, exec, cliphist list | rofi -dmenu -p "Clipboard:" -theme "clipboard" | cliphist decode | wl-copy
bind = $mainMod, Comma, exec, rofi -show emoji
bind = $mainMod Shift, V, exec, pavucontrol
bind = $mainMod, F, fullscreen, 0
Code Snippet 22: main keybindings
  • Window motions

    bind = $mainMod Shift, F, fullscreen, 1
    bind = $mainMod Control, F, fakefullscreen, 0
    bind = $mainMod, Space, togglefloating,
    
    # Move focus with mainMod + arrow keys
    bind = $mainMod, left, movefocus, l
    bind = $mainMod, right, movefocus, r
    bind = $mainMod, up, movefocus, u
    bind = $mainMod, down, movefocus, d
    
    bind = $mainMod, H, movefocus, l
    bind = $mainMod, L, movefocus, r
    bind = $mainMod, K, movefocus, u
    bind = $mainMod, J, movefocus, d
    
    # resize
    binde = $mainMod Control, H, resizeactive, -10 0
    binde = $mainMod Control, J, resizeactive, 0 10
    binde = $mainMod Control, K, resizeactive, 0 -10
    binde = $mainMod Control, L, resizeactive, 10 0
    
    binde = $mainMod Control, left, resizeactive, -10 0
    binde = $mainMod Control, down, resizeactive, 0 10
    binde = $mainMod Control, up, resizeactive, 0 -10
    binde = $mainMod Control, right, resizeactive, 10 0
    
    # move window
    bind = $mainMod Shift, H, movewindow, l
    bind = $mainMod Shift, J, movewindow, d
    bind = $mainMod Shift, K, movewindow, u
    bind = $mainMod Shift, L, movewindow, r
    
    # Window split ratio
    binde = Super, Minus, splitratio, -0.1
    binde = Super, Equal, splitratio, 0.1
    binde = Super, Semicolon, splitratio, -0.1
    binde = Super, Apostrophe, splitratio, 0.1
    
    # Move/resize windows with mainMod + LMB/RMB and dragging
    bindm = $mainMod, mouse:272, movewindow
    bindm = $mainMod, mouse:273, resizewindow
    
    Code Snippet 23: window keybindings
  • Applications

    bind = $mainMod Alt, M, exec, alacritty --class ncmpcpp -e ncmpcpp
    bind = $mainMod Alt, H, exec, alacritty --class htop -e htop
    bind = $mainMod Alt, W, exec, alacritty --class nmtui -e nmtui
    bind = $mainMod Alt, K, exec, alacritty --class khal -e khal interactive
    bind = $mainMod Alt, V, exec, alacritty --class vim -e vim
    bind = $mainMod Shift Alt, N, exec, alacritty --class nw-emacs -e emacsclient -t -a emacs
    bind = $mainMod Alt, E, exec, emacsclient -c -a emacs -e '(dired (getenv "HOME"))'
    bind = $mainMod Alt, N, exec, $editor
    bind = $mainMod Alt, T, exec, $mail
    bind = $mainMod Alt, P, exec, rofi-pass
    bind = $mainMod Alt, C, exec, rofi -show calc -modi calc -no-show-match -no-sort -theme calculator
    bind = $mainMod Alt, B, exec, rofi-rbw
    bind = $mainMod Alt, f, exec, firefox
    bind = $mainMod Alt, S, exec, [workspace 10; silent; float] showmethekey-gtk
    # tesseract
    bind = SuperShift,T,exec,grim -g "$(slurp -d -c D1E5F4BB -b 1B232866 -s 00000000)" "tmp.png" && tesseract -l eng "tmp.png" - | wl-copy && rm "tmp.png"
    

    Packages used:

    rofi-logout : a script I made.

    pavucontrol : pulseaudio control

    ncmpcpp : an mpd client.

    htop : a cross-platform interactive process viewer.

    nmtui : Network Manager terminal interface.

    khal : 📆 CLI calendar application.

    vim : a terminal text editor.

    rofi-pass : rofi frontend for pass.

    rofi-rbw : Rofi frontend for Bitwarden.

    showmethekey : Show keys you typed on screen.

    tesseract : Tesseract Open Source OCR Engine.

    Figure 2: Applications

    Figure 2: Applications

  • media keys

    binde = , XF86AudioRaiseVolume, exec, ~/.local/bin/dunst-volume -i 1
    binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%
    binde = , XF86AudioLowerVolume, exec, ~/.local/bin/dunst-volume -d 1
    bindl = , XF86AudioMute, exec, ~/.local/bin/dunst-volume -t
    # bindl = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
    
    bind = , XF86AudioPlay, exec, playerctl play-pause
    bind = , XF86AudioNext, exec, playerctl next
    bind = , XF86AudioPrev, exec, playerctl previous
    
    # binde = , XF86MonBrightnessUp, exec, brightnessctl set +1%
    binde = , XF86MonBrightnessUp, exec, ~/.local/bin/dunst-backlight +1%
    binde = , XF86MonBrightnessDown, exec, ~/.local/bin/dunst-backlight 1%-
    # binde = , XF86MonBrightnessDown, exec, brightnessctl set 1%-
    
    Code Snippet 24: media keys

    dunst : Lightweight and customizable notification daemon.

    playerctl : 🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.

    ~/.local/bin/dunst-volume : A script to set volume and also show notification.

    ~/.local/bin/dunst-backlight/ : Similar script for backlight.

  • Print Key

    bind= , Print, exec, grim "$(echo ~/Pictures/Screenshots/Screenshot1-$(date +'%Y%m%d_%H%M%S').png)"
    bind = Control, Print, exec, grim -g "$(slurp)" - | swappy -f -
    bind = Alt, Print, exec, kooha
    
    Code Snippet 25: print key

    grim : Grab images from a Wayland compositor.

    slurp : Select a region in a Wayland compositor.

    swappy : A Wayland native snapshot editing tool, inspired by Snappy on macOS.

    kooha : Elegantly record your screen.

  • notification

    bind = $mainMod Alt, grave, exec, dunstctl history-pop
    bind = $mainMod SHIFT, grave, exec, dunstctl context
    bind = $mainMod, grave, exec, dunstctl action
    bind = $mainMod, grave, exec, dunstctl close
    
    Code Snippet 26: notification
  • Submaps

    • Group

      bind = $mainMod, G, submap, group
      submap = group
      bind = , T, togglegroup
      bind = $mainMod Control, F, changegroupactive, f
      bind = $mainMod Control, B, changegroupactive, b
      
      # bind = $mainMod Alt, L, lockactivegroup
      bind = $mainMod, G, lockgroups, toggle
      bind = $mainMod Alt, G, lockactivegroup, toggle
      
      bind = $mainMod Shift, left, moveintogroup, l
      bind = $mainMod Shift, right, moveintogroup, r
      bind = $mainMod Shift, up, moveintogroup, u
      bind = $mainMod Shift, down, moveintogroup, d
      
      bind = $mainMod Shift, H, moveintogroup, l
      bind = $mainMod Shift, L, moveintogroup, r
      bind = $mainMod Shift, K, moveintogroup, u
      bind = $mainMod Shift, J, moveintogroup, d
      
      bind = $mainMod Control, left, moveoutofgroup, l
      bind = $mainMod Control, right, moveoutofgroup, r
      bind = $mainMod Control, up, moveoutofgroup, u
      bind = $mainMod Control, down, moveoutofgroup, d
      
      bind = $mainMod Control, H, moveoutofgroup, l
      bind = $mainMod Control, L, moveoutofgroup, r
      bind = $mainMod Control, K, moveoutofgroup, u
      bind = $mainMod Control, J, moveoutofgroup, d
      
      bind = , left, movefocus, l
      bind = , right, movefocus, r
      bind = , up, movefocus, u
      bind = , down, movefocus, d
      
      bind = , H, movefocus, l
      bind = , L, movefocus, r
      bind = , K, movefocus, u
      bind = , J, movefocus, d
      
      bind = , escape, submap, reset
      bind = Control, G, submap, reset
      submap = reset
      
      bind = $mainMod Control, F, changegroupactive, f
      bind = $mainMod Control, B, changegroupactive, b
      
      Code Snippet 27: group submap

      This make window grouped.

    • Resize

      ## Resize
      bind = $mainMod, R, submap, resize
      submap = resize
      ### using arrow key
      binde = , right, resizeactive, 10 0
      binde = , left, resizeactive, -10 0
      binde = , up, resizeactive, 0 -10
      binde = , down, resizeactive, 0 10
      ### using vim key
      binde = , l, resizeactive, 10 0
      binde = , h, resizeactive, -10 0
      binde = , k, resizeactive, 0 -10
      binde = , j, resizeactive, 0 10
      bind = Control, G, submap, reset
      bind = , escape, submap, reset
      submap = reset
      
  • dwindle layout keybindings

    bind = $mainMod, P, pseudo, # dwindle
    bind = $mainMod, S, togglesplit, # dwindle
    bind = Alt Control Shift, Tab, layoutmsg, swapprev
    
  • master layout keybindings

    # master
    bind = $mainMod Alt, TAB, layoutmsg, swapwithmaster auto
    bind = $mainMod Alt, H, layoutmsg, orientationleft
    bind = $mainMod Alt, J, layoutmsg, orientationbottom
    bind = $mainMod Alt, K, layoutmsg, orientationtop
    bind = $mainMod Alt, L, layoutmsg, orientationright
    # bind = Alt Shift, Tab, layoutmsg, swapnext
    bind = Alt, Tab, cyclenext
    bind = Alt Control, TAB, layoutmsg, cycleprev
    
  • workspaces keybindings

    # Switch workspaces with mainMod + [0-9]
    bind = $mainMod, 1, workspace, 1
    bind = $mainMod, 1, exec, $w1
    bind = $mainMod, 2, workspace, 2
    bind = $mainMod, 2, exec, $w2
    bind = $mainMod, 3, workspace, 3
    bind = $mainMod, 3, exec, $w3
    bind = $mainMod, 4, workspace, 4
    bind = $mainMod, 4, exec, $w4
    bind = $mainMod, 5, workspace, 5
    bind = $mainMod, 5, exec, $w5
    bind = $mainMod, 6, workspace, 6
    bind = $mainMod, 6, exec, $w6
    bind = $mainMod, 7, workspace, 7
    bind = $mainMod, 7, exec, $w7
    bind = $mainMod, 8, workspace, 8
    bind = $mainMod, 8, exec, $w8
    bind = $mainMod, 9, workspace, 9
    bind = $mainMod, 9, exec, $w9
    bind = $mainMod, 0, workspace, 10
    bind = $mainMod, 0, exec, $w10
    bind = $mainMod, TAB, workspace, previous
    
    bind = $mainMod, BackSpace, workspace, special
    bind = $mainMod Shift, Backspace, movetoworkspace, special
    bind = $mainMod Alt, Backspace, togglespecialworkspace
    # Scroll through existing workspaces with mainMod + scroll
    bind = $mainMod, mouse_down, workspace, e+1
    bind = $mainMod, mouse_up, workspace, e-1
    
    # Move active window to a workspace with mainMod + SHIFT + [0-9]
    bind = $mainMod SHIFT, 1, movetoworkspace, 1
    bind = $mainMod SHIFT, 2, movetoworkspace, 2
    bind = $mainMod SHIFT, 3, movetoworkspace, 3
    bind = $mainMod SHIFT, 4, movetoworkspace, 4
    bind = $mainMod SHIFT, 5, movetoworkspace, 5
    bind = $mainMod SHIFT, 6, movetoworkspace, 6
    bind = $mainMod SHIFT, 7, movetoworkspace, 7
    bind = $mainMod SHIFT, 8, movetoworkspace, 8
    bind = $mainMod SHIFT, 9, movetoworkspace, 9
    bind = $mainMod SHIFT, 0, movetoworkspace, 10
    bind = $mainMod SHIFT, TAB, movetoworkspace, previous
    
  • monitors movement

    bind = $mainMod Alt, H, focusmonitor, l
    bind = $mainMod Alt, J, focusmonitor, d
    bind = $mainMod Alt, K, focusmonitor, u
    bind = $mainMod Alt, L, focusmonitor, r
    
    bind = $mainMod Control, H, movecurrentworkspacetomonitor, l
    bind = $mainMod Control, J, movecurrentworkspacetomonitor, d
    bind = $mainMod Control, K, movecurrentworkspacetomonitor, u
    bind = $mainMod Control, L, movecurrentworkspacetomonitor, r
    
  • misc

    bind = $mainMod, O, toggleopaque
    
    bind = Alt, Tab, alterzorder, top
    bind = Alt Shift, Tab, bringactivetotop,
    bind = Alt Control, TAB, bringactivetotop,
    bind = Alt Control Shift, Tab, bringactivetotop,
    
    # lid switch
    # trigger when the switch is toggled
    bindl=,switch:Lid Switch,exec,hyprlock
    # trigger when the switch is turning on
    #bindl=,switch:on:[switch name],exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"
    # trigger when the switch is turning off
    #bindl=,switch:off:[switch name],exec,hyprctl keyword monitor "eDP-1, disable"