Volnoti - Lightweight Volume Notification

Hey guys,
Let me share a little piece of code I've put together recently. I'm using XMonad and one thing all the lightweight window managers always lacked was a nice notification when the volume is changed. What I'm specially fond of is the Apple-like notification you can get for example with Compiz. So I took bits and pieces of GNOME's notification-daemon, assembled my own and I present it here to you.
The main point for Volnoti was to be absolutely independent of the system configuration and WM. Therefore, Volnoti doesn't read the volume level itself, but rather waits for someone to tell it what it is. The idea is that the users can attach a script to their hot keys, read the volume level in it and then call Volnoti's client application. It just sends the 0-100 integer to the daemon, which displays the notification (all details in README). Currently, calling the client application is the only way of dealing with the daemon. I guess that it might be handy to create a small library as well, which people could use when writing plugins for volume-control applications. On the other hand, it is possible to just call a UNIX command from C, so there's no actual need for the library at the moment. Feel free to comment on this - I'd be happy to get your feedback.
This is just a first draft, which suits me, but I can imagine that people would appreciate more ways of customizing it. Currently, it is possible to replace all the icons and change the duration of notification (details in README). Let me know, what else you would like to change and I'll add suitable parameters to the daemon. One thing is definitely the level of transparency (if you use composite desktop), other might be the radius of corner rounding. In the future, more sophisticated ways of theming might be added, which would allow to completely change the look of the notifications. For now, it's quite limited...
So please, do look at the screenshots, do give it a try yourself and let me know what you think, whether you have any suggestions, problems, etc. Bugs can be reported on GitHub.
More details on the GitHub page:
https://github.com/davidbrazdil/volnoti
The package is ready in AUR:
https://aur.archlinux.org/packages.php?ID=55159
Screenshot:
http://i42.tinypic.com/10eq9lt.png
mod edit: Welcome to the forums. Please read Forum Etiquette: Pasting Pictures and Code. Thanks. --fsckd
Last edited by david.brazdil (2011-12-21 17:43:10)

Trilby wrote:Shinryuu, is Volnoti running?  I only see that error if I try to execute a 'volnoti-show' without volnoti already running.
Ah! That's the reason, running "volnoti" fixes the problem and runs just fine with scripts on my PC.
Trilby wrote:
Love it.  I'll look forward to developments for customization, but this is just what I've been looking for for a while as other notification daemons I tried were just bulky and unreliable.
Before I read the rest of the thread I tossed together my own script as well - short and to the point:
#!/bin/bash
[[ "$1" == "up" ]] && amixer set Master 5%+
[[ "$1" == "down" ]] && amixer set Master 5%-
[[ "$1" == "mute" ]] && amixer sset Master toggle
VOL=$(amixer get Master | grep Mono: | sed 's|[^[]*\[\([0-9]*\).*|\1|')
[[ $(amixer get Master | grep "\[off\]") ]] && volnoti-show -m $VOL && exit
volnoti-show $VOL
I had to fiddle, search and configure your script around to make it to work (to show volnoti info) on my laptop because it uses an "Intel CougarPoint HDMI" chip and "HDA Intel PCH" card. I was able to solve the problem by changing "grep Mono" line to "grep 'Front Left'" or "grep 'Front Right'" (I keep both left/right levels equally same) so that quick'n'dirty fix is just enough for my needs. Hope this helps someone else too.
Also thanks for the script!

