Compare commits
8 Commits
ff2d5600eb
...
1.2.0
Author | SHA1 | Date | |
---|---|---|---|
8a973038ab | |||
2ced9fe955 | |||
6dc332843d | |||
102b7e044a | |||
92270735c5 | |||
e98543973a | |||
62b63dc3e1 | |||
d302782073 |
@ -76,6 +76,10 @@ pin: 123456
|
||||
|
||||
To copy the pin start the search with `:pin` and for the username with `:user`.
|
||||
|
||||
## Disabling notifications
|
||||
|
||||
Set the `DISABLE_NOTIFICATIONS` environment variable to `True`.
|
||||
|
||||
# Alternative password providers
|
||||
|
||||
## Gopass and other pass-compatible tools
|
||||
|
@ -67,6 +67,9 @@ class SearchPassService(dbus.service.Object):
|
||||
self.password_executable = getenv("PASSWORD_EXECUTABLE") or "pass"
|
||||
self.password_mode = getenv("PASSWORD_MODE") or "pass"
|
||||
self.clipboard_executable = getenv("CLIPBOARD_EXECUTABLE") or "wl-copy"
|
||||
self.disable_notifications = (
|
||||
getenv("DISABLE_NOTIFICATIONS", "false").lower() == "true"
|
||||
)
|
||||
|
||||
@dbus.service.method(in_signature="sasu", **sbn)
|
||||
def ActivateResult(self, id, terms, timestamp):
|
||||
@ -220,6 +223,8 @@ class SearchPassService(dbus.service.Object):
|
||||
self.notify("Failed to copy password or field!", body=str(e), error=True)
|
||||
|
||||
def notify(self, message, body="", error=False):
|
||||
if not error and self.disable_notifications:
|
||||
return
|
||||
try:
|
||||
self.session_bus.get_object(
|
||||
"org.freedesktop.Notifications", "/org/freedesktop/Notifications"
|
||||
|
Reference in New Issue
Block a user