sweet desktop confectionery
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
misc
src
.gitignore
Cargo.lock
Cargo.toml
README.md

README.md

cakeybar

a customizable statusbar for your windowmanager

  • multibar/multimonitor support
  • expressive theming with CSS
  • windowmanager neutral design
  • system tray integration
  • more rice than feudal japan

work in progress
not stable yet
currently testing in i3wm/bspwm

quickstart

from source

# install rustup (if you don't have cargo)
curl https://sh.rustup.rs -sSf | sh

# clone repo
git clone https://github.com/kirjavascript/cakeybar.git
cd cakeybar

# run example
cargo run --release -- -c examples/darkblue/config.toml

configuration

TOML is used in 'normal' config files and CSS is used for theming

CSS overview
CSS properties

The Pango Text Attribute Markup Language adds hyperlinks and other formatting options for format strings

see the examples for more

global properties

# path to theme. paths can be relative or absolute
theme = "theme.css"

# dictate IPC usage
enable-ipc = true

bar config

# define a bar with the name `bar_name`
[bar.bar_name]

# monitor index the bar appears on. a list of monitors can be seen with `cakeybar -M`
monitor = 0

# where to show the bar. options are: top | bottom
position = "top"

# a list of components to add to the bar, identified by name
layout = [ "component", "names", "go", "here" ]

# if enabled, will bind workspace next/prev actions to scroll events
workspace-scroll = false

# floating bars will not reserve space on the desktop
float = false

# disable shadows in compton
disable-shadow = true

you can define as many bars as you like as long as they have unique names. the name is also used as the CSS selector for that bar: #bar_name

component config

common properties

# define a component with the name `component_name`
[component.component_name]

# the only required property for a component is **type**
# values presented in this documentation are defaults
type = "void"

# components can be styled with `#component_name` and `.class-name`
class = "class-name"

# alignments can be: start | end | center | fill
halign = "void"
valign = "void"

# the fixed property changes the component position from relative to absolute
# disabling pass-through allows the fixed component to capture mouse events
fixed = false
pass-through = true

# the update interval in seconds
interval = 3

# format strings use a basic syntax for replacing named symbols with data
format = "label: {symbol-name}"

# to print a literal curly bracket, duplicate the character `{{` or `}}`

image

an image

[component.start_icon]
type = "image"
src = "window.png"

container

a container to create more complex layouts and group components

[component.stats_box]
type = "container"
spacing = 0
direction = "vertical"
layout = [ "component", "names", "go", "here" ]

possible directions: column | row or horizontal | vertical

window

displays the current active window's title

[component.window_title]
type = "window"
format = "{title}"
truncate = 100

workspaces

[component.workspace_list]
type = "workspaces"
show-all = false # show workspaces from every monitor
format = "{number}" # symbols are; number, name

each label element in a workspace can have the focused, visibile and urgent classes which can be targeted with #workspace_list label .focused

mode

[component.current_mode]
type = "mode"
format = "{mode}"

will be hidden in the default mode

cpu

[component.cpu]
type = "cpu"
format = "{usage}" # symbols are; usage, temp, dumbtemp

memory

[component.memory]
type = "memory"
format = "{free-pct}" # symbols are; total, free, free-pct, used, used-pct, swap-total, swap-used

bandwidth

[component.download]
type = "bandwidth"
interfaces = ["eth0"] # omit to show all
format = "{down/s}" # symbols are; name, down/s, up/s, down/total, up/total

ip

[component.ip_address]
type = "ip"
interfaces = ["eth0"] # omit to show all
format = "{ipv4}" # symbols are; name, ipv4, ipv6

battery

[component.battery]
type = "battery"
battery = "BAT0"
adapter = "AC"
format = "{percent}" # symbols are; percent, remaining, plugged

you can target the class #battery.plugged when AC is plugged in

classes for battery charge are: full | high | medium | low

use ls /sys/class/power_supply/ to see devices

backlight

[component.backlight]
type = "backlight"
format = "{percent}"

disk

[component.disk]
type = "disk"
mounts = ["/"] # omit to show all
format = "{free}" # symbols are; free, used, total, fs, mount

clock

[component.time]
type = "clock"
timestamp = "%Y-%m-%d %H:%M:%S"
format = "{timestamp}"

timestamp formatting guide

script

[component.load_averages]
type = "script"
src = '''
    uptime | sed -r "s/.*average: (.*)$/\\1/"
'''
format = "{stdout}" # symbols are; stdout, stderr, code

tray

[component.tray]
type = "tray"
icon-size = 20

the background-color style needs to be set explicitly for it to work

dropdown

[component.dropdown]
type = "dropdown"
items = [
    { label = "web browser", command = "firefox" },
    { label = "screenshot", command = "xfce4-screenshooter" },
    { label = "background", children = [
        { label = "forest", command = "feh --bg-fill forest.png" },
        { label = "mountain", command = "feh --bg-fill mountain.png" },
    ] },
]

a gtk-context style dropdown menu