The time now is Tue 21 May 2013, 20:42
All times are UTC - 4 |
|
Page 30 of 110 [1644 Posts] |
Goto page: Previous 1, 2, 3, ..., 28, 29, 30, 31, 32, ..., 108, 109, 110 Next |
| Author |
Message |
Iguleder

Joined: 11 Aug 2009 Posts: 1614 Location: Israel, somewhere in the beautiful desert
|
Posted: Wed 21 Jul 2010, 04:50 Post subject:
|
|
Me neither, but plain GTK is the only way to get a tray icon.
I think you I can package it with a launcher (/usr/bin/pmusic):
| Code: |
#!/bin/sh
pmusic_tray &
/usr/local/pmusic/pmusic
killall pmusic_tray
|
This way the tray icon can be a separate package.If I compile it under 4.3.1 it should be compatible with all puppies. It depends only on GTK and glibc after all.
_________________ Shahor, my Puppy concept
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5241 Location: Valåmoen, Norway
|
Posted: Wed 21 Jul 2010, 05:02 Post subject:
|
|
Ok, I make an updated Pmusic, when I get the tray-app pet, and make it available from the main post.
Great deal
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Wed 21 Jul 2010, 05:25 Post subject:
|
|
| iguleder wrote: | | Me neither, but plain GTK is the only way to get a tray icon. |
Why do we need a tray icon when we could use a quicklaunch icon ?
| disciple wrote: | | Does/can pmusic still keep running when you close the gui (this was the original behaviour I think)? |
Ah, thanks Iguleder. From your code I see that starting Pmusic again with the -b command can be used to hide it when it is already running.
So it should be fairly easy to write a bash script which detects whether the Pmusic gui is open or not, and either hides or shows the gui. This script could be called from a JWM tray icon like I described. This approach would have the advantage that the icon would also acting as a quicklaunch icon, and there would also not be an extra process running
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
Iguleder

Joined: 11 Aug 2009 Posts: 1614 Location: Israel, somewhere in the beautiful desert
|
Posted: Wed 21 Jul 2010, 05:39 Post subject:
|
|
I tried that approach ... but it's not user-friendly. As far as I know the JWM tray buttons are not used for minimizing ... AND, you can't change their tooltip/icon dynamically. Plus, you can't add or remove them dynamically, unless you want some funky disco party of flashing window managers
/usr/bin/pmusic:
| Code: | #!/bin/sh
if [ "`ps | grep /usr/local/pmusic/pmusic | wc -l`" != 2 ]; then
/usr/local/pmusic/pmusic
echo 1 > /tmp/pmusicstate
else
case `cat /tmp/pmusicstate` in
0)
/usr/local/pmusic/pmusic &
echo 1 > /tmp/pmusicstate
;;
1)
/usr/local/pmusic/pmusic -b &
echo 0 > /tmp/pmusicstate
;;
esac
fi
|
And this in .jwmrc-tray ...
| Code: | | <TrayButton popup="Pmusic" icon="/usr/local/pmusic/pmusic20.png">exec:pmusic</TrayButton> |
_________________ Shahor, my Puppy concept
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Wed 21 Jul 2010, 05:55 Post subject:
|
|
| Quote: | | As far as I know the JWM tray buttons are not used for minimizing |
This one would be
| Quote: | | AND, you can't change their tooltip/icon dynamically. Plus, you can't add or remove them dynamically |
Yes... I guess it all depends what you want.
If I'm reading the output of top correctly, pmusic_tray uses 12MB of memory, which is a bit excessive for a couple of tooltips. Some people would be happy with a jwm button that had a tooltip saying something like "Click to launch or minimise Pmusic".
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Wed 21 Jul 2010, 06:03 Post subject:
|
|
| Quote: | | As far as I know the JWM tray buttons are not used for minimizing |
I presume you do realise that it is possible to have buttons in more than one place in the tray... so we can have normal quick launch icons to the left of the pager and task list, and a button for Pmusic to the right of the task list, so it just looks like its in the Dock.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
Iguleder

