muniftanjim / tmux-suspend Goto Github PK
View Code? Open in Web Editor NEWPlugin that lets you suspend local tmux session, so that you can work with nested remote tmux session painlessly.
License: MIT License
Plugin that lets you suspend local tmux session, so that you can work with nested remote tmux session painlessly.
License: MIT License
I can't figure out how to configure options like status-right in the @suspend_suspended_options configuration.
set -g @suspend_suspended_options " \
@mode_indicator_custom_prompt:: ---- , \
@mode_indicator_custom_mode_style::bg=brightblack\\,fg=black, \
status-right::#{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}, \
status-style::bg=brightblack\\,fg=colour15, \
window-status-current-style::bg=colour245\\,fg=colour15, \
"
This code fails at the status-right line
I would like to set an option only for the current session when I suspend. However, I'm not sure how to get the current tmux session.
set -g @suspend_on_resume_command " \
session=$(tmux display-message -p '#S'); \
tmux set -qt $session @catppuccin_status_modules_right 'directory user host session'; \
tmux run '~/.config/tmux/plugins/tpm/tpm'; \
"
set -g @suspend_on_suspend_command " \
session=$(tmux display-message -p '#S'); \
echo $session > ~/.tmux_suspend_session; \
tmux set -qt $session @catppuccin_status_modules_right 'user host session'; \
tmux run '~/.config/tmux/plugins/tpm/tpm'; \
"
~/.tmux_suspend_session
is empty after suspending, because I think tmux is executing this outside of the session. Or if you have a better way of only changing an option for a single session, that would also be helpful.
I am trying to use this plugin, however in my setup, I use C-a
as prefix2 (so both C-b
and C-a
work as prefix keys), however, this plugin only suspends the outer session when attempting to use C-b
.
Is it possible to support custom or multiple prefix keys?
Suspending should only affect the currently open session, it should not affect all the sessions.
Currently options set in @suspend_on_suspend_command
needs to be manually reverted in @suspend_on_resume_command
.
This leads to duplication in tmux config file. There needs to be a smarter alternative where options set for suspended state are automatically reverted to pre-suspend values when resumed.
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.