Skip to content

Instantly share code, notes, and snippets.

@hage
Last active March 23, 2018 08:01
Show Gist options
  • Save hage/7b20f18c76fc149c28a75900b19f105c to your computer and use it in GitHub Desktop.
Save hage/7b20f18c76fc149c28a75900b19f105c to your computer and use it in GitHub Desktop.
(if (getenv "TMUX")
(progn
(defun keycast-mode-line-update ()
"Display current `thisl-command' and `this-command-keys' using tmux message"
(if (not (eq this-command 'self-insert-command))
(shell-command
(format "tmux display-message '[%s] %s &'" (this-command-keys) this-command))))
(add-hook 'pre-command-hook 'keycast-mode-line-update t)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment