about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hm/soispha/conf/lf/default.nix2
-rw-r--r--hm/soispha/conf/lf/keybindings/default.nix189
-rw-r--r--hm/soispha/conf/lf/keybindings/dir_move.nix74
-rw-r--r--sys/secrets/default.nix8
4 files changed, 102 insertions, 171 deletions
diff --git a/hm/soispha/conf/lf/default.nix b/hm/soispha/conf/lf/default.nix
index 292a79bc..260b01fb 100644
--- a/hm/soispha/conf/lf/default.nix
+++ b/hm/soispha/conf/lf/default.nix
@@ -52,6 +52,8 @@ in {
       &${pkgs.ctpv}/bin/ctpv -s $id
       cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id
       set cleaner ${pkgs.ctpv}/bin/ctpvclear
+
+      source ${nixosConfig.age.secrets.lf.cd_paths}
     '';
   };
 }
diff --git a/hm/soispha/conf/lf/keybindings/default.nix b/hm/soispha/conf/lf/keybindings/default.nix
index ceec16e0..8be0dd73 100644
--- a/hm/soispha/conf/lf/keybindings/default.nix
+++ b/hm/soispha/conf/lf/keybindings/default.nix
@@ -1,97 +1,92 @@
-{nixosConfig, ...}: let
-  dir_move = import ./dir_move.nix {};
-in
-  {
-    # Remove some defaults
-    "'\"'" = null;
-    ";" = null;
-    "\"'\"" = null;
-    c = null;
-    d = null;
-    e = null;
-    j = null;
-    k = null;
-    m = null;
-
-    # Sorting
-    kn = ":set sortby natural; set info";
-    ks = ":set sortby size; set info size";
-    kt = ":set sortby time; set info time";
-    ka = ":set sortby atime; set info atime";
-    kc = ":set sortby ctime; set info ctime";
-    ke = ":set sortby ext; set info";
-
-    # Searching
-    l = "search-next";
-    L = "search-prev";
-
-    # File Openers
-    ee = "\$\$EDITOR \"$f\"";
-    es = "\$ nvim -S \"$f\"";
-    u = "view_file";
-    cc = "\$sudo -e \"$f\"";
-
-    # Archive Mappings
-    au = "unarchive";
-    aa = "archive";
-
-    # Trash Mappings
-    dd = "trash";
-    jc = "clear_trash";
-    jr = "restore_trash";
-
-    f = "execute";
-
-    # Dragon Mapping
-    dr = "dragon";
-    ds = "dragon-stay";
-    di = "dragon-individual";
-    #dm = "mvdragon";
-    #dc = "cpdragon";
-    dl = "dlfile";
-
-    cs = "stripspace";
-
-    # Vim keys
-    h = "updir";
-    t = "down";
-    n = "up";
-    s = "open";
-
-    # Basic Functions
-    "." = "set hidden!";
-    DD = "delete";
-    p = "paste";
-    x = "cut";
-    y = "copy";
-    "<enter>" = "open";
-
-    mk = "mk_ln";
-    mf = "mk_file";
-    me = "mk_file_and_edit";
-    md = "mk_dir";
-    ms = "mk_scr_default";
-    mt = "mk_scr_temp";
-
-    ch = "chmod";
-    bg = "set_wall_paper";
-    r = ":rename; cmd-end";
-    H = "go_project_base_directory";
-    R = "reload";
-    C = "clear";
-    U = "unselect";
-
-    # Movement
-    gjr = "cd ~/.local/share/Trash/files";
-    gus = "cd /run/user/${builtins.toString nixosConfig.users.users.soispha.uid}";
-
-    gc = "cd ~/.config";
-    gl = "cd ~/.local";
-    gE = "cd /etc";
-
-    "gU." = "cd /usr";
-    gUs = " cd /usr/share";
-
-    gt = "cd /tmp";
-  }
-  // dir_move
+{nixosConfig, ...}: {
+  # Remove some defaults
+  "'\"'" = null;
+  ";" = null;
+  "\"'\"" = null;
+  c = null;
+  d = null;
+  e = null;
+  j = null;
+  k = null;
+  m = null;
+
+  # Sorting
+  kn = ":set sortby natural; set info";
+  ks = ":set sortby size; set info size";
+  kt = ":set sortby time; set info time";
+  ka = ":set sortby atime; set info atime";
+  kc = ":set sortby ctime; set info ctime";
+  ke = ":set sortby ext; set info";
+
+  # Searching
+  l = "search-next";
+  L = "search-prev";
+
+  # File Openers
+  ee = "\$\$EDITOR \"$f\"";
+  es = "\$ nvim -S \"$f\"";
+  u = "view_file";
+  cc = "\$sudo -e \"$f\"";
+  f  = "execute";
+
+  # Archive Mappings
+  au = "unarchive";
+  aa = "archive";
+
+  # Trash Mappings
+  dd = "trash";
+  jc = "clear_trash";
+  jr = "restore_trash";
+
+  # Dragon Mapping
+  dr = "dragon";
+  ds = "dragon-stay";
+  di = "dragon-individual";
+  #dm = "mvdragon";
+  #dc = "cpdragon";
+  dl = "dlfile";
+
+  cs = "stripspace";
+
+  # Vim keys
+  h = "updir";
+  t = "down";
+  n = "up";
+  s = "open";
+
+  # Basic Functions
+  "." = "set hidden!";
+  DD = "delete";
+  p = "paste";
+  x = "cut";
+  y = "copy";
+  "<enter>" = "open";
+
+  mk = "mk_ln";
+  mf = "mk_file";
+  me = "mk_file_and_edit";
+  md = "mk_dir";
+  ms = "mk_scr_default";
+  mt = "mk_scr_temp";
+
+  ch = "chmod";
+  bg = "set_wall_paper";
+  r = ":rename; cmd-end";
+  H = "go_project_base_directory";
+  R = "reload";
+  C = "clear";
+  U = "unselect";
+
+  # Movement
+  gjr = "cd ~/.local/share/Trash/files";
+  gus = "cd /run/user/${builtins.toString nixosConfig.users.users.soispha.uid}";
+
+  gc = "cd ~/.config";
+  gl = "cd ~/.local";
+  gE = "cd /etc";
+
+  "gU." = "cd /usr";
+  gUs = " cd /usr/share";
+
+  gt = "cd /tmp";
+}
diff --git a/hm/soispha/conf/lf/keybindings/dir_move.nix b/hm/soispha/conf/lf/keybindings/dir_move.nix
deleted file mode 100644
index c70dc957..00000000
--- a/hm/soispha/conf/lf/keybindings/dir_move.nix
+++ /dev/null
@@ -1,74 +0,0 @@
-{...}: {
-  /*
-  *
-  These mappings are semi-auto generated using lf-make-map.
-  */
-  "gm." = "cd ~/media";
-  gmd = "cd ~/media/downloads";
-  gmi = "cd ~/media/isos";
-  gmm = "cd ~/media/music";
-  gmp = "cd ~/media/pictures";
-  gmte = "cd ~/media/templates";
-  gmtr = "cd ~/media/.Trash-1000";
-  gmu = "cd ~/media/public";
-  gmv = "cd ~/media/videos";
-  # -------------
-  "grn." = "cd ~/repos/nix";
-  grnc = "cd ~/repos/nix/nixos-config";
-  grnp = "cd ~/repos/nix/reference/nix/official/nixpkgs";
-  grns = "cd ~/repos/nix/server/nixos-server";
-  # -------------
-  "gr." = "cd ~/repos";
-  grah = "cd ~/repos/auto_hot_key";
-  grai = "cd ~/repos/ai";
-  graw = "cd ~/repos/awk";
-  grba = "cd ~/repos/backup";
-  grbw = "cd ~/repos/bwinf";
-  grcc = "cd ~/repos/c";
-  grcp = "cd ~/repos/cpp";
-  grg = "cd ~/repos/go";
-  grha = "cd ~/repos/haskell";
-  grht = "cd ~/repos/html";
-  grja = "cd ~/repos/java";
-  grjq = "cd ~/repos/jq";
-  grjs = "cd ~/repos/java_script";
-  grl = "cd ~/repos/lua";
-  grmd = "cd ~/repos/mark_down";
-  grno = "cd ~/repos/notes";
-  grnu = "cd ~/repos/nu";
-  grpe = "cd ~/repos/perl";
-  grpy = "cd ~/repos/python";
-  grrr = "cd ~/repos/r";
-  grru = "cd ~/repos/rust";
-  grs = "cd ~/repos/shell";
-  grte = "cd ~/repos/tex";
-  grtr = "cd ~/repos/.Trash-1000";
-  grty = "cd ~/repos/typst";
-  grv = "cd ~/repos/vim";
-  grz = "cd ~/repos/zig";
-  # -------------
-  "gs." = "cd ~/school";
-  gsb = "cd ~/school/biologie";
-  gsc = "cd ~/school/chemie";
-  gsde = "cd ~/school/deutsch";
-  gsds = "cd ~/school/dsa";
-  gsef = "cd ~/school/europa_fart_berlin";
-  gsen = "cd ~/school/english";
-  gsge = "cd ~/school/general";
-  gsgo = "cd ~/school/geographie";
-  gsgs = "cd ~/school/geschichte";
-  gsi = "cd ~/school/infomatik";
-  gskr = "cd ~/school/katholische_religion";
-  gsl = "cd ~/school/latein";
-  gsma = "cd ~/school/mathematik";
-  gsmi = "cd ~/school/mitschrift";
-  gsmu = "cd ~/school/musik";
-  gspb = "cd ~/school/praktikum_basf";
-  gsph = "cd ~/school/physik";
-  gspi = "cd ~/school/philosophie";
-  gsso = "cd ~/school/sozialkunde";
-  gssp = "cd ~/school/sport";
-  gstr = "cd ~/school/.Trash-1000";
-  gsw = "cd ~/school/website";
-  # -------------
-}
diff --git a/sys/secrets/default.nix b/sys/secrets/default.nix
index d69014bf..95bbf248 100644
--- a/sys/secrets/default.nix
+++ b/sys/secrets/default.nix
@@ -25,6 +25,14 @@ in {
             owner = "soispha";
             group = "users";
           };
+          lf = {
+            cd_paths = {
+              file = ./lf/cd_paths;
+              mode = "700";
+              owner = "soispha";
+              group = "users";
+            };
+          };
           serverphoneCa = {
             file = ./serverphone/ca.key;
             mode = "700";