diff options
| -rwxr-xr-x | scripts/media_print_spotify_info.sh | 4 | ||||
| -rwxr-xr-x | scripts/toggle_syn_touchpad.sh | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/media_print_spotify_info.sh b/scripts/media_print_spotify_info.sh index 5a53149..fcb367b 100755 --- a/scripts/media_print_spotify_info.sh +++ b/scripts/media_print_spotify_info.sh @@ -2,8 +2,8 @@ metadata=$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata') -artist=$(echo "$metadata" | egrep -A 2 "artist" | egrep -v "artist" | egrep -v "array" | cut -b 27- | cut -d '"' -f 1 | egrep -v ^$) +artist=$(echo "$metadata" | grep -A 2 -E "artist" | grep -v -E "artist" | grep -v -E "array" | cut -b 27- | cut -d '"' -f 1 | grep -v -E ^$) -title=$(echo "$metadata" | egrep -A 1 "title" | egrep -v "title" | cut -b 44- | cut -d '"' -f 1| egrep -v ^$) +title=$(echo "$metadata" | grep -A 1 -E "title" | grep -v -E "title" | cut -b 44- | cut -d '"' -f 1| grep -v -E ^$) echo $artist - $title diff --git a/scripts/toggle_syn_touchpad.sh b/scripts/toggle_syn_touchpad.sh index 38dba25..4f9cdae 100755 --- a/scripts/toggle_syn_touchpad.sh +++ b/scripts/toggle_syn_touchpad.sh @@ -1,8 +1,8 @@ #!/bin/sh -STATE=`synclient -l | grep TouchpadOff | awk '{ print $3 }'`; +STATE="$(synclient -l | grep TouchpadOff | awk '{ print $3 }')"; -if [ "$STATE" == "0" ]; then +if [ "$STATE" = "0" ]; then synclient TouchpadOff=1; else synclient TouchpadOff=0 fi @@ -10,7 +10,7 @@ fi # Forces break of touchpad functions while typing # 1 second follow interval. -if [ "$STATE" == "1" ]; then +if [ "$STATE" = "1" ]; then syndaemon -i 1 -d; else killall syndaemon fi |
