diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-07-01 03:54:45 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-07-01 03:54:45 +0900 |
| commit | 616fa190d3b2968d7623fbf0cf1037f9017e7070 (patch) | |
| tree | 7b797552a29ca903271adc87b8901cbcecb4e8c4 | |
| parent | 95460a9fd4e750fafa9a6afaa6b7a05b39a0426c (diff) | |
modified zsh/scripts.zsh, modified bin/qndl
| -rw-r--r-- | ar/.config/zsh/scripts.zsh | 8 | ||||
| -rwxr-xr-x | ar/.local/bin/qndl | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh index 6c217e8..81ab402 100644 --- a/ar/.config/zsh/scripts.zsh +++ b/ar/.config/zsh/scripts.zsh @@ -449,11 +449,9 @@ function fzf_kill_process() { --bind 'F2:toggle-preview' | awk '{print $2}' | xargs -r bash -c ' - if ! kill "$1" 2>/dev/null; then - if ! kill -9 "$1"; then - echo "Regular kill failed. Attempting with sudo..." - sudo kill "$1" || echo "Failed to kill process $1" >&2 - fi + if ! kill -9 "$1" 2>/dev/null; then + echo "Regular kill failed. Attempting with sudo..." + sudo kill -9 "$1" || echo "Failed to kill process $1" >&2 fi ' -- } diff --git a/ar/.local/bin/qndl b/ar/.local/bin/qndl index f762568..5b96155 100755 --- a/ar/.local/bin/qndl +++ b/ar/.local/bin/qndl @@ -1,12 +1,17 @@ #!/bin/sh ytdl_cmd_base="yt-dlp --continue --embed-metadata --ignore-errors --no-force-overwrites --no-playlist --verbose" +simulation_cmd="yt-dlp --simulate --print %(filename)s" case "$BROWSER" in *firefox*) cookies="firefox" ;; +*librewolf*) cookies="firefox:~/.librewolf/$USER.default" ;; +*qutebrowser*) cookies="chromium:~/.local/share/qutebrowser" ;; esac -[ -n "$cookies" ] && ytdl_cmd_base="$ytdl_cmd_base --cookies-from-browser $cookies" +[ -n "$cookies" ] && + ytdl_cmd_base="$ytdl_cmd_base --cookies-from-browser $cookies" && + simulation_cmd="$simulation_cmd --cookies-from-browser $cookies" shift $((OPTIND - 1)) @@ -101,7 +106,7 @@ case $url in ;; esac -simulation_cmd="yt-dlp --simulate --print %(filename)s $url" +simulation_cmd="$simulation_cmd $url" ytdl_cmd="$ytdl_cmd_base --output \"$ytdl_output_format\" \"$url\"" # Notify and perform simulation to get filename (feedback to user) |
