v-- / wintoggle

A simple window focus toggler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travis AUR

wintoggle(1) -- a simple window focus toggler

SYNOPSIS

wintoggle [--help] class executable

DESCRIPTION

A simple window focus toggler. Useful in conjunction with global hotkeys. It requires a window manager with EWMH support and is tested on OpenBox, KWin, Mutter and XFWM.

The program works in three steps and each one is executed only if the previous steps fail.

  • Step 1: If the currently active window has a class name (actually WM_CLASS instance name) that equals class, the window is minimized.
  • Step 2: If any window on the current display (from any screen or workspace) matches class, the window is moved to the current workspace and active.
  • Step 3: executable, which defaults to class if not specified, is executed using execlp.

EXAMPLES

Launch xterm if it is not already running

$ wintoggle xterm
[Step 1] The active window does not match class 'xterm'.
[Step 2] The currently mapped windows do not match class 'xterm'.
[Step 3] Executing 'xterm'.

Minimize xterm from inside xterm

$ wintoggle xterm
[Step 1] Minimizing window 14680086 (xterm).

Move xterm from another workspace and focus it

$ wintoggle xterm
[Step 1] The active window does not match class 'xterm'.
[Step 2] Presenting window 14680086 (xterm) to the current workspace.

OPTIONS

  • -h, --help: List available options and exit.

  • -v, --version: Print the program version and exit.

About

A simple window focus toggler

License:The Unlicense


Languages

Language:C 96.9%Language:Makefile 3.1%