Skip to content

power-profiles ​

Power profile indicator and switcher (lys-power).

Shows the active profile with a per-profile icon and color, and cycles through the profiles on click. Backed by the power profile lys-power sets and publishes as dev.stubbe.lys.Profile1 on the system bus.

Add it to your layout with power-profiles:

yaml
bar:
  layout:
    - monitor: "*"
      right: [power-profiles]

General ​

FieldTypeDefaultDescription
formatstring"{{ profile }}"Format string for the label.
icon-power-saverstring"ld-leaf-symbolic"Icon shown while the power-saver profile is active.
icon-balancedstring"ld-scale-symbolic"Icon shown while the balanced profile is active.
icon-performancestring"ld-rocket-symbolic"Icon shown while the performance profile is active.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
tooltipbooltrueShow the module's state in a tooltip on hover.
label-showboolfalseDisplay label.
label-max-lengthu320Max label characters before truncation with ellipsis. Set to 0 to disable.
auto-saver-atAutoSaverLevel"never"Switch to power-saver when the battery reaches this warning level, and back to the previous profile once it is on AC again.
More about format

Placeholders ​

  • {{ profile }} - Active profile name (power-saver, balanced, performance)

Examples ​

  • "{{ profile }}" - "balanced"

Colors ​

FieldTypeDefaultDescription
color-power-saverColorValue"green"Icon/label color while the power-saver profile is active.
color-balancedColorValue"blue"Icon/label color while the balanced profile is active.
color-performanceColorValue"red"Icon/label color while the performance profile is active.
border-colorColorValue"blue"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"bg-surface-elevated"Icon container background color token.
label-colorColorValue"auto"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.
More about icon-color

Overridden per active profile by the color-* fields.

Click actions ​

FieldTypeDefaultDescription
left-clickClickAction":cycle"Action on left click. Default cycles to the next power profile.
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:
  power-profiles:
    format: '{{ profile }}'
    icon-power-saver: ld-leaf-symbolic
    icon-balanced: ld-scale-symbolic
    icon-performance: ld-rocket-symbolic
    color-power-saver: green
    color-balanced: blue
    color-performance: red
    border-show: false
    border-color: blue
    icon-show: true
    tooltip: true
    icon-color: auto
    icon-bg-color: bg-surface-elevated
    label-show: false
    label-color: auto
    label-max-length: 0
    button-bg-color: bg-surface-elevated
    left-click: :cycle
    right-click: ""
    middle-click: ""
    scroll-up: ""
    scroll-down: ""
    auto-saver-at: never

Released under the MIT License.