Add option to change shutdown/reboot keys (#487)

Include options in the configuration to change which function keys to use for shutdown and reboot.
Fix config.map_len size in src/config.c.
Add missing defaults in config_defaults() in src/config.c.
This commit is contained in:
lolicon0930
2023-06-20 11:22:38 +00:00
committed by GitHub
parent 0edb0012ab
commit 42bf929756
23 changed files with 150 additions and 86 deletions

View File

@@ -3,7 +3,7 @@
# The active animation
# 0 -> PSX DOOM fire (default)
# 1 -> CMatrix
# 1 -> CMatrix
#animation = 0
# format string for clock in top right corner (see strftime specification)
@@ -29,12 +29,12 @@
#define TB_CYAN 0x07
#define TB_WHITE 0x08
#
# Setting both to zero makes `bg` black and `fg` white. To set the actual color palette you are encouraged to use another tool
# such as [mkinitcpio-colors](https://github.com/evanpurkhiser/mkinitcpio-colors). Note that the color palette defined with
# `mkinitcpio-colors` takes 16 colors (0-15), only values 0-8 are valid for `ly` config and these values do not correspond
# exactly. For instance, in defining palettes with `mkinitcpio-colors` the order is black, dark red, dark green, brown, dark
# blue, dark purple, dark cyan, light gray, dark gray, bright red, bright green, yellow, bright blue, bright purple, bright
# cyan, and white, indexed in that order 0 through 15. For example, the color defined for white (indexed at 15 in the mkinitcpio
# Setting both to zero makes `bg` black and `fg` white. To set the actual color palette you are encouraged to use another tool
# such as [mkinitcpio-colors](https://github.com/evanpurkhiser/mkinitcpio-colors). Note that the color palette defined with
# `mkinitcpio-colors` takes 16 colors (0-15), only values 0-8 are valid for `ly` config and these values do not correspond
# exactly. For instance, in defining palettes with `mkinitcpio-colors` the order is black, dark red, dark green, brown, dark
# blue, dark purple, dark cyan, light gray, dark gray, bright red, bright green, yellow, bright blue, bright purple, bright
# cyan, and white, indexed in that order 0 through 15. For example, the color defined for white (indexed at 15 in the mkinitcpio
# config) will be used by `ly` for `fg = 8`.
# Background color id
@@ -76,13 +76,19 @@
#save_file = /etc/ly/save
# Remove F1/F2 command hints
#hide_f1_commands = false
# Remove power management command hints
#hide_key_hints = false
# Command executed when pressing F1
# Specifies the key used for shutdown
#shutdown_key = F1
# Specifies the key used for restart
#restart_key = F2
# Command executed when pressing shutdown_key
#shutdown_cmd = /sbin/shutdown -a now
# Command executed when pressing F2
# Command executed when pressing restart_key
#restart_cmd = /sbin/shutdown -r now