Re: bash scripting fluxbox windows
Jj <[email protected]>
| Newsgroups | gmane.comp.window-managers.fluxbox.user |
|---|---|
| Message-ID | <[email protected]> |
On 5/12/05, Simon Bowden <[email protected]> wrote: > Hi Jj, > > If you've got ImageMagick (convert is part of it), then you can just skip > the whole xwd bit. Instead of > > xwd -out ~/.ventana.tmp && convert ~/.ventana.tmp $C > > just do: > > import $C > > import figures out the image format from the file extension. > In short, the following probably does what you want, neater: In that case I was using xwd to capture a particular window :) > Mod1 Print :ExecCommand (import $HOME/captura_$(date +%Y%m%d-%H%M%S).png && feh $_) > > ($_ = expanded last argument of last command) > Great tip! > You can use -window argument to get the window id to it. I'll try more on that when i get back at home I was just tinkering smoe more with it last night and I added these to my keys file #Captura toda la pantalla Print :ExecCommand import -window root ~/screenshot_`date +%Y-%m-%d.%H%M%S`.png #Captura la ventana activa Mod1 Print :ExecCommand (C=$HOME/captura_$(date +%Y%m%d-%H%M%S).png && xwd -id $(xprop -root _NET_ACTIVE_WINDOW | cut -d'#' -f2) $JFRAME -out ~/.ventana.tmp && convert ~/.ventana.tmp $C && feh $C) #Capura la ventana que se selccione con el puntero de xwd Shift Print :ExecCommand (C=$HOME/captura_$(date +%Y%m%d-%H%M%S).png && xwd $JFRAME | convert - $C && feh $C) #Captura la ventana activa despues de timeout ingresado por zenity Mod1 Shift Print :ExecCommand (C=$HOME/captura_$(date +%Y%m%d-%H%M%S).png && (sleep $(zenity --entry --text="Tiempo de espera para la captura:") 2>| /dev/null || echo "0") && xwd -id $(xprop -root _NET_ACTIVE_WINDOW | cut -d'#' -f2) $JFRAME | convert - $C && feh $C) I'll use the $_ now -- Jj ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_ids93&alloc_id281&op=click