Skip to content

Instantly share code, notes, and snippets.

@kuuote
Created February 24, 2023 11:08
Show Gist options
  • Save kuuote/4b2feda31d80fc8266fc562fc7f89c7f to your computer and use it in GitHub Desktop.
Save kuuote/4b2feda31d80fc8266fc562fc7f89c7f to your computer and use it in GitHub Desktop.
i3でスッとVimを出して保存した結果をクリップボードにコピペするやつ
#!/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
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