# Hyprland Configuration # Based on XMonad configuration from xmonad.hs # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,auto # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Set programs that you use $terminal = alacritty $fileManager = dolphin $menu = rofi -show drun -show-icons $runMenu = rofi -show run # Environment variables env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORMTHEME,qt5ct env = GDK_DPI_SCALE,1.25 env = QT_FONT_DPI,120 # Input configuration input { kb_layout = us kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 1 touchpad { natural_scroll = no } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } # General settings general { gaps_in = 5 gaps_out = 20 border_size = 2 col.active_border = rgba(edb443ee) rgba(33ccffee) 45deg col.inactive_border = rgba(595959aa) layout = master allow_tearing = false } # Decoration decoration { rounding = 10 blur { enabled = true size = 3 passes = 1 } } # Animations animations { enabled = yes 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 } # Layout configuration dwindle { pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = yes # you probably want this } master { mfact = 0.25 orientation = left } # Misc misc { force_default_wallpaper = 0 disable_hyprland_logo = true } # Scratchpad-like windows windowrule = float, title:^(htop)$ windowrule = size 80% 80%, title:^(htop)$ # Chrome specific rules windowrule = float, class:^(chrome)$,title:^(.*@gmail.com.*Gmail.*)$ windowrule = float, class:^(chrome)$,title:^(Messages)$ windowrule = size 90% 90%, class:^(chrome)$,title:^(.*@gmail.com.*Gmail.*)$ windowrule = size 90% 90%, class:^(chrome)$,title:^(Messages)$ # ===== KEY BINDINGS ===== # Based on XMonad configuration # Main modifier key (Super/Windows key equivalent to mod4Mask) $mainMod = SUPER # Mod+Alt combination (equivalent to modalt in XMonad) $modAlt = SUPER_ALT # Hyper key (equivalent to mod3Mask in XMonad) $hyper = ALT_R # Program launching bind = $mainMod, P, exec, $menu bind = $mainMod SHIFT, P, exec, $runMenu bind = $mainMod SHIFT, Return, exec, $terminal bind = $mainMod, Q, killactive, bind = $mainMod SHIFT, C, killactive, bind = $mainMod SHIFT, Q, exit, bind = $mainMod, E, exec, emacsclient -c bind = $mainMod, V, exec, xclip -o | xdotool type --file - # Chrome/Browser launching (equivalent to bindBringAndRaise) bind = $modAlt, C, exec, google-chrome-stable # Scratchpad equivalents (toggle special workspaces) bind = $modAlt, E, togglespecialworkspace, element bind = $modAlt, G, togglespecialworkspace, gmail bind = $modAlt, H, togglespecialworkspace, htop bind = $modAlt, M, togglespecialworkspace, messages bind = $modAlt, K, togglespecialworkspace, slack bind = $modAlt, S, togglespecialworkspace, spotify bind = $modAlt, T, togglespecialworkspace, transmission bind = $modAlt, V, togglespecialworkspace, volume # Move windows to special workspaces bind = $modAlt SHIFT, E, movetoworkspace, special:element bind = $modAlt SHIFT, G, movetoworkspace, special:gmail bind = $modAlt SHIFT, H, movetoworkspace, special:htop bind = $modAlt SHIFT, M, movetoworkspace, special:messages bind = $modAlt SHIFT, K, movetoworkspace, special:slack bind = $modAlt SHIFT, S, movetoworkspace, special:spotify bind = $modAlt SHIFT, T, movetoworkspace, special:transmission bind = $modAlt SHIFT, V, movetoworkspace, special:volume # Directional navigation (WASD keys as in XMonad) bind = $mainMod, W, movefocus, u bind = $mainMod, S, movefocus, d bind = $mainMod, A, movefocus, l bind = $mainMod, D, movefocus, r # Move windows directionally bind = $mainMod SHIFT, W, movewindow, u bind = $mainMod SHIFT, S, movewindow, d bind = $mainMod SHIFT, A, movewindow, l bind = $mainMod SHIFT, D, movewindow, r # Resize windows bind = $mainMod CTRL, W, resizeactive, 0 -50 bind = $mainMod CTRL, S, resizeactive, 0 50 bind = $mainMod CTRL, A, resizeactive, -50 0 bind = $mainMod CTRL, D, resizeactive, 50 0 # Layout control bind = $mainMod, Space, exec, hyprctl dispatch layoutmsg cyclenext bind = $mainMod CTRL, Space, fullscreen, 0 bind = $mainMod, slash, exec, hyprctl dispatch layoutmsg orientationcycle left top bind = $mainMod, F, fullscreen, 0 bind = $mainMod SHIFT, F, fullscreen, 1 bind = $mainMod, T, togglefloating, bind = $mainMod SHIFT, Y, pseudo, # dwindle pseudotile bind = $mainMod, J, togglesplit, # dwindle split direction bind = $mainMod, comma, exec, hyprctl dispatch splitratio -0.05 bind = $mainMod, period, exec, hyprctl dispatch splitratio +0.05 bind = $mainMod, N, exec, hyprctl dispatch layoutmsg addmaster bind = $mainMod SHIFT, N, exec, hyprctl dispatch layoutmsg removemaster # Focus manipulation bind = $mainMod, Tab, exec, hyprctl dispatch focuswindow "class:$(hyprctl activewindow -j | jq -r '.class')" bind = $mainMod, M, exec, hyprctl dispatch focuswindow "class:master" # Monitor/Screen control bind = $mainMod, Z, focusmonitor, +1 bind = $mainMod SHIFT, Z, movewindow, mon:+1 # Window management bind = $mainMod, G, exec, hyprctl clients -j | jq -r '.[] | select(.workspace.id >= 0) | "\(.title) - \(.class)"' | rofi -dmenu -i -p "Go to window" | head -1 | xargs -I {} hyprctl dispatch focuswindow "title:{}" bind = $mainMod, B, exec, SELECTION=$(hyprctl clients -j | jq -r '.[] | select(.workspace.id >= 0) | "\(.title) - \(.class) [\(.address)]"' | rofi -dmenu -i -p "Bring window"); if [ -n "$SELECTION" ]; then ADDRESS=$(echo "$SELECTION" | sed 's/.*\[\(.*\)\]/\1/'); hyprctl dispatch movetoworkspace "$(hyprctl activeworkspace -j | jq -r '.id')",address:"$ADDRESS"; fi bind = $mainMod SHIFT, B, exec, hyprctl clients -j | jq -r '.[] | select(.workspace.id >= 0) | "\(.title) - \(.class)"' | rofi -dmenu -i -p "Replace window" | head -1 | xargs -I {} hyprctl dispatch swapwindow "title:{}" bind = $mainMod, M, exec, hyprctl dispatch togglespecialworkspace minimized bind = $mainMod SHIFT, M, exec, hyprctl dispatch movetoworkspace special:minimized bind = $mainMod SHIFT, H, exec, EMPTY_WS=$(hyprctl workspaces -j | jq -r 'map(select(.windows == 0)) | .[0].id // empty'); if [ -z "$EMPTY_WS" ]; then EMPTY_WS=$(hyprctl workspaces -j | jq -r 'max_by(.id).id + 1'); fi; hyprctl dispatch movetoworkspace $EMPTY_WS && hyprctl dispatch workspace $EMPTY_WS bind = $mainMod, X, exec, hyprctl dispatch movetoworkspace special:NSP # Workspace switching 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 windows to workspaces 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 # Move and follow to workspace bind = $mainMod CTRL, 1, movetoworkspace, 1 bind = $mainMod CTRL, 2, movetoworkspace, 2 bind = $mainMod CTRL, 3, movetoworkspace, 3 bind = $mainMod CTRL, 4, movetoworkspace, 4 bind = $mainMod CTRL, 5, movetoworkspace, 5 bind = $mainMod CTRL, 6, movetoworkspace, 6 bind = $mainMod CTRL, 7, movetoworkspace, 7 bind = $mainMod CTRL, 8, movetoworkspace, 8 bind = $mainMod CTRL, 9, movetoworkspace, 9 bind = $mainMod CTRL, 0, movetoworkspace, 10 # Media keys and volume control bind = , XF86AudioRaiseVolume, exec, set_volume --unmute --change-volume +5 bind = , XF86AudioLowerVolume, exec, set_volume --unmute --change-volume -5 bind = , XF86AudioMute, exec, set_volume --toggle-mute bind = $mainMod, I, exec, set_volume --unmute --change-volume +5 bind = $mainMod, K, exec, set_volume --unmute --change-volume -5 bind = $mainMod, U, exec, set_volume --toggle-mute # Media player controls bind = $mainMod, semicolon, exec, playerctl play-pause bind = , XF86AudioPlay, exec, playerctl play-pause bind = , XF86AudioPause, exec, playerctl play-pause bind = $mainMod, L, exec, playerctl next bind = , XF86AudioNext, exec, playerctl next bind = $mainMod, J, exec, playerctl previous bind = , XF86AudioPrev, exec, playerctl previous # Brightness control bind = , XF86MonBrightnessUp, exec, brightness.sh 5 bind = , XF86MonBrightnessDown, exec, brightness.sh -5 # Utility bindings bind = $hyper, V, exec, rofi_clipit.sh bind = $hyper, Y, exec, rofi-pass bind = $hyper, H, exec, rofi_shutter bind = $hyper, C, exec, shell_command.sh bind = $hyper, X, exec, rofi_command.sh bind = $hyper SHIFT, L, exec, dm-tool lock bind = $hyper, K, exec, rofi_kill_process.sh bind = $hyper SHIFT, K, exec, rofi_kill_all.sh bind = $hyper, R, exec, rofi-systemd bind = $hyper, 9, exec, start_synergy.sh bind = $hyper, slash, exec, toggle_taffybar bind = $hyper, Space, exec, skippy-xd bind = $hyper, I, exec, rofi_select_input.hs bind = $hyper, O, exec, rofi_paswitch bind = $mainMod, apostrophe, exec, load_default_map bind = $modAlt, apostrophe, exec, load_xkb_map bind = $mainMod, R, exec, hyprctl reload # Workspace cycling bind = $mainMod, backslash, workspace, previous bind = $mainMod, Tab, workspace, previous # Mouse bindings bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Special workspaces for "scratchpad" applications exec-once = [workspace special:element silent] element-desktop exec-once = [workspace special:gmail silent] google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox exec-once = [workspace special:htop silent] alacritty --title htop -e htop exec-once = [workspace special:messages silent] google-chrome-stable --new-window https://messages.google.com/web/conversations exec-once = [workspace special:slack silent] slack exec-once = [workspace special:spotify silent] spotify exec-once = [workspace special:transmission silent] transmission-gtk exec-once = [workspace special:volume silent] pavucontrol