Skip to content

storage ​

Disk usage for a mount point.

Add it to your layout with storage:

yaml
bar:
  layout:
    - monitor: "*"
      right: [storage]

General ​

FieldTypeDefaultDescription
poll-interval-msu6430000Polling interval in milliseconds.
mount-pointStorageMountPoint"/"Mount point(s) to monitor (e.g., "/" or ["/", "/mnt/drive1"]).
formatstring"{{ percent }}%"Format string for the label.
icon-namestring"ld-hard-drive-symbolic"Icon name.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
label-showbooltrueDisplay label.
label-max-lengthu320Max label characters before truncation. Set to 0 to disable.
thresholdsarray of ThresholdEntry[]Dynamic color thresholds based on disk usage percentage.
More about poll-interval-ms

Faster polling increases CPU usage.

More about format

Placeholders ​

  • {{ percent }} - Disk usage as integer (0-100)
  • {{ used_tib }} - Used space in TiB
  • {{ used_gib }} - Used space in GiB
  • {{ used_mib }} - Used space in MiB
  • {{ used_auto }} - Used space with auto unit (e.g., "128.5 GiB")
  • {{ total_tib }} - Total space in TiB
  • {{ total_gib }} - Total space in GiB
  • {{ total_mib }} - Total space in MiB
  • {{ total_auto }} - Total space with auto unit
  • {{ free_tib }} - Free space in TiB
  • {{ free_gib }} - Free space in GiB
  • {{ free_mib }} - Free space in MiB
  • {{ free_auto }} - Free space with auto unit
  • {{ filesystem }} - Filesystem type (e.g., "ext4", "btrfs")

Examples ​

  • "{{ percent }}%" - "45%"
  • "{{ used_auto }}/{{ total_auto }}" - "128.5 GiB/512.0 GiB"
  • "{{ free_gib }} GiB free" - "383.5 GiB free"
More about thresholds

Entries are checked in order; the last matching entry wins for each color slot. Use above for high-value warnings (e.g., disk nearly full).

Example ​

yaml
modules:
  storage:
    thresholds:
      - above: 70
        icon-color: status-warning
        label-color: status-warning
      - above: 90
        icon-color: status-error
        label-color: status-error

Colors ​

FieldTypeDefaultDescription
border-colorColorValue"yellow"Border color token.
icon-colorColorValue"auto"Icon foreground color.
icon-bg-colorColorValue"yellow"Icon container background color token.
label-colorColorValue"fg-default"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions ​

FieldTypeDefaultDescription
left-clickClickAction""Action on left click.
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration ​

yaml
modules:
  storage:
    poll-interval-ms: 30000
    mount-point: /
    format: '{{ percent }}%'
    icon-name: ld-hard-drive-symbolic
    border-show: false
    border-color: yellow
    icon-show: true
    icon-color: auto
    icon-bg-color: yellow
    label-show: true
    label-color: fg-default
    label-max-length: 0
    button-bg-color: bg-surface-elevated
    left-click: ""
    right-click: ""
    middle-click: ""
    scroll-up: ""
    scroll-down: ""
    thresholds: []

Released under the MIT License.