about summary refs log tree commit diff stats
path: root/home-manager/config
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-05-28 18:32:17 +0200
committerSoispha <soispha@vhack.eu>2023-05-28 22:02:47 +0200
commit12665e711d61a08f313b62f3fbaf6c13ce0de2a1 (patch)
tree490060609b76244a97c9abc9a9b316a7b2fb4a17 /home-manager/config
parentFeat(hm/pkgs/scrs/update-sys): Add a way to specify to mode (diff)
downloadnixos-config-12665e711d61a08f313b62f3fbaf6c13ce0de2a1.tar.gz
nixos-config-12665e711d61a08f313b62f3fbaf6c13ce0de2a1.zip
Fix(treewide): Update to new shell library version
Diffstat (limited to 'home-manager/config')
-rw-r--r--home-manager/config/gpg/default.nix4
-rw-r--r--home-manager/config/lf/commands/default.nix4
-rwxr-xr-xhome-manager/config/lf/commands/scripts/archive5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/broot_jump5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/chmod5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/clear_trash5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/dl_file5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/dragon5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/dragon_individual5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/dragon_stay5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/fzf_jump5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/mk_dir5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/mk_file5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/mk_ln5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/mk_scr5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/open5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/open_config5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/restore_trash5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/set_wall_paper5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/stripspace5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/trash5
-rwxr-xr-xhome-manager/config/lf/commands/scripts/unarchive5
-rw-r--r--home-manager/config/yambar/default.nix4
-rwxr-xr-xhome-manager/config/yambar/scripts/disk6
-rwxr-xr-xhome-manager/config/yambar/scripts/grades-average6
-rwxr-xr-xhome-manager/config/yambar/scripts/network6
-rwxr-xr-xhome-manager/config/yambar/scripts/sound-volume6
27 files changed, 54 insertions, 82 deletions
diff --git a/home-manager/config/gpg/default.nix b/home-manager/config/gpg/default.nix
index facb9ade..feba1298 100644
--- a/home-manager/config/gpg/default.nix
+++ b/home-manager/config/gpg/default.nix
@@ -4,9 +4,9 @@
   pkgs,
   ...
 }: let
-  agent-program = sysLib.makeShellScriptWithLibrary {
+  agent-program = sysLib.writeShellScriptWithLibrary {
     name = "onlykey-gpg-agent";
-    script = ./agent-program;
+    src = ./agent-program;
     dependencies = with pkgs; [
       python3
       onlykey-agent
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/)
diff --git a/home-manager/config/yambar/default.nix b/home-manager/config/yambar/default.nix
index f11a3300..76d3109d 100644
--- a/home-manager/config/yambar/default.nix
+++ b/home-manager/config/yambar/default.nix
@@ -13,9 +13,9 @@
     dependencies,
     ...
   }:
-    sysLib.makeShellScriptWithLibrary {
+    sysLib.writeShellScriptWithLibrary {
       name = "${builtins.baseNameOf file}";
-      script = file;
+      src = file;
       dependencies = dependencies ++ (builtins.attrValues {inherit (pkgs) dash;});
     }
     + "/bin/${builtins.baseNameOf file}";
diff --git a/home-manager/config/yambar/scripts/disk b/home-manager/config/yambar/scripts/disk
index dad41feb..d96a8683 100755
--- a/home-manager/config/yambar/scripts/disk
+++ b/home-manager/config/yambar/scripts/disk
@@ -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
 
 # Main loop
 while true; do
@@ -20,5 +19,4 @@ while true; do
   sleep 1
 done
 
-if [ -d "$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "$LIB_TEMP_DIR_FOR_SCRIPT"; fi
 # vim: ft=sh
diff --git a/home-manager/config/yambar/scripts/grades-average b/home-manager/config/yambar/scripts/grades-average
index 98e06858..b8b5c04c 100755
--- a/home-manager/config/yambar/scripts/grades-average
+++ b/home-manager/config/yambar/scripts/grades-average
@@ -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 true; do
     grade=$(grades list average | awk '{print $2}');
@@ -13,5 +12,4 @@ while true; do
     sleep 1;
 done
 
-if [ -d "$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "$LIB_TEMP_DIR_FOR_SCRIPT"; fi
 # vim: ft=sh
diff --git a/home-manager/config/yambar/scripts/network b/home-manager/config/yambar/scripts/network
index 45c164df..0d98b110 100755
--- a/home-manager/config/yambar/scripts/network
+++ b/home-manager/config/yambar/scripts/network
@@ -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
 
 retest=120
 retest_if_con_fails=10
@@ -45,5 +44,4 @@ case "$backend" in
         ;;
 esac
 
-if [ -d "$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "$LIB_TEMP_DIR_FOR_SCRIPT"; fi
 # vim: ft=sh
diff --git a/home-manager/config/yambar/scripts/sound-volume b/home-manager/config/yambar/scripts/sound-volume
index 8a9cf0d2..41230141 100755
--- a/home-manager/config/yambar/scripts/sound-volume
+++ b/home-manager/config/yambar/scripts/sound-volume
@@ -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 true; do
     volume=$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/" } {gsub("%","",$2); gsub(" ","",$2)} {printf $2}')
@@ -18,5 +17,4 @@ while true; do
     sleep 1;
 done
 
-if [ -d "$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "$LIB_TEMP_DIR_FOR_SCRIPT"; fi
 # vim: ft=sh