Created
November 3, 2015 13:14
-
-
Save enisozgen/39bd2da923432cddf65f to your computer and use it in GitHub Desktop.
Focus emacs from everywhere
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#if emacs is running focus emacs | |
#else run emacs | |
if [ $(wmctrl -l | grep XXX--Emacs--XXX | awk '{ print $4 }') == XXX--Emacs--XXX ]; then | |
#you should put this line to your init.el or .emacs file | |
#(setq frame-title-format "XXX--Emacs--XXX") | |
wmctrl -a XXX--Emacs--XXX | |
else | |
#directory of emacs | |
/usr/bin/emacs | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment