Use tkinter's clipboard handling instead of xclip on linux

This commit is contained in:
norohind committed 2025-06-21 12:42:39 +00:00
1 parent 687a9d6986
commit 47c4637b2c
1 file changed
+3 -7
+3 -7
View File
@@ -341,13 +341,9 @@ class SpanshRouter():
logger.warning(''.join('!! ' + line for line in lines)) logger.warning(''.join('!! ' + line for line in lines))
def copy_waypoint(self): def copy_waypoint(self):
if sys.platform == "linux" or sys.platform == "linux2": self.parent.clipboard_clear()
command = subprocess.Popen(["echo", "-n", self.next_stop], stdout=subprocess.PIPE) self.parent.clipboard_append(self.next_stop)
subprocess.Popen(["xclip", "-selection", "c"], stdin=command.stdout) self.parent.update()
else:
self.parent.clipboard_clear()
self.parent.clipboard_append(self.next_stop)
self.parent.update()
def goto_next_waypoint(self): def goto_next_waypoint(self):
if self.offset < self.route.__len__()-1: if self.offset < self.route.__len__()-1: