Compare commits
5 commits
d49bdfb70c
...
9366385324
Author | SHA1 | Date | |
---|---|---|---|
9366385324 | |||
2e56222e29 | |||
a6ebcf95f0 | |||
101a4a3ac9 | |||
2802364371 |
5 changed files with 22 additions and 4 deletions
5
apsalar/spotify
Executable file
5
apsalar/spotify
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
/usr/bin/rescrobbled &
|
||||||
|
/usr/bin/spotify
|
||||||
|
kill -9 $(pgrep -f rescrobbled)
|
||||||
|
exit
|
6
apsalar/wtfis
Executable file
6
apsalar/wtfis
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
emerge --search "$1" --fuzzy-search n \
|
||||||
|
| grep "Description" \
|
||||||
|
| head -1 \
|
||||||
|
| cut -d":" -f2 \
|
||||||
|
| awk '{$1=$1;print}'
|
|
@ -1,10 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
api_url="https://api.listenbrainz.org/1/user/$1/playing-now"
|
if [[ ! $1 ]]; then
|
||||||
|
user="siinamonster"
|
||||||
|
else
|
||||||
|
user="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! $1 ]]; then 1="siinamonster"; fi
|
api_url="https://api.listenbrainz.org/1/user/$user/playing-now"
|
||||||
|
|
||||||
read artist track < <(echo $(curl -s $api_url | \
|
data=$(curl -s $api_url | jq -r '.payload.listens[0].track_metadata')
|
||||||
jq -r '.payload.listens[0].track_metadata | .artist_name, .track_name'))
|
artist=$(echo "$data" | jq '.artist_name' | tr -d '"')
|
||||||
|
track=$(echo "$data" | jq '.track_name' | tr -d '"')
|
||||||
|
|
||||||
if [[ "$artist" != "null" ]]; then
|
if [[ "$artist" != "null" ]]; then
|
||||||
echo "$artist" - "$track"
|
echo "$artist" - "$track"
|
||||||
|
|
|
@ -2,3 +2,5 @@
|
||||||
# Link some stuff to /usr/local/bin for ease of access with menus
|
# Link some stuff to /usr/local/bin for ease of access with menus
|
||||||
if [ "$EUID" -ne 0 ]; then echo "Please run as root"; exit; fi
|
if [ "$EUID" -ne 0 ]; then echo "Please run as root"; exit; fi
|
||||||
ln -s $(pwd)/apsalar/audacious /usr/local/bin/audacious
|
ln -s $(pwd)/apsalar/audacious /usr/local/bin/audacious
|
||||||
|
ln -s $(pwd)/apsalar/spotify /usr/local/bin/spotify
|
||||||
|
|
||||||
|
|
BIN
icons/obsidian.png
Normal file
BIN
icons/obsidian.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Reference in a new issue