update names

This commit is contained in:
cool-mist
2026-07-12 10:39:21 +05:30
parent 8be77f8cc7
commit fe8a1ececb
2 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ pub struct Config {
impl Config { impl Config {
pub(crate) fn create() -> WResult<Self> { pub(crate) fn create() -> WResult<Self> {
let mut config_parent = Config::get_parent()?; let mut config_parent = Config::get_parent()?;
config_parent.push("woly.conf"); config_parent.push("wolz.conf");
let config_file = config_parent; let config_file = config_parent;
if config_file.exists() { if config_file.exists() {
return Config::read_existing_conf(config_file); return Config::read_existing_conf(config_file);
@@ -104,7 +104,7 @@ impl Config {
} }
fn get_parent() -> WResult<PathBuf> { fn get_parent() -> WResult<PathBuf> {
let config_dir_env_var_name = "WOLY_CONFIG_HOME"; let config_dir_env_var_name = "WOLZ_CONFIG_HOME";
let config_dir_name = std::env::var(config_dir_env_var_name); let config_dir_name = std::env::var(config_dir_env_var_name);
if let Ok(config_dir_name) = config_dir_name { if let Ok(config_dir_name) = config_dir_name {
let path = PathBuf::from(config_dir_name); let path = PathBuf::from(config_dir_name);
@@ -133,7 +133,7 @@ impl Config {
return Err(WError::ConfigDirInitError(format!( return Err(WError::ConfigDirInitError(format!(
"Set one of {}, {} or {} environment variable to determine the config directory", "Set one of {}, {} or {} environment variable to determine the config directory",
"$WOLY_CONFIG_HOME", "$XDG_CONFIG_HOME", "$HOME" "$WOLZ_CONFIG_HOME", "$XDG_CONFIG_HOME", "$HOME"
))); )));
} }
+7 -7
View File
@@ -47,7 +47,7 @@ fn main() -> WResult<()> {
fn print_usage() -> WResult<()> { fn print_usage() -> WResult<()> {
println!( println!(
"{}", "{}",
r#"usage: woly COMMAND ARG r#"usage: wolz COMMAND ARG
Options: Options:
COMMAND One of `up`, `down` or `daemon` COMMAND One of `up`, `down` or `daemon`
@@ -56,15 +56,15 @@ Options:
`daemon` - Runs a daemon. This needs to be running on `daemon` - Runs a daemon. This needs to be running on
the target machine that needs to be shutdown the target machine that needs to be shutdown
ARG Either the mac address of the device or a nickname ARG Either the mac address of the device or a nickname
specified in woly.conf to lookup the mac. See details specified in wolz.conf to lookup the mac. See details
about config file below. about config file below.
Eg: woly up aa:bb:cc:dd:ee:ff Eg: wolz up aa:bb:cc:dd:ee:ff
Eg: woly down potato Eg: wolz down potato
Config file: Config file:
Filename woly.conf Filename wolz.conf
Location $WOLY_CONFIG_DIR/woly.conf, then $XDG_CONFIG_DIR/woly.conf, Location $WOLZ_CONFIG_DIR/wolz.conf, then $XDG_CONFIG_DIR/wolz.conf,wolz
then $HOME/woly.conf then $HOME/wolz.conf
Format KEY=VALUE Format KEY=VALUE
one per line without spaces, no comments allowed one per line without spaces, no comments allowed
Example potato=aa:bb:cc:dd:ee:ff Example potato=aa:bb:cc:dd:ee:ff