Discord Rich Presence for Vim (by the way).
Vim users never quit.
— Unknown Author
Vim BTW detects when Vim is running and publishes a Discord Rich Presence status so people can see that you are editing in Vim. When Vim is not running but a supported terminal is open, it shows an idle terminal status. When no supported terminal is running, it clears your Discord presence.
The app is written in Swift, runs as a macOS menu bar utility, and talks to Discord through local IPC instead of the deprecated Discord RPC library.
- Updates Discord Rich Presence from a native macOS menu bar app
- Shows
Editing in Vimwith the detected filename when Vim is running - Shows idle terminal status when Terminal or Ghostty is open and Vim is not running
- Clears presence when no supported terminal is running
- Tracks a continuous Vim session timer instead of resetting every update
- Lets you enable or disable presence from the menu bar
- Lets you set or change the Discord Application ID from the menu bar
- Reconnects when Discord restarts
- Supports Apple Terminal and Ghostty
- macOS 13 or newer
- Swift toolchain / Xcode command line tools
- Discord desktop app
- A Discord application with Rich Presence assets configured
- Vim running as a
vimprocess
Clone the repo:
git clone https://www.github.com/m-tedeschi/vim-btw.git
cd vim-btwBuild the app:
chmod +x build.sh
./build.shThe build creates:
Vim BTW.app
You can move the app wherever you want, or add it to Login Items in macOS Settings.
Launch Vim BTW.app.
Use the menu bar item to:
- Set your Discord Application ID
- Enable or disable Rich Presence updates
- Refresh presence immediately
- Quit the app
Vim BTW checks for supported terminals and Vim periodically. If Discord is closed, the app keeps running and reconnects when Discord is available again.
- Add Privacy Mode to hide the current filename
- Improve behavior when multiple Vim windows are open
- Improve behavior for Vim running inside tmux sessions
- Add configurable terminal process names
- Add configurable update interval