I have used a couple of standard terminal emulators on a regular basis including xfce terminal, gnome terminal and Konsole. However, I see many nice tweaks for example changing how the home displays, auto suggestions for commands or other nifty tweaks, which together make it look better or add functionality. I haven’t gone much beyond trying alacritty as alternative and installing neofetch.
What are your favorite tweaks? package name, instructions and/or screenshot are welcome
Edit: @Kresimir mentioned zsh, I think that is the shell to do this. What tweaks do you guys have for total newbie?!
It’s not really a “terminal tweak”, but a shell. However, it makes all those things you mention possible within any terminal emulator. Though, to be fair, you can do most of these things with only Bash, at least on a rudimentary level.
Also, you don’t need to chsh to use Zsh, it’s enough to start the terminal emulator with it.
You can also install zsh-autosuggestions, zsh-completions and zsh-history-substring-search. You also have to source the appropriate scripts in your .zshrc. Just make sure zsh-syntax-highlighting is sourced last.
I think the best start to tweak your shell (bash, zsh, or else) is to begin with aliases. Start to create some aliases for your most common commands. You can also begin to set some variables (like $EDITOR) and begin to use these variables to launch or config apps. No need to master this, just to know this and use it to get more speed and comfort in everyday usage of your system.
I’ve been using Zsh for about two years. It’s pretty much the only shell I use in interactive sessions. At first I also used chsh to set it as the default shell for my user (but not for the root user, you shouldn’t do that on Arch). But recently (about a year ago), I stopped doing that. I keep Bash as the default shell for all users. Since all of my interactive shell sessions happen in Konsole, my terminal emulator of choice, it is sufficient to just start Konsole with Zsh in it. This gives me the benefit of having Bash as my user’s default shell, without ever actually using it in normal situations. If something goes wrong, and I have to use the TTY, then I all the fancy Zsh features just get in my way, and I prefer to have very plainly configured Bash. That is more than sufficient to fix whatever issue caused me to need to use the TTY.
The things you mentioned can be done with the default bash shell as well by editing .bashrc file. The things you have mentioned or trying to do are not terminal tweaks they are additional functions ported or sourced in via plugins (which are mainly .sh or .zsh files).
First of you need to understand that zsh is not a terminal tweak. It’s a command interpreter that sits behind a terminal program and executes the commands the user passes through the terminal.
Many shells can be used. A few are below.
Bash Shell (Bourne Again Shell)
Tcsh/Csh Shell
Ksh Shell (Korn shell)
Zsh Shell (Zsh is compatible with most of the above shells)
ZSH is a widely used and very versatile shell compared to most. It’s compatible with POSIX unlike fish shell (fish is good but it kind of breaks things if used as the main shell). ZSH can be used as the main shell without much issue (in my experience).
I saw that @mbod mentioning oh-my-zsh. You really don’t need that to run or use zsh or to have the functions. oh-my-zsh is a plugin manager that comes with a tone of unwanted stuff or scripts (in other words bloat). on-my-zsh tends to slow down zsh itself.
If you really need a plugin manager then you can use a non-bloated one.
But personally, I don’t think we need a plugin manager because these plugins don’t get updated that often.
If possible watch this video it’ll give you some more understanding of using the .zshrc to archive the similar functions without having to install oh-my-zsh. But it’s best to learn stuff with Bash get comfortable and then move to a shell-like zsh but it’s up to you.
If you want to see how .zshrc looks after configuring you can use mine but it’s better to create your own. I don’t have variables or aliases set because I like to type the commands.
# Lines configured by zsh-newuser-install
#Some eye candy
neofetch
#History in the cache directory and the lines remember
HISTFILE=~/.cache/zsh/history
HISTSIZE=10000
SAVEHIST=10000
#EMACS mode foe keymap
bindkey -e
#Keybinds
bindkey "^[[3~" delete-char #Delete key bind
bindkey "^[[H" beginning-of-line #Use home key to jump to beginning of line
bindkey "^[[F" end-of-line #Use home key to jump to end of line
#Prompt and colors
autoload -U colors && colors
#Simple auto/tab complete
autoload -U compinit && compinit -u
zstyle ':completion:*' menu select
# Auto complete with case insenstivity
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zmodload zsh/complist
compinit
_comp_options+=(globdots) # Include hidden files.
# Edit line in vim with ctrl-e
autoload edit-command-line; zle -N edit-command-line
bindkey '^e' edit-command-line
# Use lf to switch directories and bind it to ctrl-o
lfcd () {
tmp="$(mktemp)"
lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
#Key bind Ctrl + o open lf
bindkey -s '^o' 'lfcd\n'
#Using star ship prompt
autoload -U promptinit; promptinit
prompt spaceship
########################## Plugin Area Start ###################################
#Loding zsh-completions plugin
source ~/.config/zsh/plugins/zsh-completions/zsh-completions.plugin.zsh 2>/dev/null
#Loding zsh-autosuggestion plugin
source ~/.config/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
#Loding zsh-syntax-highlighting plugin
source ~/.config/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
#Loading command-not-found plugin
source ~/.config/zsh/plugins/command-not-found/command-not-found.zsh 2>/dev/null
#Loading zsh-you-should-use plugin
source ~/.config/zsh/plugins/zsh-you-should-use/zsh-you-should-use.zsh 2>/dev/null
########################### Plugin Area End ####################################
That’s why I called it a terminal shell tweaks and why I changed original title yesterday after the zsh post and digging more into terminal emulators, shells etc…
Thanks fo sharing your config, that is very helpful!
Maybe - that’d be nice in the Dolphin terminal, but interestingly doesn’t happen with KiTTY.
I just figured out how to get the global alias’s to expand when I hit space (i.e. instead of alias ‘la’ showing ‘la’ when I type ‘la_’ I get ❯ exa --icons -a --group-directories-first ─╯
However, I will have a look at Fish.
I’ve said it many times before, but I think it’s worth repeating here: if you are using Zsh, I recommend against using oh-my-zsh. It’s very slow and most of the stuff there is bloat.
It is much better to customise Zsh yourself – not only is it fun to learn about it, the end result is a super-fast shell without bloat you don’t need. A good thing about oh-my-zsh is that you can steal ideas from it, of course.