-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
customize power controls in config #185
The head ref may contain hidden characters: "custom\u2013power\u2013controls"
customize power controls in config #185
Conversation
Firstly, thank you very much for this PR. I think this is a very nice feature to add. The code looks good as well. There are two parts I would like to do a bit different.
# Shutdown option
[[power_controls.entries]]
# The text in the top-left to display how to shutdown. The text '%key%' will be
# replaced with the shutdown_key.
hint = "Shutdown %key%"
# The color and modifiers of the hint in the top-left corner
hint_color = "dark gray"
hint_modifiers = ""
# The key used to shutdown. Possibilities are F1 to F12.
key = "F1"
# The command that is executed when the key is pressed
cmd = "systemctl poweroff -l"
# Reboot option
[[power_controls.entries]]
# The text in the top-left to display how to reboot. The text '%key%' will be
# replaced with the shutdown_key.
hint = "Reboot %key%"
# The color and modifiers of the hint in the top-left corner
hint_color = "dark gray"
hint_modifiers = ""
# The key used to reboot. Possibilities are F1 to F12.
key = "F2"
# The command that is executed when the key is pressed
cmd = "systemctl reboot -l" |
You are right,
True. |
feel free to revert 18b5799 if you dont like it |
I just did some small fixes to readd the possibility of partially specifying configuration. This also makes variable substitution possible on these entries. For convenience, I split the entries into two categories: Thank you very much for the PR. It is much appreciated. |
With this PR one can add, remove, customize an (virtual) infinite amount of power controls via the config file.
I don't really know if I got the toml macros 100% right but it works for me so it cannot be 100% wrong 😅