From 903dd570a3e7a4b88150e424c2266c1de8cdc202 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Mon, 20 Jan 2014 10:55:57 +0100 Subject: [PATCH] octopus and procmail --- Utils/octopus.sh | 22 +++++++++++++++++----- procmailrc | 8 +++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index f2b156c..2241455 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -92,20 +92,29 @@ case $1 in BEAT_TIME=`beat -v` xsetroot -name "Vol $VOLUME :: [$SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE (@$BEAT_TIME)" || true + $0 conf-ifaces ;; "wallpaper") ~/Pictures/wallpapers/chooseWP.sh || true & ;; + "conf-ifaces") + ifconfig eth0 | grep netmask > /dev/null + if [ $? -eq 0 ]; then + sudo ifconfig wlan0 down + else + sudo ifconfig wlan0 up + fi + ;; + "reset-screen") $0 init-all ;; "init-all") xrandr | grep "VGA2 disconnected" > /dev/null - if [ $? -eq 0 ] - then + if [ $? -eq 0 ]; then $0 monitor laptop else $0 monitor extern @@ -134,15 +143,18 @@ case $1 in sudo dhcpcd eth0 -b -m 10 -p -t 0 & ;; - "suspend") + slock & systemctl suspend - slock ;; "lock") + slock & xset dpms force off - slock + ;; + + "print") + sudo systemctl start cups ;; esac diff --git a/procmailrc b/procmailrc index 754085d..1f1dc35 100644 --- a/procmailrc +++ b/procmailrc @@ -77,7 +77,13 @@ SED=/bin/sed #Stupid fucking viagra :0 * ^X-Mailer: Airmail.* - * X-Original-To:.*tor.* + * ^X-Original-To:.*tor.* + $SPAMBOX + +#Out fcking ads + * ^To:.*tor@vi-di.fr.* + * ^From:.*(Prizer|Prizer).* + * ^Subject:.*(S|s)av(ings|e).* $SPAMBOX #Out trading