From 97358cfe8180b1abfe0d1fe06799277c06fa8f8a Mon Sep 17 00:00:00 2001 From: Astronach <16743141+Astronach@users.noreply.github.com> Date: Sat, 14 Nov 2020 21:11:08 +0100 Subject: [PATCH 1/3] add vpn indicator to internet status modul (#796) for me /sys/class/net/tun*/operstate show unknown in every state, but ./net/tun* only exists, if vpn is on --- .local/bin/statusbar/internet | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet index d8bd896..ee1a160 100755 --- a/.local/bin/statusbar/internet +++ b/.local/bin/statusbar/internet @@ -2,6 +2,7 @@ # Show wifi 📶 and percent strength or 📡 if none. # Show 🌐 if connected to ethernet or ❎ if none. +# Show 🔒 if a vpn connection is active case $BLOCK_BUTTON in 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;; @@ -10,6 +11,7 @@ case $BLOCK_BUTTON in 📶: wifi connection with quality ❎: no ethernet 🌐: ethernet working +🔒: vpn is active " ;; 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac @@ -19,4 +21,4 @@ case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in up) wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; esac -printf "%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)" +printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)" From 38815c3ad1a3ab75892b8146b424a2bc5e7c84cc Mon Sep 17 00:00:00 2001 From: Arthur Bais Date: Sat, 14 Nov 2020 22:12:38 +0200 Subject: [PATCH 2/3] add peertube torrents from newsboat (#760) * Create peertubetorrent * macro to torrent new videos on peertube * fix typo * rebind --- .config/newsboat/config | 4 +++- .local/bin/peertubetorrent | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .local/bin/peertubetorrent diff --git a/.config/newsboat/config b/.config/newsboat/config index b5035b8..e917991 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -35,9 +35,11 @@ macro t set browser "qndl" ; open-in-browser ; set browser linkhandler macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler macro w set browser "lynx" ; open-in-browser ; set browser linkhandler -macro p set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler +macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler macro c set browser "xsel -b <<<" ; open-in-browser ; set browser linkhandler macro C set browser "youtube-viewer --comments=%u" ; open-in-browser ; set browser linkhandler +macro p set browser "peertubetorrent %u 480" ; open-in-browser ; set browser linkhandler +macro P set browser "peertubetorrent %u 1080" ; open-in-browser ; set browser linkhandler highlight all "---.*---" yellow highlight feedlist ".*(0/0))" black diff --git a/.local/bin/peertubetorrent b/.local/bin/peertubetorrent new file mode 100644 index 0000000..56f2476 --- /dev/null +++ b/.local/bin/peertubetorrent @@ -0,0 +1,7 @@ +#!/bin/sh +# torrent peertube videos, requires the transadd script +# first argument is the video link, second is the quality (480 or 1080) +# 13/07/20 - Arthur Bais + +link="$(echo "$1" | sed "s/videos\/watch/download\/torrents/")""-$2.torrent" +transadd "$link" From 4493d431e3654e4ad59aa11f7419b71048872e5d Mon Sep 17 00:00:00 2001 From: Shaw Date: Sat, 14 Nov 2020 20:16:13 +0000 Subject: [PATCH 3/3] Add system will lock before suspend/hibernate (#797) Co-authored-by: Luke Smith --- .local/bin/sysact | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/sysact b/.local/bin/sysact index e73981f..9dc398b 100755 --- a/.local/bin/sysact +++ b/.local/bin/sysact @@ -12,7 +12,7 @@ cmds="\ 🔒 lock slock 🚪 leave dwm kill -TERM $(pgrep -u $USER "\bdwm$") ♻ renew dwm kill -HUP $(pgrep -u $USER "\bdwm$") -🐻 hibernate ${hib:-sudo -A systemctl suspend-then-hibernate} +🐻 hibernate slock ${hib:-systemctl suspend-then-hibernate -i} 🔃 reboot ${reb:-sudo -A reboot} 🖥 shutdown ${shut:-sudo -A shutdown -h now}"