Your Instagram DMs in the macOS menu bar.
Features • Install • Usage • How it works • Limitations
English • Português
DMBar is a native menu bar app that shows only your Instagram direct messages. Read and reply without opening a browser and without seeing the feed, stories or reels.
The app loads the official Instagram website in a WKWebView. It does not use any private Instagram API and does not automate requests.
Note
DMBar is an independent project. It is not affiliated with Instagram or Meta.
- DMs only: conversation list and chat in a 380x560 popover, with no navigation bar, feed or Notes.
- Persistent login: sign in once with username and password or with Facebook. Two-factor authentication works inside the app.
- Unread badge: the number of unread conversations appears next to the menu bar icon.
- Native notifications: you get a notification when a message arrives while the popover is closed. Click it to open the popover.
- Global shortcut: ⌥ D opens and closes DMBar from any app.
- Launch at login: option in the icon menu.
- No Dock icon: the app lives only in the menu bar.
- Download
DMBar.zipfrom the latest release. - Unzip it and move
DMBar.appto/Applications. - Open the app.
Note
The app is not notarized by Apple yet, so macOS asks for confirmation the first time you open it. Go to System Settings > Privacy & Security and click Open Anyway.
Releases are built by GitHub Actions from this repository for every v* tag.
Requirements:
- macOS 13 or later
- Xcode 15 or later
- XcodeGen
brew install xcodegenThe Xcode project is generated from project.yml and is not committed.
git clone https://github.com/CarlosAllberto/dmbar.git
cd dmbar
xcodegen generate
xcodebuild -project DMBar.xcodeproj -scheme DMBar -configuration Release -derivedDataPath build buildThe app is created at build/Build/Products/Release/DMBar.app. Copy it to /Applications and open it.
Tip
For development, open DMBar.xcodeproj in Xcode and run the DMBar scheme. Run xcodegen generate again whenever you add or remove files.
Note
The app is ad-hoc signed (CODE_SIGN_IDENTITY: "-") to run on your own Mac. To distribute it, set your team in project.yml and notarize the app.
| Action | How |
|---|---|
| Open or close your DMs | Click the icon or press ⌥ D |
| Go back to the list | ‹ arrow in the top left corner |
| Reload the page | Right-click the icon, Recarregar |
| Launch at login | Right-click the icon, Abrir ao iniciar o Mac |
| Sign out of Instagram | Right-click the icon, Sair da conta… |
| Quit the app | Right-click the icon, Sair |
The first time, sign in inside the popover and allow notifications when macOS asks.
Note
The app interface is in Portuguese for now. Instagram itself follows your account language.
DMBar/
├── App/ AppDelegate: icon, popover, menu and badge
├── UI/ Popover
├── Web/ Shared WKWebView, injected CSS and JS
└── Services/ Notifications, global shortcut (Carbon)
- One WebView that stays alive.
WebViewHostcreates a singleWKWebView. When the popover closes, the view moves to a hidden window, so the page keeps receiving messages and updating the badge. - Injected CSS and JS.
Scripts.swifthides everything that is not a DM and fits the layout to the popover. At 380px, the list and the conversation show one at a time. - Unread counter. The script reads the number from the page title, the DM icon and the tabs, and sends the highest value to Swift.
- Facebook login. Instagram needs to read the
facebook.comcookie, so DMBar allows third-party cookies in its own data store. Safari and other apps are not affected.
Note
The layout depends on Instagram's HTML, which can change at any time. If the feed or the navigation bar shows up again, update the selectors in Scripts.swift.
- The badge counts unread conversations, not messages. It is the same number Instagram shows.
- Notifications say how many conversations are unread, but do not show the sender or the text.
- Allowing third-party cookies uses an internal WebKit interface. If Apple removes it, only Facebook login stops working. Username and password still work.
- The shortcut is fixed to ⌥ D.
- One account at a time.
Debug builds include tools to adjust the CSS:
- Web Inspector: inspect the
WKWebViewfrom Safari's Develop menu. - Snapshot and DOM: every 3 seconds the app saves
dmbar.pnganddom.txtto~/Library/Containers/com.treendz.dmbar/Data/tmp/. - Copy DOM: the icon menu gets a Debug: copiar DOM item.
- Start page: the
DMBAR_URLvariable sets the first page to load. - Demo mode: with
DMBAR_DEMO=1, names, messages and photos are replaced with fake data and Unsplash portraits. The screenshots in this README were made this way. The photos follow the Unsplash license, not the project's MIT license.
DMBAR_URL=https://www.instagram.com/direct/requests/ build/Build/Products/Debug/DMBar.app/Contents/MacOS/DMBar

