cabytcini/src/xsetroot.rs

18 lines
318 B
Rust

#![allow(unsafe_code)]
use anyhow::Result;
use std::process::Command;
pub struct XSetRoot;
impl XSetRoot {
pub fn init() -> Result<Self> {
Ok(Self {})
}
pub fn render(&self, text: String) -> Result<()> {
Command::new("xsetroot").arg("-name").arg(text).output()?;
Ok(())
}
}