summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-04-13 21:39:49 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-04-13 21:39:49 +0200
commitb7de185610d36aa373dadfb35ed131e648f6fde2 (patch)
tree1928fbbb4ec86ea4d3c4fffb5b1ae95a381758df
parentf9025ac53340a341b731dfed6821bde40b950e03 (diff)
downloadbin-b7de185610d36aa373dadfb35ed131e648f6fde2.tar.gz
bin-b7de185610d36aa373dadfb35ed131e648f6fde2.tar.xz
remove oss related scripts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xoss-mute-proc.sh23
-rwxr-xr-xoss_mute.sh32
-rwxr-xr-xossmixer.py103
-rwxr-xr-xossplay.sh8
4 files changed, 0 insertions, 166 deletions
diff --git a/oss-mute-proc.sh b/oss-mute-proc.sh
deleted file mode 100755
index 3fbd347..0000000
--- a/oss-mute-proc.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-#----------------------------------------------------
-# Version: 0.1.1
-# Author: Florian "Bluewind" Pritz <flo@xssn.at>
-#
-# Licensed under WTFPL v2
-# (see COPYING for full license text)
-#
-#----------------------------------------------------
-# script to (un)mute processes using oss
-#----------------------------------------------------
-PROC="$1"
-VOLFILE="/tmp/${USER}_volume_${PROC}"
-
-VOLUME=$(cat "$VOLFILE" 2> /dev/null)
-if [ -z "$VOLUME" ]; then
- VOLUME=$(ossmix | grep "\"$PROC\"" | awk '{print $4}' | awk -F : '{print $1}')
- ossmix $PROC 0
- echo $VOLUME > "$VOLFILE"
-else
- ossmix $PROC $VOLUME
- rm "$VOLFILE"
-fi
diff --git a/oss_mute.sh b/oss_mute.sh
deleted file mode 100755
index a07a552..0000000
--- a/oss_mute.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/dash
-#----------------------------------------------------
-# Version: 0.2.0
-# Author: Florian "Bluewind" Pritz <flo@xssn.at>
-#
-# Licensed under WTFPL v2
-# (see COPYING for full license text)
-#
-#----------------------------------------------------
-# script to (un)mute oss devices
-#----------------------------------------------------
-MODE="$1"
-CONTROL="$2"
-
-if [ $MODE = 1 ]; then
- MUTE=$(ossmix | grep "^$CONTROL\ " | awk '{print $4}' | awk -F')' '{print $1}')
- if [ "$MUTE" = 'ON' ]; then
- ossmix "$CONTROL" OFF
- else
- ossmix "$CONTROL" ON
- fi
-elif [ $MODE = 2 ]; then
- VOLUME=$(cat $HOME/.volume)
- if [ -z "$VOLUME" ]; then
- VOLUME=$(ossmix | grep "^$CONTROL " | awk '{print $4}' | awk -F : '{print $1}')
- ossmix $CONTROL 0
- echo $VOLUME > $HOME/.volume
- else
- ossmix $CONTROL $VOLUME
- echo "" > $HOME/.volume
- fi
-fi
diff --git a/ossmixer.py b/ossmixer.py
deleted file mode 100755
index 082fb98..0000000
--- a/ossmixer.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/python2
-"A simple volume control applet."
-
-import gtk
-import subprocess
-
-__author__ = "Joakim \"JockeTF\" Soderlund"
-__date__ = "2008-08-22"
-__license__ = "Public domain."
-
-# Binaries to execute.
-OSSMIX = "ossmix"
-OSSXMIX = "ossxmix"
-
-# The device to control.
-DEVICE = "vmix0-outvol"
-
-# The maximum outvol volume in decibels.
-MAX_DB = 25.0
-
-# Sets an icon for different volume levels.
-LEVELS = (
- (22, "audio-volume-high"),
- (18, "audio-volume-medium"),
- (0, "audio-volume-low"),
- (-1, "audio-volume-muted"),
-)
-
-class StatusIcon():
- "The status icon."
- def __init__(self):
- self.icon = gtk.StatusIcon()
-
- self.icon.connect("scroll-event", self.scrollEvent)
- self.icon.connect("activate", self.clickEvent)
-
- self.set_visible = self.icon.set_visible
-
- self.update()
-
-
- def scrollEvent(self, widget, event, *args):
- "Changes the volume when the user scrolls on the volume applet."
- if event.direction == gtk.gdk.SCROLL_UP:
- subprocess.call([OSSMIX, DEVICE, "--", "+%.1f" % self.getStep()])
-
- elif event.direction == gtk.gdk.SCROLL_DOWN:
- subprocess.call([OSSMIX, DEVICE, "--", "-%.1f" % self.getStep()])
-
- self.update()
-
-
- def clickEvent(self, widget, *args):
- "Starts or closes ossxmix when the volume applet is clicked."
- if not hasattr(self, "ossxmix"):
- self.ossxmix = subprocess.Popen([OSSXMIX, "-S"])
- else:
- if self.ossxmix.poll() == None:
- self.ossxmix.terminate()
- else:
- self.ossxmix = subprocess.Popen([OSSXMIX, "-S"])
-
- self.update()
-
-
- def getVolume(self):
- "Returns the current volume in decibels as a float."
- process = subprocess.Popen([OSSMIX, DEVICE], stdout=subprocess.PIPE)
- volume = float(process.communicate()[0].split()[-2])
- process.wait()
-
- return volume
-
-
- def getStep(self):
- "Returns the next volume step to make in decibels as a float."
- return (MAX_DB - self.getVolume() + 1) * 0.1
-
-
- def getIconName(self):
- "Returns the icon name for the current volume level."
- volume = self.getVolume()
-
- for level in LEVELS:
- if level[0] < volume:
- return level[1]
-
-
- def update(self, *args):
- "Updates the volume applet's tooltip and icon."
- self.icon.set_tooltip("Volume: %.1f dB" % self.getVolume())
- self.icon.set_from_icon_name(self.getIconName())
-
-
-if __name__ == "__main__":
- icon = StatusIcon()
- icon.set_visible(True)
-
- try:
- gtk.main()
- except KeyboardInterrupt:
- print("")
-
diff --git a/ossplay.sh b/ossplay.sh
deleted file mode 100755
index 7921fc1..0000000
--- a/ossplay.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-soundfile="$1"
-vmix_to_lower="mpd"
-
-ossmix ${vmix_to_lower} 18
-ossplay "${soundfile}"
-ossmix ${vmix_to_lower} 25