Skip to content

Commit

Permalink
ipc: Don't re-export socket types
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Sep 4, 2024
1 parent 268591f commit 9ab887b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions niri-ipc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ use std::str::FromStr;

use serde::{Deserialize, Serialize};

mod socket;
pub use socket::{Socket, SOCKET_PATH_ENV};

pub mod socket;
pub mod state;

/// Request from client to niri.
Expand Down
3 changes: 2 additions & 1 deletion src/ipc/client.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use anyhow::{anyhow, bail, Context};
use niri_ipc::socket::Socket;
use niri_ipc::{
Event, KeyboardLayouts, LogicalOutput, Mode, Output, OutputConfigChanged, Request, Response,
Socket, Transform,
Transform,
};
use serde_json::json;

Expand Down
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use niri::utils::spawning::{
use niri::utils::watcher::Watcher;
use niri::utils::{cause_panic, version, IS_SYSTEMD_SERVICE};
use niri_config::Config;
use niri_ipc::socket::SOCKET_PATH_ENV;
use portable_atomic::Ordering;
use sd_notify::NotifyState;
use smithay::reexports::calloop::EventLoop;
Expand Down Expand Up @@ -191,7 +192,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

// Set NIRI_SOCKET for children.
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());
}

Expand Down Expand Up @@ -262,7 +263,7 @@ fn import_environment() {
"WAYLAND_DISPLAY",
"XDG_CURRENT_DESKTOP",
"XDG_SESSION_TYPE",
niri_ipc::SOCKET_PATH_ENV,
SOCKET_PATH_ENV,
]
.join(" ");

Expand Down

0 comments on commit 9ab887b

Please sign in to comment.