You are not logged in.
Aw, hell no. The icons killed my accelerators. Is there a fix?
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Aw, hell no. The icons killed my accelerators. Is there a fix?
Never mind, found it. I'll post it after I finish and check everything.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Showing the Alt key pressed and mouse-hover...
-v|--vertical-simple) yad --form --columns 1 --width=130 --title "Exit" --borders=7 --class=WmanExit --window-icon=gnome-logout \
--no-buttons --undecorated --center --on-top \
--field=" _Logout!gnome-logout!":fbtn 'bash -c "logoutctl terminate-session"' \
--field=" _Suspend!gnome-session-suspend!":fbtn 'bash -c "logoutctl suspend"' \
--field=" Re_boot!system-reboot!":fbtn 'bash -c "logoutctl reboot"' \
--field=" _Power Off!gnome-shutdown!":fbtn 'bash -c "logoutctl poweroff"' \
| grep -v "|" &
exit 0
;;
I'd love to see what it looks like with the form contents aligned left, but I am utterly failing. Help!
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
I'm starting to think that the form buttons can only be center justified text. I searched for a while and every example of a yad form was like that.
You must unlearn what you have learned.
-- yoda
Online
Damn. Close enough to what I envisioned, though, I can certainly live with this. It has everything you need, and it's fast, simple, pretty damn easy to customize and pretty!
@Bearded_Blunder, thanks again! This is a great contribution, and an unexpected one at that.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
I'm guessing the "solution" would be to not use a form and script individual buttons instead?
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Now we're cookin'! Reproducing the current bl-exit, with tooltips instead of text labels ....
IMG_PATH="/usr/share/images/bunsen/exit/light"
BTN_CANCEL="$IMG_PATH/cancel.png"
BTN_LOGOUT="$IMG_PATH/logout.png"
BTN_SLEEP="$IMG_PATH/sleep.png"
BTN_RESTART="$IMG_PATH/reboot.png"
BTN_SHUTDOWN="$IMG_PATH/poweroff.png"
BTN_HIBERNATE="$IMG_PATH/hibernate.png"
-m|--simple) yad --form --title "Exit" --columns 6 --borders=20 --class=WmanExit --window-icon=gnome-logout \
--no-buttons --undecorated --center --on-top \
--field="!$BTN_CANCEL!Cancel":fbtn 'bash -c "logoutctl cancel"' \
--field="!$BTN_LOGOUT!Log out":fbtn 'bash -c "logoutctl terminate-session"' \
--field="!$BTN_SLEEP!Suspend":fbtn 'bash -c "logoutctl suspend"' \
--field="!$BTN_HIBERNATE!Hibernate":fbtn 'bash -c "logoutctl hibernate"' \
--field="!$BTN_RESTART!Reboot":fbtn 'bash -c "logoutctl reboot"' \
--field="!$BTN_SHUTDOWN!Shutdown":fbtn 'bash -c "logoutctl poweroff"' \
| grep -v "|" &
exit 0
;;
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
I'm guessing the "solution" would be to not use a form and script individual buttons instead?
Yes, but that may be restricted to horizontal. Although, I suspect you can script xy offsets.
You must unlearn what you have learned.
-- yoda
Online
Now we're cookin'! Reproducing the current bl-exit, with tooltips instead of text labels
....
https://cdn.scrot.moe/images/2019/03/01/exit.th.jpg
IMG_PATH="/usr/share/images/bunsen/exit/light" BTN_CANCEL="$IMG_PATH/cancel.png" BTN_LOGOUT="$IMG_PATH/logout.png" BTN_SLEEP="$IMG_PATH/sleep.png" BTN_RESTART="$IMG_PATH/reboot.png" BTN_SHUTDOWN="$IMG_PATH/poweroff.png" BTN_HIBERNATE="$IMG_PATH/hibernate.png" -m|--simple) yad --form --title "Exit" --columns 6 --borders=20 --class=WmanExit --window-icon=gnome-logout \ --no-buttons --undecorated --center --on-top \ --field="!$BTN_CANCEL!Cancel":fbtn 'bash -c "logoutctl cancel"' \ --field="!$BTN_LOGOUT!Log out":fbtn 'bash -c "logoutctl terminate-session"' \ --field="!$BTN_SLEEP!Suspend":fbtn 'bash -c "logoutctl suspend"' \ --field="!$BTN_HIBERNATE!Hibernate":fbtn 'bash -c "logoutctl hibernate"' \ --field="!$BTN_RESTART!Reboot":fbtn 'bash -c "logoutctl reboot"' \ --field="!$BTN_SHUTDOWN!Shutdown":fbtn 'bash -c "logoutctl poweroff"' \ | grep -v "|" & exit 0 ;;
Well played.
You must unlearn what you have learned.
-- yoda
Online
You left out keyboard accelerators, or am I mistaken? But something like this is all that's needed, right? Not tested...
--field="!$BTN_LOGOUT!_Log out!":fbtn 'bash -c "logoutctl terminate-session"' \
Last edited by hhh (2019-03-01 23:05:57)
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
You left out keyboard accelerators, or am I mistaken? But something like this is all that's needed, right? Not tested...
--field="!$BTN_LOGOUT!_Log out!":fbtn 'bash -c "logoutctl terminate-session"' \
Nah, you need text for accelerators. It's easy enough to tab or arrow to the icon you want though.
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
Now we're cookin'!
Indeed we are, this thread has been productive! My lithium install is a dual session with my earlier KDE buster one. I've barely booted into Plasma in the last month and haven't missed it once, lithium is that good.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
hhh wrote:You left out keyboard accelerators, or am I mistaken? But something like this is all that's needed, right? Not tested...
--field="!$BTN_LOGOUT!_Log out!":fbtn 'bash -c "logoutctl terminate-session"' \
Nah, you need text for accelerators. It's easy enough to tab or arrow to the icon you want though.
Roger that, a trade-off for eye-candy.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
^ By now, for shutdown my muscle-memory goes "Super-x, right, right, right, enter"
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
-edit- Changed the Reboot accelerator to Alt-b, r has a conflict on my system.
I should have put it there to start with, it ties it to the same key I'm used to with a command line launch to reboot bl-exit -b
Damn. Close enough to what I envisioned, though, I can certainly live with this. It has everything you need, and it's fast, simple, pretty damn easy to customize and pretty!
@Bearded_Blunder, thanks again! This is a great contribution, and an unexpected one at that.
I do occasionally do other stuff besides complain
Now we're cookin'! Reproducing the current bl-exit, with tooltips instead of text labels ....
I like it, puts a bl "trademark" back I'm afraid that I've little clue with yad.
Starting to feel much more sanguine about the change, pleased you guys seem to like my little contribution.
Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me
Offline
Showing the Alt key pressed and mouse-hover...
https://cdn.scrot.moe/images/2019/03/01/Screenshot_2019-03-01_16-13-47.md.png
-v|--vertical-simple) yad --form --columns 1 --width=130 --title "Exit" --borders=7 --class=WmanExit --window-icon=gnome-logout \ --no-buttons --undecorated --center --on-top \ --field=" _Logout!gnome-logout!":fbtn 'bash -c "logoutctl terminate-session"' \ --field=" _Suspend!gnome-session-suspend!":fbtn 'bash -c "logoutctl suspend"' \ --field=" Re_boot!system-reboot!":fbtn 'bash -c "logoutctl reboot"' \ --field=" _Power Off!gnome-shutdown!":fbtn 'bash -c "logoutctl poweroff"' \ | grep -v "|" & exit 0 ;;
I'd love to see what it looks like with the form contents aligned left, but I am utterly failing. Help!
*I can't test this* (owing to not having a numberpad & the 255 has to be done on the numpad) but *try* making all the text fields match in length using alt+255 "non-breaking" spaces, they'll be handled differently from regular spaces. I think it's alt+255 been a while since I had a numberpad & used those odd characters that way...
If that works but isn't perfect, you might need to tell yad some monospaced font so all characters occupy the same width.
Update, it's a yukky font but you wanted to see what left justified looks like:
yad --form --columns 1 --width=130 --title "Exit" --borders=7 --class=WmanExit --window-icon=gnome-logout \
16 --no-buttons --undecorated --center --on-top \
17 --field="<span font='Liberation Mono'>Log Out </span>!gnome-logout!_Logout":fbtn 'bash -c "logoutctl terminate-session"' \
18 --field="<span font='Liberation Mono'>Suspend </span>!gnome-session-suspend!_Suspend":fbtn 'bash -c "logoutctl suspend"' \
19 --field="<span font='Liberation Mono'>Reboot </span>!system-reboot!Re_boot":fbtn 'bash -c "logoutctl reboot"' \
20 --field="<span font='Liberation Mono'>Shut Down</span>!gnome-shutdown!_Power Off":fbtn 'bash -c "logoutctl poweroff"' \
21 | grep -v "|" &
22 exit 0
That's using plain ordinary spaces. Works even better if you start from the block with the accelerators in the right field 8)
Last edited by Bearded_Blunder (2019-03-02 11:52:56)
Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me
Offline
Starting to feel much more sanguine about the change, pleased you guys seem to like my little contribution.
Uh, like? It's our bl-exit replacement, buddy, with full credit to you! The only reason I haven't marked this thread [SOLVED] is that we're still cookin' with fire.
Sorry to be nostalgic, but this thread is the best of what #! forums were and BL forums are.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
We'll have to name it something other than bl-exit, since that package already exists. Suggestions? BB-exit? blunder-exit? @Bearded, it's your script, you get to name it.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Whatever you like, yeah I see bunsen-exit exists as a package & it can't clash, I'd been thinking of it as bunsen-exityad becomes clear from the name what the interface is.
Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me
Offline
I'm in the process of making the script more modular, with drop-in vars for the dialogs. That should make it easier to have a variety of options and styles just from script parameters, without hard-coding every possible dialog. (I may need an associative array specialist like @johnraff for that though 8o )
blexit?
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