Similar Messages

  • Volume notification style cairo-compmgr

    Hi,
    when i have cairo-compmgr turned off, and press my volume keys a openbox volume "notification" pop's up in the middle of the screen. Looks like my choosen gtk style.
    When i have cairo-compmgr turned on the same volume thing looks total different. Like the one in mac os x. But there's no plugin for that.
    how can i have my openbox volume control with cairo-compmgr ?

    It looks like all the errors stem from LIBTOOL being undefined.  This should give you something to google on.  It *may* be as simple as adding
    LIBTOOL=/usr/bin/libtool
    to the Makefile(s).  But the proper solution would be to fix the autoconf/autotools input file that sets this.  As I have never had a need for those tools, I don't know much about their workings.
    I also wanted to suggest that xcompmgr may do what you need.  There are many bells and whistles that it lacks, but some of the core functionality of cairo-compmgr is duplicated in a very lightweight package.

  • Gvolicon - a lightweight volume icon in your system tray

    Hello,
    Some days ago whilst on vacation, I whipped up this lightweight and very simple volume icon. As some of you might have seen in my previous topic, this project is based on Fogobogo's gtk-vol and as such most of the features are the same:
    Easily change volume levels by scrolling on the icon
    Easily mute and restore the volume by clicking on the icon
    No right-click menu
    Also see Gvolicon's help output:
    -v, --version Display version and exit
    -d, --device Device to use
    -m, --mixer Mixer to use
    -u, --update-interval Set update interval in seconds
    -s, --volume-step Set volume step to increase or decrease the volume with
    -i, --symbolic-icons Use symbolic icons
    You can get Gvolicon in the AUR or you can get the code directly from GitHub.

    Did you somehow uncheck the "Load volume Icon At Startup" in controls?Having this checked the Creative Volume Panel will always startup in the system tray. Or, Did you try executing the program in the desktop program group "Creative>Sound Blaster X-Fi>Creative Volume Panel" If all these things don't work, try to do a repair in the "Control Panel>Programs and Features>Sound Blaster X-Fi"

  • Volume Notification [SOLVED]

    I use a minimalist xmonad+xmobar+urxvt environment. I would like a way to easily create custom pop-up notifications, which preferably disappear automatically. I want something akin to zenity or xmessage, except rather than dialogs, I want it only to print a text notification.
    echo "Message" > prog
    or
    prog -e "Message"
    or something similarly UNIXy.
    The immediate use of this is so that I can make a volume notifier. I have written a script that handles volume elegantly which I have been using from the shell, but recently integrated into xmonad itself so I don't waste a terminal. But this means I am blind. I would like to be able to have a message pop up and disappear with the volume percentage in it (my script can extract this already).
    Of course this purpose is moot if I can find a low-resource way to continually display the volume in xmobar --- suggestions here would be appreciated as well. But I would still like to know if there is any utility that does what I have outlined.
    Last edited by egan (2010-06-15 00:53:26)

    I use a script I've written based on dzen2, might inspire you:
    #!/bin/sh
    # Match only positive integers as second argument
    if [[ ${2} =~ ^[0-9]+$ ]]; then
    AMM=${2}
    else
    AMM=1
    fi
    CTRL="Master"
    PREFIX="Volume"
    GB_WIDTH=50
    GB_HEIGHT=7
    DZEN_SEC=3
    DZEN_Y="870"
    DZEN_X="1300"
    DZEN_TA="c"
    DZEN_TW="140"
    GB_ARGS="-l ${PREFIX} -w ${GB_WIDTH} -h ${GB_HEIGHT}"
    DZEN_ARGS="-p ${DZEN_SEC} -ta ${DZEN_TA} -y ${DZEN_Y} -x ${DZEN_X} -tw ${DZEN_TW}"
    if [ "$1" = "+" -o "$1" = "-" ]; then
    /usr/bin/amixer set ${CTRL} ${AMM}%${1} \
    | /bin/sed -n '${s/.*\[\([0-9]*\)%\].*/\1/p}' \
    | /usr/bin/gdbar ${GB_ARGS} \
    | /usr/bin/dzen2 ${DZEN_ARGS}
    else
    echo "Wrong usage!" 2>&1
    exit 1
    fi
    exit 0
    EDIT: use as "volume +" or "volume -" to increase or decrease the volume by one percent, additional second parameter gives the percentage.
    Last edited by Ramses de Norre (2010-06-14 13:56:59)

  • [Solved] Volume Notification with Xmonad

    Hello everyone,
    I'm trying to get this working for my environment.
    http://dmwit.com/volume/
    Now, i don't have xmonad-extras package installed so obviously the exact tutorial doesn't work for me. (I would like to avoid using cabal, i've had bad experiences with it, probably cuz i did a root install) Now I've tried the tutorial but when i change the volume i only get a large dzen square with this output "()". This is what i did for that to work on my xmonad.hs file:
    , ((0, 0x1008FF12), spawn "amixer -q set Master toggle")
    , ((0, 0x1008FF11), spawn "amixer -q set Master 10%-")
    , ((0, 0x1008FF13), spawn "amixer -q set Master 10%+; ~/.xmonad/bin/volume.sh" >>= alert)
    alert = dzenConfig centered . show
    centered =
    onCurr (center 150 66)
    >=> font "-*-helvetica-*-r-*-*-64-*-*-*-*-*-*-*"
    >=> addArgs ["-fg", "#80c0ff"]
    >=> addArgs ["-bg", "#000040"]
    The script volume.sh outputs the current value of the master. I currently use that script to output the volume to my xmobar. Of course output to screen and xmobar is redundant but i just like the visual .
    Is there a way to output the value of the script into a function in xmonad? In this case the alert function.
    After some googling i came accross this http://reddit.com.marqueefy.com/r/xmona … _spawpipe/
    but unfortunately i can seem to have the readprocess to work. (really cant figure out the syntax for it)
    Any input would be greatly appreciated.
    Thank you
    Dave
    Last edited by davama (2015-03-23 12:03:52)

    This is solved.
    The only solution i found was to install all my haskell programs using cabal exclusively as so:
    pacman -S ghc cabal-install happy alex
    cabal update
    cabal install cabal-install
    cabal install xmonad xmonad-contrib <<< here you should be using cabal from your local directory. ~/.cabal/bin/cabal
    cabal install xmonad-extras
    cabal install xmobar --flags="with_mpd"
    got into trouble when mixing packages from the official repo with haskell ones. Since they all come from haskell there should be no issues with conflicts. Granted some libraries get updated which cause xmonad to break but a simple delete and reinstall will do the trick. (has happened only once so far):
    remove ~/.ghc
    #### rerun cabal update, cabal install.... etc
    Hope it makes sense and it's useful to someone.

  • IPhone 4s iOS 6 intermittent screen dims and Ringer volume notification

    Seem I am getting intermittent problems which look to be increasing in frequency.
    One problem is the screen dimming as though I have turned the screen brightness down to minimum, with no apparent reason.
    I've checked the brightness setting and it is set to my usual screen brightness, auto brightness is always off. Touching the screen or home button does nothing and switching apps has no effect either. No particular app is being used at the time so can't pin it down to a buggy app causing it.  The only way to restore the brightness is to switch off the phone via the power button.
    A similar problem is the dark grey square containing the ringer volume setting, set to the minimum one square appearing without touching the volume buttons. This stays on screen in a similar way to the screen dimming in that. Nothing apart from powering the phone off will remove it.
    Also having problems with reduce volume button, could this be the cause of all these problems? This problem is when I'm reducing the volume it actually increases it to the maximum first before reducing it. Again it is intermittent.
    Any one with same or similar issues?

    Sorry for delay in reply.
    I've done the above but to no effect this is still happening.
    It is intermittent.

  • Use volume button on ZTE Open only for music and not for ringtone/sms/alarm

    I wounder if its possible to override the volume button on the device so it dosent change the ringtone and sms volume? I had this feature on iOS where I can set the ringtone and notification volume then a switch that sad "Change with buttons" = true || false.
    My Android device (Padfone2) did not have this feature and I end up missing calls and sms because you turn the volume up and down when you browse the web, listening to music ect.
    Does someone know if this is possible on my ZTE Open with FFOS 1.1?

    To further explain where the volume controls are going,
    'There's multiple different settings for audio volume:
    * audio.volume.content: Affects the "content" and "normal" audio channels. It's an integer between 0 and 15 where 0 means muted (but not paused).
    * audio.volume.notification: Affects the "notification" and "ringer" channels. It's an integer between 0 and 15.
    * audio.volume.alarm: Affects the "alarm" channel. It's an integer between 0 and 15.
    * audio.volume.telephony: Affects the "telephony" channel. It's an integer between 0 and 5.
    * audio.volume.bt_sco: Volume when bluetooth headset is plugged in. It's an integer between 0 and 15.'
    Take from https://wiki.mozilla.org/WebAPI/AudioChannels
    So as per stated before, the Ringer & Notification has a different setting than the Alarm, as well as the Telephony voice and the content as well as blue tooth volume.
    I agree that it can get rather confusing with which volume is getting affected when. In general if the sound is currently going off, then most likely that is what the volume is controlling. We should probably file a bug on somehow getting the volume controlling less confusing.

  • Vibrates on notifications after update

    most of  my apps are now vibrate during notifications since the update. I've  searched through each of them doing it and there isn't even an option for vibrate so "disable vibrate" isn't a choice. I have disabled it for email  txts. Any ideas? Verizon guys? I can not deal with this. It sounds dumb but it woke me up 6 times last night. I use my phone as my alarm clock. I can't just not keep it near my bed. Plus I don't need it sucking my battery dead every day.

        Dear Andrealkern,
    Good morning. I am sorry to hear of the vibrate notifications you are now receiving after the software updates. I know that can definitely be a nuisance especially if you use your phone as an alarm clock. It would be my pleasure to assist in disabling the vibrate alerts.
    After your phone did the software update, did you power off the phone and power back on? If not, please do so. Also, ensure the notification volume under settings is turned off. To do so, tap on settings>sound>volumes>notifications. Let me know if that turns off the vibrate notifications.
    If the notifications you are receiving are from applications you downloaded from the google play store, then try this. Tap on Google Play store>Menu(at the top right)>settings>uncheck notifications. After trying these two steps and you are still receiving vibrate notifications, please reach out to us for further assistance. You may also contact our Technical Support Team at 1800-922-0204.
    MichelleS_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • IPhone ringer volume always displayed?

    My iPhone 4S has been constantly displaying the ringer volume since this morning. I have tried turning off my phone and turning it back on, resetting my phone, syncing it to iTunes, and pretty much everything else. Everything is functioning correctly, and I'm able to navigate my phone normally, but it's an inconvenience to have to try to look at the things on my screen through the ringer volume notification. Help?

    Clean the headphone jack port at top of iPhone. Carefully blow it out, insert headphones few times, clean it carefully.

  • Audio Issues with MacBook Pro (Late 2008)

    I am seeing an occasional issue with my MacBook Pro (Late 2008). The Audio will go out... and instead you will just hear static-like clicking sounds when and audio even happens. For example... when you have the up/down volume notification on... and you change the audio volume.. you hear clicks. Or... when you open up a file that has audio.. you will hear the static-like click when the audio starts to try to play.
    The work around per-se is to completely shutdown and turn the notebook back on. A simple restart does not seem to fix it... it looks like the system needs to have a bit of energy drain first. Which... worries me that this is a hardware issue and not a driver issue.
    Wondering how many others are seeing this???

    I went to and Apple Support Center last week and I asked some questions about audio because my MBP was having troubles too. The tech told me audio issues are very frequent on these machines and sometimes you have to change a part of the soundcard. He also added you have to bring the MBP to a support center if you're having the problem several times - in my case I'm waiting the next "crash" since I had only 2 issues so far... If you're under warranty go for a check up and see if it really needs assistance. Goodbye

  • Flash Player version 11.3

    Anytime I run Firefox my audio runs through Adobe Flash Player 11.3 r300. The volume defaults at full volume which is too loud and hurts my ears anytime I'm on a site like Youtube. I was wondering if there was a way to disable this or if I could get rid of it completely. Thanks in advance.

    Hi,
    You can try to set the default system volume to a lower level which would be automatically picked up by the Flash player (check '''Mixer''' on the Taskbar volume notification icon}. Alternatively you can also try to lower the volume level using the volume control on a Flash video and it will be remembered as long as Flash cookies (Windows Control Panel > [http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager.html Flash Player] > Storage > Local storage settings by site) are not deleted, or Firefox is not set to '''Clear history when Firefox closes''' in '''Tools''' ('''Alt''' + '''T''') > '''Options''' > [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Privacy%20panel?as=u Privacy].
    [https://support.mozilla.org/en-US/kb/Options%20window Options]

  • Z10 Volume and Notification Issue

    Hi,
    I am facing frequent no volume and notification issue on my Z10. once i restart the phone it is getting resolved but this is really irritating as i have to do this restart process atleast 10 to 15 times a day as the problem is occuring frequently. definitely it is a software issue not an hardware issue please help me in resolving the bug...
    Model: BlackBerry Z10
    Model No: STL100- 1
    Current Device Software Version: 10.0.10.82

    Hey manikandanb4u,
    Welcome to the BlackBerry Support Community Forums.
    Thanks for the question.
    We are aware of this issue, a KB article was created about the issue: www.blackberry.com/btsc/KB33694
    Let me know if you have any more questions.
    Cheers.
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • Erratic Volume Output From Speakers (App notifications, keypad tones, Ringing Volume)

    Just purchased a Z1 over the weekend and was happily fumbling with the new phone. Got it updated to the latest 4.4.2 as well.
    Noticed a glaring problem with the volume output from the speakers.
    During use of instant messaging apps like Whatsapp and LINE, notification tones come in at times at the level that i set it at (max) and sometimes they come in really soft, to the extent i can't even hear them and sometimes none at all. All these happening when i've set the volumes to MAX on each of the available options under settings>sound>volume. Might i also add that the volume for notifications is really too soft even at MAX.
    I'm not sure if this is happening due to the updating of the software or it was already an issue prior to the update. I've seen a couple of posts online where some users are experiencing the same erratic behavior of the internal speakers. 
    I hope someone can shed some light on this so we don't judge too quickly on an otherwise excellent phone.

    I have the problem with my xperia Z1 speaker and ear phone not detect after update 4.4.2 in kitkat version.
    phone purchasing date : 28.02.2014
    Before update my Z1 runing in 4.3 jelly bean and phone is working properly....i have only one issue in 4.3 during call accept automatically call going in speaker.
    1 Problem after update 4.4.2  kitkat version sometimes movies app playing video song but  voice is not out from phone speaker and song voice playing in ear speaker then i press play/pause button in movies app then song voice play in phone speaker
    2 Problem  i connect my ear phone in my Z1  and phone is  not detect ear phone i play the song in walkman app so song voice is out from phone speaker and not lising voice in ear phone then i restart my phone ear phone is working properly.
     2 times done my Z1  software repair but not fix the problem........please tell me what can i do for fix my Z1 problem
    Thanks & Regards
    Shekhar Jaiswal

  • Why are my iPhone 5 email notifications randomly at full volume with iOS7.1.1 upgrade, regardless of the volume settings?

    Ever since I updated my iPhone 5 to iOS 7.1.1, my email notification ringtone randomly (but infrequently) plays at full volume instead of the assigned ringer volume setting.  My normal ringer volume is at about 50%, none one of the other notifications such as "new text message" behave this way, and this behavior only occurs once every 2 or 3 days... independent of battery charge level.  There seems to be no pattern to the issue.  I know this sounds crazy, but this did not happen with prior iOS versions on this phone.  Really annoying when I forget to silence the phone before attending meetings and the super-loud notification ringtone goes off...

    If that was in any way unclear, it seems somewhat similar to this user's scenario:
    https://discussions.apple.com/message/13059186#13059186

  • How can I get volume on my I6 to hear incoming calls . I went to setting , sounds, and selected a tone, but still no sound for incoming calls, texts, or other notifications.

    How can I get volume on my I6 to hear incoming calls . I went to setting , sounds, and selected a tone, but still no sound for incoming calls, texts, or other notifications.

    Hi rsample,
    Thank you for visiting Apple Support Communities.
    Your symptoms make it sound like the iPhone side switch is set to silent mode.
    iOS: Understanding sounds, ringtones, and alerts
    Set your device to silent mode
    iPhone: Toggle the Ring/Silent switch on the side of the device.
    Best Regards,
    Nubz

Maybe you are looking for

  • Better monitor quality instead of touchscreen on the AIOs

    When I first saw the MSI all-in-ones, I fell in love with the design - not so much with the touchscreen gimmick though. As I'm doing some graphic design in my free time, I wish MSI would do the following: - take the Wind Top AE2220 Pro/Hi-Fi, give it

  • Why is my iPod showing a no sign when i drag music into the itunes library and how do i fix it

    when i go into itunes and in my desktops music library, i open itunes and click on on this ipod. when i want to drag my music it wont let me and show a red no sign. my sister has the same ipod but doesnt have this issue. please help me fix it, this h

  • How to presents links as icons?

    Or how to add a link to an image? Im in the beginning of my portal-life and i just want to add a URL that displays with an icon only, or too add an image that is clickable and leads to another page. Im sure this is nice and easy i just cant see how..

  • Embedded SWF video = slow loading page?

    Hello and good morning, I have recently created a website on DreamWeaver 8 with three SWF videos (not FLV but SWF) embedded on it. The videos are supposed to be set at "progressive download" but the page takes ages to load up, as if the browser was l

  • Error message Microsoft

    After successfully I tunes for several months I can no longer connect. After clicking on the Itunes Icon I get a message that says: I tunes has encountered problems and needs to close, sorry for the inconvenience. It then asks if I wanted to send an