Coder Social home page Coder Social logo

tmux-themepack's Introduction

Tmux Themepack

A pack of various themes for Tmux for 2.6 or later.

Installation

Install manually

  1. Clone repo to local machine:

    git clone https://github.com/jimeh/tmux-themepack.git ~/.tmux-themepack
    
  2. Source desired theme in your ~/.tmux.conf:

     source-file "${HOME}/.tmux-themepack/powerline/default/green.tmuxtheme"
    

    In some linux distributions you might have to remove the quotation marks from the source-file command to avoid a no such file or directory error:

     source-file ${HOME}/.tmux-themepack/powerline/default/green.tmuxtheme
    

Install using Tmux Plugin Manager

  1. Add plugin to the list of TPM plugins in .tmux.conf:

    set -g @plugin 'jimeh/tmux-themepack'
    
  2. Press prefix + I to fetch the plugin and source it. The plugin should now be working.

Choose which theme is loaded by setting the @themepack option in your .tmux.conf:

  • set -g @themepack 'basic' (default)
  • set -g @themepack 'powerline/block/blue'
  • set -g @themepack 'powerline/block/cyan'
  • set -g @themepack 'powerline/default/green'
  • set -g @themepack 'powerline/double/magenta'
  • ...

Themes

Basic Themes

Default (default):

basic

Basic (basic):

basic

Powerline Themes

Inspired by the Powerline VIM plugin, and requires the use of a powerline compatible font in your terminal. You can find a number of such fonts in the powerline-fonts project.

If your preferred font isn't available there, please refer to Powerline's documentation on Font Patching to patch the font yourself.

Powerline Blue (powerline/default/blue):

powerline-default-blue

Powerline Cyan (powerline/default/cyan):

powerline-default-cyan

Powerline Gray (powerline/default/gray):

powerline-default-gray

Powerline Green (powerline/default/green):

powerline-default-green

Powerline Magenta (powerline/default/magenta):

powerline-default-magenta

Powerline Orange (powerline/default/orange):

powerline-default-orange

Powerline Purple (powerline/default/purple):

powerline-default-purple

Powerline Red (powerline/default/red):

powerline-default-red

Powerline Yellow (powerline/default/yellow):

powerline-default-yellow

Block

Currently selected window is indicated by a colored block.

Powerline Blue Block (powerline/block/blue):

powerline-block-blue

Powerline Cyan Block (powerline/block/cyan):

powerline-block-cyan

Powerline Gray Block (powerline/block/gray):

powerline-block-gray

Powerline Green Block (powerline/block/green):

powerline-block-green

Powerline Magenta Block (powerline/block/magenta):

powerline-block-magenta

Powerline Orange Block (powerline/block/orange):

powerline-block-orange

Powerline Purple Block (powerline/block/purple):

powerline-block-purple

Powerline Red Block (powerline/block/red):

powerline-block-red

Powerline Yellow Block (powerline/block/yellow):

powerline-block-yellow

Double

Both left and right far sides of the statusbar are colored, rather than just the left side.

Powerline Double Blue (powerline/double/blue):

powerline-double-blue

Powerline Double Cyan (powerline/double/cyan):

powerline-double-cyan

Powerline Double Green (powerline/double/green):

powerline-double-green

Powerline Double Magenta (powerline/double/magenta):

powerline-double-magenta

Powerline Double Orange (powerline/double/orange):

powerline-double-orange

Powerline Double Purple (powerline/double/purple):

powerline-double-purple

Powerline Double Red (powerline/double/red):

powerline-double-red

Powerline Double Yellow (powerline/double/yellow):

powerline-double-yellow

Customizing

All themes are built with overridable custom @-prefixed Tmux options, which means that any part of a theme can be easily customized.

To customize a theme, simply look at the source to see the list of Tmux options with names beginning with a @, and simply set the desired option in your tmux.conf before the theme is loaded.

Development / Contributing

If you want to contribute a theme, please have them use custom @-prefixed Tmux options like existing themes, so they can be customized the same way.

New themes should be created under the src folder with a .tmuxtheme extension. Please have a look at existing themes to see how files can be included and shared between themes.

To build all themes, just run make build from the root of the project.

All themes also have unit tests which can be found under the test directory. They are written in Go, but hopefully easy to understand. To run all tests, just run make test from the root of the project.

License

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2013 Jim Myhrberg

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.

tmux-themepack's People

Contributors

jimeh avatar jlopezpena avatar marsam avatar ryanwilsonperkin avatar wfxr 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tmux-themepack's Issues

does not work with fish shell

Got a number of error message when running source $HOME/.tmux-themepack/powerline/block/blue.tmuxtheme

For one example, one error says "set: Variable name 'status-interval' is not valid. See help identifiers"

Block tmux reattach theming failure

This is probably an edge-case, but mind looking into it for me?
tmux 1.8 (rhel 7)
SSH through Putty (using Source Code for Powerline font with Solarized Dark theme color scheme)
After deattaching tmux session (c-b d), and reattaching that same session, tmux is failing to theme the block and status bar.

If you need/want more info, feel free to ping me.

Appending to the status bar

It'd be nice to be able to customize the themes further. I'm trying to add a battery status indicator to my status-right, and right now below the import of the themepack theme I have written:

set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240, bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour232,bg=colour245,bold] #H #{battery_icon} #{battery_percentage} "

It shows up for the first render, but then it looks like the theme is overwriting my status-right immediately after

Other plugins don't work with the custom themepack variables.

I'm using https://github.com/tmux-plugins/tmux-cpu & https://github.com/tmux-plugins/tmux-battery. They work if I simply do:

set -g status-right "#{battery_icon} #{battery_percentage} #{cpu_icon} #{cpu_percentage}"

But if I try to use the customizable variables here it doesn't work:

set -goq @themepack-status-right-area-left-format "#{battery_icon} #{battery_percentage}"
set -goq @themepack-status-right-area-middle-format "#{cpu_icon} #{cpu_percentage}"

Any ideas on how to get this to work?

powerline font can not display

Hi, I installed the themepack as the README

and every thing goes well,

bug the powerline font can not display

1__tmux__ssh_

And maybe you will know why there are blank lines at the right and bottom of the window
I can't get a answer from GOOGLE

ATHAME_VIM_MODE not displayed

Hi,

