Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 25 May 2018, 08:57
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
YAD - Tips
Post new topic   Reply to topic View previous topic :: View next topic
Page 27 of 28 [418 Posts]   Goto page: Previous 1, 2, 3, ..., 25, 26, 27, 28 Next
Author Message
fredx181


Joined: 11 Dec 2013
Posts: 2977
Location: holland

PostPosted: Sun 25 Mar 2018, 06:25    Post subject:  

See new YRadio version here:
http://murga-linux.com/puppy/viewtopic.php?p=986591#986591
(merged with "Dogradio and YRadio" thread)

Why ??
My interest in exploring new yad options, (e.g. --cycle-read and --paned) and attempting to provide a simple and lightweight internet radio player.

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
misko_2083


Joined: 08 Nov 2016
Posts: 34

PostPosted: Mon 26 Mar 2018, 13:14    Post subject:  

fredx181 wrote:
See new YRadio version here:
http://murga-linux.com/puppy/viewtopic.php?p=986591#986591
(merged with "Dogradio and YRadio" thread)

Why ??
My interest in exploring new yad options, (e.g. --cycle-read and --paned) and attempting to provide a simple and lightweight internet radio player.

Fred

Freddy, you've been a busy puppy since my last login. Smile
If I may suggest that you put that "Update Index" button somewhere else. 4 out of five times I clicked that button instead of "Load". Embarassed

I would add pulse audio volume control in a popup window.
The only trouble is positioning these windows for all the monitor resolutions can be tricky. Also not sure which previous versions of yad support these kind of windows.
yradio.fake.tar
Description 
tar

 Download 
Filename  yradio.fake.tar 
Filesize  22.94 KB 
Downloaded  39 Time(s) 
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2977
Location: holland

PostPosted: Mon 26 Mar 2018, 14:34    Post subject:  

misko_2083 wrote:
Freddy, you've been a busy puppy since my last login. Smile


Yeah, sure, but you should check here more often, MiskY ! Smile

Quote:
I would add pulse audio volume control in a popup window.


