#how to bind scrot to a keyboard shortcut in i3?

30 messages · Page 1 of 1 (latest)

spare isle
#

to be clear I know how to bind commands but this one is new for me
basically when I try to use
bindsym $mod+m scrot --select
it doesnt work
bindsym $mod+m exec kitty scrot --select
this does work but opens up the terminal

I want it to work without opening up the terminal how can I do that?

spare isle
#

dead chat

solid wagon
#

Why do you need to run it in kitty?

spare isle
#

thats what i want to know

#

I was trying to run it and it only worked if I ran it through a terminal

solid wagon
#

exec is an i3 keyword, whatever follows it is run as a shell command. The reason the first fails is because scrot isn't an i3 command, so it doesn't know what to do with it

spare isle
#

so whats the solution

copper osprey
#

remove kitty before the scrot

solid wagon
#

use exec as the i3 command, and follow it with the command you want to run

spare isle
copper osprey
#

exec scrot

spare isle
#

it doesnt work

solid wagon
#

Basically, the bindsym takes two args, a key combo and an i3 command to run. scrot is not an i3 command, but exec scrot is.

spare isle
#

trust me I tried it doesnt work

#

I have it as bindsym $mod+m exec scort without the --select even and still doesnt work

copper osprey
#

scort btw

#

its s c r o t

spare isle
#

is there a way to run the terminal in the background so that it doesnt show up

solid wagon
#

Could you open up a terminal normally, type scrot --select and tell us what happens?

spare isle
#

it works as intended

solid wagon
#

So just to be absolutely clear, you've tried setting your i3 config line to bindsym $mod+m exec scrot --select, saved the file, reloaded i3 ($mod+shift+r by default I think), and then tried the bind?

spare isle
#

yep

solid wagon
#

You reloaded the config after the change? Sometimes I forget to reload when tweaking.

spare isle
#

omg bro unbelievable

#

it does work

#

but the problem is that it doesnt show any graphic

#

so I thought it didnt work

#

my bad

#

now the problem is how do I make it show a graphic