1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00

config: follow XDG base spec

moves /etc/superfreq/config.toml to /etc/xdg/superfreq/config.toml
to follow xdg base spec more closely.
This commit is contained in:
Bloxx12 2025-05-14 11:33:49 +02:00
parent 78490f7c08
commit 1645c921d7
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -46,7 +46,7 @@ pub fn load_config_from_path(specific_path: Option<&str>) -> Result<AppConfig, C
}
// System-wide paths
config_paths.push(PathBuf::from("/etc/superfreq/config.toml"));
config_paths.push(PathBuf::from("/etc/xdg/superfreq/config.toml"));
config_paths.push(PathBuf::from("/etc/superfreq.toml"));
for path in config_paths {

View file

@ -274,7 +274,7 @@ const GOVERNOR_OVERRIDE_PATH: &str = "/etc/superfreq/governor_override";
/// Force a specific CPU governor or reset to automatic mode
pub fn force_governor(mode: GovernorOverrideMode) -> 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 {

View file

@ -65,7 +65,7 @@ pub fn run_daemon(mut config: AppConfig, verbose: bool) -> Result<(), Box<dyn st
Some(path)
} else {
// Check standard config paths
let default_paths = ["/etc/superfreq/config.toml", "/etc/superfreq.toml"];
let default_paths = ["/etc/xdg/superfreq/config.toml", "/etc/superfreq.toml"];
default_paths
.iter()