diff options
author | Raymaekers Luca <luca@spacehb.net> | 2025-01-21 23:05:03 +0100 |
---|---|---|
committer | Raymaekers Luca <luca@spacehb.net> | 2025-01-21 23:05:03 +0100 |
commit | a5d21a49ccdc6141790085d4bd26b667b8d5618d (patch) | |
tree | c952cf834458da4938dfca837abe6323283d2bb8 /config/essentials | |
parent | efcd2b7cdb03a354bd4311bac75953738ec34e4f (diff) |
checkpoint
Diffstat (limited to 'config/essentials')
-rw-r--r-- | config/essentials/shell/aliases.sh | 1 | ||||
-rw-r--r-- | config/essentials/shell/functions.sh | 17 | ||||
-rw-r--r-- | config/essentials/starship.toml | 3 |
3 files changed, 18 insertions, 3 deletions
diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 10a72b1..70d65fc 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -112,7 +112,6 @@ alias pkb='pkgfile -b' alias trr='transmission-remote debuc.com' alias trls='transmission-remote debuc.com -t all -l' alias tradd='transmission-remote debuc.com -a' -alias trclipo='transmission-remote debuc.com -a "$(clipo)"' alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index f249c14..39c5e19 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -76,7 +76,6 @@ to_webm() { ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "$ ngenable() { ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/; } remove_audio() { ffmpeg -i "$1" -cpu-used -$(nproc) -deadline realtime -c copy -an "${2:-out.mp4}"; } nasg() { smbclient //192.168.178.24/Public/ -D ENFANTS/Luca/tmp -N -c "get $1"; } -trll() { printf "%s\n" "$1" | trl 2>/dev/null; } vidlen() { date -u -d @"$(ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i "$1")" +'%T'; } pcp() { readlink -f "$1" | tr -d '\n' | clipp; } @@ -387,3 +386,19 @@ ssl_req() { [ "$2" ] || return 2 openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out "$1" -keyout "$2" } + +trclipo() +{ + magnet="$(clipo)" + if ! printf '%s\n' "$magnet" | grep '^magnet:' > /dev/null 2>&1 + then + >&2 printf 'Not a magnet.\n' + return 1 + fi + + category="$(printf "music\nanime\nmovies\nshows\nother\nsoftware\ngames\nisos\nbooks\n" | fzf)" + [ "$category" ] || return 2 + + transmission-remote debuc.com -a -w "/downloads/$choice" "$magnet" + +} diff --git a/config/essentials/starship.toml b/config/essentials/starship.toml index abda192..ec9046b 100644 --- a/config/essentials/starship.toml +++ b/config/essentials/starship.toml @@ -46,7 +46,8 @@ disabled = true disabled = true [nodejs] disabled = true - +[dotnet] +disabled = true # [custom.upds] # command = 'cat ~/.cache/updates' # shows output of command |