Joined: 11 Aug 2009 Posts: 1614 Location: Israel, somewhere in the beautiful desert
|
Posted: Wed 21 Jul 2010, 06:10 Post subject:
|
|
We could have flying pink dinosaurs that say "woof woof" on the welcome screen that hand you heart-shaped marshmallows in 3D. Yeah, that's right.
I think your approach is just soooo complicated and confusing. The quick launch buttons are there for 2 things:
- To launch
- To do it quickly and easily
Your approach makes them open-close-minimize-wuzzup-dude-buttons and that's bad. And the normal user doesn't know how to remove that button in case he doesn't want it. The tray icon is there only when pmusic runs, that's the way it works with any application that minimizes to the tray. That's familiar. That's friendly.
btw: 12 MB? are you sure? That's kinda impossible.
_________________ Shahor, my Puppy concept
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Wed 21 Jul 2010, 06:25 Post subject:
|
|
Except flying pink dinosaurs aren't very useful
| Quote: | | And the normal user doesn't know how to remove that button in case he doesn't want it. |
Not if the normal user had to turn an option on to get it in the first place.
| Quote: | | btw: 12 MB? are you sure? That's kinda impossible. |
I guess it just loads up the whole of GTK . How much ram do you think it uses?
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Wed 21 Jul 2010, 06:31 Post subject:
|
|
| Code: | Mem: 505052K used, 10568K free, 0K shrd, 35520K buff, 317232K cached
CPU: 0% usr 1% sys 0% nice 96% idle 0% io 0% irq 0% softirq
Load average: 0.21 0.18 0.37
Mem: 509344K used, 6276K free, 0K shrd, 35520K buff, 317408K cached
CPU: 1% usr 2% sys 1% nice 94% idle 0% io 0% irq 0% softirq
Load average: 0.23 0.18 0.36
PID PPID USER STAT VSZ %MEM %CPU COMMAND
30973 30968 root S 127m 25% 0% /usr/lib/firefox/firefox-bin
30349 30344 root S 12520 2% 0% retrovol -hide
6702 1 root S 11404 2% 0% blinky
30157 30156 root S < 48720 9% 0% X :0 -br -noacpi
3643 3638 root S 108m 21% 0% /usr/lib/thunderbird/thunderbird-bin
6710 6659 root S 26752 5% 0% gtkdialog3 -p Pmusic -G +150+150
30222 1 root S 19324 4% 0% /usr/local/apps/ROX-Filer/ROX-Filer -p
30227 30226 root S 12984 3% 0% glipper
6271 30222 root S 12172 2% 0% /tmp/pmusic_tray-002/pmusic_tray |
Those numbers might be misleading though - maybe gtk is included in the number for every running GTK app, but is actually only loaded once. Does anyone know?
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2462 Location: Ontario
|
Posted: Wed 21 Jul 2010, 17:18 Post subject:
bugs and suggestions |
|
I am using luci pup 209 frugal install
I tested the pmusic -a option
I CD to /root/puppy-reference/audio . I selected all files in
directory with Rox Filer and used xclipboard to transfer paths to terminal
and it worked as expected.
| Code: | pmusic -a /root/puppy-reference/audio/beep_high.wav /root/puppy-reference/audio/beep_low.wav /root/puppy-reference/audio/2barks.wav /root/puppy-reference/audio/goodluck.m4a /root/puppy-reference/audio/ivy.mp3 /root/puppy-reference/audio/2barks.au /root/puppy-reference/audio/bark.au /root/puppy-reference/audio/error.wav /root/puppy-reference/audio/generic.wav /root/puppy-reference/audio/illegal_move.ogg /root/puppy-reference/audio/join.wav /root/puppy-reference/audio/leave.wav /root/puppy-reference/audio/ok2.wav /root/puppy-reference/audio/ok.wav /root/puppy-reference/audio/complete.wav /root/puppy-reference/audio/login.wav /root/puppy-reference/audio/logout.wav
|
When I put .txt and .jpg files in /root/puppy-reference/audio
and repeated, they were added to playlist as well as sound files.
There should be some filtering of file types done as it is done by gui version.
I also tested what would happen if a space was in a filename and as I expected, the file with the space in the name wasn't added
By the way luci209 uses the script
| Code: | #!/bin/sh
exec pmusic -a "$@"
|
to add file to playlist, so it doesn't have problems with spaces in filenames.
I tried the command
Only one file was added
Wouldn't it be a great feature if all sound files in a directory were added
to a playlist(including files with spaces in their name) with one simple
command like the above. But the GUI version does this already.
Here's another suggestion to make the terminal more useful:
.
Create a playlist of favorite songs named favorite_playlist.m3u stored in
/root/.pmusic/tmp or else /root
Then it could be played without a GUI (looping over and over for hours)
with the command
Playing in the background while you work (with no GUI) could be a nice feature.
Apple iTunes software has that feature even though most people keep it on the dock.
There is shareware software that allows user to switch song tracks with only a
keystroke combination like alt-right arrow. Could the same thing be achieved in
pmusic? The objective would be to use pmusic effectively in background.
Here's more ideas I have...
To limit the playing time to 20 minutes,the command might be
you might even make an alarm clock out of it by giving the beginning and ending
times.
| Code: | | pmusic -f 13:45 15:30 |
To create favorite_playlist.m3u you could have a menu command in the GUI version
'Save as favorite'
Use a small bright red heart-shaped icon beside the menu choice.
A large red heart-shaped icon(next to playlist 1) could be used in the main window to
open favorite playlist quickly.
If favorite playlist was stored in /root, maybe it should have a different
extension than .m3u so that a large heart-shaped icon could be used
by Rox Filer. A nice touch.
...and as far as bugs are concerned , isn't it wrong to say in your
built-in help document
| Code: | In Rox you right-click on the audiofile and chooses 'Set run action'.
Command should be 'pmusic -a $1"' to 'Add file to playlist
|
Shouldn't variable be enclosed?
Another bug ... > If you start a filename with hyphen ( example -abcd.wav)
results in doubling on list but will play when clicked
and square bracket [ won't play at all and shows up twice on list
( example ab[cd.wav ) but a square bracket facing the other way ] is fine.
|
|
Back to top
|
|
 |
Iguleder

Joined: 11 Aug 2009 Posts: 1614 Location: Israel, somewhere in the beautiful desert
|
Posted: Thu 22 Jul 2010, 05:04 Post subject:
|
|
Here's a tray icon PET compiled on Lupu 503, only for 1.0.2 because it has a modified /usr/local/pmusic/pmusic.
Have fun
| Description |
|

Download |
| Filename |
pmusic_tray-1.0.2-lupu.pet |
| Filesize |
7.4 KB |
| Downloaded |
112 Time(s) |
_________________ Shahor, my Puppy concept
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7018 Location: qld
|
Posted: Thu 22 Jul 2010, 06:46 Post subject:
|
|
| Quote: | | Here's a tray icon PET compiled on Lupu 503, only for 1.0.2 because it has a modified /usr/local/pmusic/pmusic. |
Works like a beauty Thanks
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5241 Location: Valåmoen, Norway
|
Posted: Thu 22 Jul 2010, 14:44 Post subject:
|
|
iguleder
I have added pmusic_tray to the main post.
Seems to work ok in Puppy-4.3.1 as well
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5241 Location: Valåmoen, Norway
|
Posted: Thu 22 Jul 2010, 15:21 Post subject:
|
|
don570
Thanks for great feedback.
1.)
To allow spaces in filename from terminal you can
--> "song with space"
--> 'song with space'
--> song\ with\ space
This is a common way to handle spaces in terminal
2.)
I don't think the idea of filtering non-songs is good. This is a nice way to override the gui-filter, and forces pmusic to TRY to play a chosen song. The filter in Pmusic is based on filename extensions, while the engine (ffmpeg) looks for headers/stream info.
3.)
Since I don't want to filter songfiles from other files in non-gui mode (at this stage) 'pmusic -a *' will add all kinds of files. To do what you intend you can use this command: | Code: | | find /root/ -name "*.mp3" > /tmp/playlist.m3u | pmusic -i /tmp/playlist.m3u |
4.)
Playing without gui should be solved by iguleders pmusic_tray app. You can also use the pmusic -b switch to close gui, and keep playing. I see that this is not exactly what you request, but if you have stored your favorite m3u you can start your playlist without gui by the command: | Code: | | pmusic -b -i /root/favorites.m3u |
5.)
Hotkeys for changing songs (Alt+right/left) and volume level (Alt+up/down) is already supported in the Startdust desktop environment (DuDE). It is not managed by Pmusic, but by JWM. To set it up manually in your system, add in /root/.jwm/jwmrc-personal:
| Code: | <Key mask="A" key="Up">exec:/usr/local/pmusic/func_mixer -upMono</Key>
<Key mask="A" key="Down">exec:/usr/local/pmusic/func_mixer -downMono</Key>
<Key mask="A" key="Right">exec:/usr/local/pmusic/func_player -next</Key>
<Key mask="A" key="Left">exec:/usr/local/pmusic/func_player -back</Key> | In the future it might happen that Pmusic can handle this internally.
6.)
Making Pmusic an alarmclock, or time-keeper is out of scope. Not because it is a good idea, but because it requires new background processes, and pmusic is already hungry for cpu.... We have Pschedule/Ptimer for this purpose.
7.)
Syntax error in faq is fixed. thank you!!!
8.)
Problems with - and [ is added to todo-list. Are you having this problem only when playing from terminal, or is it also present in gui mode.
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2462 Location: Ontario
|
Posted: Thu 22 Jul 2010, 18:11 Post subject:
special characters test for pmusic |
|
Here's the method that I used to test each special character.
I tried to be consistent.
1) used luci209
2) started with a new playlist each time I tested a filename
3) renamed 2barks.wav each time
4) added the filename to playlist using
right mouse button click and choosing
'Add to pmusic playlist'
This executed the script
| Code: | #!/bin/sh
exec pmusic -a "$@" |
This is a feature that all Puppies should have!!
I didn't spend much time with any other method.
_________________________________
I'll be trying the 'hide in tray' trick.
It seems useful. A good substitute for my suggestion
of a favorite playlist playing in background while you work.
|
|
Back to top
|
|
 |
|
|
Page 30 of 110 [1644 Posts] |
Goto page: Previous 1, 2, 3, ..., 28, 29, 30, 31, 32, ..., 108, 109, 110 Next |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|