You are not logged in.
^ your request is ok, but it's hard to say more if you don't actually ask the question.
Offline
Thank you ohnonot. I appreciate that.
What I'm trying to do is...create a full-screen application launcher that will close AFTER a user clicks on an application. Here is the basic command that I'm working with...
yad --icons --read-dir=/usr/share/applications --fullscreen --sort-by-name --undecorated --single-click --skip-taskbar
If I can figure this out, I will also add...
--no-buttons
...to the command.
I know that you can close yad after clicking on a button, but I can't find a way to close it after clicking on one of the icons in the window.
Last edited by miyo (2018-12-21 06:34:20)
Offline
What I'm trying to do is...create a full-screen application launcher that will close AFTER a user clicks on an application.
try xlunch. it's like gnome shell launcher for poor people (well, poor machines).
Offline
miyo wrote:What I'm trying to do is...create a full-screen application launcher that will close AFTER a user clicks on an application.
try xlunch. it's like gnome shell launcher for poor people (well, poor machines).
I've tried it, and it works well.
I'm just trying to keep extra packages out if I can...so that there are no packages (or as few packages as possible) not included in the system's repositories.
If I can't figure this out, I may use xlunch.
Thank you. I appreciate your time.
Last edited by miyo (2018-12-21 06:55:20)
Offline
miyo get the process id of the yad window and use the strace to watch for SIGCHLD signal.
When yad emits the SIGCHLD signal, send SIGURS1 signal to yad.#!/bin/bash yad --icons --read-dir=/usr/share/applications --fullscreen --sort-by-name --undecorated --single-click --skip-taskbar --no-buttons & ICONS_PID=$! strace -p $ICONS_PID -e trace=signal -s 32 2>&1 \ | while read -r line; do if [[ $line =~ "--- SIGCHLD" ]];then kill -s SIGUSR1 $ICONS_PID break fi done
Signal SIGUSR1 closes the ad dialog with 0 exit status.
If you use --close-on-unfocus, yad dialog will close on alt+tab
misko_2083,
Thank you! Exactly what I was looking for! Thank you so very much for taking the time to help me.
I would be honored if you will allow me to acknowledge you for this in the future.
Offline
That is some hack. I admire the ingenuity.
Offline
miyo wrote:I would be honored if you will allow me to acknowledge you for this in the future.
It's fine by me.
Thank you.
Offline
DEPCOUNT+=1
do you want this to be an arithmetic operation? because it's not.
it will change 0 to 01, then 011 etc.
an arithmetic operation would look like this:
((DEPCOUNT+=1))
i'm guessing there are more errors, it's just the first i saw.
your doublequote fu is definitely poor.
Offline
This is a handy tool: shellcheck
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
^Quite, nice tool. Thanks damo for pointing it out!
Postpone all your duties; if you die, you won't have to do them ..
Offline
Nice tool indeed Damo. Built with Haskell too.
Offline
Certain arithmetic operations are permitted for declared integer variables without the need for expr or let.
nice, i didn't know that.
The quotes where they need to be. Although shellcheck complains about semantics it can't check the logic. e.g. Process IDs are always integer numbers.
'm gonna take your word for it; personally I wouldn't sufficiently trust my own code to make such a bold statement.
btw, since your indices are simple integers (0-7) there is no need to declare an associative array.
a simple
APP_DESC=(
"Music player"
"Game"
"Color selector"
"Puzzle game"
"Youtube"
"Game"
"Music player"
"For screenshots"
)
will do the same in this case.
sorry I can't help with the actual script.
Offline
sorry I can't help with the actual script.
Me neither I'm afraid, but you could make your yad version checking a bit simpler and more robust by using 'dpkg --compare-versions'
--compare-versions ver1 op ver2
Compare version numbers, where op is a binary operator. dpkg
returns true (0) if the specified condition is satisfied, and
false (1) otherwise. There are two groups of operators, which
differ in how they treat an empty ver1 or ver2. These treat an
empty version as earlier than any version: lt le eq ne ge gt.
These treat an empty version as later than any version: lt-nl
le-nl ge-nl gt-nl. These are provided only for compatibility with
control file syntax: < << <= = >= >> >. The < and > operators are
obsolete and should not be used, due to confusing semantics. To
illustrate: 0.1 < 0.1 evaluates to true.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
No frills conky chooser, pretty basic but its working for me. I would like to add a killall conky there somewhere but not sure how? Suppose i could just point it to a kill script?
#!/bin/bash
yad --title="--dclick-action=CMD" --width=300 --height=200 --separator=" " --list --dclick-action="conky -c" --column=Name /home/s7/.config/conky/bar.conky.conf /home/s7/.config/conky/nl.conky.conf
Found it here: http://smokey01.com/yad/
Offline
^ Add a button with the appropriate label and index. Then test for the return value of the dialog: if it matches the index, run the kill command.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
^ yes thats it, thanks damo.
--button=gtk-cancel:1 \
--button="Killall Conky":kill-conky \
Offline
Yad conky chooser v0.2. Bit better looking than the list option. Bunsenlabs conky manager is a work of art, much better control. I wonder is there ability for yad to do what bl conky manager can do?
#!/bin/bash
yad --title="Conky Chooser" --form --center --on-top --width=300 --height=200 --window-icon=utilities-system-monitor --width=250 \
--field="NL-Conky":fbtn 'conky -c "/home/s7/.config/conky/nl.conky.conf"' \
--field="BL-Top Conky":fbtn 'conky -c"/home/s7/.config/conky/BL conkys/BL-Top.conkyrc"' \
--field="Bar-Conky":fbtn 'conky -c "/home/s7/.config/conky/bar.conky.conf"' \
--button="Killall Conky":kill-conky \
--button="Restart Conky":conkyrestart \
--button=gtk-cancel:1
Offline
... I wonder is there ability for yad to do what bl conky manager can do?
Well, the BL conky manager uses yad as the graphical interface for the script. Yad needs something behind the scenes to operate anything constructively!
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Using a bit different config...
yad --width 200 --height 400 --title "CONKY" --form --center --on-top --width=300 --height=200 --window-icon=utilities-system-monitor --width=250 \
--form \
--field="Conky Bar:BTN" 'conky -c "/home/s7/.config/conky/bar.conky.conf"' \
--field="Conky NL:BTN" 'conky -c "/home/s7/.config/conky/nl.conky.conf"' \
--field="Conky BL-Top:BTN" 'conky -c "/home/s7/.config/conky/BL-Top.conf"' \
--field="Restart Conky":fbtn "conkyrestart" \
--field="Kill Conky":fbtn "kill-conky" \
I would like to space those cancel and ok buttons better.
^just use this...
--button=gtk-close:1
Last edited by S7.L (2019-01-13 15:33:48)
Offline
^ Thats very cool misko thankyou, is that something like electron? I wouldnt have a clue how to do that sort of thing, ive dabbled a bit in html and css but not ever puting it together with say a bash script.
Offline