From 267d2b7639ec75e6f518ebca4b075019a4657a06 Mon Sep 17 00:00:00 2001 From: midays Date: Mon, 20 May 2024 15:28:15 +0300 Subject: [PATCH] shorten --- src/utils/general.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/general.py b/src/utils/general.py index 7bfaa60..c3b7abd 100644 --- a/src/utils/general.py +++ b/src/utils/general.py @@ -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}")