SHARE
TWEET

Untitled

a guest Mar 24th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::fs::File;
  2. use std::io::{BufRead, BufReader};
  3.  
  4. let f = File::open("/run/user/1000/bspwm_fifo.paahBQ").unwrap();
  5. let mut b = String::new();
  6. let mut reader = BufReader::new(f);
  7.  
  8. loop {
  9.     let data = reader.read_line(&mut b).unwrap();
  10.     if data != 0 {
  11.         println!("data: {}", b);
  12.             b.clear();
  13.         }
  14.     }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top