Giter Club home page Giter Club logo

Comments (5)

MunifTanjim avatar MunifTanjim commented on August 15, 2024 1

This seems to be working:

  status-right:g:##{tmux_mode_indicator} #[fg=colour15\\,bg=colour136]##{?window_zoomed_flag\\, ZOOM \\,}#[default] #[fg=colour136]##(whoami)#[default]@##H | #[fg=colour136]%h %d %H:%M:%S#[default] ##{online_status}, \

from tmux-suspend.

MunifTanjim avatar MunifTanjim commented on August 15, 2024

Inside @suspend_suspended_options, you'll need to escape some characters, e.g.:

  • # as ##
  • , as \\,

You'll need to set status-right as global. So it would look something like this (not tested):

  status-right:g:##{tmux_mode_indicator} [fg=colour15\\,bg=colour136]##{?window_zoomed_flag\\, ZOOM \\,}#[default] [fg=colour136]##(whoami)#[default]@##H | [fg=colour136]%h %d %H:%M:%S#[default] ##{online_status}, \

Also #{tmux_mode_indicator} is expanded on tmux startup, so it won't be expanded again if you set it later. If you want to do that you'll need to run the tmux-mode-indicator/mode_indicator.tmux script. So you can do something like:

set -g @suspend_on_suspend_command "tmux run-shell ~/.tmux/plugins/tmux-mode-indicator/mode_indicator.tmux"

I'm guessing you'll also need to do it for #{online_status}, so

set -g @suspend_on_suspend_command "tmux run-shell ~/.tmux/plugins/tmux-mode-indicator/mode_indicator.tmux && tmux run-shell ~/.tmux/plugins/tmux-online-status/online_status.tmux"

from tmux-suspend.

amigthea avatar amigthea commented on August 15, 2024

thank you @MunifTanjim for all the suggestion, really appreciated!

Working on those I've come up with a working solution:

  status-right:g:##{tmux_mode_indicator} ##{?window_zoomed_flag\\, ZOOM \\,} ##(whoami)@##H | %h %d %H:%M:%S ##{online_status}, \

but I've stripped off colour sections because they're not working, it's like they're escaped and displayed as a string like this:

#[fg=colour15\\,bg=colour136]

from tmux-suspend.

MunifTanjim avatar MunifTanjim commented on August 15, 2024

it's like they're escaped and displayed as a string like this

Probably because of some escaping issue, I'm not entirely sure about how tmux interprets the sequence.

What you can do is, run this command when in suspended state:

tmux show-options -g status-right

to see the actual value that was set.

from tmux-suspend.

amigthea avatar amigthea commented on August 15, 2024

Indeed it is! thank you so much for the time you dedicated me, have a nice day!

from tmux-suspend.

Related Issues (5)

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.