Open m040601 opened 2 years ago
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.
That's a good idea, will do!
You might want to add to the README/man page a word or two about quoting that $f.
Added quotes in examples: b561d0ea29cb123deceffce9788bc8419d148693 . I think that should suffice?
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
ormap i $PAGER $f
But very often my folders and files have spaces, so it failed.
I had to
map e $EDITOR "$f"
ormap i $PAGER "$f"