From 4c684f9c148da226e63a4d39d7c5fe53bdba7b2f Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sun, 10 Nov 2024 12:58:59 -0300 Subject: [PATCH] :recycle: refactor(hypr): separate configs in multiple files, add more blur, fix media binds --- hypr/autostart.conf | 10 +-- hypr/bindings.conf | 2 +- hypr/{appearance.conf => decorations.conf} | 18 ++---- hypr/environment.conf | 8 +-- hypr/hyprland.conf | 5 +- hypr/hyprpaper.conf | 2 +- hypr/layout.conf | 4 ++ hypr/monitors.conf | 12 ++-- hypr/nvidia.conf | 3 +- hypr/plugins.conf | 13 ++-- hypr/rules.conf | 75 ++++++++++++---------- 11 files changed, 81 insertions(+), 71 deletions(-) rename hypr/{appearance.conf => decorations.conf} (87%) create mode 100644 hypr/layout.conf diff --git a/hypr/autostart.conf b/hypr/autostart.conf index 820f537..bd02824 100644 --- a/hypr/autostart.conf +++ b/hypr/autostart.conf @@ -3,11 +3,11 @@ ## AUTOSTART ## ############### -exec-once = /usr/lib/polkit-kde-authentication-agent-1 # exec kde auth agent if app asks for sudo -exec-once = waybar -exec-once = swaync # Run notification center / daemon -exec-once = hyprpaper -exec-once = hypridle # Idle daemon for Hyprland +exec-once = /usr/lib/hyprpolkitagent # Experimental Hyprland Polkit Agent +exec-once = waybar # Status Bar +exec-once = GTK_THEME=Adwaita swaync # Run Control Center with Adwaita theme to prevent issues +exec-once = hyprpaper # Wallpaper +exec-once = hypridle # Idle daemon # Re-run pywal exec-once = wal -R diff --git a/hypr/bindings.conf b/hypr/bindings.conf index e60a924..5f61bb7 100644 --- a/hypr/bindings.conf +++ b/hypr/bindings.conf @@ -34,7 +34,7 @@ bind = , XF86AudioMedia, exec, $media bind = , XF86AudioLowerVolume, exec, pamixer -d 5 # Decrease volume bind = , XF86AudioRaiseVolume, exec, pamixer -i 5 # Increase volume bind = , XF86AudioMute, exec, pamixer --toggle-mute # Mute -bind = , XF86AudioPrevious, exec, playerctl previous # Previous media +bind = , XF86AudioPrev, exec, playerctl previous # Previous media bind = , XF86AudioNext, exec, playerctl next # Next media bind = , XF86AudioPlay, exec, playerctl play-pause # Toggle Play/Pause media diff --git a/hypr/appearance.conf b/hypr/decorations.conf similarity index 87% rename from hypr/appearance.conf rename to hypr/decorations.conf index 47bf1d8..8b0e06a 100644 --- a/hypr/appearance.conf +++ b/hypr/decorations.conf @@ -1,6 +1,6 @@ ################ -## APPEARANCE ## +## DECORATION ## ################ # See https://wiki.hyprland.org/Configuring/Variables for more information on how to configure appearance @@ -26,18 +26,20 @@ general { decoration { rounding = 12 + # Active Window Opacity active_opacity = 1.0 - inactive_opacity = 0.98 + # Inactive Window Opacity + inactive_opacity = 0.95 drop_shadow = true shadow_range = 4 shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) + col.shadow = $background blur { enabled = true - size = 3 - passes = 1 + size = 6 + passes = 2 vibrancy = 0.9 } } @@ -58,9 +60,3 @@ animations { animation = fadeLayers, 1, 7, amazingBezier animation = workspaces, 1, 5.5, amazingBezier, slide } - -dwindle { - pseudotile = true - preserve_split = true -} - diff --git a/hypr/environment.conf b/hypr/environment.conf index 8ffcbf6..5f7ee76 100644 --- a/hypr/environment.conf +++ b/hypr/environment.conf @@ -8,9 +8,9 @@ env = XCURSOR_THEME, Adwaita env = XCURSOR_SIZE, 24 env = HYPRCURSOR_THEME, Adwaita env = HYPRCURSOR_SIZE, 24 -env = QT_QPA_PLATFORM, wayland -env = QT_QPA_PLATFORMTHEME, qt6ct +env = QT_QPA_PLATFORM, wayland;xcb +env = QT_QPA_PLATFORMTHEME, qt6ct;qt5ct +env = QT_AUTO_SCREEN_SCALE_FACTOR, 1 env = XDG_CURRENT_DESKTOP, Hyprland env = ADW_DISABLE_PORTAL, 1 - -env = WALLPAPER, $wallpaper +env = MOZ_ENABLE_WAYLAND, 1 diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 6df5e1e..405c3fa 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -12,6 +12,9 @@ source = ~/.config/hypr/environment.conf # Monitors source = ~/.config/hypr/monitors.conf +# Layout +source = ~/.config/hypr/layout.conf + # Input source = ~/.config/hypr/input.conf @@ -22,7 +25,7 @@ source = ~/.config/hypr/input.conf source = ~/.config/hypr/plugins.conf # Appearance -source = ~/.config/hypr/appearance.conf +source = ~/.config/hypr/decorations.conf # Autostart source = ~/.config/hypr/autostart.conf diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index 0d9d096..156dc5e 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,5 +1,5 @@ -$wallpaper = /home/joaov/wallpapers/Ryo Yamada Maid Dress.png +$wallpaper = /home/joaov/wallpapers/Linux Anime Girl.png splash = true preload = $wallpaper diff --git a/hypr/layout.conf b/hypr/layout.conf new file mode 100644 index 0000000..4615a95 --- /dev/null +++ b/hypr/layout.conf @@ -0,0 +1,4 @@ +dwindle { + pseudotile = true + preserve_split = true +} diff --git a/hypr/monitors.conf b/hypr/monitors.conf index 9c8c640..7201bf3 100644 --- a/hypr/monitors.conf +++ b/hypr/monitors.conf @@ -6,12 +6,12 @@ # Configure yout monitor(s) here! See https://wiki.hyprland.org/Configuring/Monitors for more information on how to do that! # Monitor Arguments -# 1 -> monitor name; -# 2 -> resolution@hertz; -# 3 -> positioning from the top-left corner; -# 4 -> scaling; -# 5 -> variable refresh rate; -# 6 -> 1: vrr enabled, 0: no vrr. +# arg0 -> monitor name(you can get monitor names with `hyprctl monitors`); +# arg1 -> resolution@hertz; +# arg2 -> positioning from the top-left corner; +# arg3 -> scaling; +# arg4 -> variable refresh rate for games(optional); +# arg5 -> 1: vrr enabled, 0: no vrr. monitor = VGA-1, 1920x1080@60, 0x0, 1, vrr, 1 diff --git a/hypr/nvidia.conf b/hypr/nvidia.conf index 8993f90..51bd3de 100644 --- a/hypr/nvidia.conf +++ b/hypr/nvidia.conf @@ -11,7 +11,8 @@ env = _VK_LAYER_NV_optimus, NVIDIA_only env = __NV_PRIME_RENDER_OFFLOAD, 1 cursor { - no_hardware_cursors = true + # Set to true if you have issues + no_hardware_cursors = false } render { diff --git a/hypr/plugins.conf b/hypr/plugins.conf index da118a4..7770f70 100644 --- a/hypr/plugins.conf +++ b/hypr/plugins.conf @@ -2,14 +2,13 @@ # HYPRLAND PLUGINS # #################### +# You can add your preferred plugins here. Get help on how to do so: https://wiki.hyprland.org/Plugins/Using-Plugins/ plugin { - # Example plugin configuration - hyprbars { - bar_height = 24 - - hyprbars-button = rgb(ff4040), 16, 󰖭, hyprctl dispatch killactive - hyprbars-button = rgb(eeee11), 16, , hyprctl dispatch fullscreen 1 - } + #hyprbars { + # bar_height = 24 + # hyprbars-button = rgb(ff4040), 16, 󰖭, hyprctl dispatch killactive + # hyprbars-button = rgb(eeee11), 16, , hyprctl dispatch fullscreen 1 + #} } diff --git a/hypr/rules.conf b/hypr/rules.conf index 0b7f73b..cc6054a 100644 --- a/hypr/rules.conf +++ b/hypr/rules.conf @@ -1,55 +1,62 @@ -############# -## RULES ## -############# +############################ +## WINDOW / LAYER RULES ## +############################ # See https://wiki.hyprland.org/Configuring/Window-Rules/ and https://wiki.hyprland.org/Configuring/Workspace-Rules/ for information on how to configure this # Floating windows - windowrulev2 = float, class:moe.launcher.* - windowrulev2 = float, class:com.github.rafostar.Clapper - windowrulev2 = float, class:xdg-desktop-portal* - windowrulev2 = float, class:org.pulseaudio.pavucontrol - windowrulev2 = float, class:org.gnome.Loupe - windowrulev2 = float, class:mcpelauncher-webview - windowrulev2 = float, class:org.gnome.Calculator - windowrulev2 = float, class:io.mrarm.mcpelauncher-ui-qt +windowrulev2 = float, class:moe.launcher.* +windowrulev2 = float, class:com.github.rafostar.Clapper +windowrulev2 = float, class:xdg-desktop-portal* +windowrulev2 = float, class:org.pulseaudio.pavucontrol +windowrulev2 = float, class:blueberry.py +windowrulev2 = float, class:org.gnome.Loupe +windowrulev2 = float, class:mcpelauncher-webview +windowrulev2 = float, class:org.gnome.Calculator +windowrulev2 = float, class:io.mrarm.mcpelauncher-ui-qt # Resize - windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol - windowrulev2 = size 70% 70%, class:io.mrarm.mcpelauncher-ui-qt +windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol +windowrulev2 = size 50% 50%, class:blueberry.py +windowrulev2 = size 70% 70%, class:io.mrarm.mcpelauncher-ui-qt # Moving - windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol - windowrulev2 = movetoworkspace e, class:org.pulseaudio.pavucontrol +windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol +windowrulev2 = move 49.27% 7.28%, class:blueberry.py +windowrulev2 = movetoworkspace e, class:org.pulseaudio.pavucontrol # Maximize - windowrulev2 = tile, title:^(Resources)$ +windowrulev2 = tile, title:^(Resources)$ # Animations - windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol - layerrule = animation slide right, swaync-control-center - layerrule = animation fade, selection - layerrule = animation fade, logout_dialog - layerrule = animation fade, waybar - layerrule = animation fade, hyprpaper - layerrule = animation slide right, swaync-notification-window - layerrule = animation fade, hyprpicker +windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol +windowrulev2 = animation slide right, class:blueberry.py +layerrule = animation slide right, swaync-control-center +layerrule = animation fade, selection +layerrule = animation fade, logout_dialog +layerrule = animation fade, waybar +layerrule = animation fade, hyprpaper +layerrule = animation slide right, swaync-notification-window +layerrule = animation fade, hyprpicker # Opacity - windowrulev2 = opacity .95 .95, class:kitty - windowrulev2 = opacity .88 .88, class:spotify +windowrulev2 = opacity .95 .95, class:kitty +windowrulev2 = opacity .88 .88, class:spotify +windowrulev2 = opacity .88 .88, class:hyprpolkitagent # Blur - windowrulev2 = noblur, class:^()$, title:^()$ +windowrulev2 = noblur, class:^()$, title:^()$ - # Window Blur list - blurls = logout_dialog - blurls = kitty +# Window Blur list +blurls = logout_dialog +blurls = kitty - # Layer Blur list - layerrule = blur, waybar - layerrule = ignorezero, waybar +# Layer Blur list +layerrule = blur, waybar +layerrule = ignorealpha .5, waybar +# layerrule = blur, swaync-control-center +# layerrule = ignorealpha .56, swaync-control-center # Suppress maximize event from windows - windowrulev2 = suppressevent maximize, class:.* +windowrulev2 = suppressevent maximize, class:.*