mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
ipc: Don't re-export socket types
This commit is contained in:
+1
-3
@@ -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
@@ -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
@@ -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(" ");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user