mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-27 21:58:18 +01:00
Add pinnacle
to default config dir, fix windows on udev
This commit is contained in:
parent
73d1916403
commit
3623df002b
2 changed files with 12 additions and 4 deletions
|
@ -59,7 +59,7 @@ impl<B: Backend> State<B> {
|
|||
state.focused_tags().next().cloned().map(|tag| tag.layout())
|
||||
}) else { return };
|
||||
|
||||
let (windows_on_foc_tags, windows_not_on_foc_tags): (Vec<_>, _) =
|
||||
let (windows_on_foc_tags, mut windows_not_on_foc_tags): (Vec<_>, _) =
|
||||
output.with_state(|state| {
|
||||
let focused_tags = state.focused_tags().collect::<Vec<_>>();
|
||||
self.windows.iter().cloned().partition(|win| {
|
||||
|
@ -67,6 +67,8 @@ impl<B: Backend> State<B> {
|
|||
})
|
||||
});
|
||||
|
||||
windows_not_on_foc_tags.retain(|win| win.output(self) == Some(output.clone()));
|
||||
|
||||
let tiled_windows = windows_on_foc_tags
|
||||
.iter()
|
||||
.filter(|win| {
|
||||
|
|
12
src/state.rs
12
src/state.rs
|
@ -351,9 +351,15 @@ impl<B: Backend> State<B> {
|
|||
|
||||
fn start_config() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let config_dir = {
|
||||
let config_dir = std::env::var("PINNACLE_CONFIG_DIR")
|
||||
.or_else(|_| std::env::var("XDG_CONFIG_HOME"))
|
||||
.unwrap_or("~/.config".to_string());
|
||||
let config_dir = std::env::var("PINNACLE_CONFIG_DIR").unwrap_or_else(|_| {
|
||||
let default_config_dir =
|
||||
std::env::var("XDG_CONFIG_HOME").unwrap_or("~/.config".to_string());
|
||||
|
||||
PathBuf::from(default_config_dir)
|
||||
.join("pinnacle")
|
||||
.to_string_lossy()
|
||||
.to_string()
|
||||
});
|
||||
PathBuf::from(shellexpand::tilde(&config_dir).to_string())
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue