Moved weather from bashrc to script and updated vpn to use nordvpn

This commit is contained in:
Siina Mashek 2021-04-06 06:56:58 +03:00
parent a1ead34dbd
commit 70c317381a
3 changed files with 13 additions and 4 deletions

8
common/song Executable file
View file

@ -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}

View file

@ -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

View file

@ -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"