about summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/by-name/lf/lf/commands/default.nix5
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/open.sh15
-rw-r--r--modules/by-name/lf/lf/module.nix2
-rw-r--r--modules/by-name/mp/mpd/mpc.nix5
-rw-r--r--modules/by-name/nv/nvim/plgs/harpoon/default.nix112
-rw-r--r--modules/by-name/xd/xdg/module.nix4
-rwxr-xr-xmodules/by-name/xd/xdg/scripts/url-handler.sh2
-rw-r--r--modules/by-name/zs/zsh/module.nix5
-rw-r--r--modules/home.legacy/pkgs/default.nix5
9 files changed, 40 insertions, 115 deletions
diff --git a/modules/by-name/lf/lf/commands/default.nix b/modules/by-name/lf/lf/commands/default.nix
index 0c42607b..90b333c6 100644
--- a/modules/by-name/lf/lf/commands/default.nix
+++ b/modules/by-name/lf/lf/commands/default.nix
@@ -124,11 +124,6 @@ in {
     dependencies = [pkgs.gnused];
   };
 
-  open = async {
-    name = "open";
-    dependencies = [pkgs.handlr-regex];
-  };
-
   trash = pipe {
     name = "trash";
     dependencies = [pkgs.trash-cli];
diff --git a/modules/by-name/lf/lf/commands/scripts/open.sh b/modules/by-name/lf/lf/commands/scripts/open.sh
deleted file mode 100755
index b494074f..00000000
--- a/modules/by-name/lf/lf/commands/scripts/open.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-# shellcheck shell=sh
-
-# shellcheck disable=SC2269
-f="$f"
-# shellcheck disable=SC2269
-fx="$fx"
-# shellcheck disable=SC2269
-fs="$fs"
-# shellcheck disable=SC2269
-id="$id"
-
-# TODO: For some reason, `xdg-utils` tries to open firefox with it's default profile for
-# _everything_. Using `handlr-regex` sort-of solves this. <2025-04-04>
-handlr open "$f"
-# vim: ft=sh
diff --git a/modules/by-name/lf/lf/module.nix b/modules/by-name/lf/lf/module.nix
index 6dc8e919..ae1534d0 100644
--- a/modules/by-name/lf/lf/module.nix
+++ b/modules/by-name/lf/lf/module.nix
@@ -75,7 +75,7 @@ in {
           icons = true;
           ifs = "\\n"; # internal field separator for shell commands
           #info = "size"; # show the size of a directory
-          shell = "sh";
+          shell = "${lib.getExe pkgs.dash}";
           shellopts = "-eu"; # e: exit on error; u: error for unset variables
         };
         extraConfig = ''
diff --git a/modules/by-name/mp/mpd/mpc.nix b/modules/by-name/mp/mpd/mpc.nix
index 031465fe..b1398b77 100644
--- a/modules/by-name/mp/mpd/mpc.nix
+++ b/modules/by-name/mp/mpd/mpc.nix
@@ -5,7 +5,6 @@
   ...
 }: let
   cfg = config.soispha.services.mpd.mpc;
-  parentCfg = config.soispha.services.mpd;
 in {
   options.soispha.services.mpd.mpc = {
     enable = lib.mkEnableOption "mpc with extensions";
@@ -29,9 +28,7 @@ in {
         beets = cfg.beetsPkg;
       })
       # Displays the lyrics of the currently playing song
-      (pkgs.mpp-lyrics.override {
-        mpd_music_dir = parentCfg.directories.music;
-      })
+      pkgs.mpp-lyrics
     ];
   };
 }
diff --git a/modules/by-name/nv/nvim/plgs/harpoon/default.nix b/modules/by-name/nv/nvim/plgs/harpoon/default.nix
index 15e25468..3760ce15 100644
--- a/modules/by-name/nv/nvim/plgs/harpoon/default.nix
+++ b/modules/by-name/nv/nvim/plgs/harpoon/default.nix
@@ -1,96 +1,44 @@
 {
-  pkgs,
-  config,
   lib,
+  config,
   ...
 }: let
