Page 2 of 3
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 11:31 am
by Jerry3904
I have an alternative to propose:
Code: Select all
#!/bin/bash
#produce set of Action Buttons on screen
yad --form --center --width=250 --title="Exit Actions" --skip-taskbar \
--window-icon="/usr/share/icons/mxflux.png" \
--field="Refresh":fbtn "fluxbox-remote restart" \
--field="Logout":fbtn "fluxbox-remote 'Exit' | killall fluxbox" \
--field="Reboot":fbtn "sudo /sbin/reboot" \
--field="Shutdown":fbtn "sudo /sbin/halt" \
--field="Suspend":fbtn "sudo pm-suspend" \
--button=gtk-cancel:1 \
exit
Here is the result
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 11:45 am
by AA BB
very helpful responses, Thanks to all
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 12:24 pm
by PPC
Jerry3904 wrote: Thu Jun 25, 2020 11:31 am
I have an alternative to propose
This is more in line with the lack of icons that MXFB menu has. I do like icons, but not having icons in this exit menu follows more the rest of the design...
Suggestion: use --width=250 (the full title does not display in my resolution if I use --width=200).
Alternative suggestions: according to MXFB minimalist trend you could do away with the window decoration ( --undecorated) or keep the window decoration and remove the cancel button.
This will make the dock even more self sufficient, which is always handy: most of what a normal user may want to do with the computer is really just one click away, without any need for menus!
(Personal note- I use skippy-xd task switcher: with that I can perform any action, including switching tasks, from the dock! How minimalist is that?)
P.
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 12:30 pm
by Jerry3904
Will change the width, thanks; but the cancel button stays, for now.
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 12:35 pm
by anticapitalista
Are you going to localise it?
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 12:43 pm
by Jerry3904
I'm not totally sure, thanks for the question. With only 5 very common computer words...? In any case I will wait for things to settle a bit before making this hard and fast.
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 2:30 pm
by ceeslans
I like icons in the exit menu...
but sure, 'no-icons' is more in line with the MXFB menu layout
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 3:14 pm
by Jerry3904
That looks pretty nice for sure, thanks. Have any code to share...?
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 3:28 pm
by ceeslans
sorry, here is the yad script:
Code: Select all
#!/bin/bash
yad --form --columns 1 --width=175 --title "Exit..." --borders=8 --window-icon="gtk-quit" --center --on-top \
--field="<span font='Monospace'>Logout </span>!system-log-out!_Logout":fbtn "fluxbox-remote 'Exit' || killall fluxbox" \
--field="<span font='Monospace'>Suspend </span>!system-suspend!_Suspend":fbtn "sudo 'pm-suspend' " \
--field="<span font='Monospace'>Reboot </span>!system-reboot!_Reboot":fbtn "sudo reboot" \
--field="<span font='Monospace'>Shutdown </span>!system-shutdown!_Shutdown":fbtn "sudo poweroff" \
--button=gtk-cancel:1 \
exit 0
note the use of a mono font; this is needed to get the icons+text aligned correctly.
please edit the --width | --title | --window-icon etc, as you feel fit
for layout consistency, it would be better to capture the "Cancel" item also in a 'field' --> but I dont know how to do that :)
Re: extending an MX 19.2 XFCE Panel function to FluxBox
Posted: Thu Jun 25, 2020 3:51 pm
by Jerry3904
Thanks. I kind of like the boxed Cancel button down and to the right, indicating that it is not an exit choice.