From d4fc7e224967a63074af1d9f8d1e9f26171dd94e Mon Sep 17 00:00:00 2001 From: js0ny Date: Wed, 12 Nov 2025 06:27:54 +0000 Subject: [PATCH] feat(dolphin): declarative dolphin --- .../share/kxmlgui5/dolphin/dolphinui.rc | 207 ++++++++++++++++++ nixcfgs/users/js0ny/packages/gui.nix | 6 - .../users/js0ny/programs/desktop/plasma.nix | 1 + nixcfgs/users/js0ny/programs/dolphin.nix | 33 +++ nixcfgs/users/js0ny/programs/emacs.nix | 11 + nixcfgs/users/js0ny/programs/yazi.nix | 9 + nixcfgs/users/js0ny/zephyrus.nix | 3 + 7 files changed, 264 insertions(+), 6 deletions(-) create mode 100644 home/dot_local/share/kxmlgui5/dolphin/dolphinui.rc create mode 100644 nixcfgs/users/js0ny/programs/dolphin.nix create mode 100644 nixcfgs/users/js0ny/programs/yazi.nix diff --git a/home/dot_local/share/kxmlgui5/dolphin/dolphinui.rc b/home/dot_local/share/kxmlgui5/dolphin/dolphinui.rc new file mode 100644 index 0000000..da645e8 --- /dev/null +++ b/home/dot_local/share/kxmlgui5/dolphin/dolphinui.rc @@ -0,0 +1,207 @@ + + + + + &File + + + + + + + + + + + + + + + + + + + + + + + + + &Edit + + + + + + + + + + + + + + + + + + + + + + + + + + + + &View + + + + + + + + + + + + + + + + + + + + + + + + + + Location Bar + + + + + + + + &Go + + + + + + + + + + + + + + + + + + + &Tools + + + + + + + + + &Settings + + + + + + + + + + + + &Help + + + + + + + + + + + + + + Main Toolbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index 3048ec5..a812823 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -6,12 +6,6 @@ alacritty warp-terminal - # Explorer - kdePackages.dolphin - kdePackages.dolphin-plugins # dolphin git integration - kdePackages.konsole # dolphin terminal integration - yazi # terminal file manager - # PDF Viewer kdePackages.okular # default sioyek diff --git a/nixcfgs/users/js0ny/programs/desktop/plasma.nix b/nixcfgs/users/js0ny/programs/desktop/plasma.nix index 799e6e4..7a6c326 100644 --- a/nixcfgs/users/js0ny/programs/desktop/plasma.nix +++ b/nixcfgs/users/js0ny/programs/desktop/plasma.nix @@ -5,6 +5,7 @@ }: { imports = [ ../gwenview.nix + ../dolphin.nix ]; home.packages = with pkgs; [ # kdePackages.yakuake diff --git a/nixcfgs/users/js0ny/programs/dolphin.nix b/nixcfgs/users/js0ny/programs/dolphin.nix new file mode 100644 index 0000000..6915f56 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/dolphin.nix @@ -0,0 +1,33 @@ +{ + pkgs, + lib, + ... +}: { + home.packages = with pkgs.kdePackages; [ + dolphin + dolphin-plugins # dolphin git integration + konsole # dolphin terminal integration + ]; + xdg.configFile."dolphinrc-override".text = lib.generators.toINI {} { + General = { + ShowSelectionToggle = false; + UseTabForSwitchingSplitView = true; + }; + VersionControl = { + enabledPlugins = "Subversion,Git"; + }; + }; + + # Manually merge dolphin config to existing file + home.activation.mergeDolphinrc = lib.hm.dag.entryAfter ["writeBoundary"] '' + if [ -f ~/.config/dolphinrc-override ]; then + # Create dolphinrc if it doesn't exist + touch ~/.config/dolphinrc + + # Merge the override file into the main config + ${pkgs.crudini}/bin/crudini --merge ~/.config/dolphinrc < ~/.config/dolphinrc-override + + $DRY_RUN_CMD rm -f ~/.config/dolphinrc-override + fi + ''; +} diff --git a/nixcfgs/users/js0ny/programs/emacs.nix b/nixcfgs/users/js0ny/programs/emacs.nix index b80e70f..65d1374 100644 --- a/nixcfgs/users/js0ny/programs/emacs.nix +++ b/nixcfgs/users/js0ny/programs/emacs.nix @@ -5,9 +5,20 @@ extraPackages = epkgs: with epkgs; [ evil + evil-leader + evil-commentary + evil-surround + evil-mc + evil-goggles telega beancount counsel + company + vertico + marginalia + dirvish + nix-ts-mode + flycheck ]; }; home.packages = with pkgs; [ diff --git a/nixcfgs/users/js0ny/programs/yazi.nix b/nixcfgs/users/js0ny/programs/yazi.nix new file mode 100644 index 0000000..fa77683 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/yazi.nix @@ -0,0 +1,9 @@ +{...}: { + programs.yazi = { + enable = true; + enableZshIntegration = true; + enableFishIntegration = true; + enableNushellIntegration = true; + shellWrapperName = "y"; + }; +} diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 5e9a3ee..c379cb8 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -36,6 +36,9 @@ ./programs/ollama.nix ./programs/sops.nix ./programs/pdf2zh.nix + ./programs/gwenview.nix + ./programs/yazi.nix + ./programs/dolphin.nix # Desktop Linux ./programs/desktop/plasma.nix