- Notifications
You must be signed in to change notification settings - Fork 0
Waybar
NullString1 edited this page Jan 13, 2026
·
1 revision
Waybar is the status bar used in NullOS, providing system information, workspace indicators, and quick controls.
Configuration File:home/waybar/default.nix
Module Location:home/waybar/
Style: Automatically themed by Stylix
Waybar displays:
- Workspace indicators
- Window title
- System tray
- Clock and calendar
- CPU/Memory/Temperature
- Network status
- Audio volume
- Battery status (laptops)
Waybar configuration in NullOS uses Nix to define the JSON config and CSS styling.
# home/waybar/default.nix{programs.waybar={enable=true;settings={mainBar={# Configuration here};};style='' /* CSS styling here */ '';};}mainBar={layer="top";position="top";height=30;spacing=4;modules-left=["hyprland/workspaces""hyprland/window"];modules-center=["clock"];modules-right=["tray""cpu""memory""pulseaudio""network""battery"];};"hyprland/workspaces"={format="{icon}";format-icons={"1"="一";"2"="二";"3"="三";"4"="四";"5"="五";default="";};persistent-workspaces={"*"=5;};};clock={format="{:%H:%M}";format-alt="{:%A, %B %d, %Y (%H:%M)}";tooltip-format="<tt><small>{calendar}</small></tt>";calendar={mode="month";mode-mon-col=3;weeks-pos="right";on-scroll=1;format={months="<span color='#ffead3'><b>{}</b></span>";days="<span color='#ecc6d9'><b>{}</b></span>";weeks="<span color='#99ffdd'><b>W{}</b></span>";weekdays="<span color='#ffcc66'><b>{}</b></span>";today="<span color='#ff6699'><b><u>{}</u></b></span>";};};};cpu={format=" {usage}%";tooltip=true;interval=2;on-click="ghostty -e btop";};memory={format=" {}%";tooltip-format="RAM: {used:0.1f}G / {total:0.1f}G\nSwap: {swapUsed:0.1f}G / {swapTotal:0.1f}G";interval=5;on-click="ghostty -e btop";};network={format-wifi=" {signalStrength}%";format-ethernet="";format-disconnected="";tooltip-format="{ifname}: {ipaddr}/{cidr}";tooltip-format-wifi="{essid} ({signalStrength}%)\n{ipaddr}";on-click="nm-connection-editor";};pulseaudio={format="{icon} {volume}%";format-muted="";format-icons={headphone="";hands-free="";headset="";phone="";portable="";car="";default=[""""""];};on-click="pavucontrol";scroll-step=5;};battery={states={warning=30;critical=15;};format="{icon} {capacity}%";format-charging=" {capacity}%";format-plugged=" {capacity}%";format-icons=[""""""""""];tooltip-format="{timeTo}, {capacity}%\nPower: {power}W";};tray={icon-size=16;spacing=8;};* {
border: none;
border-radius:0;
font-family:"JetBrainsMono Nerd Font";
font-size:13px;
min-height:0;
}
window#waybar {
background:rgba(30,30,46,0.9);
color:#cdd6f4;
}
#workspaces {
margin:05px;
}
#workspacesbutton {
padding:010px;
background: transparent;
color:#cdd6f4;
border-bottom:2px solid transparent;
}
#workspacesbutton.active {
color:#89b4fa;
border-bottom:2px solid #89b4fa;
}
#workspacesbutton:hover {
background:rgba(137,180,250,0.2);
}
#clock,#cpu,#memory,#network,#pulseaudio,#battery,#tray {
padding:010px;
margin:02px;
}
#battery.charging {
color:#a6e3a1;
}
#battery.warning:not(.charging) {
color:#f9e2af;
}
#battery.critical:not(.charging) {
color:#f38ba8;
animation: blink 1s linear infinite;
}
@keyframes blink {
to {
color:#cdd6f4;
}
}Waybar can use Stylix color variables:
window#waybar {
background:@base00;
color:@base05;
}
#workspacesbutton.active {
color:@base0D;
border-bottom:2px solid @base0D;
}"custom/weather"={format="{}°";tooltip=true;interval=3600;exec="wttrbar";return-type="json";};"custom/media"={format="{icon} {}";format-icons={Playing="";Paused="";};max-length=40;exec="playerctl metadata --format '{{ artist }} - {{ title }}'";on-click="playerctl play-pause";interval=2;};"custom/power"={format="";on-click="wlogout";tooltip=false;};"custom/updates"={format=" {}";interval=3600;exec="checkupdates | wc -l";exec-if="exit 0";on-click="ghostty -e sudo nixos-rebuild switch --flake .";signal=8;};Create multiple Waybar instances:
programs.waybar={enable=true;settings={mainBar={output="eDP-1";# Primary monitor config};secondaryBar={output="HDMI-A-1";# Secondary monitor config};};};killall waybar
waybar &Or add keybinding in Hyprland:
bind=SUPERSHIFT,R,exec,killallwaybar&&waybar &Run in terminal to see errors:
waybar --log-level debugUse Nerd Font icons: https://www.nerdfonts.com/cheat-sheet
format=" {capacity}%";# Batteryformat=" {usage}%";# CPUformat=" {}%";# Memorywindow#waybar {
background: transparent;
}
#workspaces,#clock,#cpu,#memory {
background:rgba(30,30,46,0.8);
border-radius:10px;
margin:5px;
padding:015px;
}#workspaces,#clock,#tray {
background:@base00;
border-radius:15px;
margin:5px5px5px0;
padding:015px;
}mainBar={position="bottom";};Check if running:
pgrep waybarStart manually:
waybarEnsure Nerd Fonts are installed:
home.packages=[pkgs.nerd-fonts];Increase interval or check exec command:
# Test command manually
playerctl metadata- Hyprland - Window manager configuration
- Theming - Customize colors with Stylix
- Customization Guide - General customization