From: Dylan Lloyd <dylan@dylansserver.com>
Date: Tue, 13 Mar 2012 17:27:59 +0000 (-0400)
Subject: added control scripts and icons to repo
X-Git-Url: https://disinclined.org/git/?a=commitdiff_plain;h=2abe12bf0cc031e27307624049be2dd35ba620ac;p=powermate.git

added control scripts and icons to repo
---

diff --git a/icons/skip-backward.png b/icons/skip-backward.png
new file mode 100644
index 0000000..d0cf74c
Binary files /dev/null and b/icons/skip-backward.png differ
diff --git a/icons/skip-forward.png b/icons/skip-forward.png
new file mode 100644
index 0000000..58c63a8
Binary files /dev/null and b/icons/skip-forward.png differ
diff --git a/icons/volume-down.png b/icons/volume-down.png
new file mode 100644
index 0000000..a4dd311
Binary files /dev/null and b/icons/volume-down.png differ
diff --git a/icons/volume-mute.png b/icons/volume-mute.png
new file mode 100644
index 0000000..ebf7c8e
Binary files /dev/null and b/icons/volume-mute.png differ
diff --git a/icons/volume-on.png b/icons/volume-on.png
new file mode 100644
index 0000000..de6b58e
Binary files /dev/null and b/icons/volume-on.png differ
diff --git a/icons/volume-up.png b/icons/volume-up.png
new file mode 100644
index 0000000..f91b061
Binary files /dev/null and b/icons/volume-up.png differ
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 " "