You are not logged in.
Hello there,
I am having troubles getting my simple screenshot script to run via key binding.
What does work: running the script directly in my terminal (urxvt) with the command
prntScrnWhat does not work: running the script via my key binding
$mod+PrintI am certain that the key binding would work, as I can run different scripts via this binding.
Here is what I have in my i3 config
bindsym $mod+Print exec --no-startup-id $HOME/.scripts/prntScrn Here is my screenshot script (prntScrn) that does not get executed that way
#!/bin/bash
magick import ~/Screenshots/$(date +%F_%H%M%S_%N).pngHere is my wallpaper script as an example of a script (setWallpaper), that does get executed that way
#!/bin/bash
feh --bg-fill ~/Wallpapers/Minimal/vapor.jpgLast edited by lonlon (2020-04-13 13:22:23)
Offline
Screenshot tools will try to grab the server and / or inpt devices which is going to fail because i3 has an active grab for the shortcut invocation. Yaddayaddayadda: prepend a brief "sleep 0.5" or so in your script to allow yourself to release the key before the grabber actually executes.
Offline
Perfect, and thank you for the brief explanation.
Offline