buttons

184 views
Skip to first unread message

tony pfeil

unread,
Oct 24, 2023, 10:24:50 AM10/24/23
to yad-common
is there a way to make buttons show up and down rather than side by side like:

button1
button2
button3

Robert Cooper

unread,
Oct 24, 2023, 5:36:16 PM10/24/23
to yad-common
To my knowledge --button= is reserved to bottom of dialog but, you can put images in those buttons and keep the image size using --keep-icon-size. 

Here are some examples of vertical --field BTN (buttons)

<code> #!/bin/bash

KEY=$RANDOM

imageDir="/home/linux/Documents"

yad --plug="$KEY" --tabnum=1 --form --keep-icon-size  --field="!exit!test:BTN" "" \
--field="!/home/linux/Documents/clock.png!Eggs":BTN "bash -c update_apt" \
--field="!$imageDir/eggs.png!Scramble eggs":BTN "xdg-open 'http://yadlive.com'" \
--field="test:FBTN" ""  &

yad --plug="$KEY" --tabnum=2 --html --browser --uri="http://yadlive.com"  &

yad --paned --key="$KEY" --orient="horizontal" --keep-icon-size  --splitter=200 \
--tab="buttons" --tab="website" --center --width=800 --height=600</code>

paned-big-image-buttons.png

You can also use desktop icons too. This is a --paned panel with clickable icons on left. Desktop icons can do everything  just like buttons. 

Robert Cooper

unread,
Oct 24, 2023, 5:50:27 PM10/24/23
to yad-common
Here I am executing code within a desktop icon. It uses gnome-terminal tab to allow opening and closing automatically of program execution. Took me a forever to get this coded correctly as I am not a programmer. I do not understand the code. I wish I did but, I have tried. I have so much I want to accomplish before I pass on. I'm old not too many years to go.

Using desktop icons (images)  both vertical or horizontal panes. Inside tab windows (as many ttab windows as you want) both paned and notepad offer  top, right, bottom or left.  And can still use --button on bottom in all.

update.deskoop =

[Desktop Entry]
Version=1.0
GenericName=ProduceEggs
Type=Application
Comment=Setup Instructions for eggs cli Autocomplete
Exec=gnome-terminal --tab --title="sudo apt-get update" --command="bash -c 'echo "'sudo apt-get update'" \ & echo "'will update repository packages list'" & echo "" \ & echo "" \ & sudo apt-get update && read -p "'"Press enter to exit"'";  kill $PPID $SHELL'" && exit
Icon=application-exit-rtl-symbolic
Terminal=false
Name[en_US]=sudo apt-get update

tony pfeil

unread,
Oct 24, 2023, 8:50:03 PM10/24/23
to yad-common
thanks guess i just stay with useing --field
even that has given issues way round was to make bash scripts so things would work.
hey i'm no spring chicken lol 68 with a crappy heart and  still smoke lol.
i had gone to that chatgpt but everything it gave me did not work.
this what i created a menu for things  i repeatedly do

my-yad-menu.png

Victor Ananjevsky

unread,
Oct 26, 2023, 3:11:09 AM10/26/23
to yad-c...@googlegroups.com

Use yad --form --field=button1:fbtn ...

Example - https://github.com/v1cont/ydesk/blob/master/utils/ylogout.in

tony pfeil

unread,
Oct 26, 2023, 1:48:10 PM10/26/23
to yad-common
well i found a way to get what i wanted by useing tabs found a script and hacked it
to do what i wanted
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages