This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
// const log = std.log; | |
const print = std.debug.print; | |
var gpa: std.heap.GeneralPurposeAllocator(.{}) = .{}; | |
const gpa_alloc = gpa.allocator(); | |
var arena = std.heap.ArenaAllocator.init(gpa_alloc); | |
const arena_alloc = arena.allocator(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::string::String; | |
use serde::de::DeserializeOwned; | |
use serde::Deserialize; | |
use smallvec::SmallVec; | |
use tokio::io::{AsyncReadExt, AsyncWriteExt}; | |
use tokio::net::UnixStream; | |
use tokio::task::JoinHandle; | |
pub const QWW: &str = "query\0--windows\0--window\0\0"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use compact_str::{CompactString, ToCompactString}; | |
use tokio::task::JoinHandle; | |
use crate::yabai::{ | |
send, send_async, CmdError, Display, Space, Window, STACKED_BORDER, UNFOCUSED_BORDER, UNSTACKED_BORDER, | |
}; | |
#[derive(Default)] | |
pub struct Mover { | |
input_dir: CompactString, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use compact_str::ToCompactString; | |
use tokio::io::{AsyncReadExt, AsyncWriteExt}; | |
use tokio::net::UnixStream; | |
use crate::mover::Mover; | |
use crate::yabai::{send, CmdError, Display, Window, ADDR, QWW, STACKED_BORDER, UNSTACKED_BORDER}; | |
pub async fn border_color() -> anyhow::Result<()> { | |
// println!("running border_color"); | |
let mut socket = UnixStream::connect(ADDR).await?; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fs; | |
use tokio::io::AsyncReadExt; | |
use tokio::net::{UnixListener, UnixStream}; | |
use crate::runner::{border_color, focus_window, start_move}; | |
use crate::yabai::Y3_ADDR; | |
mod yabai; | |
mod runner; |