Skip to content

bottlebrushes/barik-but-better

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

159 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barik

barik-but-better

A fork of barik with active improvements and new features.

Improvements over barik

  • Drag-and-drop widget reordering - Drag widgets directly in the menu bar to rearrange them, order persists to config
  • Claude Code usage widget - Track API usage in real-time with a donut ring indicator that changes color at thresholds, plus a popup with rolling window and weekly stats
  • Codex usage widget - Track local Codex rate-limit usage from your ~/.codex auth and session data with the same menu bar and popup treatment as Claude
  • Pomodoro timer widget - Built-in pomodoro timer with work/break/long break phases, circular progress ring, session tracking, adjustable durations, and macOS notifications
  • Drastically reduced CPU usage - Replaced polling with event-driven notifications for music playback and space changes
  • Enhanced calendar popup - Day view with event selection and detailed event information
  • Click to open music player - Click on album art, song title, or artist in the now playing popup to open Spotify or Apple Music
  • Improved WiFi popup - macOS-style controls and better network information
  • New weather popup - Hourly forecast using Open-Meteo API
  • Fixed popup positioning - Consistent popup positioning across all widgets

barik is a lightweight macOS menu bar replacement. If you use yabai or AeroSpace for tiling WM, you can display the current space in a sleek macOS-style panel with smooth animations. This makes it easy to see which number to press to switch spaces.


Screenshots

Barik Light Theme Barik Dark Theme

Video

preview-video.mp4
Screen.Recording.2025-02-24.at.7.51.25.PM.mov

Requirements

  • macOS 14.6+

Quick Start

Install via Homebrew

brew install --cask bettercoderthanyou/formulae/barik-but-better

Or build from source

  1. Clone the repo and build with Xcode:
git clone https://github.com/bettercoderthanyou/barik-but-better.git
cd barik-but-better
xcodebuild -scheme Barik -configuration Release build
  1. Copy the built app to Applications:
cp -R ~/Library/Developer/Xcode/DerivedData/Barik-*/Build/Products/Release/Barik.app /Applications/

Note: Building from source requires Xcode (not just Command Line Tools).

Troubleshooting: "damaged and should be moved to Trash"

If macOS says the app is damaged, run this command to remove the quarantine attribute:

xattr -cr /Applications/Barik.app

Alternatively, you can right-click the app in Finder and select Open to bypass the Gatekeeper warning.

This happens because the app is not notarized with Apple. It is safe to use — you can verify by building from source.

Set up your desktop

  1. (Optional) To display open applications and spaces, install yabai or AeroSpace and set up hotkeys. For yabai, you'll need skhd or Raycast scripts. Don't forget to configure top paddinghere's an example for yabai.

  2. Hide the system menu bar in System Settings and uncheck Desktop & Dock → Show items → On Desktop.

  3. Launch barik from the Applications folder.

  4. Add barik to your login items for automatic startup.

That's it! Try switching spaces and see the panel in action. You can drag widgets to reorder them directly in the menu bar.

Configuration

When you launch barik for the first time, it will create a ~/.barik-config.toml file with an example customization for your new menu bar.

# If you installed yabai or aerospace without using Homebrew,
# manually set the path to the binary. For example:
#
# yabai.path = "/run/current-system/sw/bin/yabai"
# aerospace.path = ...

theme = "system" # system, light, dark

[widgets]
displayed = [ # widgets on menu bar
    "default.spaces",
    "spacer",
    "default.claude-usage",
    "default.codex-usage",
    "default.pomodoro",
    "default.nowplaying",
    "default.network",
    "default.battery",
    "divider",
    # { "default.time" = { time-zone = "America/Los_Angeles", format = "E d, hh:mm" } },
    "default.time",
]

[widgets.default.spaces]
space.show-key = true        # show space number (or character, if you use AeroSpace)
window.show-title = true
window.title.max-length = 50

# A list of applications that will always be displayed by application name.
# Other applications will show the window title if there is more than one window.
window.title.always-display-app-name-for = ["Mail", "Chrome", "Arc"]

[widgets.default.nowplaying.popup]
view-variant = "horizontal"

[widgets.default.battery]
show-percentage = true
warning-level = 30
critical-level = 10

[widgets.default.time]
format = "E d, J:mm"
calendar.format = "J:mm"

calendar.show-events = true
# calendar.allow-list = ["Home", "Personal"] # show only these calendars
# calendar.deny-list = ["Work", "Boss"] # show all calendars except these

[widgets.default.time.popup]
view-variant = "box"



### EXPERIMENTAL, WILL BE REPLACED BY STYLE API IN THE FUTURE
[experimental.background] # settings for blurred background
displayed = true          # display blurred background
height = "default"        # available values: default (stretch to full screen), menu-bar (height like system menu bar), <float> (e.g., 40, 33.5)
blur = 3                  # background type: from 1 to 6 for blur intensity, 7 for black color

[experimental.foreground] # settings for menu bar
height = "default"        # available values: default (55.0), menu-bar (height like system menu bar), <float> (e.g., 40, 33.5)
horizontal-padding = 25   # padding on the left and right corners
spacing = 15              # spacing between widgets

[experimental.foreground.widgets-background] # settings for widgets background
displayed = false                            # wrap widgets in their own background
blur = 3                                     # background type: from 1 to 6 for blur intensity

Currently, you can customize the order of widgets (time, indicators, etc.) and adjust some of their settings. Soon, you’ll also be able to add custom widgets and completely change barik's appearance—making it almost unrecognizable (hello, r/unixporn!).

Future Plans

I'm not planning to stick to minimal functionality—exciting new features are coming soon! The roadmap includes full style customization, the ability to create custom widgets or extend existing ones, and a public Store where you can share your styles and widgets.

Soon, you'll also be able to place widgets not just at the top, but at the bottom, left, and right as well. This means you can replace not only the menu bar but also the Dock! 🚀

What to do if the currently playing song is not displayed in the Now Playing widget?

Unfortunately, macOS does not support access to its API that allows music control. Fortunately, there is a workaround using Apple Script or a service API, but this requires additional work to integrate each service. Currently, the Now Playing widget supports the following services:

  1. Spotify (requires the desktop application)
  2. Apple Music (requires the desktop application)

Create an issue so we can add your favorite music service: https://github.com/bettercoderthanyou/barik-but-better/issues/new

Where Are the Menu Items?

#5, #1

Menu items (such as File, Edit, View, etc.) are not currently supported, but they are planned for future releases. However, you can use Raycast, which supports menu items through an interface similar to Spotlight. I personally use it with the option + tab shortcut, and it works very well.

If you’re accustomed to using menu items from the system menu bar, simply move your mouse to the top of the screen to reveal the system menu bar, where they will be available.

Raycast Menu Items

Contributing

Contributions are welcome! Please feel free to submit a PR.

License

MIT

Trademarks

Apple and macOS are trademarks of Apple Inc. This project is not connected to Apple Inc. and does not have their approval or support.

Stars

Stargazers over time

About

Barik fork with: event-driven NowPlaying, event-based yabai spaces (Unix socket), enhanced WiFi popup with network scanning & toggle, weather widget, configurable time widget click action

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Swift 98.8%
  • Shell 1.2%