Skip to content

Commit

Permalink
shorten
Browse files Browse the repository at this point in the history
  • Loading branch information
midays committed May 20, 2024
1 parent 218f43e commit 267d2b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ def get_clipboard_text(split=False):
"""Returns the text currently copied in the clipboard."""
try:
pyperclip.set_clipboard("xclip")
text = pyperclip.paste()
text = text.split("\n") if split else pyperclip.paste()
text = pyperclip.paste().split("\n") if split else pyperclip.paste()
return text
except pyperclip.PyperclipException as e:
print(f"Error accessing clipboard: {e}")
Expand Down

0 comments on commit 267d2b7

Please sign in to comment.