User kill signal config keys: Use underscore instead of dash
This commit is contained in:
@ -151,14 +151,14 @@ The visual display elements for waybar use a CSS stylesheet, see *waybar-styles(
|
||||
default: *false* ++
|
||||
Option to enable reloading the css style if a modification is detected on the style sheet file or any imported css files.
|
||||
|
||||
*on_sigusr1* ++
|
||||
*on-sigusr1* ++
|
||||
typeof: string ++
|
||||
default: *toggle* ++
|
||||
Action that is performed when receiving SIGUSR1 kill signal. ++
|
||||
Possible values: *show*, *hide*, *toggle*, *reload*, *noop*. ++
|
||||
Default value: *toggle*.
|
||||
|
||||
*on_sigusr2* ++
|
||||
*on-sigusr2* ++
|
||||
typeof: string ++
|
||||
default: *reload* ++
|
||||
Action that is performed when receiving SIGUSR2 kill signal. ++
|
||||
@ -230,7 +230,7 @@ For example, to toggle the bar programmatically, you can invoke `killall -SIGUSR
|
||||
|
||||
## User signal configuration
|
||||
|
||||
Config parameters *on_sigusr1* and *on_sigusr2* change what happens when bars receive
|
||||
Config parameters *on-sigusr1* and *on-sigusr2* change what happens when bars receive
|
||||
*SIGUSR1* and *SIGUSR2* signals.
|
||||
|
||||
This means that commands `killall -SIGUSR1 waybar` and `killall -SIGUSR2 waybar`
|
||||
|
@ -280,7 +280,7 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
|
||||
#endif
|
||||
|
||||
waybar::util::EnumParser<util::KillSignalAction> m_signalActionEnumParser;
|
||||
const auto& configSigusr1 = config["on_sigusr1"];
|
||||
const auto& configSigusr1 = config["on-sigusr1"];
|
||||
if (configSigusr1.isString()) {
|
||||
auto strSigusr1 = configSigusr1.asString();
|
||||
try {
|
||||
@ -289,10 +289,10 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
|
||||
} catch (const std::invalid_argument& e) {
|
||||
onSigusr1 = util::SIGNALACTION_DEFAULT_SIGUSR1;
|
||||
spdlog::warn(
|
||||
"Invalid string representation for on_sigusr1. Falling back to default mode (toggle).");
|
||||
"Invalid string representation for on-sigusr1. Falling back to default mode (toggle).");
|
||||
}
|
||||
}
|
||||
const auto& configSigusr2 = config["on_sigusr2"];
|
||||
const auto& configSigusr2 = config["on-sigusr2"];
|
||||
if (configSigusr2.isString()) {
|
||||
auto strSigusr2 = configSigusr2.asString();
|
||||
try {
|
||||
@ -301,7 +301,7 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
|
||||
} catch (const std::invalid_argument& e) {
|
||||
onSigusr2 = util::SIGNALACTION_DEFAULT_SIGUSR2;
|
||||
spdlog::warn(
|
||||
"Invalid string representation for on_sigusr2. Falling back to default mode (reload).");
|
||||
"Invalid string representation for on-sigusr2. Falling back to default mode (reload).");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user