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 Sun 15 Dec 2019, 19:26
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 54 of 55 [814 Posts]   Goto page: Previous 1, 2, 3, ..., 52, 53, 54, 55 Next
Author Message
fredx181


Joined: 11 Dec 2013
Posts: 4217
Location: holland

PostPosted: Mon 02 Dec 2019, 13:10    Post subject:  

A L A R M !! Laughing Laughing


Hi, no need to be alarmed Wink it's just about a new alarm script (attached) with changes and improvements.
Mostly focused on being able to cancel and stop the alarm even in case of multiple alarms.
Also tried putting together the ideas and suggestions into it, e.g.
- Repeat can be set to 0, which means infinite
- Tray icon will change from "waiting" icon to "running" icon when the alarm sound starts playing.
- The alarm can be shut off (once running) by right-click the icon > Stop alarm and exit tray
- The GUI a little changed
@Argolance, would be nice if you change to your liking and share (the big alarm clock icon you showed is nice), if you want of course.
Note in case you will translate, there's one function depending on "Set to" phrase: Alarm is running in the background... Set to $hr:$mn Changing "Set to" may make canceling fail. (don't know if is important, just mentioning)
@misko, thanks for "at" recommendation, maybe comes in handy for later.
@vovchik, I initially wanted to use your .svg icon setup with the "Argolance" icons, but found that on one of my systems, they show as empty (transparent) image, any idea why ?
EDIT: Few minutes later, re-attached, made small change on the GUI.

EDIT 2019-12-05: Canceling from tray needed a fix, should work now, re-attached.
See also here:
http://murga-linux.com/puppy/viewtopic.php?p=1043688#1043688

Fred
yalarm.tar.gz
Description  yad alarm updated 2019-12-05 , extract and run yalarm
gz

 Download 
Filename  yalarm.tar.gz 
Filesize  2.73 KB 
Downloaded  12 Time(s) 
2019-12-02-184318_680x179_scrot.png
 Description   yalarm
 Filesize   31.5 KB
 Viewed   544 Time(s)

2019-12-02-184318_680x179_scrot.png


_________________
Dog Linux website
Tinylinux blog by wiak

Last edited by fredx181 on Thu 05 Dec 2019, 06:37; edited 1 time in total
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1512
Location: Ukraine

PostPosted: Mon 02 Dec 2019, 16:17    Post subject:  

Dear Fred,

Good question why the argolance SVGs show up blank on that machine. Is in a compositing "feature" or alpha-channel problem with the Xorg? I've not experienced it before, but it could be that the gdk_pixbuf_loader (which normally handles icon loading within gtk progs) on that system only partially supports svgs, or the yad there was compiled without cairo? I am just speculating.... Weird.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4217
Location: holland

PostPosted: Mon 02 Dec 2019, 16:54    Post subject:  

Hi vovchik, just for info, it's on the same computer, same yad version, but diiferent Debian version (Buster, on Stretch it works fine), it's not only with yad, btw, with viewnior (image viewer) its shows empty too.
All the other "pre-made" .svg's from you are showing correctly on Buster, btw. Weird indeed... Not a complaint or big problem, just like to understand why. I'll test some more later.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3721
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Wed 04 Dec 2019, 06:15    Post subject:  

Hello,
Thank you fredx181!
Sorry I didn't answer earlier, but I wasn't home.
Code:
(yad:12506): GLib-WARNING **: g_strcompress: trailing \

I saw somewhere on the web that this warning is a result of wrong command line which must be escaped in a bash fashion. Rolling Eyes
When I cancel tray and exit from the right click menu, the systray icon is closed but the process not... and the bells ring!
As for internationalization, this time I'll wait a little while for the script to be fully finalized. Wink

[EDIT] Additional question:
Now, to understand how YAD works (for me it is still largely mysterious because the logic is very "special"...), how to move the Set command
Code:
'bash -c "alrm %1 %2 %3 %4 %5 %6 %7 %8 %9"'
to a usual "OK" button placed down the window, close to a "Cancel" one?

