Page 1 of 1
Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 1:32 am
by geo_c
I got tired of not remembering the Xfce hotkeys, so I made a splash script. Assign it to a hotkey itself and never forget the keystrokes
attached
or copy the code:
Code: Select all
#!/bin/bash
# variable SPROG for the program
SPROG="gtkdialog-splash"
$SPROG -text " Xfce Custom HOT KEYS
_____________________WINDOWS_____________________
Alt+Space = Window operations menu
Esc = Dismiss/cancel dialog
Alt+Tab = Switch to next window
Shift+Alt+Tab = Switch to previous window
Super+Tab = Next window of current app
Alt+F4 = Close window
Alt+F7 = Move window
Alt+F8 = Resize window
Alt+F9 = Hide window
Alt+F10 = Maximize window
Alt+Shift+PgDn = Raise/lower window
Alt+F11 = Toggle fullscreen
Alt+F12 = Toggle above
Ctrl+Alt+D = Show desktop
______________MOVE WINDOW TO WORKSPACE___________
Alt+F6 = Stick window
Alt+F5 = Maximize horizontally
Ctrl+Alt+End = Move to next workspace
Ctrl+Alt+Home = Move to previous workspace
Ctrl+Alt+Num1-9 = Move to workspace 1-9
_________________FOCUS WORKSPACE_________________
Ctrl+F1-F9 = Switch to workspace 1-9
Ctrl+Alt+Left/Right = Next/Previous workspace
Ctrl+Alt+Up = Upper workspace
Ctrl+Alt+Down = Bottom workspace
Ctrl+Alt+Left = Left workspace
Ctrl+Alt+Right = Right workspace
Alt+Insert = Add a workspace
Alt+Del = Delete last workspace
Ctrl+Alt+Del = Logout Menu
_______________APPLICATION SHORTCUTS_____________
Super+Alt+F = File manager
Super+M = Mail reader
Ctrl+Alt+T = Terminal emulator
Super+R = App Finder
Alt+F1 = applications menu
Ctrl+Esc = desktop applications menu
Print Screen = xfce4-screenshooter -f
Alt+Print Screen = xfce4-screenshooter -w
Ctrl+Alt+L = xflock4
Ctrl+Alt+Del = xflock4
Alt+F2 = xfrun4
Ctrl+Alt+Esc = xkill
Super+P = display settings
______________click splash to close______________
" -placement center -close click -align left -bg_gradient_sens soft -font 'DejaVu Sans Mono' -fontsize 14 -fontstyle normal -fontweight normal -fg '#19EDBB' -bg '#001E28' -margin_width -150 -margin_height -150 -timeout 0 -bg_gradient false -border true -wrap true -ontop true
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 3:43 am
by MochiMoppel
geo_c wrote: Sun Mar 03, 2024 1:32 am
Code: Select all
SPROG="gtkdialog-splash"
<snip>
" -placement center -close click -align left -bg_gradient_sens soft -font 'DejaVu Sans Mono' -fontsize 14 -fontstyle normal -fontweight normal -fg '#19EDBB' -bg '#001E28' -margin_width -150 -margin_height -150 -timeout 0 -bg_gradient false -border true -wrap true -ontop true
@geo_c Doesn't work as I would expect.
-close click
should do what? gtkdialog-splash knows no "click" option. Therefore your code defaults to "mouseover", which means that you will never see the splash if your mouse happens to be near the center of the screen
You stipulated 'DejaVu Sans Mono' as the desired font, which makes a lot of sense, However your splash text is not monospaced as it should.
Your text is rendered in "DejaVu Sans" - without "Mono". This is because the script box_splash (aka gtkdialog-splash aka yaf-splash) is buggy.
In line 269 it removes the Mono: FONTFAM="${font% *}"
You can verify the wrong result in the CSS file the script creates. In /tmp/gtkdialog-splash.css you would see
window {
/background-image: url("/tmp/gtkdialog_splash_border.svg");/
background-color: #001E28;
color: #19EDBB;
font-size: 14pt;
font-family: "DejaVu Sans";
I posted about this buggy script in the past and I'm too tired to do this again. I can only strongly suggest that you look for alternatives. IMO gxmessage would be a much better choice for you.
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 4:13 am
by geo_c
MochiMoppel wrote: Sun Mar 03, 2024 3:43 am
geo_c wrote: Sun Mar 03, 2024 1:32 am
Code: Select all
SPROG="gtkdialog-splash"
<snip>
" -placement center -close click -align left -bg_gradient_sens soft -font 'DejaVu Sans Mono' -fontsize 14 -fontstyle normal -fontweight normal -fg '#19EDBB' -bg '#001E28' -margin_width -150 -margin_height -150 -timeout 0 -bg_gradient false -border true -wrap true -ontop true
@geo_c Doesn't work as I would expect.
-close click
should do what? gtkdialog-splash knows no "click" option. Therefore your code defaults to "mouseover", which means that you will never see the splash if your mouse happens to be near the center of the screen
You stipulated 'DejaVu Sans Mono' as the desired font, which makes a lot of sense, However your splash text is not monospaced as it should.
Your text is rendered in "DejaVu Sans" - without "Mono". This is because the script box_splash (aka gtkdialog-splash aka yaf-splash) is buggy.
In line 269 it removes the Mono: FONTFAM="${font% *}"
You can verify the wrong result in the CSS file the script creates. In /tmp/gtkdialog-splash.css you would see
window {
/background-image: url("/tmp/gtkdialog_splash_border.svg");/
background-color: #001E28;
color: #19EDBB;
font-size: 14pt;
font-family: "DejaVu Sans";
I posted about this buggy script in the past and I'm too tired to do this again. I can only strongly suggest that you look for alternatives. IMO gxmessage would be a much better choice for you.
I'm sure you're right about it, but I don't seem to have either the font issue or the click option issue, so I am inclined to wonder whetther it has something to do with which gtk-splash version is running. In the KLVs and also F96 these splashes work as expected.
I could certainly use gxmessage, as I also usually duplicate these splashes using gtkdialog, which I tend to like better anyway.
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 5:28 am
by MochiMoppel
geo_c wrote: Sun Mar 03, 2024 4:13 amI don't seem to have either the font issue or the click option issue, so I am inclined to wonder whetther it has something to do with which gtk-splash version is running.
No, it has something to do with GTK3.
I'm in FP96 now and at least the font is correct. FP96 uses the GTK2 version of gtkdialog (the binary used by box-splash) while BW64 uses GTK3.
box-splash creates different style sheets, depending on the GTK version. For GTK3 it fails, GTK2 is correct.
Regarding click: Can't confirm any difference. It is not possible to move the mouse over the window and then close the window by clicking on it.
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 8:42 am
by fredx181
The gtkdialog-splash script in KLV is very different from what's in other puppies, it's based on the experiments I started here: GTK3: gtkdialog-splash
(edit: to be exact, it's gtk3-splash (renamed) from gtk3splash-mod , see: viewtopic.php?p=69032#p69032)
MochiMoppel wrote:Regarding click: Can't confirm any difference. It is not possible to move the mouse over the window and then close the window by clicking on it.
Credit to @Sofiya for bringing in the mouse -close click
option, see: viewtopic.php?p=68662#p68662
(and just tried the script from first post by geo_c, it works ok in KLV-Airedale) (edit: for my own usage I made it -fontsize 12
to get a little smaller window).
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 12:12 pm
by MochiMoppel
fredx181 wrote: Sun Mar 03, 2024 8:42 amCredit to @Sofiya for bringing in the mouse -close click
option, see: viewtopic.php?p=68662#p68662
(and just tried the script from first post by geo_c, it works ok in KLV-Airedale)
What are we talking about? I tried
fredx181 wrote: Wed Sep 21, 2022 3:14 pm
gtkdialog-splash for GTK3:
Update 2022-10-07, modified version by adding some more options, see viewtopic.php?p=69032#p69032
EDIT 2022-09-22 re-attached gtk3splash.tar.gz, some fixes, see: viewtopic.php?p=67452#p67452
EDIT 2023-02-05 re-attached gtk3splash.tar.gz, example script warn_msg had the wrong permissions, fixed.
gtk3splash.tar.gz
Is that the latest? There is no -close click
option nor does the window close when clicked. There is no reference in the help text either:
Code: Select all
-placement center|mouse|top|bottom|top-right|top-left|bottom-right|bottom-left (default: center)
-close never|mouseover|box (default is mouseover)
-deco TITLE (shows windows decorations, with title)
The link to @Sofiya's post refers to the elimination of a code line that made no sense anyway. I'm confused. If there is a version with a -close click
option, please post it.
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 12:29 pm
by fredx181
@MochiMoppel Sorry for the confusion, it's the "gtk3splash-mod" that has the -close click option (but kept the close button option too if I remember well) : viewtopic.php?p=69032#p69032
(but note that the script inside the tar.gz is named gtk3-splash rather than gtkdialog-splash)
edit: what I did now to test again is copy gtk3-splash to /usr/local/bin/ and changed in geo_c's script to SPROG="gtk3-splash" and close by clicking works.
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 4:43 pm
by rockedge
@fredx181 @geo_c @Sofiya ,
Do I need to make any changes to the KLV's that include these scripts? Updates?
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 4:58 pm
by fredx181
rockedge wrote: Sun Mar 03, 2024 4:43 pm
@fredx181 @geo_c @Sofiya ,
Do I need to make any changes to the KLV's that include these scripts? Updates?
No, it's fine, as far as I know (the gtkdialog-splash script (and mksplash) included in KLV has these latest options, e.g. -close click and others).
Re: Xfce stock hotkeys splash cheat for Airedales etc.
Posted: Sun Mar 03, 2024 6:37 pm
by geo_c
I seem to have forgotten to change the title of that splash. Instead of Xfce Custom Hot Keys
It should read Xfce Hot Keys
.