From 2abe12bf0cc031e27307624049be2dd35ba620ac Mon Sep 17 00:00:00 2001
From: Dylan Lloyd <dylan@dylansserver.com>
Date: Tue, 13 Mar 2012 13:27:59 -0400
Subject: [PATCH] added control scripts and icons to repo

---
 icons/skip-backward.png | Bin 0 -> 1304 bytes
 icons/skip-forward.png  | Bin 0 -> 1284 bytes
 icons/volume-down.png   | Bin 0 -> 451 bytes
 icons/volume-mute.png   | Bin 0 -> 652 bytes
 icons/volume-on.png     | Bin 0 -> 515 bytes
 icons/volume-up.png     | Bin 0 -> 461 bytes
 scripts/back            |   7 +++++++
 scripts/music-toggle    |  11 +++++++++++
 scripts/next            |  13 +++++++++++++
 scripts/volume-down     |   5 +++++
 scripts/volume-toggle   |  12 ++++++++++++
 scripts/volume-up       |   5 +++++
 12 files changed, 53 insertions(+)
 create mode 100644 icons/skip-backward.png
 create mode 100644 icons/skip-forward.png
 create mode 100644 icons/volume-down.png
 create mode 100644 icons/volume-mute.png
 create mode 100644 icons/volume-on.png
 create mode 100644 icons/volume-up.png
 create mode 100755 scripts/back
 create mode 100755 scripts/music-toggle
 create mode 100755 scripts/next
 create mode 100755 scripts/volume-down
 create mode 100755 scripts/volume-toggle
 create mode 100755 scripts/volume-up

