Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can not I apply this theme #11

Closed
lnxiaoy opened this issue Dec 20, 2015 · 4 comments
Closed

Why can not I apply this theme #11

lnxiaoy opened this issue Dec 20, 2015 · 4 comments

Comments

@lnxiaoy
Copy link

lnxiaoy commented Dec 20, 2015

I follow your steps, and nothing happened, may i ask why your file with "#", does it makes any sence?

@gpakosz
Copy link
Owner

gpakosz commented Dec 20, 2015

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.

@lnxiaoy
Copy link
Author

lnxiaoy commented Dec 21, 2015

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.......

@gpakosz
Copy link
Owner

gpakosz commented Dec 21, 2015

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.

@lnxiaoy
Copy link
Author

lnxiaoy commented Dec 21, 2015

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

@gpakosz gpakosz closed this as completed Dec 21, 2015
Evans9610 pushed a commit to Evans9610/.tmux that referenced this issue Dec 3, 2022
…config-status-content-no-patched-font

Configuration to disable patched font usage in status content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants