From e08222fc8f35110c2539397bda39c39b92bd8b29 Mon Sep 17 00:00:00 2001 From: DACHXY Date: Wed, 1 Jan 2025 03:29:41 +0800 Subject: [PATCH] fix: nemo open in terminal --- home/user/hypr/exec.nix | 7 ++++++- home/user/hyprland.nix | 3 ++- system/modules/packages.nix | 29 ++++------------------------- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/home/user/hypr/exec.nix b/home/user/hypr/exec.nix index 530fabb..5b7a0c6 100644 --- a/home/user/hypr/exec.nix +++ b/home/user/hypr/exec.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, inputs, system, ... }: +{ pkgs, lib, inputs, system, terminal }: let swayncScript = pkgs.pkgs.writeShellScriptBin "swaync-start" '' XDG_CONFIG_HOME="$HOME/.dummy" # Prevent swaync use default gtk theme @@ -6,6 +6,10 @@ let ''; startupScript = pkgs.pkgs.writeShellScriptBin "start" '' + # Fix nemo open in terminal + dconf write /org/cinnamon/desktop/applications/terminal/exec "''\'${terminal}''\'" & + dconf write /org/cinnamon/desktop/applications/terminal/exec-arg "''\'''\'" & + uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 & uwsm app -- ${swayncScript}/bin/swaync-start & dbus-update-activation-environment --systemd --all & @@ -20,3 +24,4 @@ let ''; in ''${startupScript}/bin/start'' + diff --git a/home/user/hyprland.nix b/home/user/hyprland.nix index 4908819..9ccc464 100644 --- a/home/user/hyprland.nix +++ b/home/user/hyprland.nix @@ -1,7 +1,8 @@ { pkgs, lib, inputs, system, cursor-size, ... }: let - startScript = import ./hypr/exec.nix { inherit pkgs lib inputs system; }; + terminal = "ghostty"; + startScript = import ./hypr/exec.nix { inherit pkgs lib inputs system terminal; }; mainMod = "SUPER"; window = import ./hypr/window.nix; windowrule = import ./hypr/windowrule.nix; diff --git a/system/modules/packages.nix b/system/modules/packages.nix index da28e36..9ccbace 100644 --- a/system/modules/packages.nix +++ b/system/modules/packages.nix @@ -1,28 +1,5 @@ { pkgs, inputs, system, ... }: -let - terminalContent = '' - [Nemo Action] - Name=Open in Ghostty - Comment=Open folder in Ghostty - Exec=ghostty -e \"cd %F && exec bash\" - Icon-Name=ghostty - Selection=any - Extensions=dir; - Quote=double - EscapeSpaces=true - Dependencies=ghostty; - ''; - - nemo-unwrapped = pkgs.nemo.overrideAttrs (oldAttrs: { - postInstall = '' - ${oldAttrs.postInstall} - - # Open in Terminal Patch - echo "${terminalContent}" > $out/share/nemo/actions/open_in_terminal.nemo_action - ''; - }); -in { environment.systemPackages = (with pkgs; [ # gtk theme @@ -32,6 +9,9 @@ in # Browser firefox + # File Manager + nemo + # Utils bat btop @@ -103,8 +83,7 @@ in ffmpegthumbnailer ]) ++ ([ inputs.ghostty.packages.${system}.default - inputs.yazi.packages.x86_64-linux.default # Terminal file manager - nemo-unwrapped ]); } +