diff --git a/icons/skip-backward.png b/icons/skip-backward.png
new file mode 100644
index 0000000000000000000000000000000000000000..d0cf74cf9614ffcb384d3ecf3153e3a1dc8f3b74
GIT binary patch
literal 1304
zcmV+z1?T#SP)<h;3K|Lk000e1NJLTq001xm001xu1^@s6R|5Hm00009a7bBm000XT
z000XT0n*)m`~Uy|2XskIMF-Le3=JPT*J_S3000EHNkl<Zc%1E-Ur6&+7{@>UnWm7s
zmYAa#(S=tkMxY>cWe7!o=G0OH<;4rdlmb(`(O$X<O{k!0ipVb1shQg@N;GH~f#6#~
zAy`If<cmrESt|a|b#Xj<H(xjR=eK#$`-KCZXFlKO`JQKIoaY>Ph==%pBkBs<%Rnoj
z1J3>6hz5QE-UntC%IkUH9pEY81d-<&@G<b2FU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DJksi
z?6A4%I+5JN$0J7{p*=C(@i*I;m>8m>9w^uoz_-`L81cocLA*2ule`s3@>f7(V<SeR
zk+ih5t3-V5CB|LcdTw~Isoz3us$#@@*L5#0atW6KI|00nX*3!d8yhJrE5l?m(cj<C
z%E}7BU%*R<pV>_Ae;xlsEbc%4#t17qIy!JVovz_<IOyr=Au}^GARe#RD*5^O<mcye
za&qF;S*233u&}_=(o#S{uR?NiGA%7F)Ya87GBU#a{5)G*Tg1l3vbws;;^N}<B<|?y
z>hf42Z=<cPEvSSqSHRa8931q@bGZVK5ZrIMgcG>xkROA1BTxb!G5!PduO-;$+yO2C
O0000<MNUMnLSTX>d{qSi

literal 0
HcmV?d00001

diff --git a/icons/skip-forward.png b/icons/skip-forward.png
new file mode 100644
index 0000000000000000000000000000000000000000..58c63a8591a38f5325986d5752436f6c2c7a4bbb
GIT binary patch
literal 1284
zcmV+f1^fDmP)<h;3K|Lk000e1NJLTq001xm001xu1^@s6R|5Hm00009a7bBm000XT
z000XT0n*)m`~Uy|2XskIMF-Le3=Jj(7>^z!000D|Nkl<Zc%1E-TS#nG7{`AeEe9oJ
zPzGt7BrBztBozdo^rg!n=@i7^Wz?gn$dQDcs0YnXP-v4~9D;Hb!4Py5Ei5_oA_QHi
zhbZ4H&^Q{|5Tl^Y8TU9n?Ae{|J~O&!?==*3{;-(6{<GHiegC!AUYEV#F7D$0jjSZx
z)4+?sLy7#oz^}mDz_K8})xgWZV~H5zmz2K(>;mrtpI%h(8Q?TwFj;!ROw<WH4umf7
zaan4)$oRK947_4ez(*#6j|1PUjpb;JKcYM|Ha61S+|2g&Hd9kmoSd8}f4!0TebYej
zSwMx7sjaQ0t*s47l8DEXk0Oi3!sg~COG`@%^}t0A!X%VVOiaWT%+1ZkEf$NmB}NSh
zxB`5s*y!o$iR(ci5K#O5Lu)W8)GgA{(ZS5j3>J$;UF0?3x&aYMeHcYb0a~=Qv?LQT
zf=Ll(p<4jRA{G`F$j{GL(<8uJLZeCpX$b&uxm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`+-0p
uwLneYg1A#t6!|NJ7P*)^hs1%1lKC5O8VEqjbzczx0000<MNUMnLSTY=bxvsj

literal 0
HcmV?d00001

diff --git a/icons/volume-down.png b/icons/volume-down.png
new file mode 100644
index 0000000000000000000000000000000000000000..a4dd31122b10d2cccdc1f4f12fbd1e21d2fe39d8
GIT binary patch
literal 451
zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)P61|KLw=#nJwQ{OJzX3_DsH`<
zeU|gE0Z(i0W5!Kx<)?N!f4wtzlbd;gKjU=^O_u1Yu6cfqO^1Ikny>Dhtf^YjCo+ef
zQGkI_pyBn2-_A8B_y74=IbFc%#xzr}{kv_Z8YhU~x7)43=zH)L!-ON<%nri(TnvGK
z&Wn6dlR3wp(dadA|Gy9hu_OM>39f%c7{ZTc-+1_tL8ta7km$1i%IMxywK6NTM*M)i
z;k2Vp(uzz9K*yJ_&QD`FWYzP`@Rs4c3$6Wnr@z^lIr3-LmzfziFmNy!r^QalIW6^i
z^TOJOBf5g#2R_Rk;90?#arcx{YJ)q+&lR7)RXOp#(6d#JmvwymKCE#AXOxld2gwA%
zLmz}TuqAr&Z(vD`63*GKw>_9aw&{d~OPj(o<^aVGsfEfMvkH#PRftks5s|3E@vgk_
lguP#pv<d^zT}&UO<D2Ky?7enO^fl0t44$rjF6*2UngF%zr6vFX

literal 0
HcmV?d00001

diff --git a/icons/volume-mute.png b/icons/volume-mute.png
new file mode 100644
index 0000000000000000000000000000000000000000..ebf7c8ea803d3d8369034b6b407e724e5ae99587
GIT binary patch
literal 652
zcmV;70(1R|P)<h;3K|Lk000e1NJLTq002M$002M;1^@s6s%dfF00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipk{
z0}U|`60?i|00In2L_t(|+U;9GjszhH90?DYZ|tAuypP)R{%O9kKj=Mm(wVdhSfJhN
zZIV%_5)hG2+qOMs9`u-e@bO3b@fY~@_bW2F_w$v!blAQ#1oQ$cnd?Oej|M!N5FQ<P
zO;#%rbVcw;xpZalNBLGAxCi)}*+vqYj){=w7}O|<2w2GD^LPxpCqk%b{eHfZWG$`r
zs4ZZGL`JGdP6x9EM1$Xh+nHRHH4vI{B=`uTX(VMd@}x&!?LUMHP|@JSuERB9R{&p{
zLw5&nwtyZNn-bBj`sC(QZ@=$-kD#8Wj|9IT!6n_!<aMhFYQSqZL_-22ci+>Ob8~b0
zNM&*4ZlX;du@3h-_98$_tbn2!A8kzkFtP|(1l)YoV%M^OMZh9p5wHkY1l%~?4XFxG
z;R3x&S6+jyg@oFioI8z1By0VtRDqEIMO1j*U7#fxN}jAn3btec*b*mD%}uDdMW|h}
zJe`kV3DnB0ra|cpuonqZoyh8|+Rm)fT4)kVdVR_YNrWT-d$|L7E2f$6-A#73K6xr;
znb&#*4|5xA0b-eJ%{^}MFw&BEv8PhrR)A>UB2Uxw%=uBBYvk>pXcDCPhg8pyX6eWX
zuWgn#6VSTD9`yn#!B7H5C~{~m3*Ih|>=BN1EBG<ED-&T6Lw+^pO@xP)anvqZ3at??
m#L>QL{rJIar1kaq<l`S`9kKed@(FbS0000<MNUMnLSTY8P8=}+

literal 0
HcmV?d00001

diff --git a/icons/volume-on.png b/icons/volume-on.png
new file mode 100644
index 0000000000000000000000000000000000000000..de6b58e1e9bef412d45f159ee7a357dc5583e490
GIT binary patch
literal 515
zcmV+e0{s1nP)<h;3K|Lk000e1NJLTq002M$002M;1^@s6s%dfF00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipk{
z0}V2k8{#$q00DzZL_t(|+U;A*4Z|P|g{KUVHM&#I9jfQ<lr_2mJw=L8o01g&usP*`
zY~J%9kz7hio)?nyHEkdHq2oZe*R!OQ(mF4hQct-n^MKpySvK%{A|eDl5Wr>a!yGUI
z_*zy=9>J*KTjgVPxBsOF-eO*y04nfT`v!Qh{E=RGbbIzPNR{n-w9BvxzL#uR1>Y+X
z!g|cN>iM=0R=`t@$FOSoUOHh3JcSobXG)FMT7JerHHp(Na8^Kn0%ztzL^4d`O3WMJ
zI;6t`Mz(H*Km$<`0@S^B<bWW+2m#jn{P2JvAP5+b0FJygln1o-GW&fI0zp6!;A_=+
zB8H(WS#+c|T`eV2bz5}~=<PwZyd#3uJdu$OqqAN}QU$c;l27LXr!p$b{-X=rjB6X7
zAmMhJ<U=a<ddN5<_uF2!*W&BE<bV5wBfwW>$1tSv!h%yTG#y4lAGBG7TaQ={pqv}l
zdC9HvMgJMv4%usp9O{u2SD3&PSk)d-$1s=P9Dk2HUvH7U(arY<5P$#x002ovPDHLk
FV1h4V+2sHL

literal 0
HcmV?d00001

diff --git a/icons/volume-up.png b/icons/volume-up.png
new file mode 100644
index 0000000000000000000000000000000000000000..f91b061c681f98e77914d313eb2f5d70e44b38a6
GIT binary patch
literal 461
zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)P61|Kg9_1RDWEC7o-U3d6}R5b
zKF!-~AmCzH#JI)Le@<}7xi2o#B@gB}gt;ua@g}_|-M@qRUghtti&~~!y0E#|`MDbd
zivtMRM%&08y8Z7%W&C;7l-bh~D$A-Y(;f8Wl$fi8-(6z9aAY%Q6q7^GK1qg<k7^7P
zj;>~Q5MR%=fc0Y*LzJNYK8~#_F)|J9KUN!izZY5DBCPQ!n@Mo~gkwp*A2c6%mweCz
zT5@5#tIKkgSs(XXAL=k-?E7r`cgL;BT{?|2OtTdj1sK|7WpDiwS31FSW0`73(~14E
zpQmR`Ul=d&?#Iu+XMY^orFT-!%#lf<Vb`t9)T_Gtc&9l{m?iUhpISe|9X-akGh;75
zja|mT)G{l<C3CsXbWP3|bC@~;AIe>@YM8dkL6_M}vBEJ}m$6@#aTB{jvq5fCheFIU
u1|gR1h8;|bAL^T9S~waQKxjeqZ-#QVDUqj}1HJ*nn!(f6&t;ucLK6V*!K`Hf

literal 0
HcmV?d00001

diff --git a/scripts/back b/scripts/back
new file mode 100755
index 0000000..fc8f08c
--- /dev/null
+++ b/scripts/back
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -n "$(pgrep pianobar)" ]
+then
+  notify-send -i /usr/share/icons/powermate/skip-backward.png "skip backward "
+  mpc next
+fi
diff --git a/scripts/music-toggle b/scripts/music-toggle
new file mode 100755
index 0000000..0069206
--- /dev/null
+++ b/scripts/music-toggle
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ -n "$(pgrep pianobar)" ]
+then
+  pianobar-toggle
+else
+  if [ -n "$(pgrep mpd)" ]
+  then
+    mpc toggle
+  fi
+fi
diff --git a/scripts/next b/scripts/next
new file mode 100755
index 0000000..4c7168b
--- /dev/null
+++ b/scripts/next
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ -n "$(pgrep pianobar)" ]
+then
+  notify-send -i /usr/share/icons/powermate/skip-forward.png "skipping "
+  pianobar-next
+else
+  if [ -n "$(pgrep mpd)" ]
+  then
+    notify-send -i /usr/share/icons/powermate/skip-forward.png "skipping "
+    mpc next
+  fi
+fi
diff --git a/scripts/volume-down b/scripts/volume-down
new file mode 100755
index 0000000..256dddd
--- /dev/null
+++ b/scripts/volume-down
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+export DISPLAY=:0
+amixer set Master 1-
+notify-send -i /usr/share/icons/powermate/volume-down.png " "
diff --git a/scripts/volume-toggle b/scripts/volume-toggle
new file mode 100755
index 0000000..407bf01
--- /dev/null
+++ b/scripts/volume-toggle
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+export DISPLAY=:0
+status=$(amixer get Master | tail -n1 | awk '{print $NF}')
+status=$(echo "${status%]}")
+status=$(echo "${status#[}")
+if [ $status == "on" ]
+  then notify-send -i /usr/share/icons/powermate/volume-on.png " "
+elif [ $status == "off" ]
+  then notify-send -i /usr/share/icons/powermate/volume-mute.png " "
+fi
+amixer set Master toggle
diff --git a/scripts/volume-up b/scripts/volume-up
new file mode 100755
index 0000000..a4e62c3
--- /dev/null
+++ b/scripts/volume-up
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+export DISPLAY=:0
+amixer set Master 1+
+notify-send -i /usr/share/icons/powermate/volume-up.png " "
-- 
2.30.2