gpakosz / .tmux Goto Github PK
View Code? Open in Web Editor NEW🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
License: MIT License
🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
License: MIT License
The behavior (blinking) is shown in https://ptpb.pw/YSSL.webm
It will be cool if we can have internet speed on the status line
Is it possible to add custom status elements without overriding .tmux.conf
— i.e. inside the .tmux.conf.local
?
Case in point, I’d like to add dickeyxxx/tmux-spotify-info. If I’m reading the .tmux.conf
correctly this isn’t currently possible. Could this maybe be added?
Here’s a quick’n’dirty example of an implementation. The delimiters are a bit tricky so I left them out for now:
diff --git a/.tmux.conf b/.tmux.conf
index 3abdffb..8884bd5 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -211,6 +211,10 @@ run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration'
# tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-bold}
# tmux setw -g mode-style fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr
#
+# # extra status lines
+# tmux_conf_extra_left=${tmux_conf_extra_left:-}
+# tmux_conf_extra_right=${tmux_conf_extra_right:-}
+#
# # status line
# tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-colour253} # white
# tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-colour232} # dark gray
@@ -218,7 +222,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration'
#
# tmux_conf_theme_session_fg=${tmux_conf_theme_session_fg:-colour16} # black
# tmux_conf_theme_session_bg=${tmux_conf_theme_session_bg:-colour226} # yellow
-# status_left="#[fg=$tmux_conf_theme_session_fg,bg=$tmux_conf_theme_session_bg,bold] ❐ #S #[fg=$tmux_conf_theme_session_bg,bg=$tmux_conf_theme_status_bg,nobold]$left_separator_black"
+# status_left="#[fg=$tmux_conf_theme_session_fg,bg=$tmux_conf_theme_session_bg,bold] ❐ #S #[fg=$tmux_conf_theme_session_bg,bg=$tmux_conf_theme_status_bg,nobold]$left_separator_black$tmux_conf_extra_left"
# if [ x"`tmux -q -L tmux_theme_status_left_test -f /dev/null new-session -d \; show -g -v status-left \; kill-session`" = x"[#S] " ] ; then
# status_left="$status_left "
# fi
@@ -303,7 +307,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration'
# status_right_hostname="#[fg=$tmux_conf_theme_hostname_bg,nobold]${status_right_hostname}$right_separator_black#[fg=$tmux_conf_theme_hostname_fg,bg=$tmux_conf_theme_hostname_bg,bold] #h "
# fi
#
-# status_right="${status_right_prefix}${status_right_battery}${status_right_time}${status_right_date}${status_right_username}${status_right_hostname}"
+# status_right="${status_right_prefix}${tmux_conf_extra_right}${status_right_battery}${status_right_time}${status_right_date}${status_right_username}${status_right_hostname}"
# tmux set -g status-right-length 64 \; set -g status-right "$status_right"
#
# # clock
With this, I can just add the following line to my .tmux.conf.local
:
tmux_conf_extra_right='#(~/.tmux/tmux-spotify-info)'
Ideally this would be an array and .tmux.conf
would add the necessary delimiters.
The status line doesn't show most of the time and most of the stuff doesn't allign.
Toggling maximize_pane() has no effect when other session already contains a maximized window.
As is describe here : #39
it is happening to me:
ZSH: Antigen
Theme: https://github.com/sindresorhus/pure
iTerm: Build 3.1.20170323-nightly
TMUX: tmux 2.3
macOS: Sierra 10.12.3
When you run tmux as the shell in a terminal emulator, i.e. without running bash/zsh/etc first, the status line doesn't get changed from the default one. Is this expected behavior or is there a way to still apply your script?
Some of us have multiple batteries in our laptops. Would be great to be able to pin battery id, or the conf dynamically show level for all combined.
I use <prefix>M
to try to toggle mouse mode. Unfortunately, this is what I got
'cut -c3- ~/.tmux.conf | sh -s toggle_mouse' returned 1
And mouse mode was not triggered.
I am on OSX 10.10.5 and have zsh
I tried <prefix>
Enter, but what is next?
I was able to go to copy mode but the vim binding doesn't seem to work. I tried pressing 'v' in copy mode but it won't highlight the parts i want to copy. Also the top right box is stuck at 0/0.
I’m following the instructions from the readme file to install the configuration. However, when I then start tmux
, it seems like not all of the configuration was loaded. Most strikingly, the powerline-inspired status bar isn’t displayed. Other options, such as renumber-windows
, are also not enabled. Starting via tmux -f ~/.tmux.conf
makes no difference.
In fact, I cannot see any difference before and after soft-linking ~/.tmux/.tmux.conf
into ~
.
tmux -V
outputs:
tmux 1.9a
In fact, this .tmux
config used to work, and I think it stopped working after the tmux
version was updated on the system (RHEL 6).
In case that helps, tmux -vvv
outputs
got 207 from server
got 203 from server
got 204 from server
First off, this may be a font issue rather than a tmux configuration issue and if so, I apologize for wasting your time.
Now, onto the actual problem. When using the Hack font (http://github.com/chrissimpkins/Hack) with your theme, the left separator doesn't want to display even though the font supports the left separator. I've included screenshots of what it looks like in the tmux theme and with the font supporting the character via echoing it to the terminal window.
Let me know if you have any other steps I should do to troubleshoot this.
Thanks!
I noticed this script has several helper bash functions stored as functions in the .tmux.conf
, and it makes use of the cut
command to run them.
My question is:
Why is it done that way, rather than storing them in a separate file?
Is there any technical limitation?
First of all, thanks for your work.
I enabled tmux_conf_theme_username and tmux_conf_theme_hostname. It shows my local username, but when I access a server using SSH it doesn't change the username and hostname even after restarting tmux.
Any ideas about what I should do?
I'm using tmux 2.1 on OS X.
In tmux version 2.4 there were some changes to key bindings (at least for vi-copy mode)
(I think commit: 76d6d3641f271be1756e41494960d96714e7ee58 for https://github.com/tmux/tmux)
of the ones that I am aware, is that the name for the key table 'vi-copy' was changed to 'copy-mode-vi' and to trigger the commands need to use the send-keys command
workaround (for users) is to rewrite the keybindings in .tmux.conf.local
examples:
unbind-key -T copy-mode-vi Escape
bind-key -T copy-mode-vi Escape send-keys -X cancel
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
Currently, the clipboard feature using reattach-to-user-namespace
only works on a local tmux session.
There are a few possible ways to enable this to work over a remote tmux session. Is it possible to enable this within .tmux
When I use tab to scroll through autocomplete options and try to select them it does not work correctly. I have noticed at the bottom right I can "^I" so I am assuming for some reason it is trying to use call C-i .
Note: I am using neovim. It seems that setting setw -g mode-keys vi will give me the correct selection, but there is still the lag time as it tries to process ^I then uses tab.
Thank you for your great tmux config.
Hey there,
Was wondering if you could help me. When I use the package I end up having an issue where the statusline disappears sometimes and other times it stacks on itself after a few seconds (so I have multiple status lines covering the bottom part of my screen. I've isolated the issue to within the _apply_theme but am not sure how to move forward since I'm not even sure what's happening. It's probably related to status line but I think there might also be issues with just the encoding and all that
This is more of a tip than an issue. Also I haven't tried your config yet, but thought you might find this info useful.
Basically, since v1.8 Tmux has supported a native pane maximizing (changelog). Personally I didn't notice until v1.9 was released, as it's tucked away within the resize-pane
command. Specifically resize-pane -Z
will toggle the current pane between normal state and maximized/zoomed state.
So my suggestion is, update your maximize_pane
function to just call tmux resize-pane -Z
if the current Tmux version is 1.8 or later.
As performing version comparisons in bash so you can determine if it's 1.8 or later, I've had that same issue myself, and here's the solution I came to:
https://github.com/jimeh/tmuxifier/blob/master/libexec/tmuxifier-tmux-version
And here's an example of using it:
https://github.com/jimeh/tmuxifier/blob/33f26bca564329fad094f25a8d38af042b85dadc/lib/layout-helpers.sh#L236-L255
I added following lines in ~/.tmux.conf.local
to change border color, but it does not take effect, am I missing anything?
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
Hi,
I was reading your post about the maximize pane to a new window and it seems to come close to something im interested in. I started using a 4k monitor recently. When I maximize my tmux pane, all of the text goes very far to the left since the high resolution can fit so many panes. This has been straining my neck. What I'd like is to be able to center the zoomed pane in my monitor. Have you thought about this at all? Is it possible doing something like your maximize_pane() function?
thanks
This configuration makes tmux unusable under WSL.
Commenting out "set -s escape-time 0" solves the issue.
Hi, would you know what could be cause of the behavior as shown in the screenshot?
I have used tmux for years but I moved to your config and suddenly it started behaving... awkwardly as you can see, with double/tripple status bar etc.
I am using latest Ubuntu 16.10 with latest bash, tmux 2.2 and latest code of gpakosz/.tmux
can join this feature ?
I'm aware this is an annoying and perhaps minor issue, but I've been googling for multiple hours now without a solution.
Here is what's wrong: The symbols, that if I understood correctly are introduced when patching a font, are not displaying for me. Others, however, work without problem, such as the battery symbol. Please have a look at the screenshot to see what I mean.
https://s9.postimg.org/ki2d54szz/powerline_issue.png
I checked font settings and encoding settings (UTF-8) in iTerm2 (which I'm mainly using). I also tried different patched fonts, including Source Code and Meslo, both show the same behavior. I checked locale, which for some reason is empty but I haven't been able to define it permanently. Don't know if that's important. I'm sure I've tried other things but forgot about it since they also didn't fix the problem.
Any what it could be or how to narrow the source down? I didn't run into this issue with the tmux-powerline repository maintained by erikw, which is why I suspect it's the config, but I don't know enough about it to be sure.
Hi, I just want know how to change the colour of "highlight of focused pane"? The default colour is to light for me.
hi, i do this:
sudo apt-get install tmux
pip install powerline-status
and sudo apt-get install powerline
1, 2, 3, 4
Hello,
How do I go back from your config to one of mine? I've removed ~/.tmux.conf* and restored my original config. Reloaded w/ C-a+r but I still see stausbar items in there (although key mapping is now restored).
When running tmux
v2.2 with this .tmux configuration under MSYS2,
CPU usage goes russian mountains, with big spikes attributed to a system
process.
This doesn't happen when running tmux
without this .tmux.conf
.
I suspect an issue with some system call such as battery level.
Hello there!
How can I add/remove things to the status line in a way that doesn't break everything?
Adding modifications to .tmux.conf.local not only completely overrides everything, but is also overriden in the next second by the default
Hi,
I've just upgraded my ubuntu installation from 16.04 to 16.10 and the battery status is now missing, running:
cut -c3- ~/.tmux.conf | sh -s _battery
Returns:
sh: 343: [: Illegal number: %d9.7
sh: 345: Illegal number: %d9.7
cat /sys/class/power_supply/BAT0/capacity
returns 97.
Hi,
How can I disable the GNU-Screen compatible prefix via .tmux.conf.local?
Thanks
How about add functionality to kill pane?
It's working fine! but when I source the config file I get this:
❯ . ~/.tmux.conf
/Users/mz/.tmux.conf:8: command not found: setw
/Users/mz/.tmux.conf:14: command not found: bind
/Users/mz/.tmux.conf:19: command not found: bind
/Users/mz/.tmux.conf:22: command not found: bind
/Users/mz/.tmux.conf:534: parse error near `\n'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
#
# # Other examples:
# # set -g @plugin 'github_username/plugin_name'
# # set -g @plugin '[email protected]/user/plugin'
# # set -g @plugin '[email protected]/user/plugin'
#
# # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
This was the code I added to .tmux.conf.local at the bottom. But it seems that tpm could't run as I expected.
When I added the code to .tmux.conf and reloaded the configuration,the error below was throwed:
'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' returned 127
But the strange thing was that I could use plugin of tmux normally this time. Spliting new pane would also throw the error.
How could I fix the error ? Any suggestion would be appreciated.
I follow your steps, and nothing happened, may i ask why your file with "#", does it makes any sence?
fish: Unknown command '/usr/local/bin/fish...'
fish: exec /usr/local/bin/fish... 2> /dev/null & reattach-to-user-namespace /usr/local/bin/fish -l
^
I have
tmux_conf_theme_clock_style='12'
But the clock is still in 24hr.
I know, dirty American.
Some of the colours like the tmux_conf_theme_username_bg, for example, can't be overwritten using the tmux.conf.local file.
this fixes the issue:
diff --git a/.tmux.conf b/.tmux.conf
index cd1830a..e6ba423 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -267,13 +267,13 @@ run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration'
# tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-colour16} # black
# tmux_conf_theme_time_date_fg=${tmux_conf_theme_time_date_fg:-colour247} # light gray
# tmux_conf_theme_time_date_bg=${tmux_conf_theme_time_date_bg:-colour232} # dark gray
-# tmux_conf_theme_username_fg=colour254 # white
-# tmux_conf_theme_username_bg=colour160 # red
-# tmux_conf_theme_hostname_fg=colour16 # black
-# tmux_conf_theme_hostname_bg=colour254 # white
+# tmux_conf_theme_username_fg=${tmux_conf_theme_username_fg:-colour254} # white
+# tmux_conf_theme_username_bg=${tmux_conf_theme_username_bg:-colour160} # red
+# tmux_conf_theme_hostname_fg=${tmux_conf_theme_hostname_fg:-colour16} # black
+# tmux_conf_theme_hostname_bg=${tmux_conf_theme_hostname_bg:-colour254} # white
#
# if [ x"$prefix_enabled" = x"true" ] ; then
-# status_right_prefix="#{?client_prefix,#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[bold]⌨ #[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_status_bg]#[nobold],}"
+# status_right_prefix="#{?client_prefix,#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[bold]⌨ #[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_status_bg]#[nobold],}"
# fi
# if [ x"$battery_enabled" = x"true" ] ; then
# status_right_battery="${tmux_conf_battery:-#(cut -c3- ~/.tmux.conf | sh -s battery ${tmux_conf_battery_style:-bar} ${tmux_conf_battery_symbol:-block} ${tmux_conf_battery_symbol_count:-auto} \"${tmux_conf_battery_palette:-colour160,colour254,colour16}\" ${tmux_conf_battery_status:-enabled})} "
why not add the screenshot to the readme.md ,and it would be better with the url
thank you!
There is a broken link in the README.md
: fonts patched with powerline symbols
I've uncommented
Reloaded my tmux conf
Downloaded and installed my powerline patched fonts of choice from here:
https://github.com/Lokaltog/powerline-fonts
I've set the fonts in iterm2 to use the new font (for regular and on-ascii)
Yet I'm seeing '?' characters instead of powerline symbols.
Sorry if this isn't the appropriate place to ask this, but have I missed something?
Thanks.
-Seth
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.