From b0fa1f99c92f57fd7f19bb00543126d5fa74c8ed Mon Sep 17 00:00:00 2001 From: Cuan Date: Thu, 13 Jan 2022 02:46:18 -0500 Subject: [PATCH] Changed method for detecting Termux --- bin/sshyp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/sshyp b/bin/sshyp index ca383b6..8885827 100755 --- a/bin/sshyp +++ b/bin/sshyp @@ -1,6 +1,7 @@ #!/usr/bin/python3 # external modules + from os import environ, mkdir, remove, system, path from shutil import copy, move, rmtree from sys import argv, exit as s_exit @@ -339,7 +340,7 @@ def copy_data(): # copies a specified field of an entry to the clipboard _shm_folder, _shm_entry = shm_gen() system(f"gpg -d --output /dev/shm/{_shm_folder}/{_shm_entry} '{directory}{_read_entry}.gpg'") _copy_line = open(f"/dev/shm/{_shm_folder}/{_shm_entry}", 'r').readlines() - if Path(f"{path.expanduser('~')}/.config/sshyp/flag_termux").is_file(): # checks for Termux, Wayland, or X + if Path("/data/data/com.termux").is_file(): # checks for Termux, Wayland, or X if argument == 'copy username' or argument == 'copy -u': system('termux-clipboard-set ' + "'" + _copy_line[0].replace('\n', '').replace("'", "'\\''") + "'") elif argument == 'copy password' or argument == 'copy -p':