aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-04-03 19:48:32 +0100
committerVasil Zlatanov <v@skozl.com>2019-04-03 19:48:32 +0100
commit5fed1e097d543abaf0b8726b21fc43e87e4526ad (patch)
treeaab3e7c6587619bb0015f9c07ab1edec1a83db05
parentf62fb0f2ab09407803680364849e22ffe2eb6342 (diff)
parent9e057a7cdeb3eddbe842bf3e5902753e7b556e7b (diff)
downloaddotfiles-5fed1e097d543abaf0b8726b21fc43e87e4526ad.tar.gz
dotfiles-5fed1e097d543abaf0b8726b21fc43e87e4526ad.tar.bz2
dotfiles-5fed1e097d543abaf0b8726b21fc43e87e4526ad.zip
Merge branch 'master' of ssh://skozl.com:/srv/git/dotfiles
-rw-r--r--Mail/mutt/mailcap2
-rw-r--r--Shell/bash_aliases6
-rwxr-xr-xWindow_Manager/ratpoison/get_spotify_sink4
-rw-r--r--Window_Manager/ratpoison/ratpoisonrc.conf30
4 files changed, 27 insertions, 15 deletions
diff --git a/Mail/mutt/mailcap b/Mail/mutt/mailcap
index fbf60e4..7daebc7 100644
--- a/Mail/mutt/mailcap
+++ b/Mail/mutt/mailcap
@@ -1,5 +1,5 @@
application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; rifle /tmp/mutt/$(basename %s) &
-text/html; chromium-dev '%s' &; test=test -n "$DISPLAY"; needsterminal;
+text/html; chromium '%s' &; test=test -n "$DISPLAY"; needsterminal;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
text/calendar; mutt-ical.py -i -e "vasil.zlatanov15@imperial.ac.uk" %s
application/ics; mutt-ical.py -i -e "vasil.zlatanov15@imperial.ac.uk" %s
diff --git a/Shell/bash_aliases b/Shell/bash_aliases
index c127431..6dad212 100644
--- a/Shell/bash_aliases
+++ b/Shell/bash_aliases
@@ -1,5 +1,9 @@
#if you wanna change timezone just copy one of /usr/share/zoneinfo/place to /etc/localtime
+
+#bauerbill
+alias bb='baurebill'
+
alias mutt='neomutt'
alias sp='spotify --force-device-scale-factor=2 &! exit'
alias wa='chromium --app=https://web.whatsapp.com'
@@ -44,7 +48,7 @@ alias radiorock="unbuffer mpv 'http://relay.181.fm:8028' |grep --line-buffered i
alias radio40="unbuffer mpv 'http://relay.181.fm:8070' |grep --line-buffered icy-title | sed -u 's/.*icy-title: /p/' > /tmp/panel-fifo"
alias radiolounge="unbuffer mpv 'http://sc-tcl.1.fm:8010/' |grep --line-buffered icy-title | sed -u 's/.*icy-title: /p/' > /tmp/panel-fifo"
alias irc='autossh -M 0 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" -p 55022 vasko@skozl.com'
-alias vps='mosh vasko@108.61.173.91 -- screen -rd'
+alias vps='mosh vasko@108.61.173.91 -- TERM=xterm-xfree86 screen -rd'
alias desk='mosh -p 55101:55999 --ssh="ssh -p 55022" vsz@108.61.173.91 -- screen -rd'
alias sourcel='source ~/.bash_aliases'
alias ,.='fc -e -'
diff --git a/Window_Manager/ratpoison/get_spotify_sink b/Window_Manager/ratpoison/get_spotify_sink
new file mode 100755
index 0000000..58ba5e9
--- /dev/null
+++ b/Window_Manager/ratpoison/get_spotify_sink
@@ -0,0 +1,4 @@
+#!/bin/sh
+pacmd list-sink-inputs |
+tr '\n' '\r' |
+perl -ne 's/ *index: ([0-9]+).+?application\.name = "([^\r]+)"\r.+?(?=index:|$)/\2:\1\r/g; print $1 if $2=="Spotify"'
diff --git a/Window_Manager/ratpoison/ratpoisonrc.conf b/Window_Manager/ratpoison/ratpoisonrc.conf
index f9e4e9c..702ab68 100644
--- a/Window_Manager/ratpoison/ratpoisonrc.conf
+++ b/Window_Manager/ratpoison/ratpoisonrc.conf
@@ -2,6 +2,8 @@
# 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
@@ -55,7 +57,7 @@ showpanel
alias showborder set border 2
alias hideborder set border 0
-bordscript
+#bordscript
######################################
# Panel
@@ -74,7 +76,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
@@ -106,7 +108,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
@@ -122,9 +124,6 @@ bind P exec ~/bin/safepaste
alias paneltoggle exec ~/.config/ratpoison/paneltoggle
-# autohide border when in fullscreen
-set onlyborder 0
-
definekey top s-b bordtoggle
definekey top s-p paneltoggle
@@ -172,19 +171,24 @@ definekey top KP_Enter exec ~/Dropbox/speech/run-duplex.sh
#-------------------------------------------------------------
# Volume Control
#-------------------------------------------------------------
-# Up
-#alias volup exec amixer -D sysdefault -q set Master 5+ && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo
-alias volup exec amixer -D sysdefault -q set Master 5+ && 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
+
+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 XF86AudioRaiseVolume volup
+definekey top M-XF86AudioRaiseVolume spvolup
definekey top s-Prior volup
definekey top s-q volup
-# Down
-#alias voldown exec amixer -D sysdefault -q set Master 5- && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo
-alias voldown exec amixer -D sysdefault -q set Master 5- && volume -f 'V%i' > /tmp/panel-fifo
+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
definekey top XF86AudioLowerVolume voldown
+definekey top M-XF86AudioLowerVolume spvoldown
definekey top s-Next voldown
definekey top s-a voldown