Fluxbox Keybinding

The system tray is a specialized area of the Taskbar/Kicker, where users can access continuously running programs. JShot contains an utility named JShotTray, which uses this area to provide instant access to the capture functions.

There are window managers e.g. on Linux, that do not fully support the access of the system tray from Java. With the latest version of Java, the system tray works fairly well in Fluxbox, but I'll give you an example, how can you use JShot without system tray support.

As I mentioned, the main task of JShotTray is to provide quick access to capture and upload commands. Fluxbox has powerful key binding functionality, you can easly define keyboard shortcuts. We can use this to bind a hotkey for a specified capture or upload command.

Let's bind the "CTRL+ALT+U" combination to an upload command.

The keys file is usually in ~/.fluxbox/keys. The syntax for a keybinding is the follows:

  <mod> [<mod> <mod>] key [key key] :command <command_options>

Where <mod> is the modifer of a keycode. Common modifiers are:

  Mod1    == Alt
  Mod4    == Windows key
  Control == Ctrl
  Shift   == Shift

[for more information see: http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts]

Append this line to your keys file:

Control Mod1 u :Exec /home/<user>/JShot/jshot.sh -capture region -delay 0 -gui discreet

The default installation path is used in this example. Of course, you must use your own path, if it differs than this.

The key thing in this is the given parameter list. In the example, we are using rectangle region capture type. The -gui discreet flag ensures that the picture will be uploaded automatically, and only a small progressbar will be visible during the upload. The -delay parameter means how long should JShot wait before the capture.

If you want more informations about the possible command line arguments, check JShot documentation. [coming soon]

On some platforms the default capture panel, which is used by the rectangle region capture, is slower than the other panel. In this case you can switch to the native capture panel by opening JShot/Configuration wizard, and check the Native capture panel property.