mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
QuickFix.
This commit is contained in:
4
ani-new
4
ani-new
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
down () {
|
down () {
|
||||||
notify-send "$3 links fetched.." -r $tmp
|
notify-send "$3 links fetched.." -r $tmp
|
||||||
choice=$(printf "download\nwatch\nnext mirror" | bemenu --fn 'Roboto 15' -p "??" -l 10)
|
choice=$(printf "download\nwatch\nnext mirror" | bemenu --fn 'Roboto 15' -p "??" -i -c -W 0.6 -B 3 -l 10)
|
||||||
[ "$choice" = "watch" ] && setsid -f mpv --referrer="$1" "$2" --force-media-title="$url" && notify-send "opening $url in mpv" -r $tmp && exit 0
|
[ "$choice" = "watch" ] && setsid -f mpv --referrer="$1" "$2" --force-media-title="$url" && notify-send "opening $url in mpv" -r $tmp && exit 0
|
||||||
[ "$choice" = "next mirror" ] && return 0
|
[ "$choice" = "next mirror" ] && return 0
|
||||||
notify-send "Downloading $url" -r $tmp
|
notify-send "Downloading $url" -r $tmp
|
||||||
@@ -24,7 +24,7 @@ base_url="https://gogohd.net"
|
|||||||
agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
|
agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
|
||||||
trap "exit 0" INT HUP
|
trap "exit 0" INT HUP
|
||||||
tmp=$(notify-send "Parsing $base_url.. Please wait..." -t 1500 -p)
|
tmp=$(notify-send "Parsing $base_url.. Please wait..." -t 1500 -p)
|
||||||
[ -z "$*" ] && url=$(run | bemenu --fn 'Roboto 15' -p "Select Anime: " -l 20) || url=$*
|
[ -z "$*" ] && url=$(run | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 20 -p "Select Anime: ") || url=$*
|
||||||
[ -z "$url" ] && notify-send -u "critical" "No anime selected" -r $tmp && exit 0 || notify-send "Loading Episode $url.." -r $tmp
|
[ -z "$url" ] && notify-send -u "critical" "No anime selected" -r $tmp && exit 0 || notify-send "Loading Episode $url.." -r $tmp
|
||||||
refr=$(curl -A "$agent" -s "$base_url/videos/$url" | sed -nE 's/.*iframe src="(.*)" al.*/\1/p')
|
refr=$(curl -A "$agent" -s "$base_url/videos/$url" | sed -nE 's/.*iframe src="(.*)" al.*/\1/p')
|
||||||
notify-send "Fetching Embed links" -r $tmp
|
notify-send "Fetching Embed links" -r $tmp
|
||||||
|
|||||||
14
readme.md
14
readme.md
@@ -1,13 +1 @@
|
|||||||
## Dmenu 5.1 with Applied patches
|
## My scripts which i use on my PC on daily basis
|
||||||
|
|
||||||
- [border](https://tools.suckless.org/dmenu/patches/border/)
|
|
||||||
- [center](https://tools.suckless.org/dmenu/patches/center/)
|
|
||||||
- [line-height](https://tools.suckless.org/dmenu/patches/line-height/)
|
|
||||||
- [mouse-support](https://tools.suckless.org/dmenu/patches/mouse-support/)
|
|
||||||
- [case-insensitive](https://tools.suckless.org/dmenu/patches/case-insensitive/)
|
|
||||||
|
|
||||||
## St 0.8.5 with Applied Patches
|
|
||||||
|
|
||||||
- [alpha](https://st.suckless.org/patches/alpha/)
|
|
||||||
- [scrollback](https://st.suckless.org/patches/scrollback/)
|
|
||||||
- [xresources](https://st.suckless.org/patches/xresources/)
|
|
||||||
|
|||||||
4
rss
4
rss
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
tmp=$(notify-send -t 2000 "Parsing SubsPlease RSS... Please Wait..." -p)
|
tmp=$(notify-send -t 2000 "Parsing SubsPlease RSS... Please Wait..." -p)
|
||||||
data=$(curl -s "https://subsplease.org/rss/?r=1080" | sed 's/<item>/\n/g')
|
data=$(curl -s "https://subsplease.org/rss/?r=1080" | sed 's/<item>/\n/g')
|
||||||
name=$(printf "%s" "$data" | sed -nE 's_^.*Please\] (.*)</title>.*size>(.*)</subs.*_(\2) > \1_p' | dmenu -l 25 -p "Search anime:")
|
name=$(printf "%s" "$data" | sed -nE 's_^.*Please\] (.*)</title>.*size>(.*)</subs.*_(\2) > \1_p' | bemenu --fn 'Roboto 16' -i -c -W 0.6 -B 3 -l 25 -p "Search anime:")
|
||||||
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" -r $tmp && exit 0
|
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" -r $tmp && exit 0
|
||||||
id=$(printf "$name" | sed -nE 's/.*\[(.*)\].*/\1/p')
|
id=$(printf "$name" | sed -nE 's/.*\[(.*)\].*/\1/p')
|
||||||
magnet=$(printf "%s" "$data" | sed -nE "s_.*<link>(.*$id.*)</link>.*_\1_p" | sed 's/amp;//g')
|
magnet=$(printf "%s" "$data" | sed -nE "s_.*<link>(.*$id.*)</link>.*_\1_p" | sed 's/amp;//g')
|
||||||
setsid -f st -e $HOME/repos_scripts/torrent "$magnet"
|
setsid -f foot -e $HOME/repos_scripts/torrent "$magnet"
|
||||||
|
|||||||
6
tor-bay
6
tor-bay
@@ -11,7 +11,7 @@ display() {
|
|||||||
wait
|
wait
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -z "$*" ] && printf "Search torrent:" && query=$(printf "" | dmenu -p "Search torrent: ") || query=$*
|
[ -z "$*" ] && query=$(printf "" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -p "Search torrent: ") || query=$*
|
||||||
[ -z "$query" ] && exit 0
|
[ -z "$query" ] && exit 0
|
||||||
tmp=$(notify-send "Searching query" -p)
|
tmp=$(notify-send "Searching query" -p)
|
||||||
query=$(printf "%s" "$query" | tr " " "+")
|
query=$(printf "%s" "$query" | tr " " "+")
|
||||||
@@ -19,7 +19,7 @@ data=$(curl -s "https://apibay.org/q.php?q=$query" | sed 's/},/}\n/g' | tr -d "[
|
|||||||
notify-send "tidying up data" -r $tmp
|
notify-send "tidying up data" -r $tmp
|
||||||
size=$(printf "%s" "$data" | sed -nE 's/.*name.*size":"(.*)",.*user.*/\1/p')
|
size=$(printf "%s" "$data" | sed -nE 's/.*name.*size":"(.*)",.*user.*/\1/p')
|
||||||
name_seed=$(printf "%s" "$data" | sed -nE 's/.*name":"(.*)","info_hash.*seeders":"(.*)",.*num.*/\2] \1/p')
|
name_seed=$(printf "%s" "$data" | sed -nE 's/.*name":"(.*)","info_hash.*seeders":"(.*)",.*num.*/\2] \1/p')
|
||||||
sel=$(display "$size" "$name_seed" | dmenu -l 25 -p "select torrent >" | cut -d" " -f3-)
|
sel=$(display "$size" "$name_seed" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 25 -p "select torrent >" | cut -d" " -f3-)
|
||||||
[ -z "$sel" ] && notify-send -u critical "No Torrent Selected" -r $tmp && exit 0 || notify-send "Selected $sel" -r $tmp
|
[ -z "$sel" ] && notify-send -u critical "No Torrent Selected" -r $tmp && exit 0 || notify-send "Selected $sel" -r $tmp
|
||||||
magnet="magnet:?xt=urn:btih:$(printf "%s" "$data" | sed -nE 's/.*name":"(.*)","info_hash":"(.*)",.*leech.*/\2\t\1/p' | sed -n "s/\t$sel//p")"
|
magnet="magnet:?xt=urn:btih:$(printf "%s" "$data" | sed -nE 's/.*name":"(.*)","info_hash":"(.*)",.*leech.*/\2\t\1/p' | sed -n "s/\t$sel//p")"
|
||||||
setsid -f st -e $HOME/repos_scripts/torrent "$magnet"
|
setsid -f foot -e $HOME/repos_scripts/torrent "$magnet"
|
||||||
|
|||||||
6
tor-cli
6
tor-cli
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
mkdir -p $HOME/.cache/pirokit
|
mkdir -p $HOME/.cache/pirokit
|
||||||
query=$(printf "" | dmenu -p "Search Torrent: ")
|
query=$(printf "" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -p "Search Torrent: ")
|
||||||
baseurl="https://www.1337xx.to"
|
baseurl="https://www.1337xx.to"
|
||||||
cachedir="$HOME/.cache/pirokit"
|
cachedir="$HOME/.cache/pirokit"
|
||||||
query="$(sed 's/ /%20/g' <<<$query)"
|
query="$(sed 's/ /%20/g' <<<$query)"
|
||||||
@@ -27,11 +27,11 @@ awk '{print NR " - ["$0"]"}' $cachedir/size.bw > $cachedir/tmp && mv $cachedir/t
|
|||||||
awk '{print "[S:"$1 ", L:"$2"]" }' $cachedir/seedleech.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/seedleech.bw
|
awk '{print "[S:"$1 ", L:"$2"]" }' $cachedir/seedleech.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/seedleech.bw
|
||||||
|
|
||||||
# Getting the line number
|
# Getting the line number
|
||||||
LINE=$(paste -d\ $cachedir/size.bw $cachedir/seedleech.bw $cachedir/titles.bw | dmenu -l 25 | cut -d\- -f1 | awk '{$1=$1; print}')
|
LINE=$(paste -d\ $cachedir/size.bw $cachedir/seedleech.bw $cachedir/titles.bw | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 25 | cut -d\- -f1 | awk '{$1=$1; print}')
|
||||||
[ -z "$LINE" ] && notify-send -u critical "Err.. No torrent selected!!" && exit 0
|
[ -z "$LINE" ] && notify-send -u critical "Err.. No torrent selected!!" && exit 0
|
||||||
|
|
||||||
url=$(head -n $LINE $cachedir/links.bw | tail -n +$LINE)
|
url=$(head -n $LINE $cachedir/links.bw | tail -n +$LINE)
|
||||||
|
|
||||||
# Requesting page for magnet link
|
# Requesting page for magnet link
|
||||||
magnet=$(curl -s "${baseurl}${url}" | sed -nE 's/.*class="(.*)" href="([^"]*)" .*/\2/p')
|
magnet=$(curl -s "${baseurl}${url}" | sed -nE 's/.*class="(.*)" href="([^"]*)" .*/\2/p')
|
||||||
setsid -f st -e $HOME/repos_scripts/torrent "$magnet"
|
setsid -f foot -e $HOME/repos_scripts/torrent "$magnet"
|
||||||
|
|||||||
Reference in New Issue
Block a user