Improve repo structure

This commit is contained in:
Paul-Henri Froidmont 2021-07-16 21:09:58 +02:00
parent fdc4148540
commit 62f200ba03
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
294 changed files with 499 additions and 516 deletions

View file

@ -0,0 +1,20 @@
#! /usr/bin/env bash
#
# Writes the title and artist of the song currently being played by MPD or MOC to STDOUT, formatted for xmobar
# If MPD is playing a song or is paused, its information will be written. If not, MOC will be checked similarly.
# If neither are playing a song or are paused, nothing will be written.
# Note: if MPD isn't playing some errors will be written to STDERR; don't worry - xmobar only looks at STDOUT
TCOL="cyan" # The colour to be used to draw the song title when playing
ACOL="lightblue" # The colour to be used to draw the song artist when playing
PCOL="#928374" # The colour to be used to draw both the song title and artist when paused
MPDSTATE=$(mpc | sed -e '2 !d' -e 's/^.*\[//' -e 's/\].*$//')
if [ $MPDSTATE == "playing" ]; then
# MPD is playing
echo "<fc=$ACOL>$(mpc current | sed "s/ - /\<\/fc\> - \<fc=$TCOL>/")</fc>"
elif [ $MPDSTATE == "paused" ]; then
# MPD is paused
echo "<fc=$PCOL>$(mpc current)</fc>"
fi

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
sleep 0.2; scrot -s -e 'mv $f ~/Pictures/Screenshots'