Skip to content

power ​

Shutdown, reboot, and logout menu.

Add it to your layout with power:

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

General ​

FieldTypeDefaultDescription
icon-namestring"ld-power-symbolic"Icon name to display.
border-showboolfalseDisplay border around button.
lock-commandCommand":lock"What the power menu's Lock button runs. The default :lock asks logind to lock the session, which the lock screen answers; any other string is a shell command line.
logout-commandCommand":logout"What the power menu's Log out button runs. The default :logout ends the session through lys-wm, else logind; any other string is a shell command line.
suspend-commandCommand":suspend"What the power menu's Suspend button runs. The default :suspend asks logind to suspend; any other string is a shell command line.
reboot-commandCommand":reboot"What the power menu's Reboot button runs. The default :reboot asks logind to reboot; any other string is a shell command line.
shutdown-commandCommand":poweroff"What the power menu's Shut down button runs. The default :poweroff asks logind to power off; any other string is a shell command line.
show-lockbooltrueShow the Lock button in the power menu.
show-logoutbooltrueShow the Log out button in the power menu.
show-suspendbooltrueShow the Suspend button in the power menu.
show-rebootbooltrueShow the Reboot button in the power menu.
show-shutdownbooltrueShow the Shut down button in the power menu.

Colors ​

FieldTypeDefaultDescription
border-colorColorValue"red"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"red"Icon container background color token.

Click actions ​

FieldTypeDefaultDescription
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.
left-clickClickAction":menu"Action on left click. Default opens lys-shell's native power menu (:menu).

Default configuration ​

yaml
modules:
  power:
    icon-name: ld-power-symbolic
    border-show: false
    border-color: red
    icon-color: auto
    icon-bg-color: red
    right-click: ""
    middle-click: ""
    scroll-up: ""
    scroll-down: ""
    left-click: :menu
    lock-command: :lock
    logout-command: :logout
    suspend-command: :suspend
    reboot-command: :reboot
    shutdown-command: :poweroff
    show-lock: true
    show-logout: true
    show-suspend: true
    show-reboot: true
    show-shutdown: true

Released under the MIT License.