Add support for x11

This commit is contained in:
Micke Nordin 2022-07-01 11:22:18 +02:00
parent 9e9520a3ef
commit 1687fc3151
Signed by untrusted user who does not match committer: micke
GPG key ID: 0DA0A7A5708FE257
3 changed files with 13 additions and 3 deletions

View file

@ -10,7 +10,7 @@ Comment=GUI for the standard unix password store
Comment[ca]=Interfície gràfica per al magatzem de contrasenyes UNIX estàndard
Comment[nl]=GUI voor de standaard Unix wachtwoordopslag
Comment[sv_SE]=GUI för Unix standardlösenordshanterare
Exec=/usr/local/bin/passui
Exec=/usr/bin/passui
Icon=dialog-password
Terminal=false
Categories=Security;Utility;

View file

@ -99,9 +99,12 @@ def copy_to_clipboard(text) -> tuple[Union[str, bytes], Union[str, bytes]]:
:param text:
"""
clip_command = ['/usr/bin/wl-copy']
if not os.path.isfile(clip_command[0]):
clip_command = ['xclip', '-selection', 'c']
password: str = text.split('\n')[0]
command1: list[str] = ['/bin/echo', password]
command2: list[str] = ['/usr/bin/wl-copy']
command2: list[str] = clip_command
result: tuple[Union[str, bytes], Union[str, bytes]] = run_command(command1, command2)
return result
@ -112,7 +115,10 @@ def get_password_from_path(pass_path) -> str:
:param pass_path:
"""
result: tuple[Union[str, bytes], Union[str, bytes]] = run_command(['/usr/bin/pass', 'show', pass_path])
password: str = result[0].decode()
if type(result[0]) == type(bytes()):
password: str = result[0].decode()
else:
password: str = result[0]
return password

4
stdeb.cfg Normal file
View file

@ -0,0 +1,4 @@
[DEFAULT]
Depends3: python3-wxgtk4.0, python3-typing-extensions, python3-typing-inspect, python3-gnupg, git, gnupg, pass, pinentry-gtk2, wl-clipboard | xclip
Debian-Version: 1
Package3: passui