Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with keybindings #29

Closed
hojberg opened this issue Aug 30, 2014 · 10 comments
Closed

issues with keybindings #29

hojberg opened this issue Aug 30, 2014 · 10 comments

Comments

@hojberg
Copy link

hojberg commented Aug 30, 2014

Not sure what im doing wrong, but hitting prefix+alt-s does nothing for me :(

Really excited about this project though :)

@bruno-
Copy link
Member

bruno- commented Aug 30, 2014

Hi,
maybe the terminal is not detecting alt keys.
Try setting this in .tmux.conf:

set -g @resurrect-save 'C-s'
set -g @resurrect-restore 'C-r'

then reload tmux settings by typing this in the shell tmux source ~/.tmux.conf.

Now, you should be able to save with prefix + ctrl-s and restore with prefix + ctrl-r.

Let me know if it works!

@hojberg
Copy link
Author

hojberg commented Aug 30, 2014

Can't get that to work either - Should I be able to run ":resurrect-save" in tmux command mode?

@bruno-
Copy link
Member

bruno- commented Aug 30, 2014

No, unfortunately tmux does not allow creating new commands for it's command mode.

Ok, we're taking a step back then:

  • can you check ~/.tmux/plugins/tmux-resurrect/ directory exists?
  • what happens when you run ~/.tmux/plugins/tmux-resurrect/scripts/save.sh script directly (it should do the saving - the same as prefix + Alt-s)
  • what's the output you're getting with this command tmux list-keys | grep resurrect ?

Thanks for the help with debugging this.

@jgeralnik
Copy link

Another thing to be aware of is to make sure you included the line

  run-shell ~/.tmux/plugins/tpm/tpm

in your .tmux.conf if you are using tmux plugin manager

@hojberg
Copy link
Author

hojberg commented Aug 30, 2014

  • Directory is there.
  • running ~/.tmux/plugins/tmux-resurrect/scripts/save.sh works
  • tmux list-keys | grep resurrect:
  tmux list-keys | grep resurrect                                                                                                                                         master
bind-key        C-r run-shell /Users/hojberg/.tmux/plugins/tmux-resurrect/scripts/restore.sh
bind-key        C-s run-shell /Users/hojberg/.tmux/plugins/tmux-resurrect/scripts/save.sh
bind-key        M-r run-shell /Users/hojberg/.tmux/plugins/tmux-resurrect/scripts/restore.sh
bind-key        M-s run-shell /Users/hojberg/.tmux/plugins/tmux-resurrect/scripts/save.sh

and finally the run-shell for tpm is in my config.

@bruno-
Copy link
Member

bruno- commented Aug 30, 2014

Okay, great. I'm happy that running the .../save.sh script worked because that's where all the logic is.

The output from tmux list-keys also looks good. It's really up to tmux to run those scripts you see in the output on the right when you press either Alt-s or Ctrl-s for save...

So I'm kinda clueless now.
@hojberg if there's no other option, wanna do a pairing session tomorrow evening over google hangouts?

@solomonjames
Copy link

I am noticing the same thing. I upgraded tmux to 1.9a from brew. tried the C-r binding too. So far my issue follows @hojberg exactly.

@solomonjames
Copy link

Hmmm, so after some playing I got the following config setup to work:

bind C-s run-shell ~/.tmux/plugins/tmux-resurrect/scripts/save.sh                                                                                                                     
bind C-r run-shell ~/.tmux/plugins/tmux-resurrect/scripts/restore.sh

But I also had to ensure that the files in scripts/* were executable. They seem to be executable with just a git clone, but I was using something called Fresh Shell to load this plugin and seemed to change the permissions on all the files. I still can't get the Alt+s to work, but I am happy with C-r/C-s because the plugin works great!!

@hojberg
Copy link
Author

hojberg commented Sep 2, 2014

I got this working now. Didn't change anything and it suddenly works - very bizarre...

@bruno-
Copy link
Member

bruno- commented Sep 2, 2014

Cool, good to hear that!
Closing the issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants