Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

feat: Create power buttons widget#112

Open
JonAnderBeroz wants to merge 2 commits into
da-rth:mainfrom
JonAnderBeroz:power_buttons_widget
Open

feat: Create power buttons widget#112
JonAnderBeroz wants to merge 2 commits into
da-rth:mainfrom
JonAnderBeroz:power_buttons_widget

Conversation

@JonAnderBeroz
Copy link
Copy Markdown

Widget to be able to shutdown , restart or lock the computer

@Pimiovdb
Copy link
Copy Markdown

how do you style? can you give some documentation?

@Welpyes
Copy link
Copy Markdown

Welpyes commented Jun 11, 2024

how do you style? can you give some documentation?

you can do this by having a custom widget in the config.yaml


  shutdown:
    type: "yasb.custom.CustomWidget"
    options: 
      label: "\uf011"
      label_alt: "\uf011"
      class_name: "shutdown-button"
      callbacks:
        on_left: "exec cmd /c shutdown /s /t 5"

this shuts down your computer by clicking on it, but i suggest putting the callback as on_right instead of on_left to avoid accidents

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants