diff --git a/dlp-trnsrpt b/dlp-trnsrpt index 1d76669..f36619f 100755 --- a/dlp-trnsrpt +++ b/dlp-trnsrpt @@ -6,8 +6,7 @@ export LC_ALL=C.UTF8 TEMP_FOLDER='/tmp/dlp-trnsrpt' mkdir -p "$TEMP_FOLDER" -cd "$TEMP_FOLDER" || exit 1 +cd "$TEMP_FOLDER" yt-dlp --write-auto-sub --sub-langs 'en.*,.*orig' --convert-subs=srt --skip-download "$*" nvim "$TEMP_FOLDER"/*-orig* -"$SHELL" diff --git a/nstore-find b/nstore-find index 51fed54..0a5820d 100755 --- a/nstore-find +++ b/nstore-find @@ -4,4 +4,4 @@ set -E -o pipefail shopt -s failglob export LC_ALL=C.UTF8 -find /nix/store/ -maxdepth 1 -iname '*'"$*"'*' +find /nix/store/ -maxdepth 1 -iname '*'"$@"'*' diff --git a/nswitch b/nswitch index 12fd592..7f5e213 100755 --- a/nswitch +++ b/nswitch @@ -5,28 +5,20 @@ set -E -o pipefail shopt -s failglob export LC_ALL=C.UTF8 -exit_with_new_shell() { - printf '\n' - printf '>>> opening a new \"%s\" shell\n' "$(basename "$SHELL")" - printf '>>> cwd: %s\n' "$(pwd)" - "$SHELL" - exit 0 -} - -cd ~/Projects/NixOS/ || exit 1 +cd ~/Projects/NixOS/ nvim printf ">>> auto formating ..." nix fmt . &> /dev/null printf " DONE!\n" -[ -z "$(git diff -U0)" ] && echo ">>> no changes, exiting ..." && exit_with_new_shell -git diff -U0 # "*.nix" # as a seperate command so we get nice colors and pager +git diff -U0 # "*.nix" printf ">>> Do you want to rebuild NixOS? [y/N]\n" printf "<<< " && read -r YESNO if ! [[ "${YESNO,,}" == "y" ]]; then - exit_with_new_shell + printf ">>> Exiting ...\n" + exit 1 fi printf ">>> Rebuilding NixOS\n" @@ -34,5 +26,3 @@ sudo nixos-rebuild switch | tee nixos-switch.log || ( grep --color error nixos-switch.log && false) gen=$(nixos-rebuild list-generations | grep current) git commit -am "$gen" - -exit_with_new_shell diff --git a/rustdesk_profile b/rustdesk_profile index c4bcec3..332adff 100755 --- a/rustdesk_profile +++ b/rustdesk_profile @@ -18,7 +18,7 @@ fi # make sure profile folder for config exists. export XDG_CONFIG_HOME="$HOME/.config/rustdesk_${RUSTDESK_PROFILE}" mkdir -p "$XDG_CONFIG_HOME" -printf 'Using profile: %s\n' "$XDG_CONFIG_HOME" +printf "Using profile: $XDG_CONFIG_HOME\n" #exit 0 # As of rustdesk 1.1.9 giving rustdesk unknown arguments crashes it with an address boundary error. diff --git a/screenshot b/screenshot index cb04e68..a2af902 100755 --- a/screenshot +++ b/screenshot @@ -4,9 +4,4 @@ set -E -o pipefail shopt -s failglob export LC_ALL=C.UTF8 -grim -g "$(slurp -o -r -c '#ff0000ff')" - \ - | satty \ - --filename - \ - --fullscreen \ - --initial-tool "crop" \ - --output-filename "$HOME/Media/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png" +grim -g "$(slurp -o -r -c '#ff0000ff')" - | satty --filename - --fullscreen --output-filename ~/Media/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png