Skip to content

Commit

Permalink
Add copy notification
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Dec 30, 2023
1 parent 0e7561b commit 94c26a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/autofill.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
gi.require_version('Adw', '1')
import gc
import time
from gi.repository import Gtk, Adw, GLib
from gi.repository import Gtk, Adw, GLib, Notify
import goldwarden
import clipboard
from threading import Thread
import sys
import os
Notify.init("Goldwarden")

class MyApp(Adw.Application):
def __init__(self, **kwargs):
Expand Down Expand Up @@ -93,9 +94,13 @@ def do_autotype(username, password):
if keyval == 112:
print("copy password")
clipboard.write(self.history_list.get_selected_row().password)
Notify.Notification.new("Goldwarden", "Password Copied", "dialog-information").show()
elif keyval == 117:
print("copy username")
clipboard.write(self.history_list.get_selected_row().username)
notification=Notify.Notification.new("Goldwarden", "Username Copied", "dialog-information")
notification.set_timeout(5)
notification.show()

keycont.connect('key-pressed', handle_keypress, self)
self.add_controller(keycont)
Expand Down

0 comments on commit 94c26a7

Please sign in to comment.