From c88f3da4acc79bb4d570c0469d25263f96ed0925 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 2 Apr 2019 21:27:47 +0100 Subject: [PATCH] Augment clipmenu KBD to paste-in-place Introduces the `xdotool` dependency, which is a way to simulate X window events from the CLI. --- configs/shared/misc/.config/i3/config.shared | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configs/shared/misc/.config/i3/config.shared b/configs/shared/misc/.config/i3/config.shared index 6eb7addee..ddd84c041 100644 --- a/configs/shared/misc/.config/i3/config.shared +++ b/configs/shared/misc/.config/i3/config.shared @@ -80,7 +80,11 @@ bindsym $mod+n exec st -e lf ~/Downloads # NOTE: Ctrl-c is already covered since `clipmenu` listens for X clipboard # events using `clipnotify`. # NOTE: `clipmenud` is started in `.xsessionrc.shared` -bindsym Ctrl+$mod+v exec clipmenu +# NOTE: This is a bit of a hack intended to support pasting in both the terminal +# and in GUI applications. `st` expects `ctrl+Shift+v` while GUIs expect +# `ctrl+v`. In the instances where GUIs don't support `ctrl+Shift+v` already, it +# acts like `ctrl+v`, so it should "just work". +bindsym Ctrl+$mod+v exec clipmenu && xdotool key --clearmodifiers ctrl+Shift+v # Screenshot # TODO: find a better KBD for this