forge
Explore
Log in

Don't you dare go Hollow

ipc: Don't re-export socket types

Browse files at this commit

9ab887bec891db61b7f97428dc803f417ed9640aIvan MolodetskikhParent: 268591f
niri-ipc/src/lib.rsmodified+1 -3
@@ -6,9 +6,7 @@ use std::str::FromStr;
66
77 use serde::{Deserialize, Serialize};
88
9-mod socket;
10-pub use socket::{Socket, SOCKET_PATH_ENV};
11-
9+pub mod socket;
1210 pub mod state;
1311
1412 /// Request from client to niri.
src/ipc/client.rsmodified+2 -1
@@ -1,7 +1,8 @@
11 use anyhow::{anyhow, bail, Context};
2+use niri_ipc::socket::Socket;
23 use niri_ipc::{
34 Event, KeyboardLayouts, LogicalOutput, Mode, Output, OutputConfigChanged, Request, Response,
4- Socket, Transform,
5+ Transform,
56 };
67 use serde_json::json;
78
src/main.rsmodified+3 -2
@@ -24,6 +24,7 @@ use niri::utils::spawning::{
2424 use niri::utils::watcher::Watcher;
2525 use niri::utils::{cause_panic, version, IS_SYSTEMD_SERVICE};
2626 use niri_config::Config;
27+use niri_ipc::socket::SOCKET_PATH_ENV;
2728 use portable_atomic::Ordering;
2829 use sd_notify::NotifyState;
2930 use smithay::reexports::calloop::EventLoop;
@@ -191,7 +192,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
191192
192193 // Set NIRI_SOCKET for children.
193194 if let Some(ipc) = &state.niri.ipc_server {
194- env::set_var(niri_ipc::SOCKET_PATH_ENV, &ipc.socket_path);
195+ env::set_var(SOCKET_PATH_ENV, &ipc.socket_path);
195196 info!("IPC listening on: {}", ipc.socket_path.to_string_lossy());
196197 }
197198
@@ -262,7 +263,7 @@ fn import_environment() {
262263 "WAYLAND_DISPLAY",
263264 "XDG_CURRENT_DESKTOP",
264265 "XDG_SESSION_TYPE",
265- niri_ipc::SOCKET_PATH_ENV,
266+ SOCKET_PATH_ENV,
266267 ]
267268 .join(" ");
268269