about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/lf/lf/keybindings/default.nix6
-rw-r--r--modules/by-name/lf/lf/module.nix24
2 files changed, 22 insertions, 8 deletions
diff --git a/modules/by-name/lf/lf/keybindings/default.nix b/modules/by-name/lf/lf/keybindings/default.nix
index 7ae720e0..f624719f 100644
--- a/modules/by-name/lf/lf/keybindings/default.nix
+++ b/modules/by-name/lf/lf/keybindings/default.nix
@@ -1,4 +1,7 @@
-{uid}: {
+{
+  uid,
+  downloadDir,
+}: {
   # Remove some defaults
   "'\"'" = null;
   ";" = null;
@@ -87,6 +90,7 @@
   gc = "cd ~/.config";
   gl = "cd ~/.local";
   gE = "cd /etc";
+  gd = "cd ${downloadDir}";
 
   "gU." = "cd /usr";
   gUs = " cd /usr/share";
diff --git a/modules/by-name/lf/lf/module.nix b/modules/by-name/lf/lf/module.nix
index 1c02092d..840ba492 100644
--- a/modules/by-name/lf/lf/module.nix
+++ b/modules/by-name/lf/lf/module.nix
@@ -8,18 +8,28 @@
   ...
 }: let
   commands = import ./commands {inherit pkgs sysLib shell_library system;};
-  keybindings = import ./keybindings {inherit (cfg.keymaps) uid;};
+  keybindings = import ./keybindings {inherit (cfg.keymaps) uid downloadDir;};
 
   cfg = config.soispha.programs.lf;
 in {
   options.soispha.programs.lf = {
     enable = lib.mkEnableOption "lf";
-    keymaps.uid = lib.mkOption {
-      description = ''
-        The uid to use when constructing the `/run/user/''${uid}` path.
-      '';
-      type = lib.types.ints.unsigned;
-      default = config.users.users.soispha.uid;
+    keymaps = {
+      downloadDir = lib.mkOption {
+        description = ''
+          The directory to cd to when the user wants to access the download dir.
+        '';
+        type = lib.types.str;
+        default = config.home-manager.users.soispha.xdg.userDirs.download;
+      };
+
+      uid = lib.mkOption {
+        description = ''
+          The uid to use when constructing the `/run/user/''${uid}` path.
+        '';
+        type = lib.types.ints.unsigned;
+        default = config.users.users.soispha.uid;
+      };
     };
   };