aboutsummaryrefslogtreecommitdiff
path: root/musicMode.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-04-09 16:26:46 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2019-04-09 16:28:27 +0200
commit6e1ce4f87831d3761a46497f80e56ac7a73e14c8 (patch)
tree1ce2f613f63e9d0a8b3443ef70feb81d6ad1f583 /musicMode.sh
parent8da9dfb0098bf119b278e043f93a56c629013b26 (diff)
downloadscripts-6e1ce4f87831d3761a46497f80e56ac7a73e14c8.tar.gz
scripts-6e1ce4f87831d3761a46497f80e56ac7a73e14c8.zip
Minor changes.
Diffstat (limited to 'musicMode.sh')
-rwxr-xr-xmusicMode.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/musicMode.sh b/musicMode.sh
index 14b97ba..15e0632 100755
--- a/musicMode.sh
+++ b/musicMode.sh
@@ -11,7 +11,7 @@ i3-msg "exec urxvt -title 'noborder' -sh 100 -fn xft:monospace:size=4 -e vis -c
# Loop checking current song and setting background
file=""
-while [ true ]
+while true
do
# Check if current file has changed
if [ "$file" != "$(cmus-remote -Q | grep "^file" | cut -d' ' -f2-)" ]; then
@@ -21,10 +21,10 @@ do
# Get title. It is only used for video search.
title="$(cmus-remote -Q | grep "^tag title " | cut -d' ' -f3-)"
[ -z "$title" ] && title="$(basename "$(cmus-remote -Q | grep "^file" | cut -d' ' -f2- | cut -d'.' -f1 )")"
- dunstify -r $(dunstifyIDs.sh musicMode) -t 0 "$(~/scripts/i3blocks/i3music.sh)"
+ dunstify -r "$(dunstifyIDs.sh musicMode)" -t 0 "$(~/scripts/i3blocks/i3music.sh)"
ffmpeg -i "$file" "$coverPath" >/dev/null
feh --no-fehbg --bg-max "$coverPath" >/dev/null #|| feh --no-fehbg --bg-max $HOME/images/wallpapers/bg_* >/dev/null
- videoFile="$(ls -d $HOME/videos/music/* | grep "$title")"
+ videoFile="$(find "$HOME/videos/music" | grep "$title")"
if [ "$videoFile" ]; then # videoclip found
cmus-remote -u
mpv --fs "$videoFile"