Skip to content
Fenner Macrae edited this page Sep 8, 2019 · 6 revisions

The Flashfocus Wiki

This wiki provides explanations of some of flashfocus' more niche features, see the README for basic usage.

Flashing the Current Window

Flashfocus contains two options for flashing the currently active window.

  • flash_window is implemented in python with no extra dependencies. Its fairly fast and should work fine for most people.

  • nc_flash_window is ~4X faster than flash_window, but requires the OpenBSD flavor of netcat to be installed (openbsd-netcat on Arch).

Defining Window-Specific Flash Rules in Config File

X-based Window Managers

Flash rules are defined by matching the WM_CLASS property of a window. To get the WM_CLASS property of a window use xprop WM_CLASS and click on a window. The property is a tuple of the form (window-id, window-class). The window-class is usually the name of the application, but not always.

Say I'd like to set all termite windows to 80% opacity but leave other windows at full opacity:

rules:
  - window-class: Termite
    default-opacity: 0.8

I also would prefer that firefox windows are not flashed on focus:

rules:
  - window-class: firefox
    flash-on-focus: False
  - window-class: Termite
    default-opacity: 0.8

For more complicated rules, you can use (python-style) regexes:

rules:
  - window-id: ^(?!termite)$
    default-opacity: 0.8

Sway

Native wayland apps can be matched using the app_id and window name. These can be found using swaymsg -t get_tree. XWayland apps are matched with using WM_CLASS as above (this can also be found with swaymsg)

Given that termite is wayland native and firefox is not, the rules above could instead be written:

rules:
  - window-class: firefox
    flash-on-focus: False
  - app-id: termite
    default-opacity: 0.8
rules:
  - window-name: ^(?!termite)$
    default-opacity: 0.8
Clone this wiki locally