diff --git a/common/song b/common/song new file mode 100755 index 0000000..17abb51 --- /dev/null +++ b/common/song @@ -0,0 +1,8 @@ +#!/bin/sh + +player="spotifyd" +qdbus org.mpris.MediaPlayer2.$player /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata >/tmp/currentsong +artist=$(cat /tmp/currentsong | grep "xesam:artist" | sed 's/.*artist: //') +title=$(cat /tmp/currentsong | grep "xesam:title" | sed 's/.*title: //') + +echo ${artist} - ${title} diff --git a/common/vpn b/common/vpn index d95f2ae..8861a0d 100755 --- a/common/vpn +++ b/common/vpn @@ -1,12 +1,12 @@ #!/bin/sh if [ "$1" == "on" ]; then - cmd="c --p2p" + cmd="c P2P" elif [ "$1" == "off" ]; then cmd="d" elif [ "$1" == "status" ]; then - cmd="s" + cmd="status" else echo "Please pass an argument: on, off, status" exit fi -doas protonvpn $cmd +nordvpn $cmd diff --git a/common/weather b/common/weather index 18b330b..b2146e4 100755 --- a/common/weather +++ b/common/weather @@ -1,5 +1,6 @@ #!/bin/sh -WEATHER=$(curl -s wttr.in/?format='%l:+%C,+%t+(feels+like+%f)+Wind:+%w&M') +FORMAT="%C,+%t+(feels+like+%f)+Wind:+%w&M" +WEATHER=$(curl -s wttr.in/?format=$FORMAT) printf "$WEATHER\n"