From 1cfd242d8e982176267de4f7945955a69cd0ac34 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Mon, 22 Sep 2025 15:39:29 +0200 Subject: [PATCH] Hypr (desktop): adopt v2 monitors and portal deps --- .../10-appearance.conf##hostname.cn-arch | 10 ++++++ .../conf.d/20-monitors.conf##hostname.cn-arch | 32 +++++++++++++++++-- .../50-autostart.conf##hostname.cn-arch | 2 ++ .../60-windowrules.conf##hostname.cn-arch | 2 ++ .config/hypr/hyprland.conf##hostname.cn-arch | 5 +++ .config/hypr/scripts/check-deps.sh | 2 ++ 6 files changed, 50 insertions(+), 3 deletions(-) diff --git a/.config/hypr/conf.d/10-appearance.conf##hostname.cn-arch b/.config/hypr/conf.d/10-appearance.conf##hostname.cn-arch index 36c265f..ddeec21 100644 --- a/.config/hypr/conf.d/10-appearance.conf##hostname.cn-arch +++ b/.config/hypr/conf.d/10-appearance.conf##hostname.cn-arch @@ -22,6 +22,7 @@ general { # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false + dim_modal = true layerrule = blur, waybar # Add blur to waybar layerrule = blurpopups, waybar # Blur waybar popups too! @@ -45,6 +46,8 @@ group { font_size = 12 height = 18 gradients = true + rounding_power = 3.5 + gradient_rounding_power = 3.0 #col.active = rgb(293B6E) #col.inactive = rgba(595959aa) col.active = rgb(79,132,204) @@ -105,6 +108,7 @@ animations { animation = borderangle, 1, 8, default animation = fade, 1, 7, default animation = workspaces, 1, 6, default + animation = dpms, 1, 5, default } # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more @@ -129,8 +133,14 @@ master { misc { force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( + mouse_move_enables_dpms = true + key_press_enables_dpms = true } xwayland { force_zero_scaling = true } + +render { + send_content_type = true +} diff --git a/.config/hypr/conf.d/20-monitors.conf##hostname.cn-arch b/.config/hypr/conf.d/20-monitors.conf##hostname.cn-arch index dc78919..265da8d 100644 --- a/.config/hypr/conf.d/20-monitors.conf##hostname.cn-arch +++ b/.config/hypr/conf.d/20-monitors.conf##hostname.cn-arch @@ -1,4 +1,30 @@ -monitor = DP-1, 2560x1440@99.95, 1920x1584, 1, bitdepth, 10, cm, auto -monitor = DP-2, 3440x1440@100.0, 1476x144, 1, bitdepth, 10, cm, auto -monitor = HDMI-A-1, 1920x1080@60.0, 0x1584, 1 +# ~/.config/hypr/conf.d/20-monitors.conf +# Updated to monitorv2 syntax (Hyprland v0.50+) +monitorv2 { + output = DP-1 + mode = 2560x1440@99.95 + position = 1920x1584 + scale = 1 + bitdepth = 10 + cm = auto +} + +monitorv2 { + output = DP-2 + mode = 3440x1440@100 + position = 1476x144 + scale = 1 + bitdepth = 10 + cm = auto +} + +monitorv2 { + output = HDMI-A-1 + mode = 1920x1080@60 + position = 0x1584 + scale = 1 +} + +# Fallback for hotplugged displays (auto-center arrangement) +monitor = , preferred, auto-center-right, 1 diff --git a/.config/hypr/conf.d/50-autostart.conf##hostname.cn-arch b/.config/hypr/conf.d/50-autostart.conf##hostname.cn-arch index 27f51a2..4e9b23f 100644 --- a/.config/hypr/conf.d/50-autostart.conf##hostname.cn-arch +++ b/.config/hypr/conf.d/50-autostart.conf##hostname.cn-arch @@ -1,8 +1,10 @@ # ~/.config/hypr/conf.d/50-autostart.conf exec-once = dbus-update-activation-environment --all +exec-once = uwsm app -- polkit-gnome-authentication-agent-1 exec-once = uwsm app -- swaync exec-once = uwsm app -- waybar +exec-once = uwsm app -- xdg-desktop-portal-hyprland exec-once = xsettingsd exec-once = ~/.config/waybar/scripts/hyprsunset_daemon.sh diff --git a/.config/hypr/conf.d/60-windowrules.conf##hostname.cn-arch b/.config/hypr/conf.d/60-windowrules.conf##hostname.cn-arch index 7326de8..894118d 100644 --- a/.config/hypr/conf.d/60-windowrules.conf##hostname.cn-arch +++ b/.config/hypr/conf.d/60-windowrules.conf##hostname.cn-arch @@ -12,6 +12,7 @@ windowrule = noscreenshare, class:^(Element|signal|Signal|org\.telegram\.desktop ## ========== Multimedia ========== windowrule = workspace 8, class:Spotify +windowrule = cursor:invisible, class:^(mpv|VLC|net\.videolan\.VLC)$ ## ========== Development ========== windowrule = float, class:jetbrains-webstorm, title:Welcome to WebStorm @@ -21,6 +22,7 @@ windowrule = size 1080 720, class:jetbrains-webstorm, title:Welcome to WebStorm # World of Warcraft (Classic & Retail) windowrule = workspace 1,force, class:^(wowclassic|wow)\.exe$, title:World of Warcraft windowrule = fullscreen, class:^(wowclassic|wow)\.exe$, title:World of Warcraft +windowrule = novrr, class:^(wowclassic|wow)\.exe$ ## ========== Launcher ========== # Steam & Battle.net & Lutris diff --git a/.config/hypr/hyprland.conf##hostname.cn-arch b/.config/hypr/hyprland.conf##hostname.cn-arch index 084ca79..feac190 100644 --- a/.config/hypr/hyprland.conf##hostname.cn-arch +++ b/.config/hypr/hyprland.conf##hostname.cn-arch @@ -4,3 +4,8 @@ source = ~/.config/hypr/conf.d/*.conf env = GDK_SCALE, 1.6 env = XCURSOR_SIZE, 22 +env = MOZ_ENABLE_WAYLAND,1 +env = QT_QPA_PLATFORM,wayland +env = SDL_VIDEODRIVER,wayland +env = XDG_CURRENT_DESKTOP,Hyprland +env = XCURSOR_THEME,Breeze diff --git a/.config/hypr/scripts/check-deps.sh b/.config/hypr/scripts/check-deps.sh index 00ff496..f92f8b0 100755 --- a/.config/hypr/scripts/check-deps.sh +++ b/.config/hypr/scripts/check-deps.sh @@ -22,10 +22,12 @@ required=( 'hyprpaper|wallpaper daemon' 'hypridle|idle manager' 'hyprlock|lock screen' + 'polkit-gnome-authentication-agent-1|Polkit authentication agent required for permission prompts' 'hyprctl|Hyprland control tool' 'hyprsunset|color temperature daemon' 'swayosd-server|overlay indicators' 'swayosd-client|volume/brightness OSD client' + 'xdg-desktop-portal-hyprland|Wayland portal backend for screen sharing and sandboxed apps' 'playerctl|media key handler' 'wpctl|PipeWire volume control' 'grimblast|screenshot helper'