From 3e5a1f97f8da63e8834ff7d28e86605f31b8c82d Mon Sep 17 00:00:00 2001 From: "pyrschtjag@gmail.com" Date: Tue, 21 Apr 2026 13:44:28 +0400 Subject: [PATCH] feat: added hyprland config --- hypr/animations.conf | 29 ++++++++++++ hypr/bind.conf | 85 ++++++++++++++++++++++++++++++++++ hypr/decoration.conf | 20 ++++++++ hypr/dwindle.conf | 4 ++ hypr/env.conf | 5 ++ hypr/exec.conf | 7 +++ hypr/general.conf | 10 ++++ hypr/hyprland.conf | 14 ++++++ hypr/input.conf | 9 ++++ hypr/master.conf | 3 ++ hypr/misc.conf | 4 ++ hypr/monitors.conf | 2 + hypr/programs.conf | 4 ++ hypr/scripts/toggle_monitor.sh | 17 +++++++ hypr/windowrule.conf | 52 +++++++++++++++++++++ hypr/workspaces.conf | 10 ++++ 16 files changed, 275 insertions(+) create mode 100644 hypr/animations.conf create mode 100644 hypr/bind.conf create mode 100644 hypr/decoration.conf create mode 100644 hypr/dwindle.conf create mode 100644 hypr/env.conf create mode 100644 hypr/exec.conf create mode 100644 hypr/general.conf create mode 100644 hypr/hyprland.conf create mode 100644 hypr/input.conf create mode 100644 hypr/master.conf create mode 100644 hypr/misc.conf create mode 100644 hypr/monitors.conf create mode 100644 hypr/programs.conf create mode 100755 hypr/scripts/toggle_monitor.sh create mode 100644 hypr/windowrule.conf create mode 100644 hypr/workspaces.conf diff --git a/hypr/animations.conf b/hypr/animations.conf new file mode 100644 index 0000000..e6a3184 --- /dev/null +++ b/hypr/animations.conf @@ -0,0 +1,29 @@ +animations { + enabled = yes + + # NAME, X0, Y0, X1, Y1 + bezier = easeOutQuint, 0.23, 1, 0.32, 1 + bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 + bezier = linear, 0, 0, 1, 1 + bezier = almostLinear, 0.5, 0.5, 0.75, 1 + bezier = quick, 0.15, 0, 0.1, 1 + + # NAME, ONOFF, SPEED, CURVE, [STYLE] + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + animation = zoomFactor, 1, 7, quick +} diff --git a/hypr/bind.conf b/hypr/bind.conf new file mode 100644 index 0000000..7574705 --- /dev/null +++ b/hypr/bind.conf @@ -0,0 +1,85 @@ +# basic +bind = $mainMod, return, exec, $terminal +bind = $mainMod SHIFT, Q, killactive, +bind = $mainMod SHIFT, X, exec, command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, M, togglefloating, +bind = $mainMod, F, fullscreen, 0 +bind = $mainMod, D, exec, $menu +bind = $mainMod, P, pseudo, +bind = $mainMod, J, layoutmsg, togglesplit +bind = $mainMod, V, exec, rofi -modi clipboard:~/.config/rofi/cliphist-rofi-img -show clipboard -show-icons -theme ~/.config/rofi/clipboard.rasi +bind = , Print, exec, AREA=$(slurp) && grim -g "$AREA" - | wl-copy && notify-send -u low "Screenshot" "Captured: $AREA" +bind = SUPER, Print, exec, ACTIVE_CLASS=$(hyprctl activewindow -j | jq -r '.class') && hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - - | wl-copy && notify-send -u low "Screenshot" "Captured: $ACTIVE_CLASS" +bind = CTRL, Print, exec, MONITOR=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') && grim -o "$MONITOR" - | wl-copy && notify-send -u low "Screenshot" "Captured: $MONITOR" + +# movefocus +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# movewindow +bind = $mainMod SHIFT, left, movewindow, l +bind = $mainMod SHIFT, right, movewindow, r +bind = $mainMod SHIFT, up, movewindow, u +bind = $mainMod SHIFT, down, movewindow, d + +# workspace +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 + +# movetoworkspace +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 + +# scratchpad +bind = $mainMod, S, togglespecialworkspace, scratchpad +bind = $mainMod SHIFT, S, movetoworkspace, special:scratchpad +bind = $mainMod CTRL, S, movetoworkspace, e+0 + +# movewindow / resizewindow +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# multimedia +bindel = $mainMod, F7, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = $mainMod, F8, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = $mainMod, F8, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = $mainMod, F9, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ + +# playerctl +bindl = $mainMod, F10, exec, playerctl previous +bindl = $mainMod, F11, exec, playerctl play-pause +bindl = $mainMod, F12, exec, playerctl next + +# resize mode +bind = $mainMod, R, exec, hyprctl keyword general:col.active_border "rgb(e3a1d2)" +bind = $mainMod, R, submap, resize + +submap = resize + binde = , right, resizeactive, 20 0 + binde = , left, resizeactive, -20 0 + binde = , up, resizeactive, 0 -20 + binde = , down, resizeactive, 0 20 + bind = , escape, exec, hyprctl keyword general:col.active_border "rgb(a8afe1)" + bind = , escape, submap, reset + bind = , return, exec, hyprctl keyword general:col.active_border "rgb(a8afe1)" + bind = , return, submap, reset +submap = reset \ No newline at end of file diff --git a/hypr/decoration.conf b/hypr/decoration.conf new file mode 100644 index 0000000..65fd9cb --- /dev/null +++ b/hypr/decoration.conf @@ -0,0 +1,20 @@ +decoration { + rounding = 12 + rounding_power = 2 + active_opacity = 1.0 + inactive_opacity = 0.8 + + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(00000066) + } + + blur { + enabled = true + size = 3 + passes = 2 + vibrancy = 0.1696 + } +} diff --git a/hypr/dwindle.conf b/hypr/dwindle.conf new file mode 100644 index 0000000..31e3769 --- /dev/null +++ b/hypr/dwindle.conf @@ -0,0 +1,4 @@ +dwindle { + pseudotile = true + preserve_split = true +} diff --git a/hypr/env.conf b/hypr/env.conf new file mode 100644 index 0000000..1c60718 --- /dev/null +++ b/hypr/env.conf @@ -0,0 +1,5 @@ +env = XCURSOR_THEME,Bibata-Modern-Classic +env = XCURSOR_SIZE,24 +env = LIBVA_DRIVER_NAME,nvidia +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = NVD_BACKEND,direct diff --git a/hypr/exec.conf b/hypr/exec.conf new file mode 100644 index 0000000..05e7383 --- /dev/null +++ b/hypr/exec.conf @@ -0,0 +1,7 @@ +exec-once = xrandr --output HDMI-A-1 --primary +exec-once = wl-paste --type text --watch cliphist store +exec-once = wl-paste --type image --watch cliphist store +exec-once = systemctl --user start hyprpolkitagent +exec-once = gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" +exec-once = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" +exec-once = eww daemon && eww open-many bar_0 bar_1 wallpaper_0 wallpaper_1 \ No newline at end of file diff --git a/hypr/general.conf b/hypr/general.conf new file mode 100644 index 0000000..59f64b0 --- /dev/null +++ b/hypr/general.conf @@ -0,0 +1,10 @@ +general { + gaps_in = 4 + gaps_out = 42,6,6,6 + border_size = 1 + col.active_border = rgb(a8afe1) + col.inactive_border = rgba(363a4fcc) + resize_on_border = false + allow_tearing = false + layout = dwindle +} \ No newline at end of file diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf new file mode 100644 index 0000000..6ca61ce --- /dev/null +++ b/hypr/hyprland.conf @@ -0,0 +1,14 @@ +source = ~/.config/hypr/monitors.conf +source = ~/.config/hypr/workspaces.conf +source = ~/.config/hypr/programs.conf +source = ~/.config/hypr/exec.conf +source = ~/.config/hypr/env.conf +source = ~/.config/hypr/general.conf +source = ~/.config/hypr/decoration.conf +source = ~/.config/hypr/animations.conf +source = ~/.config/hypr/dwindle.conf +source = ~/.config/hypr/master.conf +source = ~/.config/hypr/misc.conf +source = ~/.config/hypr/input.conf +source = ~/.config/hypr/bind.conf +source = ~/.config/hypr/windowrule.conf diff --git a/hypr/input.conf b/hypr/input.conf new file mode 100644 index 0000000..97ec32c --- /dev/null +++ b/hypr/input.conf @@ -0,0 +1,9 @@ +input { + kb_layout = us,ru + kb_variant = + kb_model = + kb_options = grp:win_space_toggle + kb_rules = + follow_mouse = 1 + sensitivity = 0 +} diff --git a/hypr/master.conf b/hypr/master.conf new file mode 100644 index 0000000..e1d987b --- /dev/null +++ b/hypr/master.conf @@ -0,0 +1,3 @@ +master { + new_status = master +} diff --git a/hypr/misc.conf b/hypr/misc.conf new file mode 100644 index 0000000..5c270d2 --- /dev/null +++ b/hypr/misc.conf @@ -0,0 +1,4 @@ +misc { + force_default_wallpaper = -1 + disable_hyprland_logo = true +} diff --git a/hypr/monitors.conf b/hypr/monitors.conf new file mode 100644 index 0000000..6a4f07c --- /dev/null +++ b/hypr/monitors.conf @@ -0,0 +1,2 @@ +monitor = HDMI-A-1, 1920x1080@60, 0x0, 1 +monitor = DVI-I-1, 1600x900@60, -1600x140, 1 diff --git a/hypr/programs.conf b/hypr/programs.conf new file mode 100644 index 0000000..d0ce321 --- /dev/null +++ b/hypr/programs.conf @@ -0,0 +1,4 @@ +$mainMod = SUPER +$terminal = kitty +$fileManager = kitty mc +$menu = rofi -show drun diff --git a/hypr/scripts/toggle_monitor.sh b/hypr/scripts/toggle_monitor.sh new file mode 100755 index 0000000..3b6f7b6 --- /dev/null +++ b/hypr/scripts/toggle_monitor.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +MONITOR_NAME="DVI-I-1" + +hyprctl keyword monitor "$MONITOR_NAME, 1600x900@60, 0x-2000, 1" && eww reload +notify-send -t 1500 "$MONITOR_NAME: Game Mode" "Monitor moved to 0x-2000" + +if [[ "$1" == *"="* ]]; then + VAR=$1 + shift + env "$VAR" "$@" +else + "$@" +fi + +hyprctl -- keyword monitor "$MONITOR_NAME, 1600x900@60, -1600x0, 1" && eww reload +notify-send -t 1500 "$MONITOR_NAME: Desktop Mode" "Monitor returned to -1600x0" \ No newline at end of file diff --git a/hypr/windowrule.conf b/hypr/windowrule.conf new file mode 100644 index 0000000..e735263 --- /dev/null +++ b/hypr/windowrule.conf @@ -0,0 +1,52 @@ +windowrule { + name = suppress-maximize-events + match:class = .* + suppress_event = maximize +} + +windowrule { + name = fix-xwayland-drags + match:class = ^$ + match:title = ^$ + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + no_focus = true +} + +windowrule { + name = move-hyprland-run + match:class = hyprland-run + move = 20 monitor_h-120 + float = yes +} + +windowrule { + name = scratchpad + match:workspace = name:special:scratchpad + border_color = rgb(a8afe1) rgba(3dd8ffb9) +} + +windowrule { + name = telegram-media-viewer + match:class = ^(org.telegram.desktop|telegramdesktop)$ + match:title = ^(Media viewer)$ + fullscreen = on + fullscreen_state = 2 +} + +windowrule { + name = firefox-youtube + match:class = ^(firefox)$ + match:title = .*(YouTube — Mozilla Firefox)$ + opacity = 1.0 override 1.0 override 1.0 override +} + +windowrule { + name = firefox-picture-in-picture + match:class = ^(firefox)$ + match:title = ^(Picture-in-Picture)$ + opacity = 1.0 override 1.0 override 1.0 override + float = true +} \ No newline at end of file diff --git a/hypr/workspaces.conf b/hypr/workspaces.conf new file mode 100644 index 0000000..e2354fc --- /dev/null +++ b/hypr/workspaces.conf @@ -0,0 +1,10 @@ +workspace = 1, monitor:HDMI-A-1 +workspace = 2, monitor:HDMI-A-1 +workspace = 3, monitor:HDMI-A-1 +workspace = 4, monitor:HDMI-A-1 +workspace = 5, monitor:HDMI-A-1 +workspace = 6, monitor:HDMI-A-1 +workspace = 7, monitor:HDMI-A-1 +workspace = 8, monitor:DVI-I-1 +workspace = 9, monitor:DVI-I-1 +workspace = 10, monitor:DVI-I-1