-
-
Notifications
You must be signed in to change notification settings - Fork 733
Styling
Alex edited this page Dec 28, 2018
·
31 revisions
Styling is done using the CSS file format and with a file named style.css
.
Valid directories for this file are:
~/.config/waybar/
~/waybar/
/etc/xdg/waybar/
A good starting point is the default style.
If you want some ideas:
- https://www.reddit.com/r/unixporn/comments/9y9w0r/sway_first_rice_on_my_super_old_macbook_air/
- https://www.reddit.com/r/unixporn/comments/a2c9kl/sway_in_the_wild/
- https://www.reddit.com/r/unixporn/comments/a7nv6h/sway_getting_ready_for_production/
- https://www.reddit.com/r/unixporn/comments/aa9xcf/sway_let_me_solarize_you/
Also a minimal example style can be found on the bottom of this page.
All valid CSS classes for the modules are listed on the modules page.
A minimal style.css
file could look like this:
* {
border: none;
border-radius: 0;
font-family: Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
min-height: 0;
}
window#waybar {
background: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: white;
}
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
border-bottom: 3px solid transparent;
}
#workspaces button.focused {
background: #64727D;
border-bottom: 3px solid white;
}
#mode, #clock, #battery {
padding: 0 10px;
margin: 0 5px;
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: black;
}
#battery.charging {
color: white;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: black;
}
}
#battery.warning:not(.charging) {
background: #f53c3c;
color: white;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
- Home
- Installation
- Configuration
- Styling
- Examples
- FAQ
- Modules:
- Backlight/Slider
- Backlight
- Battery
- Bluetooth
- CPU
- Cava
- Clock
- Custom
- DWL
- Disk
- Gamemode
- Group
- Hyprland
- Idle Inhibitor
- Image
- JACK
- Keyboard State
- Language
- Load
- MPD
- MPRIS
- Memory
- Network
- Niri
- Power Profiles Daemon
- Privacy
- PulseAudio/Slider
- PulseAudio
- River
- Sndio
- Sway
- Systemd failed units
- Taskbar
- Temperature
- Tray
- UPower
- User
- WirePlumber
- Workspaces
- Writing Modules