2 ms·
I do it using https://gist.github.com/meowtochondria/8b99b8fbf364eec41ef664138b43b2f5 https://gist.github.com/meowtochondria/8b99b8fbf364eec41ef66... on my Debi
by ainka-ainka 2y ago
I do it using https://gist.github.com/meowtochondria/8b99b8fbf364eec41ef664138b43b2f5 https://gist.github.com/meowtochondria/8b99b8fbf364eec41ef66... on my Debian based machine running X11. I've bound this script to a key as a global shortcut using OS provided facilities. See the comment on gist if you have a different setup and want to adapt it to your needs.
Algo:
1. Find path to wezterm binary by looking at desktop file
2. Use pgrep to get pid of running binary from previous step.
3. If no window is running, launch desktop file using gio
4. If window is running, bring it to front using wmctrl