суббота, 7 марта 2009 г.

How to make screenshots silently.

  1. Install imagemagick package: sudo aptitude install imagemagick
  2. Save this script somewhere:
    #!/bin/sh

    file=~/Desktop/Screenshot.png
    if [ -f "$file" ]; then
    i=1
    file=~/Desktop/Screenshot-${i}.png
    while [ -f "$file" ]; do
    i=$(($i+1))
    file=~/Desktop/Screenshot-${i}.png
    done
    fi

    import -window root -display :0 +repage "$file"
  3. Now make this script executable: chmod +x
  4. Use Super+Print to launch this script - launch gconf-editor, go /apps/metacity. In global_keybindings choose free run_command_X (should be disabled), and set it to <Super>Print. Then go to keybinding_commands and set command_X (X should be the same as X in global_keybindings) to full path to the saved script