In Fvwm WM (V2 or 3)I'm using ImageMagick to get screenshot ,but this import command can be only used on terminal .So I want to map the import command to my prtsc-key.
Key Print A A Exec exec [your script]
[…] (keysym 0xff61, Print) […]
Print
and kill the program with Control‑C. Secondly, configure xbindkeys(1). For example, my ~/.xbindkeysrc contains:"ratpoison -c 'exec mlterm -e orpie'"
XF86Calculator
xbindkeys # starts by default as a daemon (i. e. in background)
ratpoison # this is a decoration‑less window manager you can control via keyboard only
unclutter # this program hides the mouse pointer if it hasn’t moved for some time
I use x11/xbindkeys for that.I'm using ImageMagick to get screenshot ,but this import command can be only used on terminal .So I want to map the import command to my prtsc-key.
% cat ~/.xbindkeysrc | grep -C 2 Print
"~/scripts/shot.sh"
Print
"~/scripts/shot-delay.sh"
Shift + Print
<keybind key="W-Print">
<action name="Execute">
<command>maimss</command>
</action>
</keybind>
<Key mask="mod4" key="Print">exec:maimss</Key>
key "Super+Print" maimss
hc keybind Mod4-Print spawn maimss
I use Openbox - and Openbox allows to configure 'some' shortcuts for executing anything - but its very limited.Many window managers and desktop environments allow you to configure your own keyboard shortcuts. What x11/xbindkeys is offering is build-in in most of those WM's and DE's.
Keys DefaultKeyBindings
{
...
<Key>Sys_Req root|window|icon f.exec "/usr/local/bin/xterm -ls"
...
}
Keys DtKeyBindings
{
...
<Key>Sys_Req root|window|icon f.exec "/usr/local/bin/xterm -ls"
...
}
Works for me, just tested.its not possible to assign something to JUST [Print Screen] button. There ALWAYS needs to be a modifier in front of it - so [Shift]+[Print Screen] will work or [CTRL]+[Print Screen] will work - but not [Print Screen] alone.
<keybind key="Print">
<action name="Execute">
<command>maimd</command>
</action>
</keybind>
That sound right. I couldn't convince openbox to accept to execute a command substitution in a command string, I had to put it in a script.Openbox allows to configure 'some' shortcuts for executing anything - but its very limited.
<command>maim ~/Pictures/Screenshots/Screenshot-`date +%F+%T`.png</command>
resulted always in Screenshot-`date. What I expected was Screenshot-2024-04-13-09:50:54.pngFor traditional X environments like mwm, CDE, fvwm, and others, one could map the key to execute a shell script that would invoke xwd to capture the screen, writing the output to an arbitrary file of the person's choosing. Then use xwud to either display the output or use some tool to convert it to jpeg, which in turn can be attached to an email.Related but maybe derailing:
Windowmaker recently added hooks for the PrintScreen key to capture the screen; this binding was done at the windowmanager level. For some reason on my system and a few others it wound up capturing the Up Arrow key, which made everything difficult
So should binding keys to actions beyond simple window actions (open close raise lower maximize minimize) be done by the windowmanager or should a utility be used to bind keys?
My opinion, I think windowmanagers/DEs should do as little as possible. Having a widget to make it easy for a user to do the binding is a good thing.
And emails were "just text" and everything else was an attachment?Anyone remember when emails (email files) were kilobytes in size?