OSDN Git Service

fix dunsttrigger
authorpaperbenni <paperbenni@gmail.com>
Mon, 9 Mar 2020 22:56:02 +0000 (23:56 +0100)
committerpaperbenni <paperbenni@gmail.com>
Mon, 9 Mar 2020 22:56:02 +0000 (23:56 +0100)
autostart.sh
monitor.sh
programs/dunsttrigger

index 72d7002..10bdb6a 100755 (executable)
@@ -45,7 +45,7 @@ else
        echo "your computer is a potato"
 fi
 
-if ! xrdb -query -all | grep -q 'ScrollPage:.*false'; then
+if ! xrdb -query -all | grep -q 'URxvt.perl-ext-common'; then
        instantthemes a
        xrdb ~/.Xresources
 fi
index b51f7a6..7f2fba3 100755 (executable)
@@ -60,9 +60,9 @@ else
     echo "$AMOUNT monitors found"
 fi
 
-iconf names "(xrandr | grep '[^s]connected' | grep -o '^[^ ]*')"
+iconf names "$(xrandr | grep '[^s]connected' | grep -o '^[^ ]*')"
 
-MONITOR1=$(head -1 <<<"$POSTITIONS")
+MONITOR1=$(head -1 <<<"$POSITIONS")
 MONITOR2=$(tail -1 <<<"$POSITIONS")
 
 if [ "$MONITOR1" -gt "$MONITOR2" ]; then
index ae3e4a5..83e6689 100755 (executable)
@@ -4,14 +4,14 @@
 
 # escape characters that cause problems with pango
 cleanstring() {
-    sed 's/&/&amp;/g' <<<"$@"
+    echo "$@" | sed 's/&/&amp;/g'
 }
 
 # add pango markup
 echo "($(date +%H:%M)) [$(cleanstring $1)] <b>$(cleanstring $2)</b> | <i>$(cleanstring $3)</i>" >>/tmp/notifications/notif.txt
 
 # some apps dont need/already have notification sounds
-if ! echo "$1" | grep -Eiq '(discord|spotify|thunderbird)'; then
+if ! echo "$1" | grep -Eiq '(discord|spotify|thunderbird|mailspring)'; then
     if ! [ -e ~/instantos/notifications/notification.ogg ]; then
         if ping -c 1 google.com; then
             mkdir -p ~/instantos/notifications/