Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ backward_button = 275 # Button 8
minimize_inactive = false # Minimize clients when cycling away (saves resources)
```

The path to the config directory can be customized by setting the `EVE_NICOTINE_CONFIG_DIR` environment variable.

## Architecture

- **Daemon mode**: Maintains window manager connection and state in memory for instant cycling
Expand Down
13 changes: 9 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{Context, Result};
use serde::{Deserialize, Serialize};
use std::fs;
use std::{env, fs};
use std::path::PathBuf;

#[derive(Debug, Serialize, Deserialize, Clone)]
Expand Down Expand Up @@ -58,9 +58,14 @@ fn default_minimize_inactive() -> bool {

impl Config {
fn config_dir() -> PathBuf {
let mut path = dirs::config_dir().unwrap_or_else(|| PathBuf::from("."));
path.push("nicotine");
path
match env::var("EVE_NICOTINE_CONFIG_DIR") {
Ok(path) => PathBuf::from(path),
Err(_) => {
let mut path = dirs::config_dir().unwrap_or_else(|| PathBuf::from("."));
path.push("nicotine");
path
}
}
}

fn config_path() -> PathBuf {
Expand Down
Loading