added new scripts

This commit is contained in:
2024-06-28 17:22:47 +10:00
parent 71cb2fc599
commit d2c3ae6c96
3 changed files with 18 additions and 0 deletions

6
.local/bin/lsext Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
CWD=$1
if [ $# -eq 0 ]; then
CWD=$PWD
fi
find $CWD -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u

10
.local/bin/movie Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
MOVIE_DIR=/media-storage/Movies
SELECTED=`fd . $MOVIE_DIR -e avi -e m4v -e mkv -e mp4 | fzf`
if [ -z "$SELECTED" ]; then
echo "No movie selected. Exiting."
exit 1
fi
vlc "$SELECTED" &
exit 0

2
.zshrc
View File

@@ -63,4 +63,6 @@ export STARSHIP_CONFIG="$HOME/.config/starship/config.toml"
type starship_zle-keymap-select >/dev/null || { type starship_zle-keymap-select >/dev/null || {
eval "$(starship init zsh)" eval "$(starship init zsh)"
} }
export PATH="$PATH:$HOME/.local/bin"
neofetch neofetch
alias movies="movie; exit"