Fancy New Onscreen Volume Display for Openbox, et al

I created a script for handling my volume control which uses the notify-osd package from AUR.  This is the newfangled notifications from Ubuntu.  It's nothing fancy so the notify-osd-bzr package will probably work fine as well.
This is for alsa but with some minor mods it should work with oss.
You can download the script here: http://mozicodo.s3.amazonaws.com/vol.sh
The format for the command is: vol.sh {up|down|mute} [-i increment] [-m mixer]
Increment is either a percent or number just like you would pass to amixer.  Defaults to 5%
Mixer is the name of the control to change.  Defaults to Master
For example to increase the volume of PCM by 10% you would do:
vol.sh up -i 10% -m PCM
Let me know of any suggestions for improvements.
Edit: fixed the urls
Last edited by abarilla (2009-10-27 15:07:40)

I have tested the script out, but yet I seem to be having issues with notify-osd displaying the stuff.
What I get is this:
It seems as if notify-osd isn't drawing anything but the bubble.  Has anyone had this issue with the script?  (Notify-osd works fine for all the other things I use it for, save for the fact that it doesn't seem to show icons for anything but Dropbox...maybe I'm missing the icon package for it?)
Below are the notify-osd related packages I have installed:
┌─[lswest@Monster:~]-[16:57:11 on 09-07-13]
└─> yaourt -Ss notify-osd|grep installed
aur/gnome-mount-notify-osd 0.8-2 [installed] (31)
aur/gnome-settings-daemon-notify-osd 2.26.1-2 [installed] (15)
aur/notify-osd-bzr 311-1 [342-1 installed] (73)
aur/pidgin-libnotify-notify-osd 0.14-3 [installed] (60)
Thanks in advance for any ideas,
Lswest
Also, below is the original vol.sh script from Abarilla:
#!/bin/sh
usage="usage: $0 -c {up|down|mute} [-i increment] [-m mixer]"
command=
increment=5%
mixer=Master
while getopts i:m:h o
do case "$o" in
i) increment=$OPTARG;;
m) mixer=$OPTARG;;
h) echo "$usage"; exit 0;;
?) echo "$usage"; exit 0;;
esac
done
shift $(($OPTIND - 1))
command=$1
if [ "$command" = "" ]; then
echo "usage: $0 {up|down|mute} [increment]"
exit 0;
fi
display_volume=0
if [ "$command" = "up" ]; then
display_volume=$(amixer set $mixer $increment+ unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi
if [ "$command" = "down" ]; then
display_volume=$(amixer set $mixer $increment- unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi
icon_name=""
if [ "$command" = "mute" ]; then
if amixer get Master | grep "\[on\]"; then
display_volume=0
icon_name="notification-audio-volume-muted"
amixer set $mixer mute
else
display_volume=$(amixer set $mixer unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi
fi
if [ "$icon_name" = "" ]; then
if [ "$display_volume" = "0" ]; then
icon_name="notification-audio-volume-off"
else
if [ "$display_volume" -lt "33" ]; then
icon_name="notification-audio-volume-low"
else
if [ "$display_volume" -lt "67" ]; then
icon_name="notification-audio-volume-medium"
else
icon_name="notification-audio-volume-high"
fi
fi
fi
fi
notify-send " " -i $icon_name -h int:value:$display_volume -h string:synchronous:volume
Last edited by lswest (2009-07-13 15:07:17)

Similar Messages

  • HP w2207h Widescreen Monitor Onscreen Volume display is stuck on my screen

    I have an HP w2207h WidescreenFlat-Panel Monitor with BrightView Panel 
    The Onscreen  Volume display is stuck on my screen and keeps decreasing my volume to zero is there any solution to fix this
    all help appreciated. Thank you in advance.

    Thanks for your answer It did eventually go away.  It comes back from time to time but I chose to use external speakers instead until I can find a solution that wont distroy the product. 

  • I click on a yahoo new article, it displays for a few seconds and then I get a blank screen.

    It happens only in Firefox,not explorer. When I click on a yahoo news article, it displays for a few seconds and then goes to a blank screen. I've run virus scans, eliminated all cookies, all to no avail.
    == This happened ==
    Not sure how often
    == I'm not sure

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • How much will it cost to buy a new 15inch retina  display for mac pro in Italy?

    the old one was crashed..

    That is because it might not only be the dispplay that is damaged. Apple will not repair a computer without Repairing everything that is worng with it. So even though YOU THINK it is just the screen the Apple Techs may find other parts that may have been damaged when the screen got damaged. They will replace all of those also even though you only want the screen replaced. They have to do that to protect themselves from someone with other damaged parts only having one thing repplaced then bring it back in claiming the other parts should of been fixed and weren't.
    So you could be looking at a very expensive repair.
    IMHO just another reason why NOT to buy into the Hype of the Retina display. At least not from Apple and there SEALED system.
    May I ask if you are a Student why you chose to buy such an expensive and new untested hardware system in the first place.

  • Apple TV not working with new 23" cinema display

    OK so I finally found a functional use for my new Apple TV, which has been sitting unused in my living room. My MacBook Pro already connects to the HD projector in there, so Mac TV is just less functionality and redundant.
    I decided the only use I have for a keyboardless Mac interface for just music, podcasts, photos, and videos is the bathtub.
    Being the Mac fanboy that I am, I wanted the solution to be all Apple.
    So I headed down to my local Apple Store with the intention of buying a new 23" Cinema Display for my Apple TV and an iPod HiFi for the sound. I was dismayed to see them showing off the Apple TV on Sony LCD TVs. Why wouldn't Apple want to sell people a triple-play package and have it set up as a demo? After all, they weren't selling the Sony TVs anyway.
    But my first sign of trouble was the very nice store employee who didn't know if the Apple TV would work on a cinema display. But he definitely wanted to find out when I got home. Searching here, I found posts that seem to confirm that it would work, but the actual source is related to an older ADC cinema display, not the new ones.
    I set everything up and used a Toslink-minijack adapter to run the optical digital audio from the Apple TV to the iPod Hifi. I used an HDMI-DVI-D adapter to connect the cinema display to the Apple TV. I powered it all up.
    I got the white Apple logo on the screen, then everything went black. I used the Menu and + keys on the remote for 6 seconds to cycle through the resolutions. Still all black. I used the Menu and - keys on the remote to reset to factory settings. Again booted into blackness.
    Interestingly, while using the + and - keys on the Apple TV remote, the iPod HiFi volume was lowered and raised simultaneously with the moving of the menu selections in Apple TV (I could hear the clicks). What this means is, 2 remotes, each paired to each device, will be needed for proper operation. This is why having too simple a remote is lame.
    At this point I am dead in the bathtub water. I drop more money on Apple than it costs to get a new iMac (which is plan B) just so I can give the Apple TV a shot in my bathroom. But it all doesn't fit seemlessly together on first try.
    Any suggestions? Could the HDMI-DVI-D adapter be blocking the HDCP signal needed to display an image? Is DVI-D the wrong adapter to use? Any help is appreciated.

    I've not been convinced a monitor will work with the tv, but I have to accept the word of those that have had success. I'm not so certain that a monitor is a suitable first choice, maybe if you have one lying around OK, but to buy one instead of a tv is not only a very expensive alternative but even if it works you will have no way of controlling the brightness etc.
    Any suggestions? Could the HDMI-DVI-D adapter be blocking the HDCP signal needed to display an image? Is DVI-D the wrong adapter to use?
    Possibly, Did you ever manage to repeat getting the apple logo or indeed anything even if only for a few seconds. DVI-D or DVI-I would be the right connector, don't use a DVI-A

  • HDMI to TV as Display for New Mac Mini DOESN'T WORK

    I bought a new Mac Mini and was told I could us HDMI to my TV as display.   I was using this TV as display for older Mac Mini (VGA) and for a Windows PC, and DVD via HDMI.     TV is one year old. 
    The Genius at the store who sold me the new mini said all I needed was an HDMI cable.   Which I purchased. 
    The screen comes up for the Setup Assistant but as soon I select continue is goes to gray, mixed color scanning garbage mode.    If I turn the TV off and back on, the screen returns (now at the next prompt in the setup assistant) but again it goes gray after hitting continue.    Unusable, CANNOT set up my new purchase.
    Unfortunately, the DVI to VGA adapter on my old mini is different and doesn't mate to the HDMI to DVI adapter that ships with new MacMini, so I can't test VGA.   The old DVI to VGA has extra pins not on the new one. 
    My purchase is not usable and is extremely poor.   Buyer beware I guess.   

    I have been using MacMini's for commercial digital signage/video conferencing gateway usage for sometime now, they all have HDMI output, about one third are on Lion the others still on Snow Leopard, here's what I have found.
    Toshiba & LG tv's are generally reliable, Samsung and Philips generally are not, Panasonic, Sony, Sharp & Viewsonic all work, somtimes with a bit of work from me.
    Cables are important (always look for compatibility with HDMI  revision 1.3 or greater (1.4 preferred), don't waste your money on exotic brands, adhere to the distance limitations, I generally send the HDMI signal wirelessly (cost of labor to add wiring to an existing space can be very high) so am limited to less than 50ft, same as with a wire.
    READ THE TV MANUAL, find out what HDMI choices your tv possesses, is there a 'parallel' audio input available for the times when your signal origin is a MDP or DVI.
    Some TV's just don't work well, cut your losses and get another when faced with this issue.

  • How can i use my old iMac as a extended desktop display for my new iMac?

    I recently purchased a 21.5 in iMac and wanted to use my old iMac as a extended desktop. My new iMac has thunderbolt and USB 3.0 connections while my old iMac has firewire (400 and 800), USB 2.0 and mini-DVI. Is this posible?

    Welcome to Apple Support Communities
    If your iMac has got Mini-DVI, you have a 17, 20 or 24-inch iMac that doesn't support Target Display. Late 2009 and Mid 2010 27-inch iMacs, and iMacs with Thunderbolt can be used as external displays. Read > http://support.apple.com/kb/PH11302?viewlocale=en_US&locale=en_US
    If your old iMac doesn't support Target Display mode, you can use ScreenRecycler to use your old iMac as an extended display for the new iMac. The only thing you need is that both Macs are connected to the same network

  • Can I use my old 2006 iMac as a second display for my new iMac?

    Can I use my rusty old 2006 iMac as a second display for my new 2012 iMac?  How do I keep one computer from trying to take over the other one?  thank you.

    Try ScreenRecycler, the 2006 does not support display input.

  • I have an imac bought late 2013, can i use it as a display for the new mac pro? I also want to use windows 8 on it, would this work with parallels or bootcamp?

    I have an imac bought late 2013, can i use it as a display for the new mac pro? I also want to use windows 8 on it, would this work with parallels or bootcamp?

    Yes, it supports target display mode. Windows can be run with either Parallels or Boot Camp.

  • New iMac as second display for MacBook Pro not working

    I just bought the new thin 2012 27" iMac as a replacement to the last model I had.
    I want to use the iMac as a second display for my 2012 MacBook Pro.
    I have a Mini Display Port to Mini Display Port cable that used to work with my previous setup and at work with my external display.
    However, this isn't working on the new iMac. When I try the Command + F2 suggestion I've seen in the forums here. Nothing happens.
    Do I need a new cable now that these are "thunderbolt" connections?
    Any help is greatly appreciated.
    Thanks.
    Demetre

    You will most likely need a Thunderbolt cable as they are both Thunderbolt devices and not Mini DisplayPort.

  • Can I use my iMac as a display for a G5 - New Mac User

    I am still a fairly new iMac user, I would like to know if I can use my exsisting iMac with someones elses G5, and use my iMac as a screen display for his G5. Im sorry if this topic does not belong in this forum, I did try searching thru other forums to post and read up on this info.
    Please direct me to the right place, or answer my question. Thanks in advance.

    Here's the scoop, if you want to use any iMac as an external display for a G5 Mac you have these options.
    1. Target Disk Mode, only available on iMacs with Firewire:
    http://docs.info.apple.com/article.html?artnum=58207
    This only gives you access to the data files of that Mac and basically treats it as an external hard disk.
    2. Networking via ethernet, wireless, or Firewire, you can setup Virtual Network Computing or Remote Desktop:
    http://www.macupdate.com/search.php?keywords=VNC&os=macosx
    http://www.macupdate.com/search.php?os=macosx&keywords=remote+desktop
    3. As others have suggested, somehow to remove the VGA cable from the logicboard of the iMac and connect it to the Mac externally.
    The external VGA port of iMacs only display what is on the Mac itself and as far I know can't be used in a reverse signal application.

  • Need new display for White mac Book

    My macbook has had a white display for the last year and a half...I have connectors to hook it to my tv...and that is how I use it.. I was wondering how do i go by getting a new dispay when my macbook product has been discontinued...

    You can get the screen replaced on a White or Black non-unibody MacBook for $180 by mail. http://www.ebay.com/itm/Apple-MacBook-13-LCD-Screen-Repair-Replacement-/27048982 6401

  • New display for powerbook

    hi
    I have a 867mhz powerbook g4, the 12inch model, and am looking to buy an external monitor as I need more room for the work I'm now doing. I was wondering if anyone knows whether I can connect one of the new 20" cinema displays to the powerbook. I'm not sure if the machine has the correct ports or even if there is enough video memory to use an external display.
    any help would be greatly appreciated
    many thanks
    leo

    stevenewonder wrote:
    Thanks David
    I'm not sure how screen sharing works, but that sounds like there is a possibility of it doing at least partly what I want.
    screen sharing works wirelessly or hard wired.
    If compatibility is such a problem,
    that goes mostly for software. you can exchange any kind of files but i'd go easy on bringing apps from the PPC to the Intel platform. see _*A Basic Guide for Migrating to Intel-Macs*_.
    could I use the g4 powerbook purely as a wireless access to the mini - so it uses the intel processor and disc and the g4 just really is like a remote dumb terminal?
    basically yes - but you may experience "delayed action" coz all your keyboard and mouse inputs are send via the network.
    alternatively, a combination of bluetooth keyboard (paired with the mini) and ScreenRecycler might work for you.
    Or does it have to be physically connected to the mac mini?
    no.
    best of luck !

  • Is the retina display for the new mac book pro worth the extra cost? I'm buying a new mac book pro but not sure about the retina display.

    Is the retina display for the new mac book pro worth the extra cost? I'm buying a new mac book pro but not sure about the retina display.

    There is a US$10 adapter from old power adapter to new MacBook Pro.
    MagSafe to MagSafe 2 Converter
    The MagSafe to MagSafe 2 Converter allows you to use the MagSafe connector on your LED Cinema Display, Thunderbolt Display, or MagSafe Power Adapter to charge your MagSafe 2-equipped Mac computer.
    For battery life, check the latest Software Update for the fix for most problems.

  • New Display For My G4?  New Card?

    I want to get a new flat panel display, but I think I read somewhere that it needs a new video card to work.
    so...
    Which video card do I need, and what else will I have to do to this monster to use a new display?
    my current video card is the ATI Radeon that came with it.

    This should do the job, if you have further questions call ATI tech support, for a true answer.
    Manufacturer Product Page
    Website: http://www.ati.com/
    Support Phone Number: 905-882-2626
    View other products from ATI Model
    Brand ATI
    Model 100-435058
    Interface
    Interface AGP 2X/4X
    Chipset
    Chipset Manufacturer ATI
    GPU Radeon 9800PRO
    PixelPipelines 8
    Memory
    Memory Size 256MB
    Memory Interface 256-bit
    Memory Type DDR
    3D API
    DirectX DirectX 9
    OpenGL OpenGL
    Ports
    D-SUB 1
    DVI 1
    TV-Out S-Video/Composite Out
    VIVO No
    General
    Vista Ready Yes
    Tuner None
    RAMDAC 400 MHz
    Max Resolution 2048x1536@85Hz
    Cooler With Fan
    Operating Systems Supported Mac OS X 10.2.5 or later
    System Requirements AGP 4x or 2x capable Macintosh
    128MB of system memory
    Installation software requires CD-ROM drive
    DVD playback requires DVD drive
    Power connection to the computer
    Radeon 9800 PRO Mac Edition requires connection to your computer’s internal power supply for operation. ATI recommends a 300-Watt power supply or greater to ensure normal system operation where a number of other internal devices are installed.
    Features
    Features SmartShader 2.1 technology
    SmoothVision 2.1
    HyperZ III+
    Packaging
    Package Contents DVI-I to VGA connector
    S-Video to Composite connector
    Composite and S-video cables
    Power cable connector
    Manual
    Driver CD

Maybe you are looking for

  • Videos not appearing in TV Shows in iPod...

    When I add a video to iTunes and set it so it goes in the TV Shows section all works well. However, when i drag it onto my iPod, it will not appear in TV Shows, infact, the TV Shows dosen't even say there's no videos there, but it just won't let me i

  • Link inside a tabbed panel

    Hi, I am working on odc:tabbedPanel in JSF. I have four tabs in it. In one of the tabs, I have links in the second tab which need to href to other pages and should be shown in the same tab. But it gets refreshed and comes to the first tab. Can anyone

  • Viewing Publishing From Different Computers

    Am creating pages using iWeb on one computer and want to work on them on another before uploading to my own hosting url. I do not see the "import" opportunity, and I published it to my .mac account thinking I could then view it on a different compute

  • User Time Out Parameter

    Hello Everyone, Does anyone know if there is a way to reset the timeout parameter in an ABAP program if the user has not sent a command to the backend system?   For example, our timeout is set at 30 minutes and we want this parameter to be constantly

  • I have a iphone 4 ..... Did the ios  7 update now I cannt text. The only thing I can do is iMessage. Killing all my data. What do I do?

    I Have iphone 4, did the iOS. 7 update.... Now I cannt text...Help..all my data is getting eaten up...