Open SalmanFarooqShiekh opened 6 days ago
It looks like there is a fix for this already upstream (this PR was closed but it was implemented in another commit): https://github.com/asweigart/pyperclip/pull/201
It is probably enough to just bump our pyperclip dependency to the version released last week, v1.9.0
I just edited my original post to say something similar just before your comment :)
Anyways, I know it was a bit hasty on my part but I have already set up the dev environment for harlequin locally on my machine so if you want me to do this and possibly handle any breaking changes to pyperclip, I can do it. Let me know. Thanks.
@SalmanFarooqShiekh all good -- I just opened a PR in an upstream project for the textarea widget, which is where Harlequin accesses the clipboard. Once I merge and release that, if you could bump the version of textual-textarea in your local harlequin, that would confirm the fix.
ok, textual-textarea v0.13.1 has been released
testing
1 diff --git a/pyproject.toml b/pyproject.toml
2 index f903579..b085e22 100644
3 --- a/pyproject.toml
4 +++ b/pyproject.toml
5 @@ -24,7 +24,7 @@ python = ">=3.8.1,<4.0.0"
6 # textual and component libraries
7 textual = "==0.56.4"
8 textual-fastdatatable = "==0.7.1"
9 -textual-textarea = "==0.13.0"
10 +textual-textarea = "==0.13.1"
11
12 # click
13 click = "^8.1.3"
Getting this error:
$ poetry install --sync
Installing dependencies from lock file
pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.
$ poetry lock
Updating dependencies
Resolving dependencies... (74.3s)
Because no versions of textual match >0.60,<0.60.1 || >0.60.1,<0.61
and textual[syntax] (0.60.0) depends on textual (0.60.0), textual[syntax] (>=0.60,<0.60.1 || >0.60.1,<0.61) requires textual (0.60.0).
And because textual[syntax] (0.60.1) depends on textual (0.60.1)
and textual-textarea (0.13.1) depends on textual[syntax] (>=0.60,<0.61), textual-textarea (0.13.1) requires textual (0.60.0 || 0.60.1).
So, because harlequin depends on both textual (==0.56.4) and textual-textarea (==0.13.1), version solving failed.
Sorry I haven't done python in a while and poetry never.
Oh, my bad. Looks like I updated something I shouldn't have in the other project
Any way I can help?
Thanks for the offer. No, I need to bump the version of textual we're running in Harlequin. That can be tricky, but I should be able to fight through it next week
Before Proceeding, please acknowledge:
Describe the bug Copying text in query editor or query results on wayland compositors with no Xwayland shows an error message: "Could not access system clipboard.". With Xwayland, everything works fine without changing anything.
To Reproduce
harlequin duck.db
shift + arrow-keys
control + c
Expected behavior Text is copied with no error notification
Actual behavior An error shows up and text is not copied.![image](https://github.com/tconbeer/harlequin/assets/46742354/60bbc1e5-ff06-407a-8d21-272479a6925d)
Contributing Are you interested in contributing a fix?
xsel
/xclip
which only works on X11. I can contribute a fix which will usewl-clipboard
instead whenXDG_SESSION_TYPE
is equal to 'wayland'~ Upon reading the code, it seems like the TUI library component textual-textarea might need updating to fix this issue)Additional context Not relevant.
What is the output of
harlequin --version
?What database adapter are you using with Harlequin? (Default is
duckdb
) I have tried postgres and duckdb, error is present with both.What other options are you using when invoking Harlequin? (If you are using a profile, please add relevant items from your profile here). Not relevant.
Can you tell us more about your system?
fish
kitty
Arch Linux
Arch Linux
echo $LC_ALL
givesen_US.utf8
How did you install Harlequin?