mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Use xdotool to get height rather than using xrandr
This commit is contained in:
parent
ac021c11ad
commit
df01e3fc96
2
.bashrc
2
.bashrc
@ -45,7 +45,7 @@ alias diff="diff --color=auto"
|
||||
alias ccat="highlight --out-format=ansi" # Color cat - print file with syntax highlighting.
|
||||
|
||||
# Internet
|
||||
alias yt="youtube-dl --add-metadata -ic -f '(best[height<=`xrandr | sed -n '/connected primary/p' | awk '{print $4}' | sed 's/x/\n/g' | sed -n 1p`])/best'" #Download video link
|
||||
alias yt="youtube-dl --add-metadata -ic -f '(best[height<=`xdotool getdisplaygeometry | awk '{print $1}'`])/best'" #Download video link
|
||||
alias yta="yt -x -f bestaudio/best" # Download only audio
|
||||
alias YT="youtube-viewer"
|
||||
|
||||
|
||||
@ -32,8 +32,7 @@ color article cyan default
|
||||
|
||||
browser linkhandler
|
||||
macro , open-in-browser
|
||||
macro t set browser "tsp youtube-dl --add-metadata -ic -f '(best[height<=`xrandr | sed -n '/connected primary/p' | awk '{print $4}' | sed 's/x/\n/g' | sed -n 1p`])/best'"; open-in-browser ; set browser linkhandler
|
||||
|
||||
macro t set browser "tsp youtube-dl --add-metadata -ic -f '(best[height<=`xdotool getdisplaygeometry | awk '{print $1}'`])/best'"; open-in-browser ; set browser linkhandler
|
||||
macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best"; open-in-browser ; set browser linkhandler
|
||||
macro v set browser "setsid nohup mpv"; open-in-browser ; set browser linkhandler
|
||||
macro w set browser "w3m"; open-in-browser ; set browser linkhandler
|
||||
|
||||
@ -514,5 +514,6 @@ map Tn eval fm.open_console('shell eyeD3 -n "" ' + fm.thisfile.relative_path, po
|
||||
|
||||
#Downloading
|
||||
|
||||
map ytv console shell youtube-dl --add-metadata -ic -f '(best[height<=`xrandr | sed -n '/connected primary/p' | awk '{print $4}' | sed 's/x/\n/g' | sed -n 1p`])/best' %space
|
||||
map ytv console shell youtube-dl --add-metadata -ic -f '(best[height<=`xdotool getdisplaygeometry | awk '{print $1}'`])/best' %space
|
||||
|
||||
map yta console shell youtube-dl -xic -f bestaudio/best%space
|
||||
|
||||
@ -7,7 +7,7 @@ case "$(printf "copy url\\nmpv\\nmpv (loop)\\nqueue download\\n\\nqueue youtube-
|
||||
mpv) setsid mpv -quiet "$1" >/dev/null 2>&1 & ;;
|
||||
"mpv (loop)") setsid mpv -quiet --loop "$1" >/dev/null 2>&1 & ;;
|
||||
"queue download") tsp curl -LO "$1" >/dev/null 2>&1 ;;
|
||||
"queue youtube-dl") tsp "youtube-dl --add-metadata -ic -f '(best[height<=`xrandr | sed -n '/connected primary/p' | awk '{print $4}' | sed 's/x/\n/g' | sed -n 1p`])/best'" "$1" >/dev/null 2>&1 ;;
|
||||
"queue youtube-dl") tsp "youtube-dl --add-metadata -ic -f '(best[height<=`xdotool getdisplaygeometry | awk '{print $1}'`])/best'" "$1" >/dev/null 2>&1 ;;
|
||||
browser) setsid "$TRUEBROWSER" "$1" >/dev/null 2>&1 & ;;
|
||||
feh) setsid feh "$1" >/dev/null 2>&1 & ;;
|
||||
w3m) w3m "$1" >/dev/null 2>&1 ;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user