-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3ac114
commit 8f057fb
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
from subprocess import Popen | ||
|
||
from python_search.host_system.system_paths import SystemPaths | ||
|
||
|
||
class Actions: | ||
def search_in_google(self, query): | ||
Popen( | ||
f'clipboard set_content "{query}" && run_key "search in google using clipboard content" &>/dev/null', | ||
f'{SystemPaths.BINARIES_PATH}/clipboard set_content "{query}" && {SystemPaths.BINARIES_PATH}/run_key "search in google using clipboard content" &>/dev/null', | ||
stdout=None, | ||
stderr=None, | ||
shell=True, | ||
) | ||
|
||
def copy_entry_value_to_clipboard(self, entry_key): | ||
Popen( | ||
f'share_entry share_only_value "{entry_key}" &>/dev/null', | ||
f'{SystemPaths.BINARIES_PATH}/share_entry share_only_value "{entry_key}" &>/dev/null', | ||
stdout=None, | ||
stderr=None, | ||
shell=True, | ||
) | ||
|
||
def edit_key(self, key): | ||
Popen( | ||
f'/Users/jean.machado/miniconda3/envs/python312/bin/entries_editor edit_key "{key}" &>/dev/null', | ||
f'{SystemPaths.BINARIES_PATH}/entries_editor edit_key "{key}" &>/dev/null', | ||
stdout=None, | ||
stderr=None, | ||
shell=True, | ||
) | ||
|
||
def run_key(self, key: str) -> None: | ||
command = f'run_key "{key}" &>/dev/null' | ||
command = f'{SystemPaths.BINARIES_PATH}/run_key "{key}" &>/dev/null' | ||
Popen(command, stdout=None, stderr=None, shell=True) |