Git Product home page Git Product logo

tmux-power's Introduction

Tmux Power

Yet another powerline theme for tmux.

TPM Awesome License

screenshot

๐Ÿ“ฅ Installation

Install manually

Clone the repo somewhere and source it in .tmux.conf:

run-shell "/path/to/tmux-power.tmux"

NOTE: Options should be set before sourcing.

Install using TPM

set -g @plugin 'wfxr/tmux-power'

๐ŸŽจ Themes

Gold (default)

set -g @tmux_power_theme 'gold'

screenshot

Everforest

set -g @tmux_power_theme 'everforest'

screenshot

Moon

set -g @tmux_power_theme 'moon'

screenshot

Coral

set -g @tmux_power_theme 'coral'

screenshot

Snow

set -g @tmux_power_theme 'snow'

Forest

set -g @tmux_power_theme 'forest'

Violet

set -g @tmux_power_theme 'violet'

Redwine

set -g @tmux_power_theme 'redwine'

Default

set -g @tmux_power_theme 'default'

Set this theme if you want to honor the terminal colorscheme. To be used with something like pywal for instance.

โš™ Customizing

You can define your favourite main color if you don't like any of above.

set -g @tmux_power_theme '#483D8B' # dark slate blue

You can change the date and time formats using strftime:

set -g @tmux_power_date_format '%F'
set -g @tmux_power_time_format '%T'

You can also customize the icons. As an example, the following configurations can generate the theme shown in the first screenshot:

set -g @plugin 'wfxr/tmux-power'
set -g @plugin 'wfxr/tmux-net-speed'
set -g @tmux_power_theme 'everforest'
set -g @tmux_power_date_icon ' '
set -g @tmux_power_time_icon ' '
set -g @tmux_power_user_icon ' '
set -g @tmux_power_session_icon ' '
set -g @tmux_power_show_upload_speed    true
set -g @tmux_power_show_download_speed  true
set -g @tmux_power_show_web_reachable   true
set -g @tmux_power_right_arrow_icon     '๎‚ธ'
set -g @tmux_power_left_arrow_icon      '๎‚บ'
set -g @tmux_power_upload_speed_icon    '๓ฐ•’'
set -g @tmux_power_download_speed_icon  '๓ฐ‡š'
set -g @tmux_power_prefix_highlight_pos 'R'

The default icons use glyphs from nerd-fonts.

๐Ÿ“ฆ Plugin support

tmux-net-speed

set -g @tmux_power_show_upload_speed true
set -g @tmux_power_show_download_speed true

tmux-prefix-highlight

# 'L' for left only, 'R' for right only and 'LR' for both
set -g @tmux_power_prefix_highlight_pos 'LR'

tmux-web-reachable

set -g @tmux_power_show_web_reachable true

๐Ÿ”— Other plugins

You might also find these useful:

๐Ÿ“ƒ License

MIT (c) Wenxuan Zhang

tmux-power's People

Contributors

brendon1555 avatar koppchen avatar opennomad avatar psyhomb avatar toshikinakamura0412 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

tmux-power's Issues

Icons not displaying

Hi, thanks for the theme, it's great! Would it be possible to have a version without the included icons? Not all fonts include these glyphs. I'm using Meslo from powerline-fonts.

Screen Shot 2020-07-06 at 12 04 56 PM

prefix-highlight not working

using tmux 3.1 on Archlinux x64

works (not using theme): "^B" appears in status-right on ctrl+b

set -g default-terminal "tmux-256color"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M:%S'
run '~/.tmux/plugins/tpm/tpm'

doesn't work (using theme): theme is shown correctly, but nothing happens on ctrl+b

set -g default-terminal "tmux-256color"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @tmux_power_prefix_highlight_pos 'LR'
set -g @tmux_power_theme 'snow'
set -g @plugin 'wfxr/tmux-power'
run '~/.tmux/plugins/tpm/tpm'

Sourcing the configuration does not work with tmux 2.6

I tried to use this repo, but all I get is bunch of "unknown command" errors.

/home/simontoth/.repos/tmux-power/tmux-power.tmux:10: unknown command: tmux_get()
/home/simontoth/.repos/tmux-power/tmux-power.tmux:11: unknown command: local
/home/simontoth/.repos/tmux-power/tmux-power.tmux:12: unknown command: [
/home/simontoth/.repos/tmux-power/tmux-power.tmux:13: unknown command: }
/home/simontoth/.repos/tmux-power/tmux-power.tmux:17: unknown command: tmux_set()
/home/simontoth/.repos/tmux-power/tmux-power.tmux:18: unknown command: tmux
/home/simontoth/.repos/tmux-power/tmux-power.tmux:19: unknown command: }
/home/simontoth/.repos/tmux-power/tmux-power.tmux:23: unknown command: case
/home/simontoth/.repos/tmux-power/tmux-power.tmux:24: unknown command: gold
/home/simontoth/.repos/tmux-power/tmux-power.tmux:26: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:27: unknown command: redwine
/home/simontoth/.repos/tmux-power/tmux-power.tmux:29: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:30: unknown command: moon
/home/simontoth/.repos/tmux-power/tmux-power.tmux:32: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:33: unknown command: forest
/home/simontoth/.repos/tmux-power/tmux-power.tmux:35: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:36: unknown command: violet
/home/simontoth/.repos/tmux-power/tmux-power.tmux:38: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:39: unknown command: snow
/home/simontoth/.repos/tmux-power/tmux-power.tmux:41: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:42: unknown command: coral
/home/simontoth/.repos/tmux-power/tmux-power.tmux:44: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:45: unknown command: sky
/home/simontoth/.repos/tmux-power/tmux-power.tmux:47: unknown command: ;
/home/simontoth/.repos/tmux-power/tmux-power.tmux:48: unknown command: esac
/home/simontoth/.repos/tmux-power/tmux-power.tmux:60: unknown command: tmux_set
/home/simontoth/.repos/tmux-power/tmux-power.tmux:61: unknown command: tmux_set
/home/simontoth/.repos/tmux-power/tmux-power.tmux:64: unknown command: tmux_set
/home/simontoth/.repos/tmux-power/tmux-power.tmux:65: unknown command: tmux_set
/home/simontoth/.repos/tmux-power/tmux-power.tmux:66: unknown command: tmux_set
/home/simontoth/.repos/tmux-power/tmux-power.tmux:69: unknown command: tmux_set
/home/simontoth/.repos/tmux-power/tmux-power.tmux:70: unknown command: tmux_set
... snip ...

Theme not being applied

Apologies in advance, this is probably my fault, but there was nothing in the read me about this.

Here's my config:

set -g @tmux_power_theme 'moon'

# list of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'wfxr/tmux-power'
# 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'

If I'm not mistaken, I should see the nice moon theme that tmux-power provides, but I'm not seeing anything. I still get the standard bar at the bottom.

What am I doing wrong?

IP instead of hostname

Hi! Awesome plugin, thank you!

I have one question: My machine is showing the IP instead of the actual hostname, how can I change that to the hostname? ๐Ÿ™๐Ÿป

CleanShot 2022-07-21 at 15 13 46

request: alternating background color for windows

Hi!

I really like your theme, exactly what I was looking for except one thing:
It would be nice if the pane names had alternating background colors.
Something like this:
image1 (just a quick PS)
I would really appreciate this feature.

Panes left-aligned now when they used to be center-aligned

Hello! Love the theme - thank you for making it!

I noticed that my pane list is now left-aligned at the bottom of my screen rather than center-aligned:
image

Any way to configure it so it's centered again? Here is my .tmux.conf:

# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind C-a send-prefix

# use vi mode
setw -g mode-keys vi
set -g status-keys vi

# split panes using | and -
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %

# reload config file
bind r source-file ~/.tmux.conf

# search last command
bind -Tcopy-mode C-x send -X search-backward "[โฏโฎ]"
bind C-x copy-mode \; send -X search-backward "[โฏโฎ]"

# vim-like pane switching
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R

# vim-like pane resizing
bind -r C-k resize-pane -U 5
bind -r C-j resize-pane -D 5
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5

# switch windows
bind -n C-j previous-window
bind -n C-k next-window

# no delay for escape key press
set -sg escape-time 0

# enable mouse mode
set -g mouse on

# don't rename windows automatically
set-window-option -g automatic-rename on
set-option -g set-titles on

# increase history
set -g history-limit 100000

# 256 colors
set -g default-terminal "screen-256color"

# start with window 1
set -g base-index 1

# start with pane 1
set -g pane-base-index 1

