DEV Community

Cover image for My Fish Shell with tmux setup for Linux.
Nishu Murmu
Nishu Murmu

Posted on

My Fish Shell with tmux setup for Linux.

I recently transitioned from windows to Linux environment (Fedora 35) for various reasons. As a new Linux user I got to know that I was required to use terminal a lot in Linux environment. So I thought why not setup my terminal nice and cool looking with all the glyphs and icons, cause I'll be spending most of time there during my workflow. So this is my setup which I came for now. Here's how you can setup your fish terminal (If you want to!)


Fish Shell setup

1.Download the fish terminal

  • I use fish terminal cause it's very fast and user-friendly

2.Download omf or oh-my-fish

  • A Fish shell framework helps you to extend and modify your terminal
  • Install any terminal theme you want, you have a look at this readme.md, there are all the themes shown, choose anyone you like and type this command -
omf install theme <theme name>
Enter fullscreen mode Exit fullscreen mode

3.Download exa

  • Modern improved file lister for terminal
  • after installing exa open fish.config file located in ~/.config/fish/ folder and add this following lines of code -
if type -q exa
  alias ll "exa -l -g --icons"
  alias lla "ll -a"
end
Enter fullscreen mode Exit fullscreen mode

4.Download any Nerd fonts for all the icons and glyphs and install it in your system.


After following this steps you would have the end results


tmux setup

1.Download and install powerline, powerline-fonts and tmux-powerline
2.Create a file named .tmux.conf in your root directory and add the following lines of code -

set -g history-limit 10000
unbind C-b
set -g prefix C-a

set -g mouse on

unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"

set -g xterm-keys on

bind R refresh-client

set-window-option -g mode-keys vi

set-option -sa terminal-overrides ",xterm*:Tc"

set-option -g focus-events on

#Splitting panes
unbind v
unbind h

unbind % # Split vertically
unbind '"' # Split horizontally

bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"

#navigating panes
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R

# Visual Activity Monitoring between windows
setw -g monitor-activity on
set -g visual-activity on


# Show tmux positions in titles
set -g set-titles on

# statusbar
set-option -g status on
set-option -g status-interval 2
set-option -g status-left-length 60
set-option -g status-right-length 90

set-option -g status-left "#(~/Build/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/Build/tmux-powerline/powerline.sh right)"
set-hook -g session-created 'run-shell "~/Build/tmux-powerline/powerline.sh init"' # prettifies the window-status segments
Enter fullscreen mode Exit fullscreen mode

3.Change the terminal colors settings to xterm.


Any suggestions are welcomed 🙌

Top comments (0)