-
Notifications
You must be signed in to change notification settings - Fork 7
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
make "y" copy independent of a display server #18
Comments
That's a good idea, will do!
Added quotes in examples: b561d0e . I think that should suffice? |
TIP: You can also use tty-copy to make copying work even via SSH. ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all thank your work on this really interesting tool. I found it via suckless.org and the termbox library links. Nice to know you're also an Archlinux user. It really deserves a post there on the forum.
So, by default, "y" is binded to a clipboard action. When one is not using X11/Wayland it doesnt do anything.
Since I'm using tmux, without X11 I tried in ~/.config/ictree/config
map y echo "$f" | tmux load-buffer -
And it worked !
So, my suggestion, instead of hard coding "y" to use xsel etc,
Maybe you could probe for a $DISPLAY environement (returning false), and a $TMUX environment (returning true). If both check then map y to the tmux copy buffer.
By the way,
You might want to add to the README/man page a word or two about quoting that $f.
Apparently ictree sends $f unquoted.
I first tried
map e $EDITOR $f
or
map i $PAGER $f
But very often my folders and files have spaces, so it failed.
I had to
map e $EDITOR "$f"
or
map i $PAGER "$f"
The text was updated successfully, but these errors were encountered: