Giter VIP home page Giter VIP logo

tmux.fish's Introduction

tmux.fish โ ๐ŸŸ

This is a tmux plugin for fish. Inspired by or rather a port of ohmyzsh tmux plugin.

Features

This plugin does the following:

  • determines if tmux is installed or not, if not, prompt user to install tmux
  • autostart/autoconnect tmux by default
  • determines if the terminal supports the 256 colors or not, sets the appropriate configuration variable
  • sets the correct local config file to use
  • abbrereviations for tmux

Installation

First, make sure you have the recent version of tmux and fish as I don't test this on older version. Next, install this plugin with Fisher:

fisher install budimanjojo/tmux.fish

Abbreviations

Alias Command Description
ta tmux attach -t Attach new tmux session to already running named session
tad tmux attach -d -t Detach named tmux session
ts tmux new-session -s Create a new named tmux session
tl tmux list-sessions Displays a list of running tmux sessions
tksv tmux kill-server Terminate all running tmux sessions
tkss tmux kill-session -t Terminate named running tmux session

Configuration Variables

Variable Description
fish_tmux_autostart Automatically starts tmux (default: true)
fish_tmux_autostart_once Autostart only if tmux hasn't been started previously (default: true)
fish_tmux_autoconnect Automatically connect to previous session if it exits (default: true)
fish_tmux_fixterm Sets $TERM to 256-color term or not based on current terminal support (default: true)
fish_tmux_iterm2 Sets the -CC option for iTerm2 tmux integration (default: false)
fish_tmux_fixterm_without_256color $TERM to use for non 256-color terminals (default: screen)
fish_tmux_fixterm_with_256color $TERM to use for 256-color terminals (default: screen-256color
fish_tmux_config Set the configuration path (default: $HOME/.tmux.conf)
fish_tmux_unicode Set tmux -u option to support unicode (default: false)
fish_tmux_default_session_name Set tmux default session name when autostart is enabled

Configuration

You can modify the default configuration variables either by exporting the env from your config.fish or in your terminal, for example:

set -Ux fish_tmux_config $HOME/.config/tmux.conf

Difference with ZSH Version

  • Autostart is set to true by default
  • Automatically closes terminal once tmux exits is hardcoded because I can't get the zsh way working in fish (maybe some help?)
  • This plugin will only run if the user is not root. This is to avoid having nested tmux from the same environment
  • Alias is now abbrereviations

License

MIT License

tmux.fish's People

Contributors

budimanjojo avatar rriski avatar z775729168 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tmux.fish's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.