Several months ago I saw some DHH Arch Linux distro come out and he was doing talks on it. I know DHH is not very popular these days, maybe he never was and just had a cult following. I like his contributions and direction with Rails, the web framework has allowed many to jumpstart their careers and build wonderful products. The topic of this post isn't to rail on DHH or offer him support. Its a how to on incorporating AuxBox into the Omarchy Waybar at the top of the screen with some minor adjustments to a config file, as outlined in the AuxBox user guide here. I will explain our integration and then give more details on where to find my sources and maybe you too can create and extend your Waybar. I will outline our process below to open our config file to edit within Omarchy:
- Press the cmd/windows + opt/alt + spacebar to bring up a menu
- Type or press setup > config > waybar
- A new config file should open in lazyvim
- the following VIM keystrokes are important and you can look up more on vim and lazyvim if you like.
- i - insert mode, this allows you to type.
- esc - exits insert mode or any other mode you get trapped in. Pressing this allows you to enter the next command.
- wq - together after pressing esc will save and quit, remember to press enter after to execute command.
- With our config open we are looking for the section that outlines the modules for Waybar:
- modules-left: left aligned in the Waybar, Omarchy defaults their "custom/omarchy" and "hyprland/workspace" as the only left aligned items. I don't like AuxBox here in the left.
- modules-center: center aligned and defaults for Omarchy "clock", "custom/update", "custom/screenrecording-indicator". This is where I like AuxBox, looks the most beautiful here. Functional too.
- modules-right: this would be right aligned items, tray expansion, bluetooth, network, pulseaudio, cpu, battery. I leave this one be, plenty going on here already.
- Press i to enter insert mode and adjust our modules-center to look like this; "modules-center": ["clock", "custom/update", "custom/screenrecording-indicator", "custom/auxbox"],
- Now we need to define our actual "custom/auxbox" package for Waybar, we define it below our modules and reading this file you can see all of our defined Waybar packages. I will define mine after "clock" so navigate lazyvim with keystrokes to get to our entry point for our package definition. Define like below:
"custom/auxbox": {
"interval": 5,
"exec": "auxbox status",
"on-click": "auxbox pause",
"on-double-click": "auxbox play",
"on-click-right": "auxbox skip"
},- Press esc and then wq and enter to save and quit. Waybar should refresh and you should see your AuxBox player running in the Waybar if its playing.
What we have configured will allow the Waybar item to be clickable with some playback functionality and track progression. It refreshes the Waybar every 5 seconds so you will see the time increase against the length of playback. Can left click and pause playback, double click to resume playback and can skip with a right click, since I usually start with the -s flag to shuffle my folder it is perfect workflow to just play music and then control a bit through the Waybar at the top without a music player in my face.
Comments (0)
Sign in to leave a comment.
No comments yet. Be the first to comment!