Fix doc paths

Also some other random cleanup
This commit is contained in:
Ottatop 2024-02-17 23:57:02 -06:00
parent 9b5eac55d1
commit 832165b838
3 changed files with 10 additions and 18 deletions

View file

@ -27,10 +27,10 @@ jobs:
- name: Build docs
run: cd ./api/rust && cargo doc
- name: Create index.html
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=pinnacle_api\">" > ./api/rust/target/doc/index.html
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=pinnacle_api\">" > ./target/doc/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./api/rust/target/doc
publish_dir: ./target/doc
destination_dir: ${{ env.BRANCH_NAME }}/rust

View file

@ -447,11 +447,7 @@ impl pinnacle_api_defs::pinnacle::process::v0alpha1::process_service_server::Pro
}
let Ok(mut child) = tokio::process::Command::new(OsString::from(arg0.clone()))
.envs(
[("WAYLAND_DISPLAY", state.socket_name.clone())]
.into_iter()
.chain(state.xdisplay.map(|xdisp| ("DISPLAY", format!(":{xdisp}")))),
)
.envs(state.xdisplay.map(|xdisp| ("DISPLAY", format!(":{xdisp}"))))
.stdin(match has_callback {
true => Stdio::piped(),
false => Stdio::null(),

View file

@ -50,8 +50,6 @@ pub struct State {
pub clock: Clock<Monotonic>,
pub space: Space<WindowElement>,
/// The name of the Wayland socket
pub socket_name: String,
pub seat: Seat<State>,
@ -108,11 +106,11 @@ impl State {
let socket = ListeningSocketSource::new_auto()?;
let socket_name = socket.socket_name().to_os_string();
std::env::set_var("WAYLAND_DISPLAY", socket_name.clone());
tracing::info!(
"Set WAYLAND_DISPLAY to {}",
socket_name.clone().to_string_lossy()
"Setting WAYLAND_DISPLAY to {}",
socket_name.to_string_lossy()
);
std::env::set_var("WAYLAND_DISPLAY", socket_name);
// Opening a new process will use up a few file descriptors, around 10 for Alacritty, for
// example. Because of this, opening up only around 100 processes would exhaust the file
@ -170,8 +168,8 @@ impl State {
let xwayland = {
let (xwayland, channel) = XWayland::new(&display_handle);
let clone = display_handle.clone();
tracing::debug!("inserting into loop");
let dh_clone = display_handle.clone();
let res = loop_handle.insert_source(channel, move |event, _, state| match event {
XWaylandEvent::Ready {
connection,
@ -181,7 +179,7 @@ impl State {
} => {
let mut wm = X11Wm::start_wm(
state.loop_handle.clone(),
clone.clone(),
dh_clone.clone(),
connection,
client,
)
@ -254,11 +252,9 @@ impl State {
dnd_icon: None,
socket_name: socket_name.to_string_lossy().to_string(),
popup_manager: PopupManager::default(),
windows: vec![],
windows: Vec::new(),
new_windows: Vec::new(),
xwayland,