You are not logged in.

#1 2009-03-09 03:25:30

synorgy
Member
From: $HOME
Registered: 2005-07-11
Posts: 272
Website

OSS4 volume adjust script

So I was looking for a quick and easy way to adjust my volume via my media keys and I couldn't find anything particularly appealing. Here's my quick python script that handles most options I could hope for.

What it does:
    - Sets volume to an arbitrary level (i.e 90%, 75% etc.)
    - Sets volume relative to the current level (i.e +5%, -13%)
    - Handles toggling muting and unmuting of the volume
    - Uses your choice of either the 'vol' mixer or the 'pcm' mixer (and is relatively easy to either add more or change the current ones)

It depends only on Python, ossmix, and standard Unix utilities (cat and echo, in particular).

Usage:
    - Extract the downloaded file into a folder in your $PATH and change the permissions, if needed.
    - Create a file called vol.dat somewhere in your filesystem and make sure you have write and read access.
    - Edit the script on line 6 and change the value of 'voldat' to point to the file you created earlier.
    - Call the program with:

osspy {vol, pcm} {toggle_mute} 
or 
osspy {vol, pcm} {volume level (i.e 90)}
or
osspy {vol, pcm} {amount to modify volume by (i.e +50, - 10 etc.)}

Download Link: personal.georgiasouthern.edu/~bbenne10/osspy.zip

I hope you guys find this helpful. If you find any issues, please let me know and I'll try to fix them smile

EDITED: to change some wording and make installation clearer.

Last edited by synorgy (2009-03-09 03:29:06)


"Unix is basically a simple operating system, but you have to be a genius to understand the simplicity." (Dennis Ritchie)

Offline

Board footer

Powered by FluxBB