about summary refs log tree commit diff stats
path: root/modules/home.legacy/conf/lf
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 21:56:16 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 21:59:59 +0200
commit746ea42ff4616024ec41b6dcb1d2588dee4b85d1 (patch)
tree4d4a1a774f6499161f7bd3077f1f21c31f93da35 /modules/home.legacy/conf/lf
parentrefactor(modules/legacy/conf/zsh): Parameterize and move to new `by-name` (diff)
downloadnixos-config-746ea42ff4616024ec41b6dcb1d2588dee4b85d1.tar.gz
nixos-config-746ea42ff4616024ec41b6dcb1d2588dee4b85d1.zip
refactor(modules/legacy/conf/lf): Move to new `by-name` dir
This makes it possible to mix and match between `NixOS` and
`home-manager` options and thus allows merging the secret handling
directly into this module. Furthermore, the `systemd` tempfiles handling
was also merged into this module.
Diffstat (limited to '')
-rw-r--r--modules/by-name/lf/lf/colors (renamed from modules/home.legacy/conf/lf/colors)0
-rw-r--r--modules/by-name/lf/lf/commands/default.nix (renamed from modules/home.legacy/conf/lf/commands/default.nix)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/archive.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/archive.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/broot_jump.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/broot_jump.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/chmod.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/chmod.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/clear_trash.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/clear_trash.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/cow_cp.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/cow_cp.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/dl_file.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/dl_file.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/dragon.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/dragon.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/dragon_individual.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/dragon_individual.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/dragon_stay.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/dragon_stay.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/execute.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/execute.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/follow_link.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/follow_link.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/fzf_jump.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/fzf_jump.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/go_project_root.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/go_project_root.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/mk_dir.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/mk_dir.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/mk_file.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/mk_file.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/mk_file_and_edit.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/mk_file_and_edit.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/mk_ln.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/mk_ln.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/mk_scr_default.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/mk_scr_default.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/mk_scr_temp.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/mk_scr_temp.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/restore_trash.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/restore_trash.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/set_wall_paper.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/set_wall_paper.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/stripspace.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/stripspace.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/trash.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/trash.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/unarchive.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/unarchive.sh)0
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/view_file.sh (renamed from modules/home.legacy/conf/lf/commands/scripts/view_file.sh)0
-rw-r--r--modules/by-name/lf/lf/icons (renamed from modules/home.legacy/conf/lf/icons)0
-rw-r--r--modules/by-name/lf/lf/keybindings/default.nix (renamed from modules/home.legacy/conf/lf/keybindings/default.nix)4
-rw-r--r--modules/home.legacy/conf/lf/default.nix59
30 files changed, 2 insertions, 61 deletions
diff --git a/modules/home.legacy/conf/lf/colors b/modules/by-name/lf/lf/colors
index 1c2853ec..1c2853ec 100644
--- a/modules/home.legacy/conf/lf/colors
+++ b/modules/by-name/lf/lf/colors
diff --git a/modules/home.legacy/conf/lf/commands/default.nix b/modules/by-name/lf/lf/commands/default.nix
index 933769ac..933769ac 100644
--- a/modules/home.legacy/conf/lf/commands/default.nix
+++ b/modules/by-name/lf/lf/commands/default.nix
diff --git a/modules/home.legacy/conf/lf/commands/scripts/archive.sh b/modules/by-name/lf/lf/commands/scripts/archive.sh
index 25f40534..25f40534 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/archive.sh
+++ b/modules/by-name/lf/lf/commands/scripts/archive.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/broot_jump.sh b/modules/by-name/lf/lf/commands/scripts/broot_jump.sh
index 8f40ba01..8f40ba01 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/broot_jump.sh
+++ b/modules/by-name/lf/lf/commands/scripts/broot_jump.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/chmod.sh b/modules/by-name/lf/lf/commands/scripts/chmod.sh
index 9859127b..9859127b 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/chmod.sh
+++ b/modules/by-name/lf/lf/commands/scripts/chmod.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/clear_trash.sh b/modules/by-name/lf/lf/commands/scripts/clear_trash.sh
index 9052bb5f..9052bb5f 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/clear_trash.sh
+++ b/modules/by-name/lf/lf/commands/scripts/clear_trash.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/cow_cp.sh b/modules/by-name/lf/lf/commands/scripts/cow_cp.sh
index 98675b9e..98675b9e 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/cow_cp.sh
+++ b/modules/by-name/lf/lf/commands/scripts/cow_cp.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/dl_file.sh b/modules/by-name/lf/lf/commands/scripts/dl_file.sh
index c7e3d8b2..c7e3d8b2 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/dl_file.sh
+++ b/modules/by-name/lf/lf/commands/scripts/dl_file.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/dragon.sh b/modules/by-name/lf/lf/commands/scripts/dragon.sh
index cf3c3176..cf3c3176 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/dragon.sh
+++ b/modules/by-name/lf/lf/commands/scripts/dragon.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/dragon_individual.sh b/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh
index 2465cdfa..2465cdfa 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/dragon_individual.sh
+++ b/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/dragon_stay.sh b/modules/by-name/lf/lf/commands/scripts/dragon_stay.sh
index 066b4c75..066b4c75 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/dragon_stay.sh
+++ b/modules/by-name/lf/lf/commands/scripts/dragon_stay.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/execute.sh b/modules/by-name/lf/lf/commands/scripts/execute.sh
index aa97fd7f..aa97fd7f 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/execute.sh
+++ b/modules/by-name/lf/lf/commands/scripts/execute.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/follow_link.sh b/modules/by-name/lf/lf/commands/scripts/follow_link.sh
index 80413990..80413990 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/follow_link.sh
+++ b/modules/by-name/lf/lf/commands/scripts/follow_link.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/fzf_jump.sh b/modules/by-name/lf/lf/commands/scripts/fzf_jump.sh
index ad1633fb..ad1633fb 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/fzf_jump.sh
+++ b/modules/by-name/lf/lf/commands/scripts/fzf_jump.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/go_project_root.sh b/modules/by-name/lf/lf/commands/scripts/go_project_root.sh
index 5f7746d3..5f7746d3 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/go_project_root.sh
+++ b/modules/by-name/lf/lf/commands/scripts/go_project_root.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/mk_dir.sh b/modules/by-name/lf/lf/commands/scripts/mk_dir.sh
index 150f7eed..150f7eed 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/mk_dir.sh
+++ b/modules/by-name/lf/lf/commands/scripts/mk_dir.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/mk_file.sh b/modules/by-name/lf/lf/commands/scripts/mk_file.sh
index 41d5cf1a..41d5cf1a 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/mk_file.sh
+++ b/modules/by-name/lf/lf/commands/scripts/mk_file.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/mk_file_and_edit.sh b/modules/by-name/lf/lf/commands/scripts/mk_file_and_edit.sh
index 19fc51db..19fc51db 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/mk_file_and_edit.sh
+++ b/modules/by-name/lf/lf/commands/scripts/mk_file_and_edit.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/mk_ln.sh b/modules/by-name/lf/lf/commands/scripts/mk_ln.sh
index 7fab8e22..7fab8e22 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/mk_ln.sh
+++ b/modules/by-name/lf/lf/commands/scripts/mk_ln.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/mk_scr_default.sh b/modules/by-name/lf/lf/commands/scripts/mk_scr_default.sh
index 47d05080..47d05080 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/mk_scr_default.sh
+++ b/modules/by-name/lf/lf/commands/scripts/mk_scr_default.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/mk_scr_temp.sh b/modules/by-name/lf/lf/commands/scripts/mk_scr_temp.sh
index 512b5d0b..512b5d0b 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/mk_scr_temp.sh
+++ b/modules/by-name/lf/lf/commands/scripts/mk_scr_temp.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/restore_trash.sh b/modules/by-name/lf/lf/commands/scripts/restore_trash.sh
index b4ef492f..b4ef492f 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/restore_trash.sh
+++ b/modules/by-name/lf/lf/commands/scripts/restore_trash.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/set_wall_paper.sh b/modules/by-name/lf/lf/commands/scripts/set_wall_paper.sh
index 2e607d33..2e607d33 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/set_wall_paper.sh
+++ b/modules/by-name/lf/lf/commands/scripts/set_wall_paper.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/stripspace.sh b/modules/by-name/lf/lf/commands/scripts/stripspace.sh
index 33b1cbcf..33b1cbcf 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/stripspace.sh
+++ b/modules/by-name/lf/lf/commands/scripts/stripspace.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/trash.sh b/modules/by-name/lf/lf/commands/scripts/trash.sh
index f4878c49..f4878c49 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/trash.sh
+++ b/modules/by-name/lf/lf/commands/scripts/trash.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/unarchive.sh b/modules/by-name/lf/lf/commands/scripts/unarchive.sh
index d4835f6b..d4835f6b 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/unarchive.sh
+++ b/modules/by-name/lf/lf/commands/scripts/unarchive.sh
diff --git a/modules/home.legacy/conf/lf/commands/scripts/view_file.sh b/modules/by-name/lf/lf/commands/scripts/view_file.sh
index 6258d755..6258d755 100755
--- a/modules/home.legacy/conf/lf/commands/scripts/view_file.sh
+++ b/modules/by-name/lf/lf/commands/scripts/view_file.sh
diff --git a/modules/home.legacy/conf/lf/icons b/modules/by-name/lf/lf/icons
index 9047fbfb..9047fbfb 100644
--- a/modules/home.legacy/conf/lf/icons
+++ b/modules/by-name/lf/lf/icons
diff --git a/modules/home.legacy/conf/lf/keybindings/default.nix b/modules/by-name/lf/lf/keybindings/default.nix
index b41004dc..b6feffe3 100644
--- a/modules/home.legacy/conf/lf/keybindings/default.nix
+++ b/modules/by-name/lf/lf/keybindings/default.nix
@@ -1,4 +1,4 @@
-{nixosConfig, ...}: {
+{uid}: {
   # Remove some defaults
   "'\"'" = null;
   ";" = null;
@@ -81,7 +81,7 @@
 
   # Movement
   gjr = "cd ~/.local/share/Trash/files";
-  gus = "cd /run/user/${builtins.toString nixosConfig.users.users.soispha.uid}";
+  gus = "cd /run/user/${builtins.toString uid}";
 
   gc = "cd ~/.config";
   gl = "cd ~/.local";
diff --git a/modules/home.legacy/conf/lf/default.nix b/modules/home.legacy/conf/lf/default.nix
deleted file mode 100644
index 7b604ed0..00000000
--- a/modules/home.legacy/conf/lf/default.nix
+++ /dev/null
@@ -1,59 +0,0 @@
-{
-  pkgs,
-  sysLib,
-  nixosConfig,
-  shell_library,
-  system,
-  ...
-}: let
-  commands = import ./commands {inherit pkgs sysLib shell_library system;};
-  keybindings = import ./keybindings {inherit nixosConfig;};
-in {
-  xdg.configFile."lf/icons".source = ./icons;
-  xdg.configFile."lf/colors".source = ./colors;
-
-  # TODO: add the systemd tempfile option here
-
-  programs.lf = {
-    enable = true;
-
-    inherit commands keybindings;
-
-    previewer = {
-      keybinding = "i";
-      source = "${pkgs.ctpv}/bin/ctpv";
-    };
-    settings = {
-      # close the server, after the last client exits
-      autoquit = true;
-
-      # disable the cusor in the preview pane
-      cursorpreviewfmt = "";
-
-      # preview for directories
-      # dirpreviews = true;
-
-      # count things in directories
-      dircounts = true;
-
-      drawbox = true;
-
-      # errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m";
-      errorfmt = "\\033[1;91m%s\\033[0m";
-      hidden = true; # show hidden files
-      icons = true;
-      ifs = "\\n"; # internal field separator for shell commands
-      #info = "size"; # show the size of a directory
-      shell = "sh";
-      shellopts = "-eu"; # e: exit on error; u: error for unset variables
-    };
-    # TODO: remove auto quit, if it has been added
-    extraConfig = ''
-      &${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.path}
-    '';
-  };
-}