Giter Club home page Giter Club logo

Comments (24)

danielkrajnik avatar danielkrajnik commented on July 18, 2024 1

I think it was set -g @continuum-save-interval '5'; that made it tick

from tmux-continuum.

bruno- avatar bruno- commented on July 18, 2024

Did you try reloading tmux config file?

from tmux-continuum.

janbuchar avatar janbuchar commented on July 18, 2024

Yes, in fact I waited for a couple of days and rebooted a handful of times.

from tmux-continuum.

bruno- avatar bruno- commented on July 18, 2024

Can you please provide this info https://github.com/tmux-plugins/tmux-continuum/blob/master/CONTRIBUTING.md

from tmux-continuum.

janbuchar avatar janbuchar commented on July 18, 2024

.tmux.conf
last session file

from tmux-continuum.

bruno- avatar bruno- commented on July 18, 2024

Can you try moving run-shell from here at the bottom of your tmux.conf.

In general you want to run your plugin after the options are set. In this case @continuum-save-interval is set after the plugin is run.

from tmux-continuum.

janbuchar avatar janbuchar commented on July 18, 2024

Looks like autosave works, thanks! However, continuum_status is still empty.

from tmux-continuum.

mdeguzis avatar mdeguzis commented on July 18, 2024

Variable is empty for me too

from tmux-continuum.

fejiso avatar fejiso commented on July 18, 2024

Empty for me as well

from tmux-continuum.

rrebollo avatar rrebollo commented on July 18, 2024

Same problem for me here!!! Any ideas???

from tmux-continuum.

clayreimann avatar clayreimann commented on July 18, 2024

When I run the status command manually on my mac I see:

 ~~/.tmux/plugins/tmux-continuum/scripts/continuum_status.sh
/Users/clayreimann/.tmux/plugins/tmux-continuum/scripts/continuum_status.sh: line 12: [: -gt: unary operator expected
off

I don't know if this line is borked because I'm using the default save interval (and so have never explicitly set the interval).

Edit: the error went away when I set @continuum-save-interval but that didn't fix the status bar.

from tmux-continuum.

rpdelaney avatar rpdelaney commented on July 18, 2024

Edit: Please don't tag me. I can't help with this any more than I already have.


@clayreimann

Line 12 is:
if [ $save_int -gt 0 ]; then

That error indicates that $save_int is unset when line 12 is reached.

It's set here, on line 9:
local save_int="$(get_tmux_option "$auto_save_interval_option")"

That explains why the error went away when you set @continuum-save-interval. It seems that $auto_save_interval_option needs to be populated with the default value in this script.

I don't have this error and I'm not sure why not. But try changing line 9 to this:
local save_int="$(get_tmux_option "${auto_save_interval_option:-15}")"

If that fixes it then a PR should be an easy fix.

from tmux-continuum.

bestvibes avatar bestvibes commented on July 18, 2024

Same issue for me as well! Has anyone found a solution yet? Setting @continuum-save-interval removes the error from the script but the status still shows up empty. I'm on Mac 10.14.5 and tmux 2.9a.

from tmux-continuum.

rpdelaney avatar rpdelaney commented on July 18, 2024

@bestvibes Can you try the change I suggested in my comment above yours? I don't use this plugin anymore but if someone can confirm that it fixes the problem I will send a PR.

Edit: I'm not clear what you mean by this bit:

...the status still shows up empty.

Can you expand on that?

from tmux-continuum.

bestvibes avatar bestvibes commented on July 18, 2024

@rpdelaney I tried what you mentioned, and I had the same result as @clayreimann above your comment. The error went away when running the script and it just shows 15 now. However when I add the status to the status bar in tmux it still shows empty, even though the script returns 15. I hope that clarifies it! I can give more details tonight once I'm near my computer.

from tmux-continuum.

slowkow avatar slowkow commented on July 18, 2024

My #{continuum_status} was off even though I had this line in my .tmux.conf:

set -g @continuum-restore 'on'

Then, I changed my .tmux.conf to include this line:

set -g @continuum-save-interval 15

Finally, I ran tmux source ~/.tmux.conf and the status changed to 15 instead of off.

Now it looks like it is working:

$ ls -T ~/.tmux/resurrect/
~/.tmux/resurrect
├── last -> tmux_resurrect_20191009T110430.txt
├── pane_contents.tar.gz
├── save
│  └── pane_contents
└── tmux_resurrect_20191009T110430.txt

I'm using tmux 2.9a on macOS.

from tmux-continuum.

xave avatar xave commented on July 18, 2024

In addressing the empty status bar concern:

For manual installations of the tmux-continuum plugin, you need to make sure the run-shell command is after any set -g commands or the Continuum-status: will be blank, presumably because the script will have run before those optional settings have been provided to it otherwise.

In essence:

`set -g @foo`
`set -g @bar`
`run-shell /path/to/tmux/continuum/continuum.tmux` #must be the last line for continuum portion of tmux config

from tmux-continuum.

alex-popov-tech avatar alex-popov-tech commented on July 18, 2024

Hi guys, same thing...
here is my tmux conf - https://github.com/alex-popov-tech/.dotfiles/blob/master/configs/tmux.conf
and i see empty continuum_status variable in status line, and automatic saving does NOT happens also :(
but if i will run mayually continuum_save.sh or continuum_status.sh they both works as expected (save session or show current status text)

Any ideas on that?

cc @slowkow @rpdelaney

from tmux-continuum.

alex-popov-tech avatar alex-popov-tech commented on July 18, 2024

@bruno- any updates on that topic?

from tmux-continuum.

rpdelaney avatar rpdelaney commented on July 18, 2024

@alex-popov-tech The fix I described in my previous comment is still working for me. I'm not sure what else to suggest.

from tmux-continuum.

illuz avatar illuz commented on July 18, 2024

I put confg settings before @plugin and it works.

set -g @continuum-restore 'on'
set -g @continuum-save-interval '1'

set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

Just try it. @slowkow @rpdelaney @alex-popov-tech

from tmux-continuum.

rpdelaney avatar rpdelaney commented on July 18, 2024

I don't have this error and I'm not sure why not.

Please don't tag me... I can't help with this any more than I already have.

from tmux-continuum.

mdeguzis avatar mdeguzis commented on July 18, 2024

Idk why it doesn't get sourced right, but this fixed it for me

# top of tmux.conf somewhere 
# For some reason, the var doesn't get set normally for #{continuum_status}
run-shell "tmux setenv -g continuum_status $(~/.tmux/plugins/tmux-continuum/scripts/continuum_status.sh)

if-shell '[ $(echo "$TMUX_VERSION >= 1.9" | bc -l) == 1 ]' \
    "\
    set -g @continuum-save-interval '5'; \
    set -g status-right 'Continuum status: #{continuum_status}'; \
    set -g @plugin tmux-plugins/tpm; \
    set -g @plugin tmux-plugins/tmux-logging; \
    set -g @plugin tmux-plugins/tmux-resurrect; \
    set -g @plugin tmux-plugins/tmux-continuum; \
    set -g @continuum-restore 'on' \
    "

And to someone's point above, yes, if you don't put the save/status first, you'll often get this instead:

$ tmux source ~/.tmux.conf
usage: set-option [-aFgosquw] [-t target-window] option [value]

from tmux-continuum.

luchaoqi avatar luchaoqi commented on July 18, 2024

I think it was set -g @continuum-save-interval '5'; that made it tick

Same, need to specify the interval in the config file to start the plugin

from tmux-continuum.

Related Issues (20)

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.