From 2e15ab83a8acb809f4e515ca66aa013c69d79222 Mon Sep 17 00:00:00 2001 From: Kirottu Date: Sun, 5 Feb 2023 21:43:45 +0200 Subject: [PATCH] Revert "Initial randr plugin commit" This reverts commit 68928d9623d5542b47ba5ebfb5b7af803d60021a. --- Cargo.lock | 8 -------- Cargo.toml | 1 - plugins/randr/Cargo.toml | 13 ------------- plugins/randr/src/lib.rs | 6 ------ plugins/randr/src/randr.rs | 20 -------------------- plugins/randr/src/wlr_randr.rs | 24 ------------------------ 6 files changed, 72 deletions(-) delete mode 100644 plugins/randr/Cargo.toml delete mode 100644 plugins/randr/src/lib.rs delete mode 100644 plugins/randr/src/randr.rs delete mode 100644 plugins/randr/src/wlr_randr.rs diff --git a/Cargo.lock b/Cargo.lock index d8454c0..95be35d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1430,14 +1430,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "randr" -version = "0.1.0" -dependencies = [ - "abi_stable", - "anyrun-plugin", -] - [[package]] name = "redox_syscall" version = "0.2.16" diff --git a/Cargo.toml b/Cargo.toml index 2797723..dc61ef8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,5 +8,4 @@ members = [ "plugins/rink", "plugins/shell", "plugins/translate", - "plugins/randr", ] \ No newline at end of file diff --git a/plugins/randr/Cargo.toml b/plugins/randr/Cargo.toml deleted file mode 100644 index d4656e8..0000000 --- a/plugins/randr/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "randr" -version = "0.1.0" -edition = "2021" - -[lib] -crate-type = ["cdylib"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -abi_stable = "0.11.1" -anyrun-plugin = { path = "../../anyrun-plugin" } diff --git a/plugins/randr/src/lib.rs b/plugins/randr/src/lib.rs deleted file mode 100644 index e4e8772..0000000 --- a/plugins/randr/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -use randr::Randr; - -mod randr; -mod wlr_randr; - -fn init() -> Box {} diff --git a/plugins/randr/src/randr.rs b/plugins/randr/src/randr.rs deleted file mode 100644 index 459adf7..0000000 --- a/plugins/randr/src/randr.rs +++ /dev/null @@ -1,20 +0,0 @@ -pub struct Mode { - width: u32, - height: u32, - rate: f64, - preferred: bool, - current: bool, -} - -pub struct Monitor { - output: String, - modes: Vec, - x: i32, - y: i32, - enabled: bool, -} - -pub trait Randr { - fn get_monitors(&self) -> Vec; - fn set_mode(&self, mon: &Monitor, mode: &Mode) -> Result<(), String>; -} diff --git a/plugins/randr/src/wlr_randr.rs b/plugins/randr/src/wlr_randr.rs deleted file mode 100644 index d302b67..0000000 --- a/plugins/randr/src/wlr_randr.rs +++ /dev/null @@ -1,24 +0,0 @@ -use std::process::Command; - -use crate::randr::{Mode, Monitor, Randr}; - -pub struct WlrRandr { - pub exec: String, -} - -impl WlrRandr { - fn run_wlr_randr(&self, args: &[&str]) -> String { - String::from_utf8(Command::new(self.exec).args(args).output().unwrap().stdout).unwrap() - } -} - -impl Randr for WlrRandr { - fn get_monitors(&self) -> Vec { - let output = self.run_wlr_randr(&[]); - todo!() - } - - fn set_mode(&self, mon: &Monitor, mode: &Mode) -> Result<(), String> { - todo!() - } -}