# fzf split below
set -g @extrakto_split_direction "v"

# enter copy mode shortcut
bind -n C-q copy-mode

# copy with y in tmux
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'

# vim-like selection in copy mode
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel

# plugins
if "test ! -d ~/.tmux/plugins/tpm" \
   "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"

set -g @plugin 'laktak/extrakto'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'wfxr/tmux-power'
set -g @tmux_power_theme 'moon'

# NOTE: for tmux-power theme to display icons, had to install this font:
# https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Meslo/S/Regular/MesloLGSNerdFont-Regular.ttf
# copy/paste into fontbook
# use it under iterm2 settings (Profile -> Text)

# TO RELOAD PLUGINS: <prefix> + I (capital i)
# TO UPDATE PLUGINS: <prefix> + U (capital u)
# TO REMOVE OLD PLUGINS: <prefix> + alt + u (map alt to +Esc on Profiles -> Keys preference in iTerm2)
run -b '~/.tmux/plugins/tpm/tpm'

custom theme is not shown when entering tmux

This is my .tmux.conf file:

# 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'

set -g @plugin 'wfxr/tmux-power'
set -g @tmux_power_theme 'forest'

but every time when entering tmux, the theme is default, I have to refresh it by <prefix>+I, it can switch to the 'forest theme'. But when I logout tmux and login next time, it is set to default again.

all users to set own FG/BG values

currently hardcoded and produces some weird coloring if the terminal theme does not match the hex codes provided. Would be nice to see this as a param like the Theme color.

Hide user

Hello! Is it possible to hide the user?
It's not really helpful to me and it occupies a lot of space.

add a custom background color

hello, awesome theme plugin, i love how can i customise de main color to match to my neovim theme but i wonder if there is a way to also change the background color.

Expose all the colors G01-G12

This enables more customization, probably by setting @tmux_power_theme_color1 --> @tmux_power_theme_color12. It introduces so many variables but I can't think of any better approach.

Non-active window names are not being displayed

Hi I installed tmux-power with tmp and did the configurations, all looking good but I'm unable to see the window names that is not active but I only can see active window name even if there are many other windows.
tmux-power
.

This is how my configurations looks like;

set -g @tmux_power_theme 'moon'
set -g @tmux_power_date_icon ' ' # set it to a blank will disable the icon
set -g @tmux_power_time_icon '๐Ÿ•˜' # emoji can be used if your terminal supports
set -g @tmux_power_user_icon 'U'
set -g @tmux_power_session_icon 'S'
set -g @tmux_power_upload_speed_icon 'โ†‘'
set -g @tmux_power_download_speed_icon 'โ†“'
set -g @tmux_power_prefix_highlight_pos 'LR'
set -g @tmux_power_show_upload_speed true
set -g @tmux_power_show_download_speed true
set -g @tmux_power_show_web_reachable true

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'wfxr/tmux-power'
set -g @plugin 'wfxr/tmux-net-speed'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'wfxr/wmux-web-reachable'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# 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'

when I add the set -g status-fg white command to the end of ~/.tmux.confthey gets visible but without the arrow like background coloring that you guys have on the screenshots.

incorrect background

it looks like the first left triangle on the right side doesn't set the BG here:

RS="#[fg=$G06]$left_arrow_icon#[fg=$TC,bg=$G06] $time_icon $time_format #[fg=$TC,bg=$G06]$left_arrow_icon#[fg=$G04,bg=$TC] $date_icon $date_format "

adding ,bg=$BG near the fron of the line seems to correct it for me.

Here is a diff:

diff --git a/tmux-power.tmux b/tmux-power.tmux
index 54b7b0f..3caac63 100755
--- a/tmux-power.tmux
+++ b/tmux-power.tmux
@@ -119,7 +119,7 @@ tmux_set status-left "$LS"
 tmux_set status-right-bg "$G04"
 tmux_set status-right-fg "G12"
 tmux_set status-right-length 150
-RS="#[fg=$G06]$left_arrow_icon#[fg=$TC,bg=$G06] $time_icon $time_format #[fg=$TC,bg=$G06]$left_arrow_icon#[fg=$G04,bg=$TC] $date_icon $date_format "
+RS="#[fg=$G06,bg=$BG]$left_arrow_icon#[fg=$TC,bg=$G06] $time_icon $time_format #[fg=$TC,bg=$G06]$left_arrow_icon#[fg=$G04,bg=$TC] $date_icon $date_format "
 if "$show_download_speed"; then
     RS="#[fg=$G05,bg=$BG]$left_arrow_icon#[fg=$TC,bg=$G05] $download_speed_icon #{download_speed} $RS"
 fi