-  numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"];
-  mkNumberedCommand = {
-    command_template,
-    prefix,
-    number,
-    desc_template,
-  }: {
-    key = "${prefix}${number}";
-    action.__raw = ''
-      function()
-        ${command_template number}
-      end
-    '';
-    options.desc = "${desc_template number}";
-  };
-  mkGotoTerminalCommand = number: let
-    desc_template = number: "Goto terminal number ${number}";
-    command_template = number: ''require("harpoon.term").gotoTerminal(${number})'';
-    prefix = "gt";
-  in
-    mkNumberedCommand {inherit desc_template command_template prefix number;};
-  mkGotoFileCommand = number: let
-    desc_template = number: "Goto Buffer number ${number}";
-    command_template = number: ''require("harpoon.ui").nav_file(${number})'';
-    prefix = "gf";
-  in
-    mkNumberedCommand {inherit desc_template command_template prefix number;};
-
-  gotoTerminalMappings = builtins.map mkGotoTerminalCommand numbers;
-  gotoFileMappings = builtins.map mkGotoFileCommand numbers;
   cfg = config.soispha.programs.nvim;
 in {
   home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable {
-    plugins.harpoon = {
-      enable = true;
-      package = pkgs.vimPlugins.harpoon;
-      enableTelescope = true;
-    };
+    plugins.harpoon.enable = true;
+
     keymaps =
-      [
-        {
-          key = "-";
-          action.__raw = ''
+      lib.mapAttrsToList
+      (key: action: {
+        mode = "n";
+        inherit key;
+        action.__raw = builtins.elemAt action 0;
+        options.silent = true;
+        options.desc = builtins.elemAt action 1;
+      })
+      {
+        # add current file
+        "<leader><leader>" = [
+          # lua
+          ''
             function()
-              require("harpoon.ui").nav_next()
-             end
-          '';
-          options.desc = "go to the next marked file";
-        }
-        {
-          key = "_";
-          action.__raw = ''
-            function()
-              require("harpoon.ui").nav_prev()
-             end
-          '';
-          options.desc = "go to the previous marked file";
-        }
-        {
-          key = "<leader><leader>";
-          action.__raw = ''
-            function()
-              require("harpoon.mark").add_file()
+              require("harpoon"):list():add()
             end
-          '';
-          options.desc = "add a mark to the open file in harpoon.";
-        }
-        {
-          key = "gqc";
-          action.__raw = ''
-            function()
-              require("harpoon.cmd-ui").toggle_quick_menu()
-            end
-          '';
-          options.desc = "toggle the harpoon command quick menu to see all commands.";
-        }
-        {
-          key = "<leader>q";
-          action.__raw = ''
+          ''
+          "Add a mark to the open file in harpoon."
+        ];
+
+        # open menu
+        "<leader>q" = [
+          # lua
+          ''
             function()
-              require("harpoon.ui").toggle_quick_menu()
+                require("harpoon").ui:toggle_quick_menu(require("harpoon"):list())
             end
-          '';
-          options.desc = "toggle the harpoon normal quick menu to see all marks.";
-        }
-      ]
-      ++ gotoFileMappings
-      ++ gotoTerminalMappings;
+          ''
+          "Toggle the harpoon normal quick menu to see all marks."
+        ];
+      };
   };
 }
diff --git a/modules/by-name/xd/xdg/module.nix b/modules/by-name/xd/xdg/module.nix
index f1781d86..a7c77cd7 100644
--- a/modules/by-name/xd/xdg/module.nix
+++ b/modules/by-name/xd/xdg/module.nix
@@ -38,6 +38,8 @@ in {
   config = lib.mkIf cfg.enable {
     home-manager.users.soispha = {
       xdg = {
+        configFile."xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile;
+
         desktopEntries = {
           url-handler = {
             name = "url-handler";
@@ -107,8 +109,6 @@ in {
       };
     };
 
-    environment.etc."xdg/xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile;
-
     systemd.user.services.xdg-desktop-portal-termfilechooser = {
       serviceConfig.ExecStart = [
         ""
diff --git a/modules/by-name/xd/xdg/scripts/url-handler.sh b/modules/by-name/xd/xdg/scripts/url-handler.sh
index 222c91f3..d1c8277d 100755
--- a/modules/by-name/xd/xdg/scripts/url-handler.sh
+++ b/modules/by-name/xd/xdg/scripts/url-handler.sh
@@ -2,7 +2,7 @@
 
 project="$({
     tskm projects list
-    echo nvim zathura
+    printf "%s\n" nvim zathura
 } | rofi -sep "$(printf "\n")" -dmenu)"
 
 if [ "$project" = "nvim" ]; then
diff --git a/modules/by-name/zs/zsh/module.nix b/modules/by-name/zs/zsh/module.nix
index b50e72ac..fd99031b 100644
--- a/modules/by-name/zs/zsh/module.nix
+++ b/modules/by-name/zs/zsh/module.nix
@@ -3,6 +3,7 @@
   lib,
   shell_library,
   system,
+  pkgs,
   ...
 }: let
   cfg = config.soispha.programs.zsh;
@@ -133,8 +134,8 @@ in {
         };
 
         shellAliases = {
-          ll = ". ll";
-          lm = ". lm";
+          ll = ". ${lib.getExe pkgs.ll}";
+          lm = ". ${lib.getExe pkgs.lm}";
         };
       };
     };
diff --git a/modules/home.legacy/pkgs/default.nix b/modules/home.legacy/pkgs/default.nix
index 31942f0d..fd8b811a 100644
--- a/modules/home.legacy/pkgs/default.nix
+++ b/modules/home.legacy/pkgs/default.nix
@@ -85,7 +85,8 @@ with pkgs; let
 
     SystemUpdate = [
       fupdate # Generic update tool.
-      update-sys # System update tool (meant to slot into `fupdate`).
+      fupdate-sys # System update tool (meant to slot into `fupdate`).
+      fupdate-flake # Nix flake update tool (meant to slot into `fupdate`).
     ];
 
     FileListers = [
@@ -93,8 +94,6 @@ with pkgs; let
       fd # Simple, fast and user-friendly alternative to find
       ripgrep # A search tool that combines the usability of ag with the raw speed of grep
       file # Show information about a file
-      ll # Wrapper around `lf` to automatically change the path
-      lm # Wrapper around `ll` to automatically cd to the last accessed path
     ];
 
     Programming = {