update everything to current config

This commit is contained in:
cho
2023-06-29 21:12:35 +07:00
parent f88cda4a67
commit ffa5843046
35 changed files with 3353 additions and 296 deletions

View File

@ -7,8 +7,8 @@ bgaloc="${XDG_DATA_HOME:-$HOME/.local/share}/bga"
trueloc="$(readlink -f "$1")" &&
case "$(file --mime-type -b "$trueloc")" in
video/* ) mpvpaper && ln -sf "$trueloc" "$bgaloc" && notify-send -i "$bgaloc" "Changing wallpaper..." ;;
image/gif ) mpvpaper && ln -sf "$trueloc" "$bgaloc" && ln -sf "$trueloc" "$bgloc" && notify-send -i "$bgaloc" "Changing wallpaper..." ;;
video/* ) ln -sf "$trueloc" "$bgaloc" && notify-send -i "$bgaloc" "Changing wallpaper..." ;;
image/gif ) ln -sf "$trueloc" "$bgaloc" && ln -sf "$trueloc" "$bgloc" && notify-send -i "$bgaloc" "Changing wallpaper..." ;;
image/* ) ln -sf "$trueloc" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..."
if [[ -f "$bgaloc" ]]; then
rm $bgaloc

View File

@ -21,6 +21,8 @@ case "$url" in
curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
*pdf|*cbz|*cbr)
curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
*epub)
curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && com.github.johnfactotum.Foliate "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
*mp3|*flac|*opus|*mp3?source*)
qndl "$url" 'curl -LO' >/dev/null 2>&1 ;;
*)

View File

@ -0,0 +1,9 @@
#!/bin/sh
# torrent peertube videos, requires the transadd script
# first argument is the video link, second is the quality (360, 480 or 1080)
# 13/07/20 - Arthur Bais
instance=$(echo "$1" | sed "s|/w.\+||")
vidid=$(echo "$1" | sed "s|.\+/||")
link=$(curl -s "$instance/api/v1/videos/$vidid" | grep -o "$instance/download/torrents/.\{37\}$2.torrent")
transadd "$link"

2
home/default/.local/bin/timer Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
termdown $@ && mpv ~/resources/sounds/alerts/codec-mgs-classic-woalert.opus >/dev/null 2>&1

View File

@ -0,0 +1,2 @@
#!/bin/bash
termdown $@ && mpv --loop ~/resources/sounds/alerts/codec-mgs-classic-woalert.opus >/dev/null 2>&1

View File

@ -0,0 +1,8 @@
#!/bin/sh
# Mimeapp script for adding torrent to deluge, but will also start the daemon first if not running.
pgrep deluged >/dev/null || (deluged && notify-send "Starting deluge daemon...")
# BUG will always return 1 if under v2.1.2, see https://dev.deluge-torrent.org/ticket/3582#ticket
if deluge-console add "$@" ; then notify-send "🔽 Torrent added." ; else notify-send "🔽 failed to add, maybe it exists?" ; fi