Skip to main content

Overview

Waybar is the status bar used in the Kanagawa dotfiles, providing system information, workspace indicators, and quick access to system controls.
Waybar configuration uses JSON/JSONC format and is split between config (structure) and modules.json (module definitions).

Configuration Structure

~/.config/waybar/
├── config           # Main configuration (layout)
├── modules.json     # Module definitions
├── style.css        # Styling and theming
└── scripts/         # Custom scripts
    └── weather      # Weather information script

Main Configuration

The main config file defines the bar layout and module positions:
{
  "layer": "top",
  "position": "top",
  "height": 36,
  "spacing": 4,
  
  "modules-left": [
    "custom/arch",
    "hyprland/workspaces"
  ],
  
  "modules-center": [
    "clock",
    "custom/weather"
  ],
  
  "modules-right": [
    "pulseaudio",
    "network",
    "backlight",
    "battery",
    "battery#bat2",
    "wlogout"
  ],
  
  "include": [
    "~/.config/waybar/modules.json"
  ]
}

Left Side Modules

Arch Logo

Custom Arch Linux logo with tooltip and wlogout integration

Workspaces

Hyprland workspace indicator with custom styling

Arch Logo Module

"custom/arch": {
  "format": "",
  "tooltip": true,
  "tooltip-format": "I use Arch btw",
  "on-click": "wlogout"
}

Workspaces Module

"hyprland/workspaces": {
  "disable-scroll": true,
  "all-outputs": true,
  "warp-on-scroll": false,
  "format": "{name}",
  "format-icons": {
    "urgent": "",
    "active": "",
    "default": ""
  }
}

Module Features

System Monitoring

Track CPU, memory, temperature, and network status

Power Management

Battery status with dual battery support

Audio Control

PulseAudio integration with multiple device support

Custom Scripts

Weather and other custom information modules

Optional Modules

Several modules are commented out in the default configuration:
// Commented out by default:
"idle_inhibitor"     // Prevent screen sleep
"cpu"                // CPU usage percentage
"memory"             // RAM usage
"temperature"        // System temperature
"hyprland/language" // Keyboard layout indicator
Uncomment these in the config file to enable them.

Custom Scripts Integration

Waybar supports custom scripts for extending functionality:

Weather Script

Location: ~/.local/bin/weather
"custom/weather": {
  "format": "{}",
  "exec": "/home/nico/.local/bin/weather",
  "interval": 1800,
  "tooltip": true
}
The weather script runs every 30 minutes to fetch and display weather information.

Theme Integration

Waybar automatically integrates with the Kanagawa color scheme through style.css:
1

Colors Sourced

Colors are pulled from the active theme in ~/.config/colors/
2

Dynamic Updates

When you switch themes, Waybar reloads with new colors
3

CSS Styling

All styling is defined in style.css with theme variables

Click Actions

Many modules support click actions for quick access:
ModuleActionOpens
custom/archClickwlogout (power menu)
pulseaudioClickpavucontrol (volume mixer)
networkClicknm-connection-editor (network settings)
batteryClickPower menu script

System Integration

Hyprland Integration

Native workspace and window information

Auto-reload

Automatically reloads on config changes

Next Steps

Styling

Customize Waybar appearance

Scripts

Learn about custom scripts