chore: commit pre beets
This commit is contained in:
parent
1c5a3ba8e8
commit
40d9d75228
4 changed files with 55 additions and 59 deletions
|
@ -1,30 +1,30 @@
|
||||||
if ! typeset -f ytr >/dev/null; then
|
if ! typeset -f ytr >/dev/null; then
|
||||||
|
|
||||||
export PATH="$PATH:$HOME/.local/bin:$HOME/bin"
|
export PATH="$PATH:$HOME/.local/bin:$HOME/bin"
|
||||||
|
|
||||||
# ── 2. Load .env files from ~/.environment.d/ ───────────────────
|
# ── 2. Load .env files from ~/.environment.d/ ───────────────────
|
||||||
# Automatically export all variables defined while sourcing .env files
|
# Automatically export all variables defined while sourcing .env files
|
||||||
setopt allexport
|
setopt allexport
|
||||||
for file in ~/.environment.d/*.env(.N); do
|
for file in ~/.environment.d/*.env(.N); do
|
||||||
source "$file"
|
source "$file"
|
||||||
done
|
done
|
||||||
unset file
|
unset file
|
||||||
unsetopt allexport
|
unsetopt allexport
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Load a function that allows us to import other function definitions from
|
# Load a function that allows us to import other function definitions from
|
||||||
# the ZSH_FUNC_PATH without providing their exact location
|
# the ZSH_FUNC_PATH without providing their exact location
|
||||||
source "$DOTFILES_DIR/.zsh_functions/autosource.sh"
|
source "$DOTFILES_DIR/.zsh_functions/autosource.sh"
|
||||||
|
|
||||||
# Load the rest of the zsh configs in ~/.zshrc.d/
|
# Load the rest of the zsh configs in ~/.zshrc.d/
|
||||||
setopt allexport
|
setopt allexport
|
||||||
for file in ~/.zshrc.d/*.zsh(.N); do
|
for file in ~/.zshrc.d/*.zsh(.N); do
|
||||||
source "$file"
|
source "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
source ~/.zsh_functions/youtube.zsh
|
source ~/.zsh_functions/youtube.zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mdl () {
|
mdl () {
|
||||||
|
@ -58,7 +58,7 @@ cd "$mount_point/$path_on_nas"
|
||||||
echo "SMB share mounted successfully."
|
echo "SMB share mounted successfully."
|
||||||
if [[ "$*" == *"tidal.com"* ]]; then
|
if [[ "$*" == *"tidal.com"* ]]; then
|
||||||
echo "TIDAL DETECTED"
|
echo "TIDAL DETECTED"
|
||||||
tidal-dl -l $*
|
uvx tidal-dl -l $*
|
||||||
else
|
else
|
||||||
echo "Using qobuz-dl via uvx at: $(which uvx)"
|
echo "Using qobuz-dl via uvx at: $(which uvx)"
|
||||||
echo "QOBUZ URL: $*"
|
echo "QOBUZ URL: $*"
|
||||||
|
@ -69,43 +69,43 @@ echo "Unmounting SMB share..."
|
||||||
sleep 1
|
sleep 1
|
||||||
/sbin/umount -f "$mount_point"
|
/sbin/umount -f "$mount_point"
|
||||||
cd $cwd
|
cd $cwd
|
||||||
if declare -f jelly_rescan > /dev/null; then
|
#if declare -f jelly_rescan > /dev/null; then
|
||||||
echo "Waiting $jelly_wait secs before triggering automatic library scan..."
|
# echo "Waiting $jelly_wait secs before triggering automatic library scan..."
|
||||||
sleep $jelly_wait
|
# sleep $jelly_wait
|
||||||
jelly_rescan
|
# jelly_rescan
|
||||||
echo "done"
|
# echo "done"
|
||||||
fi
|
#fi
|
||||||
}
|
}
|
||||||
d () {
|
d () {
|
||||||
local url="${1:-$(pbpaste)}"
|
local url="${1:-$(pbpaste)}"
|
||||||
local used_clipboard=0
|
local used_clipboard=0
|
||||||
|
|
||||||
if [[ -z "$url" ]]; then
|
if [[ -z "$url" ]]; then
|
||||||
echo "No URL provided and clipboard is empty."
|
echo "No URL provided and clipboard is empty."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if URL came from clipboard
|
# Check if URL came from clipboard
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
echo "started via clipboard"
|
echo "started via clipboard"
|
||||||
used_clipboard=1
|
used_clipboard=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$url" in
|
case "$url" in
|
||||||
(*youtube*|*youtu.be*)
|
(*youtube*|*youtu.be*)
|
||||||
echo "Detected YouTube URL: $url"
|
echo "Detected YouTube URL: $url"
|
||||||
ytr "$url"
|
ytr "$url"
|
||||||
;;
|
;;
|
||||||
(*qobuz*)
|
(*qobuz*)
|
||||||
echo "Detected Qobuz URL: $url"
|
echo "Detected Qobuz URL: $url"
|
||||||
mdl "$url"
|
mdl "$url"
|
||||||
if [[ $used_clipboard -eq 1 ]]; then
|
if [[ $used_clipboard -eq 1 ]]; then
|
||||||
osascript -e "display dialog \"Done with Qobuz: $url\" buttons {\"OK\"}"
|
osascript -e "display dialog \"Done with Qobuz: $url\" buttons {\"OK\"}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
(*)
|
(*)
|
||||||
echo "Unknown URL: $url"
|
echo "Unknown URL: $url"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ insta () {
|
||||||
user_list=("${insta_default_users[@]}")
|
user_list=("${insta_default_users[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#local cmd=(uvx --with browser_cookie3 instaloader -b Firefox -B '/Users/janolehuebner/Library/Application Support/zen/Profiles/frbi8zqc.insta/cookies.sqlite' "${user_list[@]}" --fast-update --abort-on=302,400,401,429)
|
||||||
local cmd=(uvx --with browser_cookie3 instaloader -b Safari "${user_list[@]}" --fast-update --abort-on=302,400,401,429)
|
local cmd=(uvx --with browser_cookie3 instaloader -b Safari "${user_list[@]}" --fast-update --abort-on=302,400,401,429)
|
||||||
if $stories_only; then
|
if $stories_only; then
|
||||||
cmd+=(--stories --no-profile-pic --no-posts)
|
cmd+=(--stories --no-profile-pic --no-posts)
|
||||||
|
|
|
@ -2,7 +2,5 @@ jelly_rescan(){
|
||||||
JELLYFIN_URL="http://$NAS_IP:8096"
|
JELLYFIN_URL="http://$NAS_IP:8096"
|
||||||
API_KEY="$(pass jelly)"
|
API_KEY="$(pass jelly)"
|
||||||
LIBRARY_ID="8a05b0252259a1dbd62df97522638439"
|
LIBRARY_ID="8a05b0252259a1dbd62df97522638439"
|
||||||
|
curl -X POST -H "X-Emby-Token: $API_KEY" "$JELLYFIN_URL/Items/$LIBRARY_ID/Refresh?Recursive=true"
|
||||||
curl -X POST -H "X-Emby-Token: $API_KEY" \
|
|
||||||
"$JELLYFIN_URL/Library/VirtualFolders/$LIBRARY_ID/Refresh"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,5 @@ alias nano="nvim"
|
||||||
alias tg="terragrunt"
|
alias tg="terragrunt"
|
||||||
alias tf="tofu"
|
alias tf="tofu"
|
||||||
alias terraform="tofu"
|
alias terraform="tofu"
|
||||||
alias pip="pip3"
|
|
||||||
alias python="python3"
|
|
||||||
alias cookies="open $HOME/Library/Containers/com.apple.Safari/Data/Library/Cookies/"
|
|
||||||
alias dotfiles="git --work-tree=$HOME --git-dir=$HOME/.dotgit "
|
alias dotfiles="git --work-tree=$HOME --git-dir=$HOME/.dotgit "
|
||||||
alias instaedit="nvim ~/.environment.d/insta.env"
|
alias instaloader="uvx --with browser_cookie3 instaloader"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue