Giter Club home page Giter Club logo

Comments (4)

gpakosz avatar gpakosz commented on May 14, 2024 2

Hello,

Make sure you stop all tmux client and server processes.

Backup your existing .tmux.conf file and try again following the installation steps as per documented in README.md:

$ cd
$ rm -rf .tmux
$ git clone https://github.com/gpakosz/.tmux.git
$ ln -s .tmux/.tmux.conf
$ cp .tmux/.tmux.conf.local .

About your "may i ask why your file with "#", does it makes any sence?" question, I'm not sure I understand what you're referring to.

In both Bash and tmux, # starts a comment and comment lines are ignored. Now there's a trick:

  • the first line of .tmux.conf starts with # cat << ►_◄ > /dev/null and later in the file there's a line starting with # ►_◄. Those lines are both ignored by tmux, because they start with a #
  • below the line starting with # ►_◄, all lines start with # and they will be ignored by tmux as well
  • pay attention that those comment lines are in fact a whole shell script put behind comments, and it's important to notice all the lines start with # followed by a space.
  • now if you run the cut -c3- ~/.tmux.conf command, you notice that it takes ~/.tmux.conf and removes the first 2 columns of the file
  • removing the first 2 columns of the file transforms the valid tmux configuration file into a valid shell script
  • when you pipe the result of cut -c3- ~/.tmux.conf to sh, your shell evaluates the cat << ►_◄ > /dev/null statement
    • remember, cut -c3- removed the first 2 columns, hence it removed the # characters
    • cat << ►_◄ > /dev/null is a classic HEREDOC, I just used fancy Unicode characters
    • after having run cut -c3-, everything between the first cat << ►_◄ > /dev/null and the ►_◄ line becomes an invalid truncated soup of tmux commands
    • but when your shell evaluates the cat << ►_◄ > /dev/null statement, all those truncated and invalid tmux commands are just sent to /dev/null and everything after the ►_◄ end of HEREDOC marker is a valid shell script

Hope that sheds some light to how it works.

from .tmux.

lnxiaoy avatar lnxiaoy commented on May 14, 2024

Thank you for answering my question, my English is very poor, thank you for your patience;
now, I try this:

  1. I change into TMUX mode, and type Ctrl + b + m, and it displays "mouse mode : on", it seems it does work
  2. but i run "cut -c3- ~/.tmux.conf | sh -s apply_configuration" it displays "unkwon opration pane-borde-style"
    can you help me to fix this? thank you very much, i'm not get used to markdown.......

from .tmux.

gpakosz avatar gpakosz commented on May 14, 2024

Which version of tmux are you using?

My configuration only works with tmux 1.9, 2.0 or 2.1+ . If you use tmux 1.9 or 2.0, use the corresponding branch of the configuration.

from .tmux.

lnxiaoy avatar lnxiaoy commented on May 14, 2024

I did it! I just use vertion 1.8, so,I update to lastest version , your configure have shown, thank you very much

from .tmux.

Related Issues (20)

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.