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