Vault and uri shortcuts
This commit is contained in:
parent
171d833a83
commit
6e983b6b7a
|
@ -43,8 +43,6 @@ class GoldwardenQuickAccessApp(Adw.Application):
|
|||
self.window.add_controller(evk)
|
||||
|
||||
def key_press(self, event, keyval, keycode, state):
|
||||
print(keyval, keycode)
|
||||
|
||||
if keyval == Gdk.KEY_Escape:
|
||||
os._exit(0)
|
||||
|
||||
|
@ -73,28 +71,33 @@ class GoldwardenQuickAccessApp(Adw.Application):
|
|||
# totp code
|
||||
if keyval == Gdk.KEY_t or keyval == Gdk.KEY_T:
|
||||
if auto_type_combo:
|
||||
print("TOTP type")
|
||||
self.autotype(totp.totp(self.filtered_logins[self.selected_index]["totp"]))
|
||||
if copy_combo:
|
||||
print("TOTP copy")
|
||||
self.set_clipboard(totp.totp(self.filtered_logins[self.selected_index]["totp"]))
|
||||
|
||||
if keyval == Gdk.KEY_u or keyval == Gdk.KEY_U:
|
||||
if auto_type_combo:
|
||||
print("Username type")
|
||||
self.autotype(self.filtered_logins[self.selected_index]["username"])
|
||||
if copy_combo:
|
||||
print("Username copy")
|
||||
self.set_clipboard(self.filtered_logins[self.selected_index]["username"])
|
||||
|
||||
if keyval == Gdk.KEY_p or keyval == Gdk.KEY_P:
|
||||
if auto_type_combo:
|
||||
print("Password type")
|
||||
self.autotype(self.filtered_logins[self.selected_index]["password"])
|
||||
if copy_combo:
|
||||
print("Password copy")
|
||||
self.set_clipboard(self.filtered_logins[self.selected_index]["password"])
|
||||
|
||||
if (keyval == Gdk.KEY_l or keyval == Gdk.KEY_L) and auto_type_combo:
|
||||
Gtk.show_uri(None, self.results_list.get_selected_row().uri, Gdk.CURRENT_TIME)
|
||||
|
||||
if (keyval == Gdk.KEY_v or keyval == Gdk.KEY_V) and auto_type_combo:
|
||||
self.set_clipboard(self.filtered_logins[self.selected_index]["uri"])
|
||||
environment = goldwarden.get_environment()
|
||||
if environment == None:
|
||||
return
|
||||
item_uri = environment["vault"] + "#/vault?itemId=" + self.results_list.get_selected_row().uuid
|
||||
Gtk.show_uri(None, item_uri, Gdk.CURRENT_TIME)
|
||||
|
||||
if keyval == Gdk.KEY_Return:
|
||||
if auto_type_combo:
|
||||
self.autotype(f"{self.filtered_logins[self.selected_index]['username']}\t{self.filtered_logins[self.selected_index]['password']}")
|
||||
|
|
|
@ -39,7 +39,7 @@ Adw.Window window {
|
|||
}
|
||||
Adw.ActionRow {
|
||||
title: "Autotype Username Shortcut";
|
||||
subtitle: "CTRL + ALT + U";
|
||||
subtitle: "CTRL + SHIFT + U";
|
||||
}
|
||||
Adw.ActionRow {
|
||||
title: "Copy Password Shortcut";
|
||||
|
@ -47,7 +47,7 @@ Adw.Window window {
|
|||
}
|
||||
Adw.ActionRow {
|
||||
title: "Autotype Password Shortcut";
|
||||
subtitle: "CTRL + ALT + P";
|
||||
subtitle: "CTRL + SHIFT + P";
|
||||
}
|
||||
Adw.ActionRow {
|
||||
title: "Copy TOTP Shortcut";
|
||||
|
@ -55,19 +55,15 @@ Adw.Window window {
|
|||
}
|
||||
Adw.ActionRow {
|
||||
title: "Autotype TOTP Shortcut";
|
||||
subtitle: "CTRL + ALT + T";
|
||||
subtitle: "CTRL + SHIFT + T";
|
||||
}
|
||||
Adw.ActionRow {
|
||||
title: "Launch URI Shortcut";
|
||||
subtitle: "CTRL + L";
|
||||
subtitle: "CTRL + SHIFT + L";
|
||||
}
|
||||
Adw.ActionRow {
|
||||
title: "Launch Web Vault Shortcut";
|
||||
subtitle: "CTRL + V";
|
||||
}
|
||||
Adw.ActionRow {
|
||||
title: "Focus Search Shortcut";
|
||||
subtitle: "F";
|
||||
subtitle: "CTRL + SHIFT + V";
|
||||
}
|
||||
Adw.ActionRow {
|
||||
title: "Quit Shortcut";
|
||||
|
|
Loading…
Reference in New Issue