Fixed an issue with copying notes (2)

This commit is contained in:
2021-10-11 13:47:53 -04:00
parent f7c0e81f02
commit 2911087b40
+3 -3
View File
@@ -116,7 +116,7 @@ if argument == 'version' or argument == '-v':
print('/ /') print('/ /')
print('/ rpass Copyright (C) 2021 Randall Winkhart /') print('/ rpass Copyright (C) 2021 Randall Winkhart /')
print('/ /') print('/ /')
print('/ Version 2021.10.07.mr5 /') print('/ Version 2021.10.12.mr5.1 /')
print('/ The Notetaker Update /') print('/ The Notetaker Update /')
print('/ /') print('/ /')
print('////////////////////////////////////////////////////////\n') print('////////////////////////////////////////////////////////\n')
@@ -661,9 +661,9 @@ if argument == 'copy note' or argument == 'copy -n':
term('gpg -d --output /dev/shm/' + shmfolder + '/' + shmentry + ' ' + directory + readentry + '.gpg') term('gpg -d --output /dev/shm/' + shmfolder + '/' + shmentry + ' ' + directory + readentry + '.gpg')
copyline = open('/dev/shm/' + shmfolder + '/' + shmentry, 'r').readlines() copyline = open('/dev/shm/' + shmfolder + '/' + shmentry, 'r').readlines()
if environ.get('WAYLAND_DISPLAY') == 'wayland-0': if environ.get('WAYLAND_DISPLAY') == 'wayland-0':
term('wl-copy ' + "'" + copyline[3].replace('\n', '') + "'") term('wl-copy ' + "'" + copyline[4].replace('\n', '') + "'")
else: else:
term('echo -n ' + "'" + copyline[3].replace('\n', '') + "'" + ' | xclip -sel c') term('echo -n ' + "'" + copyline[4].replace('\n', '') + "'" + ' | xclip -sel c')
rmtree('/dev/shm/' + shmfolder) rmtree('/dev/shm/' + shmfolder)
except FileNotFoundError: except FileNotFoundError:
print('\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') print('\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')