On 2014-03-31, marst <[email protected]> wrote: > On Sun, Mar 30, 2014 at 07:52:52PM -0400, marst wrote: >>I set up a shortcut in my cwm config that goes like this: >>bind 4-p "/home/marst/bin/screenshot.sh" >> >>screenshot.sh goes like this: >> >>#!/bin/sh >>scrot -s '%Y-%m-%d_$wx$h.png' # -e 'mv $f ~/documents/shots' -e 'feh $f' >> >>Ran by itself, the command goes fine, I can select an area of the screen, a >>shot is taken and appears in feh. >> >>But when I hit the shortcut key from cwm, nothing seem to happen. >>Can such a command be executed in cwm? What am I doing wrong? >> >>Mario >> > > Well, some development. The "script" which I modified as such: > > $>cat bin/importscreen.sh > #!/bin/sh > scrot -s '%Y-%m-%d_$wx$h.png' -e 'mv $f ~/documents/shots/$f' > feh ~/documents/shots/$f #feh wants to be on it's own line. > > works fine on it's own when used from the shell prompt. > > In my .cwmrc conf I have this: > command shot "/home/marst/bin/importscreen.sh" > bind 4-p "/home/marst/bin/importscreen.sh" > > The first line (command) works fine, I can select "shot" from the cwm menu, > the shot > is taken, moved and feh shows the picture taken. > But the second line (bind) is not responding. Trying a shorter command with > scrot only will not work neither. It will not let me select a rectangle > area. It would only work if I remove the -s switch. > cwm has been restarted, no error found in .xsession-errors. > > I guess I can live with that. But I wish I could bind a key somehow. > > Mario > >
I *do* get an error in .cwmrc if I bind a key to 'scrot -s /tmp/test.png' :- $ tail -1 .xsession-errors giblib error: couldn't grab keyboard:Resource temporarily unavailable

