Now using $MPV_FLAGS = best[height<=1441]
This commit is contained in:
parent
a56e7d1cf4
commit
f002f281a7
|
@ -9,3 +9,4 @@ termscripts/test.sh
|
||||||
.vim/plugged
|
.vim/plugged
|
||||||
*.o
|
*.o
|
||||||
.vim/.netrwhist
|
.vim/.netrwhist
|
||||||
|
*/TAGS
|
||||||
|
|
2
.profile
2
.profile
|
@ -24,7 +24,7 @@ export DEVICES_FOLDER="/media"
|
||||||
export FAV_STREAMERS="$HOME/fav_streamers"
|
export FAV_STREAMERS="$HOME/fav_streamers"
|
||||||
export LC_ALL=en_US.utf8
|
export LC_ALL=en_US.utf8
|
||||||
export KERNEL_CONFIGS="$HOME/kernel-configs"
|
export KERNEL_CONFIGS="$HOME/kernel-configs"
|
||||||
export MPV_FLAGS="--ytdl-format best[height<=1080]"
|
export MPV_FLAGS="--ytdl-format best[height<=1441]"
|
||||||
|
|
||||||
# ALIASES
|
# ALIASES
|
||||||
alias ll='lsd --group-dirs first --date relative -alh'
|
alias ll='lsd --group-dirs first --date relative -alh'
|
||||||
|
|
|
@ -7,6 +7,7 @@ cpupulse=$(top -b -n 1 -p "$pulseid" | tail -n 1 | awk '{print $9}')
|
||||||
stuck=$(printf "%b\n" "$cpupulse > 90" | bc -l)
|
stuck=$(printf "%b\n" "$cpupulse > 90" | bc -l)
|
||||||
|
|
||||||
if [ "$stuck" -eq 1 ]; then
|
if [ "$stuck" -eq 1 ]; then
|
||||||
stop_pulse=$(printf "%b\n" "Yes\nNo" | dmenu -i -p "Stop PulseAudio?")
|
# stop_pulse=$(printf "%b\n" "Yes\nNo" | dmenu -i -p "Stop PulseAudio?")
|
||||||
[ "$stop_pulse" = "Yes" ] && killall pulseaudio
|
# [ "$stop_pulse" = "Yes" ] && killall pulseaudio
|
||||||
|
date >> $HOME/pulseaudio.log
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
[ "$url" = "" ] && notify-send "Tube.sh" "Nothing will be downloaded" && exit 0
|
[ "$url" = "" ] && notify-send "Tube.sh" "Nothing will be downloaded" && exit 0
|
||||||
|
|
||||||
mpv "$url"
|
mpv $MPV_FLAGS "$url"
|
||||||
|
|
|
@ -8,4 +8,4 @@ xdotool key ctrl+c
|
||||||
# link="$(xclip -o -selection clipboard | sed -E 's|([^&]*)(&)(.*)|\1|')"
|
# link="$(xclip -o -selection clipboard | sed -E 's|([^&]*)(&)(.*)|\1|')"
|
||||||
link="$(xclip -o | sed -E 's|([^&]*)(&)(.*)|\1|')"
|
link="$(xclip -o | sed -E 's|([^&]*)(&)(.*)|\1|')"
|
||||||
|
|
||||||
mpv "$link"
|
mpv $MPV_FLAGS "$link"
|
||||||
|
|
|
@ -5,7 +5,7 @@ streamer="$(rofi -dmenu)"
|
||||||
if [ -n "$streamer" ]; then
|
if [ -n "$streamer" ]; then
|
||||||
if [ "$(youtube-dl -e "https://www.twitch.tv/$streamer" 2>/dev/null)" ]; then
|
if [ "$(youtube-dl -e "https://www.twitch.tv/$streamer" 2>/dev/null)" ]; then
|
||||||
notify-send "$streamer found"
|
notify-send "$streamer found"
|
||||||
mpv "https://www.twitch.tv/$streamer"
|
mpv $MPV_FLAGS "https://www.twitch.tv/$streamer"
|
||||||
else
|
else
|
||||||
notify-send "$streamer NOT FOUND or NOT STREAMING"
|
notify-send "$streamer NOT FOUND or NOT STREAMING"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -25,4 +25,4 @@ else
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$watch" ] && mpv "https://www.twitch.tv/$watch"
|
[ -n "$watch" ] && mpv $MPV_FLAGS "https://www.twitch.tv/$watch"
|
||||||
|
|
|
@ -8,7 +8,7 @@ if [ -n "$search" ]; then
|
||||||
|
|
||||||
link="https://invidio.us/watch?v=$id"
|
link="https://invidio.us/watch?v=$id"
|
||||||
|
|
||||||
mpv "$link" 1>&2
|
mpv $MPV_FLAGS "$link" 1>&2
|
||||||
|
|
||||||
printf "%b\n" "$link"
|
printf "%b\n" "$link"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
findpid=$1
|
||||||
|
|
||||||
|
known_windows=$(xwininfo -root -children|sed -e 's/^ *//'|grep -E "^0x"|awk '{ print $1 }')
|
||||||
|
|
||||||
|
for id in ${known_windows}
|
||||||
|
do
|
||||||
|
xp=$(xprop -id $id _NET_WM_PID)
|
||||||
|
if test $? -eq 0; then
|
||||||
|
pid=$(xprop -id $id _NET_WM_PID|cut -d'=' -f2|tr -d ' ')
|
||||||
|
|
||||||
|
if test "x${pid}" = x${findpid}
|
||||||
|
then
|
||||||
|
echo "Windows Id: $id"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
|
@ -11,7 +11,7 @@ do
|
||||||
|
|
||||||
video="$(sed "$current_video q;d" "$1")"
|
video="$(sed "$current_video q;d" "$1")"
|
||||||
|
|
||||||
mpv "$video"
|
mpv $MPV_FLAGS "$video"
|
||||||
|
|
||||||
length="$(wc -l "$1" | awk '{print $1}')"
|
length="$(wc -l "$1" | awk '{print $1}')"
|
||||||
if [ "$length" -eq "$current_video" ]; then
|
if [ "$length" -eq "$current_video" ]; then
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "$* [Y/n]: " yn
|
||||||
|
case $yn in
|
||||||
|
"") return 0 ;;
|
||||||
|
[Yy]*) return 0 ;;
|
||||||
|
[Nn]*) printf "%b\n" "Aborted" ; return 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
Loading…
Reference in New Issue