I was trying to tweak the powerline block gray theme by displaying the env variable ATHAME_VIM_MODE from Athame, and for some reason it doesn't appear. I've tried other env variables, and they get displayed, but not that one, although I can do `echo $ATHAME_VIM_MODE`` from the shell...

Is that a theme problem? How could I solve that to have it displayed?

@theme*-prefix/suffix and configuration reload error

Adding anything to a suffix/prefix and reloading the configuration results in the suffix/prefix being printed/applied multiple times.

e.g. adding set -g @theme-status-left-prefix "test" and reloading the configuration results in this:

Screencast.from.2023-12-18.13-33-00.webm

Suggestion: Highlight on pressing prefix.

Thank You
First off, the themes are just lovely ❤️, been using it for a while now & it fits well with my vim's oceanic-next theme.

Suggestion
Can we highlighting this part:
screen shot 2017-08-13 at 6 59 54 pm
on pressing of prefix key by either giving it more/less contrast would be really handy in determining the state of tmux.

Line not displaying some character

Hey, i know its my side problem, but maybe you know the solution?

My tmux is not displaying U+E0E0, and all other arrows

2017-08-14-163921_1920x1080_scrot

there is my tmux.conf and the example of how the characters look

Some colors not legible

Using powerline default theme (red, yellow, green etc.):
source-file "${HOME}/.tmux-themepack/powerline/default/red.tmuxtheme"

The window title has a bad foreground-background combo, illegible text. Same problem with command prompt.
Screen Shot 2022-04-26 at 3 27 06 PM
Screen Shot 2022-04-26 at 3 27 26 PM

Tried with different colors. I have no customization of the theme in my .tmux.conf, using as-is. I have nothing else visual related in the conf either.

The tmux server is running on a remote host (not local mac). Could something be causing this? or am I missing some setup step?

After opening TMUX I first have to reload the configuration file before the Theme is loaded

Like the title says, after opening TMUX I first have to reload the configuration file before the theme is loaded, this is my configuration file:

set -g mouse on

set -g default-terminal "screen-256color"
set -g default-shell "/bin/bash"

set -g status-left '#{prefix_highlight}'

set -g status-right-length 256

set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_AUTH_SOCK SSH_CONNECTION WINDOWID XAUTHORITY"

bind-key g split-window -c "#{pane_current_path}" -p 50 gitsh
bind - split-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key M split-window -h "nano ~/.tmux.conf"

bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Plugins Config
set-option -g @ssh-split-keep-cwd "true"
set-option -g @ssh-split-no-shell "true"
set-option -g @ssh-split-h-key "S"
set-option -g @ssh-split-v-key "W"

set -g @sidebar-tree-command 'tree -C'
set -g @sidebar-key-t 'nnn,left,60,focus'

set -g @themepack 'powerline/block/cyan'
# Plugins
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'pschmitt/tmux-ssh-split'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-sidebar'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

Fix for Tmux 2.9 compatibility, breaks themes in Tmux 1.8 and earlier

The fix for Tmux 2.9 in #25 sadly breaks compatibility with Tmux 1.8 and earlier, as the *-style options were introduced in Tmux 1.9.

Annoyingly I still have a couple of boxes floating around which are perpetually stuck with Tmux 1.8 for reasons beyond my control.

I'm working on a refactor to allow themes to be customizable, and at the same time, I'll make them compatible with Tmux 1.8 and later.

Errors with Tmux v2.9

.tmux-theme-blue.conf:19: invalid option: status-left-bg            
.tmux-theme-blue.conf:20: invalid option: status-left-fg
.tmux-theme-blue.conf:25: invalid option: status-right-bg
.tmux-theme-blue.conf:26: invalid option: status-right-fg
.tmux-theme-blue.conf:35: invalid option: window-status-current-bg
.tmux-theme-blue.conf:36: invalid option: window-status-current-fg
.tmux-theme-blue.conf:39: invalid option: window-status-activity-bg
.tmux-theme-blue.conf:40: invalid option: window-status-activity-fg
.tmux-theme-blue.conf:49: invalid option: pane-border-bg
.tmux-theme-blue.conf:50: invalid option: pane-border-fg
.tmux-theme-blue.conf:53: invalid option: pane-active-border-bg
.tmux-theme-blue.conf:54: invalid option: pane-active-border-fg
.tmux-theme-blue.conf:65: invalid option: message-bg
.tmux-theme-blue.conf:66: invalid option: message-fg
.tmux-theme-blue.conf:69: invalid option: message-command-bg
.tmux-theme-blue.conf:70: invalid option: message-command-fg
.tmux-theme-blue.conf:73: invalid option: mode-bg
.tmux-theme-blue.conf:74: invalid option: mode-fg

Shortened line after applying theme

image
Working on Ubuntu with Zsh installed.
The line remains shortened even when I minimise the terminal.
There was no such problem with the line without the theme.

theme titles parameters

You should list off all the theme titles like in the first examples, it's hard to discern what are the exact parameters they are in when I try to set it up in my conf file, I pretty much have to guess it

tmux 2.9 incompatibility: -fg, -bg and -attr options have been removed

Since tmux 2.9 is out (near 24 May 2019) themes are incompatible with tmux.

I you read the tmux 2.9 Changelog, you'll see this for example:

  • The individual -fg, -bg and -attr options have been removed; they
    were superseded by -style options in tmux 1.9.

So at tmux launch I see those errors:

/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:19: invalid option: status-left-bg                                                                                                                                                                             [0/0]
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:20: invalid option: status-left-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:25: invalid option: status-right-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:26: invalid option: status-right-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:35: invalid option: window-status-current-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:36: invalid option: window-status-current-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:39: invalid option: window-status-activity-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:40: invalid option: window-status-activity-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:49: invalid option: pane-border-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:50: invalid option: pane-border-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:53: invalid option: pane-active-border-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:54: invalid option: pane-active-border-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:65: invalid option: message-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:66: invalid option: message-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:69: invalid option: message-command-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:70: invalid option: message-command-fg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:73: invalid option: mode-bg
/home/noraj/.tmux-themepack/powerline/default/red.tmuxtheme:74: invalid option: mode-fg

Doesn't work on macOS?

In my tmux.conf I have

source-file '/Users/crstnbr/.tmux-themepack/powerline/default/cyan.tmuxtheme'

What I get when starting tmux:

/Users/crstnbr/.tmux-themepack/powerline/default/cyan.tmuxtheme:10: unknown command:

Versions:
macOS Catalina 10.15.4
tmux 3.0a

Could it be an incompatibility with tmux version >=3.0?

Any pointers to how to fix this will be highly appreciated!

Work with base16-shell

Would it be possible to build a theme that works with base16-shell themes? The basic theme seems to adapt but I'm not sure if there's a better way.

Old/new powerline characters?

I'm using the patched version of Source Code Pro from the linked repository. The separator symbols show up fine in vim-ariline. When browsing through the airline docs I noticed a section on "old powerline separators" and characters looked very strange. In fact, they look like this:

screen shot 2013-10-10 at 8 41 00 pm

Which is exactly what I'm faced with using the cyan double tmux theme. Any idea where to go from here?

Cancel bottom margin of the status bar

Hello,
As you can see in the image attached, the status bar has a bottom margin. Is there a way to fix this?

Thank you in advance, love that theme btw <3

Screen Shot 2020-01-20 at 16 25 35

Refresh display after changes to .tmux.conf?

I can't seem to make changes to my ~/.tmux.conf reflected in the theme without closing all tmux sessions and opening a new one. Say I change what's displayed in the status bar of one of the themes provided here. How do you make the change active? Reloading ~/.tmux.conf doesn't do it for me.

How to configure status

I want to remove some things from the status bar and edit somethings too.
I want to completely remove the right status.
Also, I want to add a little windows or ubuntu icon to the extreme left of my status.
How can i do that?

Adding Ram Available

Hello team, thanks for this plugin, i'm using it and it's so useful.

I would like to add the available ram, how can I do this?

Cursor Blinking & Type not controllable

for the life in me I can't figure out why would the below line prevent the cursor from blinking
the  character is the powerline triangle
this is the original line in Jimeh theme pack
I am trying to get the cursor blinking to work again but can't solve the issue in the below line

set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour232,bg=colour245,bold] #H "

add a high-contrast/white on black theme

All the current themes work well for a terminal that is normally set with a dark background and a light foreground, but some of us prefer to use a high-contrast theme for our terminal sessions (say, if we happen to work in brightly-lit conditions, or even outdoors).

Add support for tmux-prefix-highlight?

Excellent pack of themes you have here jimeh!

Is it possible an option could be added to support the tmux-prefix-highlight plugin out of the box? I consider it a very useful plugin when interacting with multiple windows.

In the meantime, I've gone through the theme I use and manually added the tmux-prefix-highlight indicator to the status line.

Thank you again!
-Blake

Add pane synchronization status on right

Please add an indicator to show if all panes in window are synchronized or not. It helps a lot when multiple panes are open and you are switching between synchronized and unsynchronized mode.

I made following change to basic theme to make this work -
set -g status-right "#{?pane_synchronized, #[fg=yellow]SYNC #[fg=white]«#[default], } #H #[fg=white]« #[fg=yellow]%H:%M:%S #[fg=green]%d-%b-%y".

it looks like following -
2018-11-20 12_04_10--bash

How can get pane numbers?

By default <prefix>+q will show a big number indicating the pane number. After installed the theme, no pane number appears.
This is my .tmux.conf:

# keys
bind r source-file ~/.tmux.conf

# options
set -g prefix C-b
set -g prefix2 C-x

set -g mouse on

set -g mode-keys vi

# plugins
set -g @plugin 'tmux-plugins/tpm'
run '~/.tmux/plugins/tpm/tpm'

### comment the two lines, it shows numbers.
### set -g @plugin 'jimeh/tmux-themepack'
### set -g @themepack 'basic'

set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @resurrect-capture-pane-contents 'on'

set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
set -g @continuum-restore 'on'

How to customize colours.

Hi, really loving this but how do you provide custom colours?
I know in the readme it says..

To customize a theme, simply look at the source to see the list of Tmux options with names beginning with a @, and simply set the desired option in your tmux.conf before the theme is loaded.

But what does that look like? How do you set the desired option in tmux.conf?
For example I see in the themes there is..

set -goq @powerline-color-main-1 colour39

So how do I set a colour for that in tmux.conf?
Thanks in advance

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.