• 0 Posts
  • 82 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle
  • It’s been a while, but my clumsy adding of a comment to the buffer is unnecessary, given zle -M, which will display a message outside of the buffer. So here’s an updated version:

    # -- Run input if single line, otherwise insert newline --
    # Key: enter
    # Credit: https://programming.dev/comment/2479198
    .zle_accept-except-multiline () {
      if [[ $BUFFER != *$'\n'* ]] {
        zle .accept-line
        return
      } else {
        zle .self-insert-unmeta
        zle -M 'Use alt+enter to submit this multiline input'
      }
    }
    zle -N       .zle_accept-except-multiline
    bindkey '^M' .zle_accept-except-multiline  # Enter
    
    # -- Run input if multiline, otherwise insert newline --
    # Key: alt+enter
    # Credit: https://programming.dev/comment/2479198
    .zle_accept-only-multiline () {
      if [[ $BUFFER == *$'\n'* ]] {
        zle .accept-line
      } else {
        zle .self-insert-unmeta
      }
    }
    zle -N         .zle_accept-only-multiline
    bindkey '^[^M' .zle_accept-only-multiline  # Enter
    




  • Andy@programming.devtoLinux@lemmy.mlbest linux terminal emulator
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    4 months ago

    For me: Wezterm. It does pretty much everything. I don’t think Alacritty/Kitty etc. offer anything over it for my usage, and the developer is a pleasure to engage with.

    Second place is Konsole – it does a lot, is easy to configure, and obviously integrates nicely with KDE apps.

    Honorable mention is Extraterm, which has been working on cool features for a long time, and is now Qt based.











  • Andy@programming.devtoLinux@lemmy.mlRectangle for Linux?
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    10 months ago

    I’ll just second the suggestion that KDE Plasma is worth a try, as it’s very adaptable once you know what you want. You don’t need to install any addons for the functionality you describe, just open the Shortcuts settings, KWin category, and have at it.