From 9d491f9f676536634040fea8294dc672f3466e26 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Sat, 8 Oct 2016 18:42:33 -0700 Subject: Start implementing copypasta, a clipboard library Currently it only supports x11 via the xclip program, and that only supports reading the clipboard contents. --- src/input.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index d0cbc600..f1022814 100644 --- a/src/input.rs +++ b/src/input.rs @@ -25,7 +25,7 @@ //! TODO handling xmodmap would be good use std::borrow::Cow; -use clipboard::ClipboardContext; +use copypasta::{Clipboard, Load}; use glutin::{ElementState, VirtualKeyCode, MouseButton}; use glutin::{Mods, mods}; @@ -349,8 +349,8 @@ impl Processor { Action::Esc(s) => notifier.notify(s.as_bytes()), Action::Paste => { println!("paste request"); - let clip = ClipboardContext::new().expect("get clipboard"); - clip.get_contents() + let clip = Clipboard::new().expect("get clipboard"); + clip.load_selection() .map(|contents| { println!("got contents"); notifier.notify(contents.into_bytes()) -- cgit