Thanks.
Cordialement.

Cordialement.

_________________

A second life for your PCs...
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 4217
Location: holland

PostPosted: Wed 04 Dec 2019, 12:52    Post subject:  

Hi Argolance,

Quote:
(yad:12506): GLib-WARNING **: g_strcompress: trailing \

Yes, thats because of a small mistake I made in the yad code, part of the GUI code at the bottom should be this:
Code:
yad --plug="$$" --tabnum=1 --form --cycle-read --columns=2 --field="\t\t\t\t\Current Time:\t\t: " --field="               \t\t\t\t\t\t:lbl" &

(without extra \ after \t\t\t\t\t\t)
But it's just a warning, as far as I know it doesn't affect how things work.

Quote:
When I cancel tray and exit from the right click menu, the systray icon is closed but the process not... and the bells ring!

Strange... works ok for me, I guess you mean right-click on the "waiting" icon and "Cancel Alarm and Exit tray"
I tested just now in Xenialpup also and works well for me.
Could be that you edited things in script (e.g. for translation) ?

Quote:
Now, to understand how YAD works (for me it is still largely mysterious because the logic is very "special"...), how to move the Set command
Code:
'bash -c "alrm %1 %2 %3 %4 %5 %6 %7 %8 %9"
to a usual "OK" button placed down the window, close to a "Cancel" one?


Yeah, sure,"special", it should be possible to move the Set button to a usual "OK" button placed down the window, but then it will close the dialog (which I prefer not to) and also requires a completely different setup AFAIK to get all the variables from the fields.

EDIT:
Quote:
but then it will close the dialog

that may be wrong Question

Fred

_________________
Dog Linux website
Tinylinux blog by wiak

Last edited by fredx181 on Wed 04 Dec 2019, 15:10; edited 1 time in total
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4217
Location: holland

PostPosted: Wed 04 Dec 2019, 14:29    Post subject:  

Hi all, another change to the alarm script, included now the earlier suggestion for setting "relative" time (thanks vovchik), attached yalarm2
(the config file is different: ~/.yalrm2, so not compatible with earlier versions).

EDIT 2019-12-05: Canceling from tray needed a fix, should work now, re-attached.
See also here:
http://murga-linux.com/puppy/viewtopic.php?p=1043688#1043688

Fred
yalarm2.tar.gz
Description  yad alarm updated 2019-12-05, extract and run yalarm2
gz

 Download 
Filename  yalarm2.tar.gz 
Filesize  3.01 KB 
Downloaded  16 Time(s) 
2019-12-04-191247_686x218_scrot.png
 Description   yalarm2 with relative time option
 Filesize   46.08 KB
 Viewed   367 Time(s)

2019-12-04-191247_686x218_scrot.png


_________________
Dog Linux website
Tinylinux blog by wiak

Last edited by fredx181 on Thu 05 Dec 2019, 06:40; edited 1 time in total
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1417

PostPosted: Wed 04 Dec 2019, 14:44    Post subject:  

fredx181 wrote:
A L A R M !! Laughing Laughing


Hi, no need to be alarmed Wink it's just about a new alarm script (attached) with changes and improvements.
/snip

Fred


Thank God. Finally a decent alarm clock that doesn't take 100 meg of dependencies.

I've literally been using a 7 hour long countdown video I downloaded off of youtube that plays music after 7 hours.

I will install immediately and report back.
Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 1617
Location: The other Mr. 305

PostPosted: Wed 04 Dec 2019, 23:21    Post subject:  

Well, you didn't report back so I guess you overslept and the alarm didn't work. LOL
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1417

PostPosted: Wed 04 Dec 2019, 23:27    Post subject:  

slavvo67 wrote:
Well, you didn't report back so I guess you overslept and the alarm didn't work. LOL


The big test is tomorrow morning. Very Happy
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4217
Location: holland

PostPosted: Thu 05 Dec 2019, 06:07    Post subject:  

Argolance wrote:
When I cancel tray and exit from the right click menu, the systray icon is closed but the process not... and the bells ring!

Now I could reproduce that, but it's only sometimes that the canceling doesn't work, can't understand why yet, will look for a fix.

EDIT: The solution was actually quite simple, previously the code for cancelling was too complicated and therefore fragile, should be OK now, re-attached here:
http://murga-linux.com/puppy/viewtopic.php?p=1043415#1043415
and here (v2):
http://murga-linux.com/puppy/viewtopic.php?p=1043629#1043629

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3721
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 07 Dec 2019, 07:40    Post subject:  

Bonjour,
Here is yalrm 0.2 which incorporates the latest changes made by fredx181 without the countdown since other programs Arrow like this one for example already exist.
I added the "Frequency" option which allows you to set the blinking (from 0.1 to 2 seconds) according to the type of icons you choose: 5 themes are available.
Internationalized: fr

[EDIT]: if already existing, the hidden /root/.yalrm file must be deleted for the script to run properly because it creates a directory with the same name at startup.

Cordialement.
191206_224314_257x605_easyshot.jpg
 Description   
 Filesize   22.81 KB
 Viewed   188 Time(s)

191206_224314_257x605_easyshot.jpg

yalrm-0.2.pet
Description 
pet

 Download 
Filename  yalrm-0.2.pet 
Filesize  59.6 KB 
Downloaded  23 Time(s) 

_________________

A second life for your PCs...
Back to top
View user's profile Send private message Visit poster's website 
dancytron

Joined: 18 Jul 2012
Posts: 1417

PostPosted: Sat 07 Dec 2019, 12:46    Post subject:  

fredx181 wrote:
Hi all, another change to the alarm script, included now the earlier suggestion for setting "relative" time (thanks vovchik), attached yalarm2
(the config file is different: ~/.yalrm2, so not compatible with earlier versions).

EDIT 2019-12-05: Canceling from tray needed a fix, should work now, re-attached.
See also here:
http://murga-linux.com/puppy/viewtopic.php?p=1043688#1043688

Fred


This is working great for me.

Is a snooze button (ideally the space bar but choosing from the task bar would be okay too) with a settable duration possible?
Back to top
View user's profile Send private message 
stemsee

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

PostPosted: Sat 07 Dec 2019, 18:39    Post subject:  

Thanks Argolance

yalrm works well on dpupbuster64_8.0.0
Back to top
View user's profile Send private message MSN Messenger 
josejp2424


Joined: 01 Aug 2010
Posts: 520

PostPosted: Sat 07 Dec 2019, 19:19    Post subject: yalrm-gettex
Subject description: yalrm
 

Argolance wrote:
Bonjour,
Here is yalrm 0.2 which incorporates the latest changes made by fredx181 without the countdown since other programs Arrow like this one for example already exist.
I added the "Frequency" option which allows you to set the blinking (from 0.1 to 2 seconds) according to the type of icons you choose: 5 themes are available.
Internationalized: fr

[EDIT]: if already existing, the hidden /root/.yalrm file must be deleted for the script to run properly because it creates a directory with the same name at startup.

Cordialement.


hi Argolance.

It is very good.
there would be the possibility of adding gettex?.

_________________
Shiba Inu | Pupjibaro jessie | My Blog
Back to top
View user's profile Send private message Visit poster's website 
Argolance


Joined: 06 Jan 2008
Posts: 3721
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sun 08 Dec 2019, 09:24    Post subject:  

Bonjour,
josejp2424 wrote:
there would be the possibility of adding gettex?.

Yes obviously: the script is internationalized using gettext and the pot file is /usr/share/doc/2PDE/yalrm/yalrm.pot (I note I should have put it to /usr/share/doc/nls/yalrm) Embarassed .
Thanks.

Additional note regarding the countdown option: I forgot to mention the excellent Arrow pTiming by zigbert for "relative" time alarm.

Cordialement.

_________________

A second life for your PCs...
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 54 of 55 [814 Posts]   Goto page: Previous 1, 2, 3, ..., 52, 53, 54, 55 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.1622s ][ Queries: 13 (0.0650s) ][ GZIP on ]