Color troughout the terminal

I am not sure if it is an issue related to the theme.

Checking your screenshot I can see the color of the text output in your terminal to match the look of the tmux theme.

Is it something that should happen installing the plug in or that changes are something else? if it is not related to the theme could you share where to find it?

Thank you

[Feature] Show load average in tmux status bar

Hi, thanks for your awesome Tmux plugin.

I would like to show load average in me Tmux status bar via tmux-power plugin. Please, could you add a option to display it ?

The string to display Load average can be defined via simple shell (here with Bash) command :

uptime | rev | cut -d":" -f1 | rev | sed s/,//g => 0.35 0.64 0.75

tmux prefix highlight doesn't work after adding tmux-power

My Tmux config

# tmux power config
set -g @tmux_power_date_icon '๐Ÿ“…' # set it to a blank will disable the icon
set -g @tmux_power_time_icon '๐Ÿ•˜' # emoji can be used if your terminal supports
set -g @tmux_power_user_icon '๐Ÿ˜'
set -g @tmux_power_session_icon ' '
set -g @tmux_power_upload_speed_icon 'โ†‘'
set -g @tmux_power_download_speed_icon 'โ†“'
set -g @tmux_power_left_arrow_icon ' < '
set -g @tmux_power_right_arrow_icon ' > '
set -g @tmux_power_theme 'moon'

set -ag status-left '#{prefix_highlight}'
set-window-option -g window-status-current-bg '#CEA163'

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'wfxr/tmux-power'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'

# set prefix as backtick
unbind C-b
set -g prefix `
bind-key ` send-prefix
# a suggestion by stackoverflow user below to activate ctrl+a and revert it back to backtick in case of conflicts
# bind-key C-a set-option -g prefix C-a
# bind-key C-b set-option -g prefix `

set -g display-panes-time 3000
set -sg escape-time 0

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

And when I press prefix key, it doesn't highlight anything:

image

I tried the approach suggested in another issue #8, but its not working for me.

Default theme not applied

Hello and thank you for the theme!

I have an issue in which the default theme does not pick my terminal colors. I am using alacrity as my terminal. The rest of the themes work just fine :)

can not get icon printed for some of them

Hello and thank you for this plugin theme setting.
I can not get icon for User and some other (but calendar icon is printing for date).
I'm under FreeBSD-12.2 server on a VPS, i access from SSH through ssh command (and i can get icons on my oh-my-zsh prompt shell configured... even inside tmux).
Font used for oh-my-zsh theme (powerlevel10k) is nerdfont.

How do I add a custom wttr.in curl to the right side?

I would like to add the output of curl -s "wttr.in/Europe?format=1" | sed "s/+//" | sed "s/ / /" to the right side and refresh it every 15 minutes or so. I tried to use tmux-weather with this theme, but couldn't get it to work, so I thought it should be possible with just a .tmux.conf or modifying the theme itself. How should I do it?

uninstalling

I simply applied the theme using ./tmux-power.tmux command.
But now that I want to uninstall the theme, amazingly I do not have any tmux.conf :/
So how could I uninstall this theme from tmux??

I'm using ubuntu

Highlight color

Is there a way to set the color of the highlighting to something different from the theme?
I love the green but it makes it impossible to read what I'm highlighting, it would be nice to set it to white while keeping the rest green.
image

Not working with tmux-prefix-highlight

steps to reproduce
install tmux-prefix-highlight tmux-power-power-theme
set config:

            set -g @tmux_power_prefix_highlight_pos 'LR'

Nothing shows up if I press prefix .0-0

IP on status bar

Hi,

I would like to add vpn ip to the status bar (useful when we work with several VPN). I added it to the .tmux-power.tmux. If the vpn is up it works but if not and I run vpn later once I am on tmux, the value is not updated. I wonder if you have any parameter to make updatable such as time. thanks

Empty icons should not create space

Setting set -g @tmux_power_date_icon ' ' creates an empty space. My current solution is to edit the source code to not display the icon at all, but it would be nice if it could just be empty as well.

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.