diff --git a/kakoune/.config/kak/kakrc b/kakoune/.config/kak/kakrc index 6b83956..ee95f36 100644 --- a/kakoune/.config/kak/kakrc +++ b/kakoune/.config/kak/kakrc @@ -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' map global -docstring 'Dark mode' options-mode 'D' ': colorscheme one-darker' -map global -docstring 'Paste clipboard (append)' user 'p' ' xsel -bo' -map global -docstring 'Paste clipboard (insert)' user 'P' '! xsel -bo' -map global -docstring 'Yank to clipboard' user 'y' ' xsel -bi' +evaluate-commands %sh{ + if [ -n "$WAYLAND_DISPLAY" ]; then + echo " + map global -docstring 'Paste clipboard (append)' user 'p' ' wl-paste -n' + map global -docstring 'Paste clipboard (insert)' user 'P' '! wl-paste -n' + map global -docstring 'Yank to clipboard' user 'y' ' wl-copy' + " + elif [ -n "$DISPLAY" ]; then + echo " + map global -docstring 'Paste clipboard (append)' user 'p' ' xsel -bo' + map global -docstring 'Paste clipboard (insert)' user 'P' '! xsel -bo' + map global -docstring 'Yank to clipboard' user 'y' ' xsel -bi' + " + fi +} map global -docstring 'Replace jump mode' user 'j' ': enter_jump_mode_with_replace_select_mode' map global -docstring 'Extend jump mode' user 'e' ': enter_jump_mode_with_extend_select_mode'