From 7195bad13f5449c00c9db9b50e5b73889531bb07 Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 6 Nov 2024 12:06:38 -0600 Subject: [PATCH] nautilus: temp fix for background service Signed-off-by: Myned --- options/custom/desktops/hyprland/settings.nix | 4 ++++ options/custom/programs/nautilus.nix | 20 ++++++++++++------- options/custom/programs/waybar/default.nix | 1 + options/custom/settings/packages.nix | 1 - 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/options/custom/desktops/hyprland/settings.nix b/options/custom/desktops/hyprland/settings.nix index 41361e9..4a44f61 100644 --- a/options/custom/desktops/hyprland/settings.nix +++ b/options/custom/desktops/hyprland/settings.nix @@ -10,6 +10,7 @@ with lib; let clipse = "${pkgs.clipse}/bin/clipse"; firefox-esr = "${config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage}/bin/firefox-esr"; left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source; + nautilus = "${pkgs.nautilus}/bin/nautilus"; pkill = "${pkgs.procps}/bin/pkill"; rm = "${pkgs.coreutils}/bin/rm"; sleep = "${pkgs.coreutils}/bin/sleep"; @@ -72,6 +73,9 @@ in { "${sleep} 1 && ${clipse} --clear" # Clear clipboard history "${_1password} --silent" # Launch password manager in background #// "[group new; tile] ${firefox-esr}" + + # HACK: Launch hidden nautilus window in lieu of background service + "[workspace special:files silent] ${nautilus}" ]; # https://wiki.hyprland.org/Configuring/Variables/#xwayland diff --git a/options/custom/programs/nautilus.nix b/options/custom/programs/nautilus.nix index 97a9d8a..7d432e3 100644 --- a/options/custom/programs/nautilus.nix +++ b/options/custom/programs/nautilus.nix @@ -7,7 +7,13 @@ with lib; let cfg = config.custom.programs.nautilus; in { - options.custom.programs.nautilus.enable = mkOption {default = false;}; + options.custom.programs.nautilus = { + enable = mkOption {default = false;}; + git = mkOption {default = false;}; + index = mkOption {default = true;}; + service = mkOption {default = false;}; + terminal = mkOption {default = "kitty";}; + }; config = mkIf cfg.enable { # TODO: Use module when completed @@ -19,8 +25,8 @@ in { gnome = { sushi.enable = true; # Quick preview with spacebar - tracker.enable = true; # File indexing - tracker-miners.enable = true; + tracker.enable = cfg.index; # File indexing + tracker-miners.enable = cfg.index; }; }; @@ -29,7 +35,7 @@ in { #?? echo $NAUTILUS_4_EXTENSION_DIR programs.nautilus-open-any-terminal = { enable = true; - terminal = "kitty"; + terminal = cfg.terminal; }; home-manager.users.${config.custom.username} = { @@ -38,7 +44,7 @@ in { nautilus = "${pkgs.nautilus}/bin/nautilus"; turtle_service = "${pkgs.turtle}/bin/turtle_service"; in { - nautilus = { + nautilus = mkIf cfg.service { Unit.Description = "GNOME Files Background Service"; Install.WantedBy = ["graphical-session.target"]; @@ -51,10 +57,10 @@ in { }; }; - # TODO: Check for official service + # TODO: Check for module # BUG: Benign AttributeError when scanning on nautilus launch # Git integration dependency - turtle = { + turtle = mkIf cfg.git { Unit.Description = "Turtle Background Service"; Install.WantedBy = ["graphical-session.target"]; diff --git a/options/custom/programs/waybar/default.nix b/options/custom/programs/waybar/default.nix index 5ca9f8a..90f2b6f 100644 --- a/options/custom/programs/waybar/default.nix +++ b/options/custom/programs/waybar/default.nix @@ -180,6 +180,7 @@ in { format-icons = { android = ""; dropdown = "󰞷"; + files = "󰉋"; game = "󰊴"; music = "󰝚"; office = "󰈙"; diff --git a/options/custom/settings/packages.nix b/options/custom/settings/packages.nix index bc2e8ad..bc38962 100644 --- a/options/custom/settings/packages.nix +++ b/options/custom/settings/packages.nix @@ -131,7 +131,6 @@ in { syncthingtray # Syncthing client tagger # Audio file tagger telegram-desktop # Telegram client - turtle # Git client variety # Wallpaper changer ventoy # Image writer virt-viewer # Virtual machine viewer