dotfiles/home/.config/hypr/hyprland.conf

224 lines
6.8 KiB
Plaintext

# Should be configured per-profile
monitor = eDP-1, preferred, auto, 1
workspace = eDP-1, 1
# Autostart
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = hypr-restart-portals
exec-once = setbg
exec-once = eww open bar
exec-once = dunst
exec-once = swayidle
exec-once = aa-notify -p
exec-once = udiskie -A -T
# exec-once = nm-applet --indicator
exec-once = webcord --start-minimized
input {
kb_layout = us, sk
kb_variant = ,qwerty
kb_options = grp:alt_shift_toggle
numlock_by_default=true
follow_mouse = 1
touchpad {
natural_scroll = no
}
}
general {
gaps_in = 5
gaps_out = 8
border_size = 2
#col.active_border = 0xFF327BD1 # blue
col.active_border = 0xFFFFA500 # orange
col.inactive_border = 0xFF000000 # black
layout = dwindle
}
decoration {
rounding = 8
blur = 1
blur_size = 3
blur_passes = 2
blur_new_optimizations = 1
drop_shadow = 1
shadow_ignore_window = 1
shadow_offset = 2 2
shadow_range = 4
shadow_render_power = 1
col.shadow = 0x55000000
}
animations {
enabled = 1
animation = windows, 1, 3, default, popin 50%
animation = border, 1, 4, default
animation = fade, 1, 4, default
animation = workspaces, 1, 3, default
}
dwindle {
pseudotile = 1
preserve_split = 1
no_gaps_when_only = 0
}
# Automatically move windows to their workspace
windowrulev2 = workspace 2, class:^(firefox)$
windowrulev2 = workspace 4, class:^(discord)$
windowrulev2 = workspace 4, class:^(WebCord)$
windowrulev2 = workspace 6, class:^(Stremio)$
# Give apps proper size
windowrulev2 = float, class:^(qalculate-gtk)$
windowrulev2 = size 800 550, class:^(qalculate-gtk)$
# Float some firefox windows (like bookmark menus)
windowrulev2 = float, class:^(firefox)$,title:^(Revert Bookmarks)$
windowrulev2 = float, class:^(firefox)$,title:^(Library)$
# TODO: Fix this
windowrulev2 = float, class:^(firefox)$,title:^(Page Info)(.*)$
# Mouse window resizing
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
# Compositor commands
bind = SUPER, Space, fullscreen,
bind = SUPER, W, killactive,
bind = SUPER, F, togglefloating,
bind = SUPER, S, togglesplit,
bind = SUPER, G, togglegroup,
bind = SUPER_SHIFT, N, changegroupactive, f
bind = SUPER_SHIFT, P, changegroupactive, b
bind = SUPER, P, pseudo,
bind = SUPER_SHIFT, Q, exec, menuprompt --yesno -p "Quit Hyprland?" && hyprctl dispatch exit ""
# Utilities
bind = SUPER_CTRL, L, exec, swaylock -fF
bind = SUPER_SHIFT, L, exec, wlogout -p layer-shell
# Programs
bind = SUPER, Return, exec, alacritty
bind = SUPER, X, exec, pcmanfm
bind = SUPER, B, exec, firefox
bind = SUPER, R, exec, wofi --show drun
bind = SUPER_SHIFT, Return, exec, wofi --show run
# Notifications
bind = CTRL, grave, exec, dunstctl close
bind = CTRL_SHIFT, grave, exec, dunstctl close-all
bind = CTRL, period, exec, dunstctl history-pop
bind = CTRL_SHIFT, period, exec, dunstctl context
# Volume comtrol
binde = SUPER, Down, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-
binde = SUPER, Up, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+
binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-
binde = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
# Brightness control
binde = SUPER, Right, exec, brightness -i 5% -n
binde = SUPER, Left, exec, brightness -d 5% -n
binde = , XF86MonBrightnessUp, exec, brightness -i 5% -n
binde = , XF86MonBrightnessDown, exec, brightness -d 5% -n
# Screenshots
bind = ,Print, exec, grim -g "$(slurp)" - | wl-copy && notify-send "Screenshot" "Screenshot saved to clipboard"
bind = SUPER, Print, exec, grim -g "$(slurp)" - | swappy -f - -o - | wl-copy
bind = CTRL, Print, exec, echo "" | wofi --prompt "Set delay (ms)" --show dmenu | xargs -I _ sleep _e-3 && grim -g "$(slurp)" - | wl-copy
bind = SUPER_CTRL, Print, exec, echo "" | wofi --prompt "Set delay (ms)" --show dmenu | xargs -I _ sleep _e-3 && grim -g "$(slurp)" - | swappy -f - -o - | wl-copy
bind = SHIFT, Print, exec, wl-copy "$(hyprpicker)" && notify-send 'Picked color' "$(wl-paste) (saved to clipboard)"
# Global keybinds (passing keys to other programs)
bind = SUPER, F10, pass, ^(com\.obsproject\.Studio)$
bind = SUPER, F10, pass, ^(com\.obsproject\.Studio)$
# Move between windows
bind = SUPER, h, movefocus, l
bind = SUPER, l, movefocus, r
bind = SUPER, k, movefocus, u
bind = SUPER, j, movefocus, d
# Window resizing
bind = SUPER, Q, submap, resize
submap = resize
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
binde = , L, resizeactive, 10 0
binde = , H, resizeactive, -10 0
binde = , K, resizeactive, 0 -10
binde = , J, resizeactive, 0 10
bind = , escape, submap, reset
bind = SUPER, Q, submap, reset
submap = reset
binde = ALT, right, resizeactive, 10 0
binde = ALT, left, resizeactive, -10 0
binde = ALT, up, resizeactive, 0 -10
binde = ALT, down, resizeactive, 0 10 binde = , L, resizeactive, 10 0
binde = ALT, H, resizeactive, -10 0
binde = ALT, K, resizeactive, 0 -10
binde = ALT, J, resizeactive, 0 10
# Move between workspaces
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
# Move windows to workspaces
bind = SUPER_SHIFT, 1, movetoworkspacesilent, 1
bind = SUPER_SHIFT, 2, movetoworkspacesilent, 2
bind = SUPER_SHIFT, 3, movetoworkspacesilent, 3
bind = SUPER_SHIFT, 4, movetoworkspacesilent, 4
bind = SUPER_SHIFT, 5, movetoworkspacesilent, 5
bind = SUPER_SHIFT, 6, movetoworkspacesilent, 6
bind = SUPER_SHIFT, 7, movetoworkspacesilent, 7
bind = SUPER_SHIFT, 8, movetoworkspacesilent, 8
bind = SUPER_SHIFT, 9, movetoworkspacesilent, 9
# Move windows to workspaces and focus it there
bind = ALT, 1, movetoworkspace, 1
bind = ALT, 2, movetoworkspace, 2
bind = ALT, 3, movetoworkspace, 3
bind = ALT, 4, movetoworkspace, 4
bind = ALT, 5, movetoworkspace, 5
bind = ALT, 6, movetoworkspace, 6
bind = ALT, 7, movetoworkspace, 7
bind = ALT, 8, movetoworkspace, 8
bind = ALT, 9, movetoworkspace, 9
# Cycle workspaces
bind = SUPER, mouse_down, workspace, m+1
bind = SUPER, mouse_up, workspace, m-1
bind = SUPER, bracketleft, workspace, m-1
bind = SUPER, bracketright, workspace, m+1
# Cycle monitors
bind = SUPER_SHIFT, braceleft, focusmonitor, l
bind = SUPER_SHIFT, braceright, focusmonitor, r
# Special workspace
bind = ALT, grave, movetoworkspace, special
bind = SUPER, grave, togglespecialworkspace,