Many thanks, nice to have volume control, however... most puppy (and 'dog') systems don't have pulseaudio by default, just alsa.
Do you think something like you did that can work with just alsa ?
Works fine for me, but first had to install pulseaudio and also "gawk" (had only "mawk" installed, setting the volume didn't work with that (EDIT, I *think* also not with busybox awk)).

Best regards, and thanks again,

EDIT: YRadio also on github now:
https://github.com/fredx181/yradio

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 1178
Location: Green Island baby! Drowning in fresh for a month

PostPosted: Wed 28 Mar 2018, 18:35    Post subject:  

Thought I'd have a look . Found it in /root
Found on xenialpup64 I did not have mplayer installed
Bum...Have no download capacity atm ,very expensive out here on the reef.
Back to top
View user's profile Send private message Yahoo Messenger 
rufwoof

Joined: 24 Feb 2014
Posts: 2323

PostPosted: Wed 28 Mar 2018, 21:35    Post subject:  

fredx181 wrote:
Many thanks, nice to have volume control, however... most puppy (and 'dog') systems don't have pulseaudio by default, just alsa.
Do you think something like you did that can work with just alsa ?
Works fine for me, but first had to install pulseaudio and also "gawk" (had only "mawk" installed, setting the volume didn't work with that (EDIT, I *think* also not with busybox awk)).

Nowadays I just map Win key (special left) plus the up/down arrow keys to incrementally raise/lower the volume. Right menu to present the default menu (up and down arrows to navigate the menu) ... etc.
Back to top
View user's profile Send private message 
misko_2083


Joined: 08 Nov 2016
Posts: 34

PostPosted: Fri 30 Mar 2018, 08:36    Post subject:  

fredx181 wrote:
misko_2083 wrote:
Freddy, you've been a busy puppy since my last login. Smile


Yeah, sure, but you should check here more often, MiskY ! Smile

Didn't have the time to "sit" by the computer.

"MiskY", that's how my nephew used to call me when he was little. Smile

No idea why Marc Conta called me "Manow" (see the screenshot bellow). Very Happy I never heard of such name. Very Happy

fredx181 wrote:

Many thanks, nice to have volume control, however... most puppy (and 'dog') systems don't have pulseaudio by default, just alsa.
Do you think something like you did that can work with just alsa ?
Works fine for me, but first had to install pulseaudio and also "gawk" (had only "mawk" installed, setting the volume didn't work with that (EDIT, I *think* also not with busybox awk)).


Here is alsa version. *Requires alsa-utils.
yradio.fake.tar
Description 
tar

 Download 
Filename  yradio.fake.tar 
Filesize  22.41 KB 
Downloaded  30 Time(s) 
TheMagnificentManow.png
 Description   
 Filesize   12.11 KB
 Viewed   551 Time(s)

TheMagnificentManow.png

Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2977
Location: holland

PostPosted: Sat 31 Mar 2018, 05:20    Post subject:  

misko_2083 wrote:
Here is alsa version. *Requires alsa-utils.


Thanks again Miskey ! Wink

I changed the CURVOL variable (check for pid of pulseaudio)
How it was, the current volume shows 0 for me if pulseaudio is not running.
Now works in both cases from what I tested (also with alsa only).
Code:
# CURVOL=$(echo ${vol[4]} | sed 's/[][%]//g')
# fredx181, check if pulseaudio is running, set CURVOL accordingly.
[ $(pidof pulseaudio) ] && CURVOL=$(echo ${vol[4]} | sed 's/[][%]//g') || CURVOL=$(echo ${vol[3]} | sed 's/[][%]//g')


Added volume control in v0.0.5:
https://github.com/fredx181/yradio/archive/master.zip



Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2168
Location: In The Way

PostPosted: Sat 31 Mar 2018, 08:37    Post subject:  

Alsa version with VLC option (chkbox) would be ideal!

Hi MiskY

I called you Manow as a guess because your 'handle' seemed to be in the cyrillic alphabet, which I recalled poorly! Wink

apologies
stemsee
Back to top
View user's profile Send private message MSN Messenger 
misko_2083


Joined: 08 Nov 2016
Posts: 34

PostPosted: Mon 02 Apr 2018, 18:41    Post subject:  

fredx181 wrote:
I changed the CURVOL variable (check for pid of pulseaudio)
How it was, the current volume shows 0 for me if pulseaudio is not running.
Now works in both cases from what I tested (also with alsa only).

Very good Fred.

stemsee wrote:
I called you Manow as a guess because your 'handle' seemed to be in the cyrillic alphabet, which I recalled poorly!

Well, at least you guessed the first letter right. Smile
As the consolation prize you get a link to my wallpaper "Resting fox 1920x1080" on Deviant Art. Very Happy https://misko-2083.deviantart.com/art/Resting-Fox-HD-726774960

stemsee wrote:
Alsa version with VLC option (chkbox) would be ideal!

It's possible to use use the checkbox for selection. However, in yad form dialogs, only button can be used as the trigger.
Maybe paned dialog is too much but if Fred thinks it is worth the trouble I have an example with the alsa volume control and the paned dialog that launch from a notification icon but this can be modified to launch from any button.

Now about the notification area and sticky windows: I've tried to position the alsa volume control (yad paned) dialog near the notification icon. Sometimes it is positioned correctly, sometimes not. Notification area can sometimes be positioned to the left/right (top and bottom panels) and top/bottom (vertical panels).The idea is to determine the zone in which the notification icon is activated. Clicking the notification area grabs the mouse position and calculates the relative position in which the window will be launched. The last action is to pass the coordinates where the dialog will open. I whish this is easier with yad. Very Happy
yad-alsa-notification.fake.tar
Description 
tar

 Download 
Filename  yad-alsa-notification.fake.tar 
Filesize  4.83 KB 
Downloaded  33 Time(s) 
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3701
Location: King's Lynn, UK.

PostPosted: Mon 02 Apr 2018, 21:13    Post subject:  

@ Smokey01:-

Hi, Grant. Just wanted to say 'Thanks' for your brilliant YAD tutorial:-

http://smokey01.com/yad/

I was browsing t'interweb this evening, looking for some tips on using YAD, since I wanted to create a small 3-button selector box for my SoftMaker FreeOffice packages. LibreOffice, as you probably know, has the 'StartCenter'; you click on a single MenuEntry, and you then get access to the entire suite from that point on. FreeOffice doesn't have anything like that, so you end up with a whole bunch of .desktop entries.....which is rather untidy.

(I came across your tutorial almost by accident - I must have overlooked the multiple references to it in the Newsletter! - by alighting on this site:-

http://www.thelinuxrain.com/articles/the-buttons-of-yad

...and discovering that you'd been credited down the bottom, along with a link to the tutorial. So it seems you've got fans in more places than you realised..... Laughing)


-----------------------------------------------------------------------------

Anyway; I've ended up with this:-





.....which resulted from the following script:-

Code:
#!/bin/sh
#
#Selector for SoftMaker FreeOffice components: © Mike Walsh Apr 2018 - with thanks to Smokey01
#
yad --center --window-icon=/usr/local/lib/X11/pixmaps/office-2-icon.png --title="SoftMaker FreeOffice2016 StartCenter" --form --width=425 --text="SOFTMAKER FREEOFFICE2016 STARTCENTER
                                                                   
Please choose your desired office module:-" \
--image="/usr/local/lib/X11/pixmaps/office-2-icon.png" \
--field="TEXTMAKER (word processor)":fbtn "textmaker16free" \
--field="PLANMAKER (spreadsheet)":fbtn "planmaker16free" \
--field="PRESENTATIONS (slideshows, etc.)":fbtn "presentations16free" \
--no-buttons --close-on-unfocus


I've probably made an unholy mess of the order in which I've listed the various options.....but, for a first attempt at this kinda thing, I don't think it's turned out too bad. I went with the '--no-buttons' option, 'cos it tidied-up the appearance. I was intending to use the '--timeout' option, but got the idea for '--close-on-unfocus' from the comments section of the LinuxRain page, so went with that instead. Works nicely! It seems that if you use the bog-standard '--form' box then you have to clear it manually.....otherwise it'll still be there when you've finished using whatever app you used it to select in the first place..!

Cheers.

EDIT:- I get the impression '--close-on-unfocus' is a fairly new addition to YAD, because I'd recently compiled the newest version (40) for Slacko 570, which is where I'd been doing this. I'm slowly sym-linking the new stuff into the kennels from the remote data partition where they live, and I'm finding that most Pups won't run it:-

Code:
Unable to parse option --close on-unfocus


So; time to re-compile the new version for all the other Pups!


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------


Last edited by Mike Walsh on Tue 03 Apr 2018, 10:45; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
stemsee

Joined: 27 Jun 2013
Posts: 2168
Location: In The Way

PostPosted: Tue 03 Apr 2018, 09:01    Post subject:  

@miskY

Beautiful artistic 'painting'. Which program did you use to achieve that? I have a friend called beverly greene who also has an account on deviantart.

How about a yad paint!?!
Back to top
View user's profile Send private message MSN Messenger 
fredx181


Joined: 11 Dec 2013
Posts: 2977
Location: holland

PostPosted: Tue 03 Apr 2018, 10:55    Post subject:  

Hi Mike Walsh,

Quote:
Unable to parse option --close on-unfocus


I see a whitespace where it should be a dash, this works maybe ?
Code:
--close-on-unfocus


Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3701
Location: King's Lynn, UK.

PostPosted: Tue 03 Apr 2018, 17:59    Post subject:  

Hi, Fred.

Well spotted, mate. Actually, I didn't perform a copy/paste for that one; I simply typed it in from memory.....and forgot one of the '-' symbols.

*smacked wrist* Bad Mike..! Laughing

But that definitely is a recent addition; it wasn't working in Precise 571, where I've been using v36.0 for some little while.....it simply doesn't recognise it.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 2977
Location: holland

PostPosted: Wed 04 Apr 2018, 06:28    Post subject:  

Mike Walsh wrote:
Actually, I didn't perform a copy/paste for that one; I simply typed it in from memory.....and forgot one of the '-' symbols.


Ah, I see,
I did a little digging and I think the --close-on-unfocus option was added from 0.37 on.

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
misko_2083


Joined: 08 Nov 2016
Posts: 34

PostPosted: Wed 04 Apr 2018, 15:15    Post subject:  

stemsee wrote:
@miskY

Beautiful artistic 'painting'. Which program did you use to achieve that? I have a friend called beverly greene who also has an account on deviantart.

How about a yad paint!?!

I use Gimp mostly.
Making a paint application with yad is impossible.
Maybe some basic image manipulation like resizing and rotating or color efects can be scripted.

Those are more usefull with the file managers via context (right-click) menu.
https://ubuntu-mate.community/t/rotate-images-with-gimp-using-cajas-context-menu/8762
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 27 of 28 [418 Posts]   Goto page: Previous 1, 2, 3, ..., 25, 26, 27, 28 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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
[ Time: 0.0998s ][ Queries: 12 (0.0421s) ][ GZIP on ]