Skip to content

Instantly share code, notes, and snippets.

@jaawerth
Last active January 2, 2021 00:19
Show Gist options
  • Save jaawerth/88d769a8e4d6643ee8c075026a6017d7 to your computer and use it in GitHub Desktop.
Save jaawerth/88d769a8e4d6643ee8c075026a6017d7 to your computer and use it in GitHub Desktop.
Tiny fuzzy-matching win-picker script using fzf + wmctrl
#!/usr/bin/env bash
fzfargs=()
[ $# -gt 0 ] && fzfargs+=( '-q' "$*" )
tgt_win="$(wmctrl -l | fzf "${fzfargs[@]}" | cut -d' ' -f 1)"
[ -n "$tgt_win" ] && wmctrl -i -a "$tgt_win"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment