changes
This commit is contained in:
parent
bf696a125f
commit
69905fb872
|
|
@ -28,6 +28,7 @@ export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
|||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
|
||||
export PATH=$PATH:$HOME/.local/bin
|
||||
export PATH=$PATH:$HOME/.local/pbin # personal bin
|
||||
export PATH="$PATH:$XDG_DATA_HOME/cargo/bin"
|
||||
|
||||
export MPD_HOST="localhost"
|
||||
|
|
|
|||
|
|
@ -7,5 +7,4 @@ case "$(printf "a selected area (copy)\\ncurrent window (copy)\\nfull screen (co
|
|||
"a selected area") maim -s ~/pix/ss/pic-selected-"$(date '+%y-%m-%d-%H-%M').png" ;;
|
||||
"current window") maim -i "$(xdotool getactivewindow)" ~/pix/ss/pic-window-"$(date '+%y-%m-%d-%H-%M').png" ;;
|
||||
"full screen") sleep 0.2 ; maim ~/pix/ss/pic-full-"$(date '+%y-%m-%d-%H-%M').png" ;;
|
||||
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
if [ -z "$*" ]; then
|
||||
input_file=$(fzf)
|
||||
else
|
||||
input_file=$*
|
||||
fi
|
||||
read -p "Title: " title
|
||||
read -p "Artist: " artist
|
||||
read -p "album: " album
|
||||
output_name="metadata-$input_file"
|
||||
ffmpeg -i "$input_file" -metadata title="$title" -metadata artist="$artist" -metadata album="$album" -c copy "$output_name"
|
||||
mv -f "$output_name" "$input_file"
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
mkdir -p $HOME/.cache/pirokit
|
||||
|
||||
if [ -z $1 ]; then
|
||||
query=$(echo "" | dmenu -p "Search Torrent: ")
|
||||
else
|
||||
query=$1
|
||||
fi
|
||||
|
||||
baseurl="https://1337x.to"
|
||||
cachedir="$HOME/.cache/pirokit"
|
||||
query="$(sed 's/ /+/g' <<<$query)"
|
||||
|
||||
#curl -s https://1337x.to/category-search/$query/Movies/1/ > $cachedir/tmp.html
|
||||
curl -s https://1337x.to/search/$query/1/ > $cachedir/tmp.html
|
||||
|
||||
# Get Titles
|
||||
grep -o '<a href="/torrent/.*</a>' $cachedir/tmp.html |
|
||||
sed 's/<[^>]*>//g' > $cachedir/titles.bw
|
||||
|
||||
result_count=$(wc -l $cachedir/titles.bw | awk '{print $1}')
|
||||
if [ "$result_count" -lt 1 ]; then
|
||||
notify-send "😔 No Result found. Try again 🔴"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# Seeders and Leechers
|
||||
grep -o '<td class="coll-2 seeds.*</td>\|<td class="coll-3 leeches.*</td>' $cachedir/tmp.html |
|
||||
sed 's/<[^>]*>//g' | sed 'N;s/\n/ /' > $cachedir/seedleech.bw
|
||||
|
||||
# Size
|
||||
grep -o '<td class="coll-4 size.*</td>' $cachedir/tmp.html |
|
||||
sed 's/<span class="seeds">.*<\/span>//g' |
|
||||
sed -e 's/<[^>]*>//g' > $cachedir/size.bw
|
||||
|
||||
# Links
|
||||
grep -E '/torrent/' $cachedir/tmp.html |
|
||||
sed -E 's#.*(/torrent/.*)/">.*/#\1#' |
|
||||
sed 's/td>//g' > $cachedir/links.bw
|
||||
|
||||
|
||||
|
||||
# Clearning up some data to display
|
||||
sed 's/\./ /g; s/\-/ /g' $cachedir/titles.bw |
|
||||
sed 's/[^A-Za-z0-9 ]//g' | tr -s " " > $cachedir/tmp && mv $cachedir/tmp $cachedir/titles.bw
|
||||
|
||||
awk '{print NR " - ["$0"]"}' $cachedir/size.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/size.bw
|
||||
awk '{print "[S:"$1 ", L:"$2"]" }' $cachedir/seedleech.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/seedleech.bw
|
||||
|
||||
# Getting the line number
|
||||
LINE=$(paste -d\ $cachedir/size.bw $cachedir/seedleech.bw $cachedir/titles.bw |
|
||||
dmenu -i -l 25 |
|
||||
cut -d\- -f1 |
|
||||
awk '{$1=$1; print}')
|
||||
|
||||
url=$(head -n $LINE $cachedir/links.bw | tail -n +$LINE)
|
||||
fullURL="${baseurl}${url}/"
|
||||
|
||||
# Requesting page for magnet link
|
||||
curl -s $fullURL > $cachedir/tmp.html
|
||||
magnet=$(grep -Po "magnet:\?xt=urn:btih:[a-zA-Z0-9]*" $cachedir/tmp.html | head -n 1)
|
||||
|
||||
transadd "$magnet"
|
||||
|
||||
# Simple notification
|
||||
notify-send "⬇️ Start downloading File 📁"
|
||||
|
|
@ -10,7 +10,7 @@ update_cpu () {
|
|||
}
|
||||
|
||||
update_memory () {
|
||||
memory=" $(free -h | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")"
|
||||
memory=" $(free -h --si | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")"
|
||||
}
|
||||
|
||||
update_time () {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Open a terminal window in the same directory as the currently active window.
|
||||
|
||||
PID=$(xprop -id "$(xprop -root | xprop -root | sed -n "/_NET_ACTIVE_WINDOW/ s/^.*# // p")" | sed -n "/PID/ s/^.*= // p")
|
||||
PID="$(pstree -lpA "$PID")"
|
||||
PID="${PID##*"${SHELL##*/}"(}"
|
||||
PID="${PID#*lf(}"
|
||||
PID="${PID%%)*}"
|
||||
cd "$(readlink /proc/"$PID"/cwd)" || return 1
|
||||
"$TERMINAL"
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
i=0
|
||||
|
||||
if [ -z $1 ]; then
|
||||
read -p "enter query: " query
|
||||
else
|
||||
query=$1
|
||||
fi
|
||||
|
||||
while [ $i -le 100 ]
|
||||
do
|
||||
xdotool type "$query" ;xdotool key KP_Enter; sleep 1 ;
|
||||
|
||||
done
|
||||
|
|
@ -8,5 +8,6 @@ fi
|
|||
|
||||
[ -z "$file" ] && exit
|
||||
|
||||
curl -F"file=@$file" 0x0.st | xclip -sel c
|
||||
# curl -F"file=@$file" 0x0.st | xclip -sel c
|
||||
curl -F"file=@$file" 0.tildevarsh.in | xclip -sel c
|
||||
notify-send "The url has been copied to your clipboard. $(xclip -sel c -o)"
|
||||
|
|
|
|||
|
|
@ -85,3 +85,4 @@ apprehension -> anziety or fear that something bad or unpleasant will happen
|
|||
reprise -> a repeated passage in music
|
||||
reluctant -> unwilling and hesitant; disinclined
|
||||
trait -> a distinguishing quality or characteristic, typically one belonging to a person.
|
||||
pedantic -> excessively concerned with minor details or rules; overscrupulous.
|
||||
|
|
|
|||
Loading…
Reference in New Issue