Created
February 24, 2023 11:08
-
-
Save kuuote/4b2feda31d80fc8266fc562fc7f89c7f to your computer and use it in GitHub Desktop.
i3でスッとVimを出して保存した結果をクリップボードにコピペするやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -u | |
touch /tmp/clip | |
wezterm start --class Floaterm nvim /tmp/clip || exit 1 # Vimが正しく終了しなかった時はコピーしない | |
# head -c -1は末尾の改行を削ぎ落とすやつ | |
head -c -1 /tmp/clip | xclip -selection clipboard | |
notify-send -t 1000 copied |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bindsym $mod+c exec XMODIFIERS=@im= ~/.config/i3/clip.sh | |
for_window [instance="Floaterm"] floating enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment