diff --git a/.bashrc b/.bashrc index 29f0d4e..d3a98c7 100644 --- a/.bashrc +++ b/.bashrc @@ -8,6 +8,11 @@ # alias ls='ls --color=auto' # PS1='[\u@\h \W]\$ ' +export QT_IM_MODULE=fcitx +export QT_IM_MODULES="wayland;fcitx;ibus" +export GTK_IM_MODULE=fcitx +export XMODIFIERS=@im=fcitx + #jewtube-related function yts { yt-dlp --get-title --get-duration --get-id ytsearch10:"'$*'"; } function ytl { echo https://inv.riverside.rocks/watch?v=$1; } @@ -74,6 +79,9 @@ function tapas { wget $(curl $1 | grep -oE data-src=\".+\" | grep -oE h.+g); } function mnotif { [ -z $1 ] && jq -r 'keys | .[]' < ~/tinker/matrix/matrix.conf; [ -z $1 ] || curl https://$(jq -r ".$1.instance" < ~/tinker/matrix/matrix.conf)/_matrix/client/r0/notifications -H "Authorization:Bearer $(jq -r ".$1.access_token" < ~/tinker/matrix/matrix.conf)" | jq '.notifications | .[] | (.room_id+", "+(.ts | tostring)+", "+.event.sender+": "+.event.content.body),""'; } function tlcard { a="$*"; read oid lang <<< "$(curl -s "https://api.scryfall.com/cards/named?fuzzy=${a/ /+}" | jq -r '.oracle_id+" "+(["en","ja"]-[.lang])[0]')"; curl -s "https://api.scryfall.com/cards/search?order=released&q=oracleid:$oid+lang:$lang&unique=prints" | jq -r '.data[0] | .printed_name // .name, .printed_type_line // .type_line, .printed_text // .oracle_text'; } function waypon { sudo rc-service waycontainer start; WAYLAND_DISPLAY=wayland-1 waydroid show-full-ui; } +function video_extract { ffmpeg -ss $1 -to $2 -i $3 $4; } +function reread_rss { sqlite3 ~/.local/share/liferea/liferea.db 'select items.title,parent_node_id,node.title from items join node on parent_node_id=node.node_id where date > '`date +%s`"-${1:-86400} and parent_node_id<>'bfqeltc' order by date desc;"; } +function cover_fix { if [ -z "`ls cover_large* 2>/dev/null`" ]; then rename cover cover_large *; fi; magick cover_large* -resize $1x$1 cover.png; } #deprecated #function nhen { echo https://nhentai.net/g/$1; } diff --git a/search.sh b/search.sh index dc3681e..3fb6836 100755 --- a/search.sh +++ b/search.sh @@ -4,6 +4,7 @@ sources[gelb]="https://gelbooru.com/index.php?page=post&s=list&tags=" sources[wiki]="https://en.wikipedia.org/w/index.php?title=Special:Search&fulltext=Search&ns0=1&go=Go&search=" sources[gfl]="https://iopwiki.com/index.php?title=Special:Search&go=Go&search=" sources[nyaa]="https://nyaa.si/?f=0&c=1_2&q=" +sources[nyaa2]="https://nyaa.si/?f=0&c=3_3&q=" sources[itch]="https://itch.io/search?q=" sources[bandcamp]="https://bandcamp.com/search?q=" sources[pip]="https://pypi.org/search/?q=" @@ -14,9 +15,14 @@ sources[mal]="https://myanimelist.net/anime.php?cat=anime&type=0&score=0&status= sources[meta]="https://metager.org/meta/meta.ger3?eingabe=" sources[jaded]="http://thejadednetwork.com/sfx/search/?submitSearch=Search+SFX&x=&keyword=" sources[vndb]="https://vndb.org/v?sq=" +sources[jeek]="https://www.mojeek.com/search?q=" +sources[dlraw]="https://dlraw.to/search/" +sources[4get]="https://4get.ca/web?s=" +sources[4geti]="https://4get.ca/images?s=" #https://apibay.org/q.php?cat=&q= #https://apibay.org/t.php?id= mag() { echo "magnet:?xt=urn:btih:$1&dn=${*:2}&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.bittor.pw%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=udp%3A%2F%2Fbt.xxx-tracker.com%3A2710%2Fannounce&tr=udp%3A%2F%2Fpublic.popcorn-tracker.org%3A6969%2Fannounce&tr=udp%3A%2F%2Feddie4.nl%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&tr=udp%3A%2F%2Fp4p.arenabg.com%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.tiny-vps.com%3A6969%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce"; } + function smolhelp() { echo "Known search engines: ${!sources[@]}"