diff --git a/aliases b/aliases index 8199b381..88bd8b3b 100644 --- a/aliases +++ b/aliases @@ -250,7 +250,6 @@ alias {mnb,nb-m}="cd ~/.config/newsboat && /usr/bin/cp $HOME/.config/newsboat/my alias {ynb,nb-y}="/usr/bin/cp $HOME/.config/newsboat/yt_urls $HOME/.config/newsboat/urls && newsboat" alias {rnb,nb-r}="cd ~/.config/newsboat && /usr/bin/cp $HOME/.config/newsboat/reddit_urls $HOME/.config/newsboat/urls && newsboat" alias {tootnb,mastnb}="cd ~/.config/newsboat && /usr/bin/cp $HOME/.config/newsboat/mastodon_urls $HOME/.config/newsboat/urls && newsboat" -alias rt="rtorrent" alias rt-rs="doas rm -r watch session && mkdir watch session" alias slink="streamlink" alias {epub,fbreader}="gobble FBReader" diff --git a/scripts/rt b/scripts/rt new file mode 100755 index 00000000..d3c93d72 --- /dev/null +++ b/scripts/rt @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if pgrep -x "openvpn" >/dev/null; then + IPV4=$(ip addr show dev tun0 | grep inet | awk '{print $2}' | cut -d/ -f1 | head -n 1) + /usr/bin/rtorrent -b "$IPV4" +else + echo "openvpn is not running. please start your VPN first." +fi