I think I have a pretty good developer env going on, but I’m always looking for more things I haven’t thought of.

So does anybody have any uber useful, or fun, or just a general favorite shell/terminal setup or tool?

  • tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    8 days ago

    A have it so that my shell always opens tmux, unless it’s a login shell or dumb shell.

    # ~/.bashrc
    ## Top of your RC
    [[ $- != *i* ]] && return          # If not running interactively, don't do anything
    [ -z "$PS1" ] && return            # If not running interactively, don't do anything
    [[ $TERM == dumb ]] && return      # If called from emacs, don't do anything
    
    ## Put the rest of your code here
    
    ## Bottom of RC
    shopt -q login_shell && return       ## If this is a login shell, load all except tmux
    
    if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
        tmux attach || exec tmux new-session 
    fi
    

    That way, I always have persistent terminal sessions and don’t need a terminal emulator that has tabs since I can just do multiplexing in tmux