From 1645c921d799d6c996b5adb96a0d0b8eae3647d9 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 14 May 2025 11:33:49 +0200 Subject: [PATCH] config: follow XDG base spec moves /etc/superfreq/config.toml to /etc/xdg/superfreq/config.toml to follow xdg base spec more closely. --- README.md | 2 +- src/config/load.rs | 2 +- src/cpu.rs | 2 +- src/daemon.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 88ebe6a..5669106 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ sudo superfreq set-max-freq 2800 --core-id 1 Superfreq uses TOML configuration files. Default locations: -- `/etc/superfreq/config.toml` +- `/etc/xdg/superfreq/config.toml` - `/etc/superfreq.toml` You can also specify a custom path by setting the `SUPERFREQ_CONFIG` environment diff --git a/src/config/load.rs b/src/config/load.rs index f0fedce..30deabe 100644 --- a/src/config/load.rs +++ b/src/config/load.rs @@ -46,7 +46,7 @@ pub fn load_config_from_path(specific_path: Option<&str>) -> Result Result<()> { // Create directory if it doesn't exist - let dir_path = Path::new("/etc/superfreq"); + let dir_path = Path::new("/etc/xdg/superfreq"); if !dir_path.exists() { fs::create_dir_all(dir_path).map_err(|e| { if e.kind() == io::ErrorKind::PermissionDenied { diff --git a/src/daemon.rs b/src/daemon.rs index b755226..fc94800 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -65,7 +65,7 @@ pub fn run_daemon(mut config: AppConfig, verbose: bool) -> Result<(), Box