ipc: Don't re-export socket types

This commit is contained in:
Ivan Molodetskikh
2024-09-04 12:02:44 +03:00
parent 268591f343
commit 9ab887bec8
3 changed files with 6 additions and 6 deletions
+1 -3
View File
@@ -6,9 +6,7 @@ use std::str::FromStr;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
mod socket; pub mod socket;
pub use socket::{Socket, SOCKET_PATH_ENV};
pub mod state; pub mod state;
/// Request from client to niri. /// Request from client to niri.
+2 -1
View File
@@ -1,7 +1,8 @@
use anyhow::{anyhow, bail, Context}; use anyhow::{anyhow, bail, Context};
use niri_ipc::socket::Socket;
use niri_ipc::{ use niri_ipc::{
Event, KeyboardLayouts, LogicalOutput, Mode, Output, OutputConfigChanged, Request, Response, Event, KeyboardLayouts, LogicalOutput, Mode, Output, OutputConfigChanged, Request, Response,
Socket, Transform, Transform,
}; };
use serde_json::json; use serde_json::json;
+3 -2
View File
@@ -24,6 +24,7 @@ use niri::utils::spawning::{
use niri::utils::watcher::Watcher; use niri::utils::watcher::Watcher;
use niri::utils::{cause_panic, version, IS_SYSTEMD_SERVICE}; use niri::utils::{cause_panic, version, IS_SYSTEMD_SERVICE};
use niri_config::Config; use niri_config::Config;
use niri_ipc::socket::SOCKET_PATH_ENV;
use portable_atomic::Ordering; use portable_atomic::Ordering;
use sd_notify::NotifyState; use sd_notify::NotifyState;
use smithay::reexports::calloop::EventLoop; use smithay::reexports::calloop::EventLoop;
@@ -191,7 +192,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Set NIRI_SOCKET for children. // Set NIRI_SOCKET for children.
if let Some(ipc) = &state.niri.ipc_server { if let Some(ipc) = &state.niri.ipc_server {
env::set_var(niri_ipc::SOCKET_PATH_ENV, &ipc.socket_path); env::set_var(SOCKET_PATH_ENV, &ipc.socket_path);
info!("IPC listening on: {}", ipc.socket_path.to_string_lossy()); info!("IPC listening on: {}", ipc.socket_path.to_string_lossy());
} }
@@ -262,7 +263,7 @@ fn import_environment() {
"WAYLAND_DISPLAY", "WAYLAND_DISPLAY",
"XDG_CURRENT_DESKTOP", "XDG_CURRENT_DESKTOP",
"XDG_SESSION_TYPE", "XDG_SESSION_TYPE",
niri_ipc::SOCKET_PATH_ENV, SOCKET_PATH_ENV,
] ]
.join(" "); .join(" ");