kakoune: support wayland or X clipboard (autodetect)
This commit is contained in:
@@ -45,9 +45,21 @@ map global -docstring 'LP Light mode' options-mode 'l' ': colorscheme four-color
|
||||
map global -docstring 'Light mode' options-mode 'L' ': colorscheme one-light<ret>'
|
||||
map global -docstring 'Dark mode' options-mode 'D' ': colorscheme one-darker<ret>'
|
||||
|
||||
map global -docstring 'Paste clipboard (append)' user 'p' '<a-!> xsel -bo<ret>'
|
||||
map global -docstring 'Paste clipboard (insert)' user 'P' '! xsel -bo<ret>'
|
||||
map global -docstring 'Yank to clipboard' user 'y' '<a-|> xsel -bi<ret>'
|
||||
evaluate-commands %sh{
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
echo "
|
||||
map global -docstring 'Paste clipboard (append)' user 'p' '<a-!> wl-paste -n<ret>'
|
||||
map global -docstring 'Paste clipboard (insert)' user 'P' '! wl-paste -n<ret>'
|
||||
map global -docstring 'Yank to clipboard' user 'y' '<a-|> wl-copy<ret>'
|
||||
"
|
||||
elif [ -n "$DISPLAY" ]; then
|
||||
echo "
|
||||
map global -docstring 'Paste clipboard (append)' user 'p' '<a-!> xsel -bo<ret>'
|
||||
map global -docstring 'Paste clipboard (insert)' user 'P' '! xsel -bo<ret>'
|
||||
map global -docstring 'Yank to clipboard' user 'y' '<a-|> xsel -bi<ret>'
|
||||
"
|
||||
fi
|
||||
}
|
||||
|
||||
map global -docstring 'Replace jump mode' user 'j' ': enter_jump_mode_with_replace_select_mode<ret>'
|
||||
map global -docstring 'Extend jump mode' user 'e' ': enter_jump_mode_with_extend_select_mode<ret>'
|
||||
|
||||
Reference in New Issue
Block a user