-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add ability to control which backend Helix uses for clipboards #8826
Labels
A-helix-term
Area: Helix term improvements
C-enhancement
Category: Improvements
E-good-first-issue
Call for participation: Issues suitable for new contributors
Comments
Agreed, there was #1827 but feedback was never addressed so the PR wasn't merged |
kirawi
added
A-helix-term
Area: Helix term improvements
E-good-first-issue
Call for participation: Issues suitable for new contributors
labels
Dec 8, 2023
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
May 28, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (use an internal buffer) (on windows only) - `windows` (use native windows clipboard) (on MacOS only) - `macos` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `xclip` - `xsel` - `win23yank` (for wsl) (on all targets with "term") - `termux` - `tmux` - `term` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.config] copy = ["tee", "test.txt"] paste = ["cat", "test.txt"] primary-copy = ["tee", "test-primary.txt"] // optional primary-copy = ["cat", "test-primary.txt"] // optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome. Note: This adds the `nonempty` crate as a new dependency. This is because I wanted a way to fail parsing custom commands if they were empty and didn't want to write custom parsign Serde code. I do not know what the process is for considering new dependencies and am very willing to change this for an alternative solution when presented with a better one! I looked for a `serde` annotation as I thought that was likely but couldn't find one.
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
May 28, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (use an internal buffer) (on windows only) - `windows` (use native windows clipboard) (on MacOS only) - `macos` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `xclip` - `xsel` - `win23yank` (for wsl) (on all targets with "term") - `termux` - `tmux` - `term` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.config] copy = ["tee", "test.txt"] paste = ["cat", "test.txt"] primary-copy = ["tee", "test-primary.txt"] // optional primary-copy = ["cat", "test-primary.txt"] // optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome. Note: This adds the `nonempty` crate as a new dependency. This is because I wanted a way to fail parsing custom commands if they were empty and didn't want to write custom parsign Serde code. I do not know what the process is for considering new dependencies and am very willing to change this for an alternative solution when presented with a better one! I looked for a `serde` annotation as I thought that was likely but couldn't find one.
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
May 28, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (use an internal buffer) (on windows only) - `windows` (use native windows clipboard) (on MacOS only) - `macos` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `xclip` - `xsel` - `win23yank` (for wsl) (on all targets with "term") - `termux` - `tmux` - `term` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.config] copy = ["tee", "test.txt"] paste = ["cat", "test.txt"] primary-copy = ["tee", "test-primary.txt"] // optional primary-copy = ["cat", "test-primary.txt"] // optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome. Note: This adds the `nonempty` crate as a new dependency. This is because I wanted a way to fail parsing custom commands if they were empty and didn't want to write custom parsign Serde code. I do not know what the process is for considering new dependencies and am very willing to change this for an alternative solution when presented with a better one! I looked for a `serde` annotation as I thought that was likely but couldn't find one.
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
Jun 12, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (use an internal buffer) (on windows only) - `windows` (use native windows clipboard) (on MacOS only) - `macos` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `xclip` - `xsel` - `win23yank` (for wsl) (on all targets with "term") - `termux` - `tmux` - `term` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.config] copy = ["tee", "test.txt"] paste = ["cat", "test.txt"] primary-copy = ["tee", "test-primary.txt"] // optional primary-copy = ["cat", "test-primary.txt"] // optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome. Note: This adds the `nonempty` crate as a new dependency. This is because I wanted a way to fail parsing custom commands if they were empty and didn't want to write custom parsign Serde code. I do not know what the process is for considering new dependencies and am very willing to change this for an alternative solution when presented with a better one! I looked for a `serde` annotation as I thought that was likely but couldn't find one.
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
Sep 9, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (use an internal buffer) (on windows only) - `windows` (use native windows clipboard) (on MacOS only) - `macos` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `xclip` - `xsel` - `win23yank` (for wsl) (on all targets with "term") - `termux` - `tmux` - `term` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.config] copy = ["tee", "test.txt"] paste = ["cat", "test.txt"] primary-copy = ["tee", "test-primary.txt"] // optional primary-copy = ["cat", "test-primary.txt"] // optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome. Note: This adds the `nonempty` crate as a new dependency. This is because I wanted a way to fail parsing custom commands if they were empty and didn't want to write custom parsign Serde code. I do not know what the process is for considering new dependencies and am very willing to change this for an alternative solution when presented with a better one! I looked for a `serde` annotation as I thought that was likely but couldn't find one.
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
Sep 9, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (use an internal buffer) (on windows only) - `windows` (use native windows clipboard) (on MacOS only) - `macos` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `xclip` - `xsel` - `win23yank` (for wsl) (on all targets with "term") - `termux` - `tmux` - `term` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.config] copy = ["tee", "test.txt"] paste = ["cat", "test.txt"] primary-copy = ["tee", "test-primary.txt"] // optional primary-copy = ["cat", "test-primary.txt"] // optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome. Note: This adds the `nonempty` crate as a new dependency. This is because I wanted a way to fail parsing custom commands if they were empty and didn't want to write custom parsign Serde code. I do not know what the process is for considering new dependencies and am very willing to change this for an alternative solution when presented with a better one! I looked for a `serde` annotation as I thought that was likely but couldn't find one.
the-mikedavis
changed the title
Add ability to control which backend Helix uses for clipboards?
Add ability to control which backend Helix uses for clipboards
Sep 21, 2024
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
Oct 13, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (on windows only) - `windows` (use native windows clipboard) - `pasteboard` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `x-clip` - `x-sel` - `win-32-yank` (for wsl) - `termux` - `tmux` (on all targets with "term") - `termcode` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.custom] yank = { command = "cat", args = ["test.txt"] } paste = { command = "tee", args = ["test.txt"] } primary-yank = { command = "cat", args = ["test-primary.txt"] } # optional primary-paste = { command = "tee", args = ["test-primary.txt"] } # optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome.
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
Oct 13, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (on windows only) - `windows` (use native windows clipboard) - `pasteboard` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `x-clip` - `x-sel` - `win-32-yank` (for wsl) - `termux` - `tmux` (on all targets with "term") - `termcode` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.custom] yank = { command = "cat", args = ["test.txt"] } paste = { command = "tee", args = ["test.txt"] } primary-yank = { command = "cat", args = ["test-primary.txt"] } # optional primary-paste = { command = "tee", args = ["test-primary.txt"] } # optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome.
AlfGalf
added a commit
to AlfGalf/helix
that referenced
this issue
Oct 16, 2024
This change adds the `clipboard-provider` setting to the `editor` section of configuration. This option can have values of: - `none` (on windows only) - `windows` (use native windows clipboard) - `pasteboard` (use pbcopy/pbpaste) (on neiter of the above) - `wayland` - `x-clip` - `x-sel` - `win-32-yank` (for wsl) - `termux` - `tmux` (on all targets with "term") - `termcode` (osc codes) - `custom` (see below for the configuration) Note for a custom provider the configurations should look like: ```toml [editor.clipboard-provider.custom] yank = { command = "cat", args = ["test.txt"] } paste = { command = "tee", args = ["test.txt"] } primary-yank = { command = "cat", args = ["test-primary.txt"] } # optional primary-paste = { command = "tee", args = ["test-primary.txt"] } # optional ``` This can be configured at runtime with the usual: ``` set clipboard-provider term ``` Note: I was unable to work out a syntax expression for setting a `custom` provider at runtime. In my opinion this is probably a fine limitation to have but I am curious if there is a correct way I couldn't work out. This ports over the previous provider selection logic so hopefully the same default behaviour should apply. I updated the health command to reflect the provider. Note: this required reading the user configurations within the health command which warrants discussion as this seems to not have been done before. This is my first contribution, I am a C++ developer by profession and a rust hobyist at best so nits and style updates very welcome.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-helix-term
Area: Helix term improvements
C-enhancement
Category: Improvements
E-good-first-issue
Call for participation: Issues suitable for new contributors
It seems to select automatically, and I can't find any docs for changing it. This is a problem if you have a nontrivial environment and some providers (e.g., xclip) fail -- but cannot be removed from the environment.
The text was updated successfully, but these errors were encountered: