A helper script for Linux (xorg) to bring a window to foreground when hitting a hotkey.
It respects the recent used window so if you have 5 Chromium instances, it will bring up the recently used one.
It uses xprop -spy
to listen for window focus changes and persists the window-id to a
temporaray file if the window title includes a given app name.
wmctrl
brings the recently used window-id for a given app name to foreground.
xbindkeys
listes for the hotkey to trigger window-activator.sh
- download the window-activator.sh and make it executeable (
chmod +x window-activator.sh
) - create any kind of autostart for the daemon, ie
~/.config/autostart/window-activator.desktop
PS: Adjust the list of monitored apps[Desktop Entry] Exec=~/.dotfiles/window-activator.sh -d Chrom Thunderbird Dolphin WebStorm StartupNotify=false Terminal=false Type=Application
- Add some
.xbindkeysrc
config to triggerwindow-activator.sh -a <app>
using a hotkey see the example below