aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ncmpcpp/config1
-rwxr-xr-xratpoison/mpdvolind2
-rw-r--r--ratpoison/ratpoisonrc.conf16
3 files changed, 10 insertions, 9 deletions
diff --git a/ncmpcpp/config b/ncmpcpp/config
index 1f3e315..80b8f70 100644
--- a/ncmpcpp/config
+++ b/ncmpcpp/config
@@ -1,3 +1,4 @@
+mpd_host = "127.0.0.1" # needed because localhost doesn't work for some reason
mpd_connection_timeout = 30
colors_enabled = "yes"
song_status_format = "$0{$8%t$9} on {$5%b$9} by {$3%a}"
diff --git a/ratpoison/mpdvolind b/ratpoison/mpdvolind
index 1f79362..c279af8 100755
--- a/ratpoison/mpdvolind
+++ b/ratpoison/mpdvolind
@@ -1,5 +1,5 @@
#!/bin/bash
-volm=`mpc volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`
+volm=`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`
if [[ "$volm" -eq "100" ]]; then
let volm=99
diff --git a/ratpoison/ratpoisonrc.conf b/ratpoison/ratpoisonrc.conf
index ee317fc..f574c28 100644
--- a/ratpoison/ratpoisonrc.conf
+++ b/ratpoison/ratpoisonrc.conf
@@ -271,21 +271,21 @@ definekey top XF86MonBrightnessDown brightdown
# Cmus (Music) Control
#-------------------------------------------------------------
# Aliases
-alias playinfo exec ratpoison -c "echo Music: `mpc | head -2 | tail -1 | awk '{print $1}'`"
+alias playinfo exec ratpoison -c "echo Music: `mpc -h 127.0.0.1 | head -2 | tail -1 | awk '{print $1}'`"
alias volinfo exec ratpoison -c "echo `$HOME/.ratpoison/mpdvolind`"
-alias songinfo exec ratpoison -c "echo Music: `mpc | head -1`"
+alias songinfo exec ratpoison -c "echo Music: `mpc -h 127.0.0.1 | head -1`"
#alias volinfo exec ratpoison -c "echo `$HOME/.ratpoison/cmusvolind`"
#alias playinfo exec ratpoison -c "echo Music: `cmus-remote -Q | awk '/status/ {print $2}'`"
#alias songinfo exec ratpoison -c "echo Playing:`cmus-remote -Q | awk '/ artist/ {$1=$2=""; print $0}'` - `cmus-remote -Q 2>/dev/null | grep title | awk '{$1=$2=""; print $0}'`"
# Play/Pause and Volume
-definekey top s-space exec mpc toggle && ratpoison -c 'playinfo'
-definekey top s-Right exec mpc next && ratpoison -c "songinfo"
-definekey top s-Left exec mpc prev && ratpoison -c "songinfo"
-definekey top s-Up exec mpc volume +5 && ratopison -c "volinfo"
-definekey top s-Up exec mpc volume +5 && ratpoison -c 'volinfo'
-definekey top s-Down exec mpc volume -5 && ratpoison -c 'volinfo'
+definekey top s-space exec mpc -h 127.0.0.1 toggle && ratpoison -c 'playinfo'
+definekey top s-Right exec mpc -h 127.0.0.1 next && ratpoison -c "songinfo"
+definekey top s-Left exec mpc -h 127.0.0.1 prev && ratpoison -c "songinfo"
+definekey top s-Up exec mpc -h 127.0.0.1 volume +5 && ratopison -c "volinfo"
+definekey top s-Up exec mpc -h 127.0.0.1 volume +5 && ratpoison -c 'volinfo'
+definekey top s-Down exec mpc -h 127.0.0.1 volume -5 && ratpoison -c 'volinfo'
# Old cmus controls
#definekey top s-space exec cmus-remote -u && ratpoison -c "playinfo"