diff options
Diffstat (limited to '')
21 files changed, 42 insertions, 62 deletions
diff --git a/home-manager/config/lf/commands/default.nix b/home-manager/config/lf/commands/default.nix index 0a58302d..a44db5ac 100644 --- a/home-manager/config/lf/commands/default.nix +++ b/home-manager/config/lf/commands/default.nix @@ -8,9 +8,9 @@ dependencies, ... }: - sysLib.makeShellScriptWithLibraryAndKeepPath { + sysLib.writeShellScriptWithLibraryAndKeepPath { name = "${builtins.baseNameOf file}"; - script = file; + src = file; dependencies = dependencies ++ (builtins.attrValues {inherit (pkgs) dash coreutils;}); } + "/bin/${builtins.baseNameOf file}"; diff --git a/home-manager/config/lf/commands/scripts/archive b/home-manager/config/lf/commands/scripts/archive index fd032dd4..617a4ace 100755 --- a/home-manager/config/lf/commands/scripts/archive +++ b/home-manager/config/lf/commands/scripts/archive @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH # Option '-f' disables pathname expansion which can be useful when $f, $fs, and # $fx variables contain names with '*' or '?' characters. However, this option diff --git a/home-manager/config/lf/commands/scripts/broot_jump b/home-manager/config/lf/commands/scripts/broot_jump index ff62ec90..6ff63ce9 100755 --- a/home-manager/config/lf/commands/scripts/broot_jump +++ b/home-manager/config/lf/commands/scripts/broot_jump @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH tmp=$(mktmp) res="$(broot --outcmd $tmp && cat $tmp | sed 's/cd //')" diff --git a/home-manager/config/lf/commands/scripts/chmod b/home-manager/config/lf/commands/scripts/chmod index b1682090..bafb38c9 100755 --- a/home-manager/config/lf/commands/scripts/chmod +++ b/home-manager/config/lf/commands/scripts/chmod @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH readp "Mode Bits: " bits diff --git a/home-manager/config/lf/commands/scripts/clear_trash b/home-manager/config/lf/commands/scripts/clear_trash index e1ee3d1e..b57e8a00 100755 --- a/home-manager/config/lf/commands/scripts/clear_trash +++ b/home-manager/config/lf/commands/scripts/clear_trash @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH # could also use --force, for instand removal trash list | fzf --multi | awk '{print $NF}' | xargs trash empty --match=exact diff --git a/home-manager/config/lf/commands/scripts/dl_file b/home-manager/config/lf/commands/scripts/dl_file index 373386f8..0988bca6 100755 --- a/home-manager/config/lf/commands/scripts/dl_file +++ b/home-manager/config/lf/commands/scripts/dl_file @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH # Provides the ability to download a file by dropping it into a window diff --git a/home-manager/config/lf/commands/scripts/dragon b/home-manager/config/lf/commands/scripts/dragon index fce161be..a6fe0355 100755 --- a/home-manager/config/lf/commands/scripts/dragon +++ b/home-manager/config/lf/commands/scripts/dragon @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH dragon -a -x "$fx" # vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/dragon_individual b/home-manager/config/lf/commands/scripts/dragon_individual index 7adf6924..1cec01b2 100755 --- a/home-manager/config/lf/commands/scripts/dragon_individual +++ b/home-manager/config/lf/commands/scripts/dragon_individual @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH dragon "$fx" # vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/dragon_stay b/home-manager/config/lf/commands/scripts/dragon_stay index aff9d01d..f0379680 100755 --- a/home-manager/config/lf/commands/scripts/dragon_stay +++ b/home-manager/config/lf/commands/scripts/dragon_stay @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH dragon -a "$fx" # vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/fzf_jump b/home-manager/config/lf/commands/scripts/fzf_jump index e0995761..31fad6ef 100755 --- a/home-manager/config/lf/commands/scripts/fzf_jump +++ b/home-manager/config/lf/commands/scripts/fzf_jump @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH res="$(fd . --maxdepth 3 | fzf --header='Jump to location')" if [ -f "$res" ]; then diff --git a/home-manager/config/lf/commands/scripts/mk_dir b/home-manager/config/lf/commands/scripts/mk_dir index fb69cf92..e24c9163 100755 --- a/home-manager/config/lf/commands/scripts/mk_dir +++ b/home-manager/config/lf/commands/scripts/mk_dir @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH readp "Directory Name: " dir mkdir "$dir" diff --git a/home-manager/config/lf/commands/scripts/mk_file b/home-manager/config/lf/commands/scripts/mk_file index eef8df4b..5c98b400 100755 --- a/home-manager/config/lf/commands/scripts/mk_file +++ b/home-manager/config/lf/commands/scripts/mk_file @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH readp "File Name: " name "$EDITOR" "$name" diff --git a/home-manager/config/lf/commands/scripts/mk_ln b/home-manager/config/lf/commands/scripts/mk_ln index 066150bd..7d626345 100755 --- a/home-manager/config/lf/commands/scripts/mk_ln +++ b/home-manager/config/lf/commands/scripts/mk_ln @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH while IFS= read -r i;do set -- "$@" "$i" diff --git a/home-manager/config/lf/commands/scripts/mk_scr b/home-manager/config/lf/commands/scripts/mk_scr index 6857e8f6..9d404c87 100755 --- a/home-manager/config/lf/commands/scripts/mk_scr +++ b/home-manager/config/lf/commands/scripts/mk_scr @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH script=$(mktmp) cat << EOF > $script diff --git a/home-manager/config/lf/commands/scripts/open b/home-manager/config/lf/commands/scripts/open index 2065eee3..a0257844 100755 --- a/home-manager/config/lf/commands/scripts/open +++ b/home-manager/config/lf/commands/scripts/open @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH case $(file --mime-type "$f" -bL) in text/*|application/json) "$EDITOR" "$f";; diff --git a/home-manager/config/lf/commands/scripts/open_config b/home-manager/config/lf/commands/scripts/open_config index 55ae68cb..63e0c1b6 100755 --- a/home-manager/config/lf/commands/scripts/open_config +++ b/home-manager/config/lf/commands/scripts/open_config @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH "$EDITOR" "$(bookmenu -b ~/.config/bookmenu/configs -f fzf -o)" # TODO implement this # vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/restore_trash b/home-manager/config/lf/commands/scripts/restore_trash index 22c16888..147bfd2d 100755 --- a/home-manager/config/lf/commands/scripts/restore_trash +++ b/home-manager/config/lf/commands/scripts/restore_trash @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH trash list | fzf --multi | awk '{print $NF}' | xargs trash restore --match=exact # vim: ft=sh diff --git a/home-manager/config/lf/commands/scripts/set_wall_paper b/home-manager/config/lf/commands/scripts/set_wall_paper index 50cc9656..d4b38365 100755 --- a/home-manager/config/lf/commands/scripts/set_wall_paper +++ b/home-manager/config/lf/commands/scripts/set_wall_paper @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH die "No yet implemented" # TODO do what the 'die' says #sed -i "s,export AWMWALLPAPER='.*',export AWMWALLPAPER='${f}'," ${ZDOTDIR}/.zshenv diff --git a/home-manager/config/lf/commands/scripts/stripspace b/home-manager/config/lf/commands/scripts/stripspace index 65dabc4c..59971a0b 100755 --- a/home-manager/config/lf/commands/scripts/stripspace +++ b/home-manager/config/lf/commands/scripts/stripspace @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH files=$(mktmp); echo "$fx" > $files; diff --git a/home-manager/config/lf/commands/scripts/trash b/home-manager/config/lf/commands/scripts/trash index 9e2e6aa4..e3a5810b 100755 --- a/home-manager/config/lf/commands/scripts/trash +++ b/home-manager/config/lf/commands/scripts/trash @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH trash_output=$(mktmp); expected_error_output=$(mktmp); diff --git a/home-manager/config/lf/commands/scripts/unarchive b/home-manager/config/lf/commands/scripts/unarchive index dfa82c9a..b0e3ab10 100755 --- a/home-manager/config/lf/commands/scripts/unarchive +++ b/home-manager/config/lf/commands/scripts/unarchive @@ -1,8 +1,7 @@ #! /usr/bin/env dash -# shellcheck disable=SC2086 + # shellcheck source=/dev/null -# . ~/.local/lib/shell/lib -. %SHELL_LIBRARY_PATH +SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH # extract the current file with the right command # (xkcd link: https://xkcd.com/1168/) |