From c72d10c520e584d08b1de56914232a5a028c3f0a Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 31 Mar 2026 20:57:10 +0545 Subject: [PATCH] feat(config/hypr/UserConfigs): streamline keybinds and environment variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored the UserConfigs to simplify environment settings, enhance startup handling, and introduce flexible window rules. - Added LIBVA, GLX, and Electron env vars for better GPU integration - Introduced named window rules for viewer, multimedia video, and dialogs- Updated exec‑once commands and DBus import‑environment handling - Renamed notification variable to fix bind failures - Refined cursor‑zoom gestures and floating behavior - Adjusted scrolling, workspace layouts, and XWayland cursor settings- Cleaned up deprecated config lines and removed unused env entries --- config/hypr/UserConfigs/Apps.conf | 7 --- config/hypr/UserConfigs/ENVariables.conf | 6 ++- config/hypr/UserConfigs/Laptops.conf | 1 - config/hypr/UserConfigs/Startup_Apps.conf | 4 +- config/hypr/UserConfigs/UserKeybinds.conf | 7 ++- config/hypr/UserConfigs/UserSettings.conf | 52 +++++++++++++++++------ config/hypr/UserConfigs/WindowRules.conf | 47 +++++++++++++++++--- 7 files changed, 93 insertions(+), 31 deletions(-) delete mode 100644 config/hypr/UserConfigs/Apps.conf diff --git a/config/hypr/UserConfigs/Apps.conf b/config/hypr/UserConfigs/Apps.conf deleted file mode 100644 index b3698e6a..00000000 --- a/config/hypr/UserConfigs/Apps.conf +++ /dev/null @@ -1,7 +0,0 @@ -env = BROWSER, zen-browser #! -@browser -env = TERMINAL, kitty #! -@terminal -env = EDITOR, nvim #! -@editor -env = FILEMANAGER, thunar #! -@filemanager -env = XDG_UTILS_TERMINAL, kitty #! -@terminal -env = XDG_UTILS_BROWSER, zen-browser #! -@browser -env = XDG_UTILS_FILEMANAGER, thunar #! -@filemanager diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf index ef0f1f74..15ccc51c 100644 --- a/config/hypr/UserConfigs/ENVariables.conf +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -13,10 +13,14 @@ env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland +env = LIBVA_DRIVER_NAME,nvidia +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = ELECTRON_OZONE_PLATFORM_HINT,auto + env = SDL_VIDEODRIVEVER,wayland env = GDK_SCALE,1 - +env = QT_SELECTION=/usr/bin/qmake # firefox env = MOZ_ENABLE_WAYLAND,1 firefox diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf index b86c9898..76ffb2a2 100644 --- a/config/hypr/UserConfigs/Laptops.conf +++ b/config/hypr/UserConfigs/Laptops.conf @@ -1,5 +1,4 @@ - # See https://wiki.hyprland.org/Configuring/Keywords/ for more variable settings # These configs are mostly for laptops. This is addemdum to Keybinds.conf diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index 9a9a108f..53120aa9 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -3,8 +3,8 @@ exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CUR exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment --systemd --all exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME - - +exec-once = systemctl --user import-environment & +exec-once = hash dbus-update-activation-environment 2>/dev/null & exec-once = uwsm-app /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index ac242b91..a4318d11 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -13,9 +13,9 @@ $browser = zen-browser bind = Alt, f12, exec, notify-send 'Test notification' "Here's a really long message to test truncation and wrapping\nYou can middle click or flick this notification to dismiss it!" -a 'terminal' -A "Test1=I got it!" -A "Test2=Another action" bind = Alt, Equal, exec, notify-send 'hmm' ${SLURP_ARGS} -$axMessage = notify-send "Axenide" "FIRE IN THE HOLE‼️🗣️🔥🕳️" -i "/home/sankalp/.config/Ax-Shell/assets/ax.png" -A "🗣️" -A "🔥" -A "🕳️" -a "Source Code" +$Message = notify-send "Hello" "FIRE IN THE HOLE‼️🗣️🔥🕳️" -i "/home/sankalp/.face.icon" -A "🗣️" -A "🔥" -A "🕳️" -a "Source Code" -bind = SUPER ALT, N, exec, $axMessage # Message +bind = SUPER ALT, N, exec, $Message # Message # Applications bind = ALT SHIFT,Return, exec, $terminal --title float_kitty --single-instance bind = $mainMod, Return, exec,$terminal @@ -54,3 +54,6 @@ bind = $mainMod SHIFT, up, layoutmsg, movewindowto u bind = $mainMod SHIFT, down, layoutmsg, movewindowto d bindd = $mainMod SHIFT, comma, swap columns, layoutmsg, swapcol l + + + diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index b2d96aad..c2e4ab90 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -1,16 +1,39 @@ - # User Settings # refer to Hyprland wiki for more info https://wiki.hyprland.org/Configuring/Variables + dwindle { pseudotile = yes preserve_split = yes + smart_resizing = true + use_active_for_splits = true + smart_split = false + default_split_ratio = 1.0 + split_bias = 0 + precise_mouse_move = false special_scale_factor = 0.8 } master { - new_status = master - new_on_top=1 - mfact = 0.5 + new_status = slave + new_on_top = false + new_on_active = none + orientation = left + mfact = 0.55 + slave_count_for_center_master = 2 + center_master_fallback = left + smart_resizing = true + drop_at_cursor = true + always_keep_position = false +} + +scrolling { + column_width = 0.50 + fullscreen_on_one_column = true + direction = right + follow_focus = true +} + +monocle { } input { @@ -39,10 +62,10 @@ input { gesture { gesture = 3, horizontal, workspace, - gesture = 3, down, close, - gesture = 3, pinchin,float,tile - gesture = 3, pinchout,float, float - # gesture = 3, up, dispatcher, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+ + # gesture = 3, down, close, + gesture = 3, up, dispatcher, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 1.5}')" + gesture = 3, down, dispatcher, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 1.5}')" + gesture = 4, down, float } misc { @@ -50,8 +73,9 @@ misc { disable_splash_rendering = true mouse_move_enables_dpms = true vfr = 1 + vrr = 2 mouse_move_enables_dpms = true - enable_swallow = true + enable_swallow = false focus_on_activate = false swallow_regex = (foot|kitty|alacritty|Alacritty) middle_click_paste = false @@ -69,10 +93,12 @@ xwayland { } cursor { - no_hardware_cursors = false - enable_hyprcursor = true - warp_on_change_workspace = true - no_warps = true + sync_gsettings_theme = true + no_hardware_cursors = false + enable_hyprcursor = true + warp_on_change_workspace = true + no_warps = true + min_refresh_rate = 24 } ecosystem{ diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index cacc4b31..a44630dd 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -1,12 +1,8 @@ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# Xwaylandvideobridge (if installed) -windowrule = opacity 0.0 override, no_anim on, no_initial_focus on, max_size 1 1, no_blur on, match:class ^(xwaylandvideobridge)$ - - - # windowrule - tags - add apps under appropriate tag to use the same settings + # browser tags windowrule = tag +browser, match:class ^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$ windowrule = tag +browser, match:class ^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ @@ -94,6 +90,14 @@ windowrule = float on, size (monitor_w*0.7) (monitor_h*0.6), match:initial_title windowrule = size 850 550, move (center), float on, match:title float_kitty +# float popups and dialogue +windowrule = match:title ^(Authentication Required)$, float on, center on +windowrule = match:class (codium|codium-url-handler|VSCodium), match:title negative:(.*codium.*|.*VSCodium.*), float on +windowrule = match:title ^(Add Folder to Workspace)$, float on, size (monitor_w*0.7) (monitor_h*0.6), center on +windowrule = match:title ^(Save As)$, float on, size (monitor_w*0.7) (monitor_h*0.6), center on +windowrule = match:initial_title (Open Files), float on, size (monitor_w*0.7) (monitor_h*0.6) + + #Layer Rules layerrule = no_anim on, match:namespace hyprpicker layerrule = no_anim on, match:namespace selection @@ -102,3 +106,36 @@ layerrule = no_anim on, match:namespace noanim layerrule = ignore_alpha 0, match:namespace gtk-layer-shell layerrule = no_anim on, match:namespace fabric + +# Named rule for Viewer (tag) +windowrule { + name = Viewer (tag) + match:tag = viewer + float = on + center = on +} + +# Named rule for Multimedia Video (tag) +windowrule { + name = Multimedia Video (tag) + match:tag = multimedia_video + no_blur = on +} + +# Named rule for Thunar Dialogs +windowrule { + name = Thunar Dialogs + match:class = ([Tt]hunar) + match:title = negative:(.*[Tt]hunar.*) + float = on + center = on +} + +# Named rule for Settings (tag) +windowrule { + name = Settings (tag) + match:tag = settings + float = on + center = on + size = (monitor_w*0.7) (monitor_h*0.7) +}