Merge pull request #4 from mateossh/fix-indentation
Fix indentation inconsistency
This commit is contained in:
commit
5a58f89f96
|
@ -0,0 +1,14 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Unix-style newlines with a newline ending every file
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
# Tab indentation (no size specified)
|
||||||
|
[*.md]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
16
kunst
16
kunst
|
@ -22,15 +22,15 @@ update_cover() {
|
||||||
# output of ffmpeg
|
# output of ffmpeg
|
||||||
ffmpeg -i "$MUSIC_DIR$(mpc current -f %file%)" $COVER -y &> /dev/null
|
ffmpeg -i "$MUSIC_DIR$(mpc current -f %file%)" $COVER -y &> /dev/null
|
||||||
|
|
||||||
# get the status of the previous command
|
# get the status of the previous command
|
||||||
STATUS=$?
|
STATUS=$?
|
||||||
|
|
||||||
# check if the file has a embbeded album art
|
# check if the file has a embbeded album art
|
||||||
if [ $STATUS -eq 0 ];then
|
if [ $STATUS -eq 0 ];then
|
||||||
echo "kunst: extracted album art"
|
echo "kunst: extracted album art"
|
||||||
ARTLESS=false
|
ARTLESS=false
|
||||||
else
|
else
|
||||||
echo "error: file does not have an album art"
|
echo "error: file does not have an album art"
|
||||||
ARTLESS=true
|
ARTLESS=true
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -46,9 +46,9 @@ main() {
|
||||||
update_cover
|
update_cover
|
||||||
|
|
||||||
if [ $ARTLESS == true ];then
|
if [ $ARTLESS == true ];then
|
||||||
# change the path to COVER because the music note
|
# change the path to COVER because the music note
|
||||||
# image is a png not jpg
|
# image is a png not jpg
|
||||||
COVER=/tmp/kunst.png
|
COVER=/tmp/kunst.png
|
||||||
|
|
||||||
# decode the base64 encoded image and save it
|
# decode the base64 encoded image and save it
|
||||||
# to /tmp/kunst.png
|
# to /tmp/kunst.png
|
||||||
|
@ -61,9 +61,9 @@ main() {
|
||||||
sxiv -g 250x250 -b $COVER &
|
sxiv -g 250x250 -b $COVER &
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# waiting for an event from mpd; play/pause/next/previous
|
# waiting for an event from mpd; play/pause/next/previous
|
||||||
# this is lets kunst use less CPU :)
|
# this is lets kunst use less CPU :)
|
||||||
mpc idle &> /dev/null
|
mpc idle &> /dev/null
|
||||||
echo "kunst: received event from mpd"
|
echo "kunst: received event from mpd"
|
||||||
|
|
||||||
update_cover
|
update_cover
|
||||||
|
|
Loading…
Reference in New Issue