Page 1 of 3

Tray Volume selector - Updated Mar 2007!

Posted: Sat 27 May 2006, 07:18
by rarsa
Here is a volume Selector that shows in the JWM tray

This mini-app is a must. It will download in 10 seconds even on dial-up. Just 6 K.

It's the perfect addition to the gplaycd-mini

You can configure it in /root/.jwmrc-tray. Right now it can receive the following parameters
-orientation [ vertical | horizontal ]
-mixer <mixer application>
-bg color

For a list of valid colours read this

for example

Code: Select all

mini-volume.tcl -o horizontal -m pvolume-mixer.tcl -bg lightblue
If no parameters are passed, it shows vertically with a grey background and does not show the menu option to launch a mixer

It can also run as a standalon app or in any tray bar that accepts swallowed applications.

Any suggestions for extra parameters are welcome.

You can get the latest source from the puppy subversion repository

Code: Select all

svn co http://svn2.cvsdude.com/puppylinux/puppy-miniapps/mini-volume/trunk
Let me know if you are interested on adding functionality

Issues
It will only work appropriatelly in puppy109 and Puppy2.xx

Changelog:
2007-03-03 - 19:20
- Fixed balance calculation

2007-02-26 - 01:00
- Added a parameter to select a mixer application to launch on right click
- Added right click menu to select either "mute" or "mixer"
- Added code to respect balance selected in another mixer
- Cleaned up the code a little.

2007-01-14 - 18:56
-Fixed position of slider and hint when the tray is on the top
- Replaced image with images showing the volume level (High, medium, low, mute)

2006-06-16 - 01:01
At the request of Barry changed it to use setvol instead of snack.
Fixed flickering on mouse wheel actions.

2006-06-14 - 01:00
Added mouse wheel functionality to control the volume
Added to Subversion repository

Posted: Sat 27 May 2006, 08:09
by Lobster
Excellent Mr Bond :)

Works in Puppy2a8
The install alien package is a bit different (easier in fact) in Puppy2
You want the first small icon that talks about installing tarballs . . .

Does the volume image need to be transparent?

then

Code: Select all

		<Swallow name="mini-volume.tcl">
		mini-volume.tcl -bg "#3A82F8"
		</Swallow>
would change from grey to my beloved deep blue of the XP JWM theme
I say woof woof - this needs to be in Puppy2 even though there is a feature freeze - I would suggest no volume control is a bug (yep gotta get that volume into Puppy2 . . .)

Well done rarsa
:)

Posted: Sat 27 May 2006, 09:06
by Béèm
Thanks It's great.

Another challenge would be to connect the volume buttons (+ -) on multi-media keyboards to the slider and make it move.

Posted: Sat 27 May 2006, 09:23
by BarryK
Truly great!

It's getting to the point where jwm-config needs taskbar-applet management
added...
I wonder, maybe we should put all the taskbar applets in the same place, say
/usr/local/trayapps/, so the applet manager can find them easily and we wouldn't
have to have a fixed list.

Posted: Sat 27 May 2006, 09:31
by Béèm
Good idea, Barry.

I support.

Posted: Sat 27 May 2006, 13:51
by Rhino
Absolutely fantastic! It works perfectly so far and is so simple and elegant. This is a "must have" utility for any puppy user. Great work. 8)

Posted: Sat 27 May 2006, 14:10
by BarryK
Okay, it's now in Puppy2! Only thing I changed was make the background of the
gif transparent.

Posted: Wed 31 May 2006, 23:14
by Flash
Thanks, rarsa. I've really wanted one of those. :)

Posted: Wed 14 Jun 2006, 04:58
by rarsa
I've uploded a new version that responds to the mouse wheel

I had it 99% ready since a couple of days before Puppy2 but didn't have enough time to finish it then.

Now I've also added it to the subversion repository

Check it out:
http://www.murga.org/~puppy/viewtopic.php?p=51724#51724

Posted: Wed 14 Jun 2006, 05:19
by BarryK
rarsa,
in mini-volume.tcl, could you change this line:

Code: Select all

exec wish8.4 "$0" "$@"
to this:

Code: Select all

exec wish "$0" "$@"
reason is, i've upgraded puppy2 to tcl/tk 8.5.
but, both 8.4 and 8.5 unleashed pkgs has executable 'wish' which is a sym link
to the actual executable.

Posted: Wed 14 Jun 2006, 05:24
by rarsa
BarryK wrote:in mini-volume.tcl, could you change this line...
Done.

Posted: Fri 16 Jun 2006, 05:03
by rarsa
Version 0.3

At the request of Barry changed it to use setvol instead of snack.

Fixed flickering on mouse wheel actions.

You can find the pupget at the top of this thread http://www.murga.org/~puppy/viewtopic.php?p=51724#51724

Posted: Mon 15 Jan 2007, 00:30
by rarsa
Version 0.4

Download it from here:
http://www.murga-linux.com/puppy/viewto ... 1724#51724

Version 0.4 is not just a change of look with a nicer image. It also correctly displays the slider and hint when the tray at the top and changes the image according to the volume level. from Mute to High volume there are 4 different volume levels to display.

Changelog:
2007-01-14 - 18:56
- Fixed position of slider and hint when the tray is on the top
- Replaced image with images showing the volume level (High, medium, low, mute)

Posted: Mon 15 Jan 2007, 14:06
by Flash
rarsa, how do we install it? It extracted as a directory, "mini volume-0.4," which I put in /root/my-applications for now.

Posted: Mon 15 Jan 2007, 14:39
by rarsa
It installs as a PupGet With the PupGet manager.

When you open the PupGet installer it is the second small button. It will let you choose a file to install.

Posted: Mon 15 Jan 2007, 15:36
by Lobster
8) 0.4 is very polished. Look forward to seeing it in Puppy Barbie 2.14
http://puppylinux.org/wikka/Puppy214

:)

Posted: Mon 15 Jan 2007, 22:16
by WhoDo
Love the applet, rarsa! Any chance us addicted Icewm'ers can get a compatible version?

MU managed to get Blinky working for me, so it should be possible but only you can say for sure!

Cheers

Posted: Mon 15 Jan 2007, 23:15
by Pizzasgood
C programs can use eggtray to show up in IceWM. That's how Blinky does it. If I remember right though, this volume app is a TCL program. I don't know if those can do that.

It would be nice though.

Posted: Tue 16 Jan 2007, 03:21
by rarsa
There is a tcl/tk extension to handle system trays. But I would need to install it and make it work. I may get around to it at some point.

Posted: Mon 26 Feb 2007, 06:12
by rarsa
Version 0.6

Download it from here:
http://www.murga-linux.com/puppy/viewto ... 1724#51724

This version is designed to work better with the pvolume-mixer or any other external mixer.

Changelog:
2007-02-26 - 01:00 (version 0.6)
- Added a parameter to select a mixer application to launch on right click
- Added right click menu to select either "mute" or "mixer"
- Added code to respect balance selected in another mixer
- Enlarged the slider handle
- Cleaned up the code a little.