Compare commits

...

2 Commits

Author SHA1 Message Date
60a7f4ddff feat: always centre column after action 2025-06-23 01:02:24 +10:00
b621743d9d chore: tidy imports 2025-06-23 01:02:01 +10:00
2 changed files with 8 additions and 5 deletions

View File

@ -1,13 +1,11 @@
use std::{
collections::{BTreeMap, HashMap},
net::SocketAddr,
os::linux::net::SocketAddrExt,
path::PathBuf,
str::FromStr,
};
use crate::socket::{create_niri_socket, tell};
use anyhow::{Error, Result, anyhow};
use anyhow::{Result, anyhow};
use microxdg::Xdg;
use niri_ipc::{Event, Request};
use niri_tag::{TagCmd, TagEvent, TagState};
@ -16,7 +14,7 @@ use nix::unistd::geteuid;
use smol::{
channel::{self},
future,
io::{AsyncBufReadExt, AsyncWriteExt, BufReader, BufWriter},
io::{AsyncBufReadExt, AsyncWriteExt, BufReader},
net::unix::{UnixListener, UnixStream},
stream::StreamExt,
};

View File

@ -353,7 +353,12 @@ impl NiriTag {
},
};
// then arrange corresponding state in the compositor
self.do_action(action).await
self.do_action(action).await?;
tell(
&mut self.socket,
Request::Action(Action::CenterVisibleColumns {}),
)
.await
}
async fn handle_event(&mut self, ev: Event) -> Result<()> {