From f6377d26b6983289cdc5228bbd2fe1c3ab501172 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 21 Apr 2025 21:55:36 +0800 Subject: [PATCH] fix hyprland config --- modules/home/hyprland/conf/hypr/hyprland.conf | 43 +++++++++++++++---- modules/home/hyprland/conf/hypr/monitors.conf | 26 +++++------ modules/home/hyprland/conf/hypr/nvidia.conf | 25 ++++++++--- 3 files changed, 68 insertions(+), 26 deletions(-) diff --git a/modules/home/hyprland/conf/hypr/hyprland.conf b/modules/home/hyprland/conf/hypr/hyprland.conf index adc84ab..c602ba5 100644 --- a/modules/home/hyprland/conf/hypr/hyprland.conf +++ b/modules/home/hyprland/conf/hypr/hyprland.conf @@ -35,13 +35,30 @@ exec-once = nm-applet --indicator # systray app for Network/Wifi exec-once = dunst # start notification demon exec-once = wl-paste --type text --watch cliphist store # clipboard store text data exec-once = wl-paste --type image --watch cliphist store # clipboard store image data -exec-once = fcitx5 exec-once = ~/.config/swww/swwwallpaper.sh # start wallpaper daemon -exec-once = ~/.config/hypr/scripts/resetxdgportal.sh # reset XDPH for screenshare +exec-once = fcitx5 #exec-once = swayidle -w timeout 900 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' # turn off monitor after 15 mins +# █▀▀ █▄░█ █░█ +# ██▄ █░▀█ ▀▄▀ + +# Some default env vars. + +# env = XDG_CURRENT_DESKTOP,Hyprland +# env = XDG_SESSION_TYPE,wayland +# env = XDG_SESSION_DESKTOP,Hyprland +# env = GDK_BACKEND,wayland +# env = QT_QPA_PLATFORM,wayland +# #env = QT_STYLE_OVERRIDE,kvantum +# env = QT_QPA_PLATFORMTHEME,qt5ct +# env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +# env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +# env = XDG_PICTURES_DIR,$HOME/Pictures + + + # █ █▄░█ █▀█ █░█ ▀█▀ # █ █░▀█ █▀▀ █▄█ ░█░ @@ -67,9 +84,9 @@ input { # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more -device:epic mouse V1 { - sensitivity = -0.5 -} +#device:epic mouse V1 { +# sensitivity = -0.5 +#} # See https://wiki.hyprland.org/Configuring/Variables/ for more @@ -92,12 +109,22 @@ dwindle { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more -master { - new_is_master = true -} +#master { +# new_is_master = true +#} +# █▀▄▀█ █ █▀ █▀▀ +# █░▀░█ █ ▄█ █▄▄ + +# See https://wiki.hyprland.org/Configuring/Variables/ for more + +misc { + vrr = 0 +} + + # █▀ █▀█ █░█ █▀█ █▀▀ █▀▀ # ▄█ █▄█ █▄█ █▀▄ █▄▄ ██▄ diff --git a/modules/home/hyprland/conf/hypr/monitors.conf b/modules/home/hyprland/conf/hypr/monitors.conf index 2ca27a4..901e0d3 100644 --- a/modules/home/hyprland/conf/hypr/monitors.conf +++ b/modules/home/hyprland/conf/hypr/monitors.conf @@ -6,19 +6,19 @@ # monitor = name, resolution, offset, scale, extra-args # monitor = ,preferred,auto,auto -monitor = DP-3,1920x1080@60,0x0,1,transform,1 -monitor = HDMI-A-1,1920x1080@60,1080x0,1, -monitor = HDMI-A-3,1920x1080@60,3000x0,1, +monitor = HDMI-A-2, 1920x1080@60, 1080x0, 1 +monitor = DP-3, preferred, auto, 1 +# monitor = DP-3, 1920x1080@60, x0, 1, transform,1 + + +workspace = 1,monitor:HDMI-A-2 +workspace = 2,monitor:HDMI-A-2 +workspace = 3,monitor:HDMI-A-2 +workspace = 4,monitor:HDMI-A-2 +workspace = 5,monitor:HDMI-A-2 -workspace = 5,monitor:DP-3 workspace = 6,monitor:DP-3 workspace = 7,monitor:DP-3 - -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 = 8,monitor:HDMI-A-3 -workspace = 9,monitor:HDMI-A-3 -workspace = 10,monitor:HDMI-A-3 \ No newline at end of file +workspace = 8,monitor:DP-3 +workspace = 9,monitor:DP-3 +workspace = 0,monitor:DP-3 \ No newline at end of file diff --git a/modules/home/hyprland/conf/hypr/nvidia.conf b/modules/home/hyprland/conf/hypr/nvidia.conf index d25c019..af6395b 100644 --- a/modules/home/hyprland/conf/hypr/nvidia.conf +++ b/modules/home/hyprland/conf/hypr/nvidia.conf @@ -2,10 +2,25 @@ # █▄░█ █░█ █ █▀▄ █ ▄▀█ # █░▀█ ▀▄▀ █ █▄▀ █ █▀█ -#env = GBM_BACKEND,nvidia-drm +# Hyprland Nvidia Configuration +# See https://wiki.hyprland.org/Nvidia/ env = LIBVA_DRIVER_NAME,nvidia -env = __GLX_VENDOR_LIBRARY_NAME,nvidia -env = __GL_VRR_ALLOWED,1 -env = WLR_NO_HARDWARE_CURSORS,1 -env = WLR_DRM_NO_ATOMIC,1 +env = __GLX_VENDOR_LIBRARY_NAME,nvidia # Disable this if you have issues with screensharing +# If you want to try hardware cursors, +# you can enable them by setting `cursor:no_hardware_cursors = false` , +# but it will require also enabling `cursor:allow_dumb_copy` +# which may cause small to major hitches whenever the cursor shape changes. +# If this is a problem on your system, keep hardware cursors disabled. +cursor:no_hardware_cursors = true # Set to true to avoid hitches +# cursor:allow_dumb_copy = true + +# https://wiki.hyprland.org/Nvidia/#va-api-hardware-video-acceleration +# Hardware video acceleration on Nvidia and Wayland is +# possible with the nvidia-vaapi-driver. +# This may solve specific issues in Electron apps. +env = NVD_BACKEND,direct # Requires 'libva-nvidia-driver' package + +# https://wiki.hyprland.org/Nvidia/#regarding-environment-variables +# If you encounter crashes in Firefox, remove this line +env = GBM_BACKEND,nvidia-drm