aboutsummaryrefslogtreecommitdiff
path: root/musicMode.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-02-12 23:31:34 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-02-12 23:31:34 +0100
commitb4f6c2e0a01059345ef73a76a49240cbbdb6d257 (patch)
treeec0abebf66da5bc6c5885b3a6b613bb79f5a3ac9 /musicMode.sh
parentd56404164f7a04cc6433a7693b56e18dec7ec994 (diff)
downloadscripts-b4f6c2e0a01059345ef73a76a49240cbbdb6d257.tar.gz
scripts-b4f6c2e0a01059345ef73a76a49240cbbdb6d257.zip
Changed musicMode to use /tmp
Diffstat (limited to 'musicMode.sh')
-rwxr-xr-xmusicMode.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/musicMode.sh b/musicMode.sh
index 4fd7c82..e634aee 100755
--- a/musicMode.sh
+++ b/musicMode.sh
@@ -2,13 +2,16 @@
[ "$(pgrep -x musicMode.sh)" != "$$" ] && notify-send -t 3000 "Already running! Exiting this new instance." && exit 0 #Check if already running
[ -z "$(pgrep -x cmus)" ] && notify-send -t 3000 "cmus not running: No music mode." && exit 0 #Check that cmus is running
-# Get file name
-file=""
+
+mkdir /tmp/musicMode
+coverPath="/tmp/musicMode/cover.jpg"
+
i3-msg "workspace 6" >/dev/null #Switch to music workspace
i3-msg "gaps inner current set 0; gaps outer current set 0; bar mode hide"
i3-msg "exec urxvt -title 'noborder' -sh 100 -fn xft:monospace:size=4 -e vis -c ~/.config/vis/configMusicMode" # Start music visualizer
+
# Loop checking current song and checking background
-coverPath="/home/inigo/images/musicMode/cover.jpg"
+file=""
while [ true ]
do
if [ "$file" != "$(cmus-remote -Q | grep "^file" | cut -d' ' -f2-)" ]; then