aboutsummaryrefslogtreecommitdiff
path: root/Window_Manager/ratpoison
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-04-03 00:51:56 +0100
committerVasil Zlatanov <v@skozl.com>2019-04-03 00:51:56 +0100
commitb1dbf62ab9dcad03138a52a8596dccdf9286d958 (patch)
tree9536b3b472538500f6422aa44337b9317708995f /Window_Manager/ratpoison
parentf098edccda3c8d1ab02a7bae06cdb450ad0ef60d (diff)
downloaddotfiles-b1dbf62ab9dcad03138a52a8596dccdf9286d958.tar.gz
dotfiles-b1dbf62ab9dcad03138a52a8596dccdf9286d958.tar.bz2
dotfiles-b1dbf62ab9dcad03138a52a8596dccdf9286d958.zip
Add spotify volume commands
Diffstat (limited to 'Window_Manager/ratpoison')
-rw-r--r--Window_Manager/ratpoison/ratpoisonrc.conf32
1 files changed, 22 insertions, 10 deletions
diff --git a/Window_Manager/ratpoison/ratpoisonrc.conf b/Window_Manager/ratpoison/ratpoisonrc.conf
index 757d186..8b00a30 100644
--- a/Window_Manager/ratpoison/ratpoisonrc.conf
+++ b/Window_Manager/ratpoison/ratpoisonrc.conf
@@ -1,13 +1,15 @@
#using jcs hacks
# info: C=control, M=meta/alt, s=super, S=shift, H = Hyper
# xnest for testing
+
+set onlyborder 0
+
escape grave
definekey top s-grave meta
definekey top Arabic_dammatan meta
#set quiet 1
-
set historyexpansion 1
#find files script
@@ -54,7 +56,7 @@ showpanel
alias showborder set border 2
alias hideborder set border 0
-bordscript
+#bordscript
######################################
# Panel
@@ -73,7 +75,7 @@ addhook switchwin barsend
#addhook deletewindow barsend
addhook switchframe barsend
addhook switchgroup barsend
-addhook switchgroup bordscript
+#addhook switchgroup bordscript
#addhook titlechanged barsend
#addhook key barsend
@@ -105,7 +107,7 @@ bind V hsplit 2/3
bind s vsplit
bind S vsplit 2/3
bind d remove
-bind space exec urxvt
+bind space exec alacritty
bind o only
bind semicolon colon
bind e exec
@@ -126,7 +128,7 @@ alias paneltoggle exec ~/.config/ratpoison/paneltoggle
-addhook key bordscript
+#addhook key bordscript
definekey top s-b bordtoggle
definekey top s-p paneltoggle
@@ -176,18 +178,28 @@ definekey top KP_Enter exec ~/Dropbox/speech/run-duplex.sh
# Volume Control
#-------------------------------------------------------------
# Up
-#alias volup exec amixer -q set Master 5+ && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo
-alias volup exec amixer -q set Master 5+ && volume -f 'V%i' > /tmp/panel-fifo
+#alias volup exec amixer -D pulse -q set Master 5+ && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo
+alias volup exec pactl set-sink-volume `pactl list sinks short | perl -ne '/^(\d*)/; $x=$1; END { print $x }'` +2% && volume -f 'V%i' > /tmp/panel-fifo
+alias voldown exec pactl set-sink-volume `pactl list sinks short | perl -ne '/^(\d*)/; $x=$1; END { print $x }'` -2% && volume -f 'V%i' > /tmp/panel-fifo
-definekey top XF86AudioRaiseVolume volup
+alias spvolup exec pactl set-sink-input-volume `.config/ratpoison/get_spotify_sink` +2%
+alias spvoldown exec pactl set-sink-input-volume `.config/ratpoison/get_spotify_sink` -2%
+
+
+definekey top M-XF86AudioRaiseVolume spvolup
definekey top s-Prior volup
definekey top s-q volup
+definekey top XF86AudioPlay exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
+definekey top XF86AudioStop exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
+definekey top XF86AudioNext exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
+definekey top XF86AudioPrev exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
+
# Down
-#alias voldown exec amixer -q set Master 5- && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo
-alias voldown exec amixer -q set Master 5- && volume -f 'V%i' > /tmp/panel-fifo
+#alias voldown exec amixer -D pulse -q set Master 5- && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo
definekey top XF86AudioLowerVolume voldown
+definekey top M-XF86AudioLowerVolume spvoldown
definekey top s-Next voldown
definekey top s-a voldown