Moved weather from bashrc to script and updated vpn to use nordvpn
This commit is contained in:
parent
a1ead34dbd
commit
70c317381a
3 changed files with 13 additions and 4 deletions
8
common/song
Executable file
8
common/song
Executable 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}
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue