From 892b62a3129a6ae30fa6b039e3f88d370d418319 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 25 Jul 2026 11:50:05 +0530 Subject: feat(hyprland): migrate config to Lua, fix API calls, switch to hyprpaper - Set configType = "lua" for Hyprland 0.55+ Lua config format - Rewrite window rules to use hl.window_rule({...}) table API - Convert keybindings to hl.bind() with _args + mkLuaInline - Fix dispatchers: hl.dsp.focus (not window.focus), hl.dsp.focus({workspace=}) (not workspace.switch) - Replace swaybg with services.hyprpaper module for wallpaper - Fix border colors to use base07 (white) / base03 (grey) with rgba() format - Reduce default font size from 16 to 12 --- modules/desktop/xdg/default.nix | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'modules/desktop/xdg') diff --git a/modules/desktop/xdg/default.nix b/modules/desktop/xdg/default.nix index bf5ac02..5edaf03 100644 --- a/modules/desktop/xdg/default.nix +++ b/modules/desktop/xdg/default.nix @@ -5,19 +5,30 @@ pkgs, ... }: +let + # Hyprland ships its own portal for screensharing/screencasting + portalPkgs = + with pkgs; + [ + xdg-desktop-portal-termfilechooser + ] + ++ lib.optionals config.desktop.hyprland.enable [ + xdg-desktop-portal-hyprland + ] + ++ lib.optionals (!config.desktop.hyprland.enable) [ + xdg-desktop-portal-gtk + ]; + + defaultPortal = if config.desktop.hyprland.enable then "hyprland" else "gtk"; +in { config = lib.mkIf config.desktop.enable { xdg.portal = { enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-termfilechooser - xdg-desktop-portal-gtk - ]; + extraPortals = portalPkgs; config.common = { "org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" ]; - default = [ - "gtk" - ]; + default = [ defaultPortal ]; }; xdgOpenUsePortal = true; }; -- cgit v1.2.3