Open Lethaquell opened 2 months ago
Hey @Lethaquell :wave: thanks for raising this.
This is a new one! Which system clipboard utility are you using here? eg wl-clipboard
, xsel
, xclip
etc. It's possible you're using something that only keeps clipboard history within a certain context. It may be worth testing this with something like:
alacritty -e wl-copy test
alacritty -e sh -c 'echo test | wl-copy'
The recommended dependencies for this are wl-clipboard
for wayland and xclip
for xorg.
Could be worth checking what happens when you run the following also:
alacritty -e clipse -c test
alacritty -e sh -c 'echo test | clipse -c'
You could also try amending your script to add a short sleep after clipse has executed, or try -e sh -c clipse
to see if that makes a difference.
I might look into adding an arg that will output what's been copied to allow a piping command like alacritty -e sh -c 'clipse -out | clipse -c'
if that is found to be an issue with the system environment (Archcraft), though hopefully it's more simple than that.
Hello @savedra1! Thanks for reaching me back, appreciate it.
I'm using xclip
cause bspwm
works on xorg
. I also have wl-clipboard
installed, but for other WM's on Wayland. xsel
isn't installed.
I've tried some tests eg:
alacritty -e sh -c "echo test | xclip -selection clipboard"
alacritty -e sh -c 'echo test | clipse -c'
alacritty -e clipse -c test
I've also tried to add sleep before executing clipse itself, but for now nothing is working for me.
To be clear, when I'm executing echo test | xclip -selection clipboard
from xfce4-terminal
it works just fine even after closing the terminal itself.
If there is anything I can also try -- I'll be grateful for any advises. I'll also investigate on problem furthermore on my spare time.
P.S. I might be entirely wrong, but can it be somehow related with OSC52 functionality/compatibility within alacritty?
@Lethaquell I see :thinking:
You could be on to something there with osc52, found this in the Alacritty docs:
This section documents the [terminal] table of the configuration file.
osc52 = "Disabled" | "OnlyCopy" | "OnlyPaste" | "CopyPaste"
Controls the ability to write to the system clipboard with the OSC 52 escape sequence. While this escape sequence is useful to copy contents from the remote server, allowing any application to read from the clipboard can be easily abused while not providing significant benefits over explicitly pasting text.
Default: "OnlyCopy"
you could try setting this to CopyPaste
in the [terminal]
section of your config?
@savedra1 it's on CopyPaste
right now, I've tested these particular settings yesterday. Also tried Disabled
and CopyPaste
. I can confirm that my bspterm
uses this config, not any other.
Thanks for letting me know @Lethaquell
Seems like the connection to the X clipboard server is terminating along with the terminal session when alacritty is used. I'm wondering if there's a way to get this to persist to the main session clipboard by attaching an extra command to what you're currently using.
The copy mechanism used by clipse for X environments is xclip -in -selection clipboard
but it's posible the -in
arg is restricting it to the current terminal sesison Maybe something like this could help:
alacritty -e clipse | clipboard_contents=$(xclip -selection clipboard -o) && echo '$clipboard_contents' | xclip -selection clipboard
OR
alacritty -e "clipse; clipboard_contents=$(xclip -selection clipboard -o) && echo '$clipboard_contents' | xclip -selection clipboard"
Not sure if that will help though as I'm unable to test an X environment atm.
Hello! I'm using Archcraft with bspwm.
I'm running listening from
bspwmrc
config asexec clipse -listen &
Then I have asxhkdrc
config for my keybinds, I've configured clipse to open in floating alacritty terminal as:bspterm
is basically an Alacritty term executing from bash script for managing float/fullscreen behavior:The problem is:
Am I doing something wrong?
Quick UPD:
alacritty -e clipse
and got the same (p3) behavior. I'll try to research furthermorebspterm --float -e clipse keep
and get anything from buffer that I want, sadly, right to the moment I close the term window. I'll stick to this "solution" for nowxfce4-terminal
works just fine.