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 Mon 17 Jun 2019, 00:34
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 42 of 42 [626 Posts]   Goto page: Previous 1, 2, 3, ..., 40, 41, 42
Author Message
achim

Joined: 13 Apr 2017
Posts: 33
Location: Germany

PostPosted: Fri 10 May 2019, 12:19    Post subject: Keyboard instead of Mouse  

Hello everybody,

How can I move with the keyboard instead of the mouse in a selection dialog created with "--file-selection"?

Best regards, Achim
Back to top
View user's profile Send private message 
misko_2083


Joined: 08 Nov 2016
Posts: 67

PostPosted: Fri 10 May 2019, 15:57    Post subject: Re: Keyboard instead of Mouse  

achim wrote:
Hello everybody,

How can I move with the keyboard instead of the mouse in a selection dialog created with "--file-selection"?

Best regards, Achim

Tab to change the focus to another widget, then arrow keys up and down.
To get to the right pane when you open a yad file selection press shift+tab.
Back to top
View user's profile Send private message 
achim

Joined: 13 Apr 2017
Posts: 33
Location: Germany

PostPosted: Fri 10 May 2019, 16:09    Post subject: Re: Keyboard instead of Mouse  

misko_2083 wrote:
achim wrote:
Hello everybody,

How can I move with the keyboard instead of the mouse in a selection dialog created with "--file-selection"?

Best regards, Achim

Tab to change the focus to another widget, then arrow keys up and down.
To get to the right pane when you open a yad file selection press shift+tab.


Thanks misko_2083!
Back to top
View user's profile Send private message 
artsown

Joined: 12 Sep 2012
Posts: 335

PostPosted: Sun 12 May 2019, 09:42    Post subject: cpu temperature monitor  

Say I have a folder holding icons showing temperatures from 10C to
105C. My bash script finds the temp and selects the appropriate icon.
How using yad can I place the icon in the tray? I would arrange to do
this "find temp and display icon" loop every few seconds.

Edit: The icons are from an old tempicon app having .svg extensions,
if that's a concern or consideration. Maybe they can be converted if
necessary.

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


Joined: 11 Dec 2013
Posts: 3956
Location: holland

PostPosted: Sun 12 May 2019, 11:36    Post subject:  

misko_2083 wrote:
Fredx181, if you want to make one, even simpler version of yradio,
you can use the list for navigation between the radio categories and stations.

Here's an example with the notification icon.
....
....


Hey Misko, thanks anyway, but I have no idea how to implement your code in yradio, if you feel like it sometime, maybe you want to do it ?
(also I'm not sure if I understand what the improvement exactly can be Rolling Eyes , but it sounds promising what you're suggesting )

Fred

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


Joined: 21 Jan 2019
Posts: 31

PostPosted: Sat 08 Jun 2019, 17:49    Post subject: Want to make a YAD Gui Camera Image viewing program.  

Any pointers will be appreciated.

I have security cameras that use proprietary Web view apps but, if my internet is down I can not see my camera output. I can though, capture snapshots from each camera locally using a URL -- *.cgi script in each camera. Here is the flow I want to acomplish.

1. Use wget to get image form camera http:/admin:pw@192.168.1.100 (Done, this works)

2. wget saves images to snampshot.cgi.1, snapshot.cgi.2, snapshot.cgi.3, etc. (every 3 seconds). (Done)

Need to do this:

A. Rename files:
rename snapshot1.cgi.1 ---> camera0000001.jpg
rename snapshot1.cgi.2 ---> camera0000002.jpg
rename snapshot1.cgi.1 ---> camera0000003.jpg
etc........

Use DevedeNG to make a DVD video out of the files, 1 hour long video file.

This will work on Amcrest Cameras and many others. Once it is done, I'll give credit to all and put it on Github under GPL License 2.1+.

I am just stuck at the Renaming part.

Thanks, Bobby
Back to top
View user's profile Send private message Visit poster's website 
phat7

Joined: 05 Jun 2015
Posts: 125

PostPosted: Sat 08 Jun 2019, 18:29    Post subject:  

using yad?
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1842
Location: Japan

PostPosted: Sat 08 Jun 2019, 21:47    Post subject: Re: Want to make a YAD Gui Camera Image viewing program.  

lamplinux wrote:
A. Rename files:
rename snapshot1.cgi.1 ---> camera0000001.jpg
rename snapshot1.cgi.2 ---> camera0000002.jpg

Try
Code:
cd /path/to/snapshots
for f in snapshot1.cgi* ; do mv $f $(printf 'camera%07d.jpg' ${f##*.}); done
Back to top
View user's profile Send private message 
stemsee

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

PostPosted: Tue 11 Jun 2019, 20:10    Post subject: Re: cpu temperature monitor  

artsown wrote:
Say I have a folder holding icons showing temperatures from 10C to
105C. My bash script finds the temp and selects the appropriate icon.
How using yad can I place the icon in the tray? I would arrange to do
this "find temp and display icon" loop every few seconds.

Edit: The icons are from an old tempicon app having .svg extensions,
if that's a concern or consideration. Maybe they can be converted if
necessary.

Art

Code:

mkfifo /tmp/PIPE
exec 4<> /tmp/PIPE

yad --notification --listen <& 4 &
echo "icon:/path/105c.svg" >/tmp/PIPE

svg may need size limit.

EDIT: to clarify, only the 'echo "icon:/*.svg" >/tmp/PIPE' statement needs to be in your loop, which means the icon name needs to be represented with a variable.
Code:
echo "icon:${PATH}${temp}.svg" >/tmp/PIPE

you can do notificaion text in he same way and a menu.
Code:
echo "tooltip:temperature is ${temp}" >/tmp/PIPE
echo "menu:Refresh Temp!bash -c command!/path/to/icon.svg|" >/tmp/PIPE
Back to top
View user's profile Send private message MSN Messenger 
rufwoof


Joined: 24 Feb 2014
Posts: 3155

PostPosted: Wed 12 Jun 2019, 12:41    Post subject:  

Rather than storing pre-created svg temperature value files, if you have image magick installed then you could create images dynamically
Code:
# Requires imagemagick

temp=113  # temperature value hard coded here

convert \
    -size 32x32 \
    xc:lightblue \
    -font DejaVu-Sans \
    -pointsize 18 \
    -fill black \
    -gravity center \
    -draw "text 0,0 '${temp}'" \
    image.png

That creates a .png, so you'd have to amend the code that stemsee posted to
Code:
echo "icon:/path/image.png" >/tmp/PIPE

_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
artsown

Joined: 12 Sep 2012
Posts: 335

PostPosted: Sat 15 Jun 2019, 19:21    Post subject:  

@stemsee & rufwoof
Thanks for your inputs. Meanwhile, SFR provided me with a working
model of the yad method of placing icons on a tray. I've put up my
latest version 1.4 of traytemp in the utilities section.

Art
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 42 of 42 [626 Posts]   Goto page: Previous 1, 2, 3, ..., 40, 41, 42
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.1711s ][ Queries: 13 (0.1108s) ][ GZIP on ]