diff --git a/README.md b/README.md index 943e257..6b7a424 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ enable Xorg. ``` sudo sed 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm/custom.conf -i # on Gnome ``` +[on Fedora](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) # Join us To keep up with the latest news about atbswp you can reach us on this [telegram channel](https://t.me/atbswp) we will diff --git a/atbswp/atbswp.py b/atbswp/atbswp.py index 5eb868e..7161af6 100755 --- a/atbswp/atbswp.py +++ b/atbswp/atbswp.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # Record mouse and keyboard actions and reproduce them identically at will # -# Copyright (C) 2019 Mairo Rufus +# Copyright (C) 2019 Paul Mairo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/atbswp/control.py b/atbswp/control.py index 43b6a83..6643990 100644 --- a/atbswp/control.py +++ b/atbswp/control.py @@ -2,7 +2,7 @@ # atbswp: Record mouse and keyboard actions and reproduce them identically at will # -# Copyright (C) 2019 Mairo Rufus +# Copyright (C) 2019 Paul Mairo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,6 @@ from threading import Thread import pyautogui -pyautogui.PAUSE = 0 from pynput import keyboard, mouse @@ -40,6 +39,7 @@ import wx.adv import wx.lib.newevent as NE + TMP_PATH = os.path.join(tempfile.gettempdir(), "atbswp-" + date.today().strftime("%Y%m%d")) HEADER = ( @@ -125,7 +125,6 @@ def __init__(self): self._capture = [self._header] self._lastx, self._lasty = pyautogui.position() - self.mouse_sensibility = 21 if getattr(sys, 'frozen', False): self.path = sys._MEIPASS else: @@ -308,8 +307,25 @@ def recording_timer(event): dialog.Destroy() settings.CONFIG['DEFAULT']['Recording Timer'] = str(new_value) + def mouse_speed(event): + """Set the mouse speed.""" + # Workaround for user upgrading from a previous version + try: + current_value = settings.CONFIG.getint( + 'DEFAULT', 'Mouse Speed') + except: + current_value = 21 + + dialog = wx.NumberEntryDialog(None, message="Choose an amount of time (seconds)", + prompt="", caption="Recording Timer", value=current_value, min=0, max=9999) + dialog.ShowModal() + new_value = dialog.Value + dialog.Destroy() + settings.CONFIG['DEFAULT']['Mouse Speed'] = str(new_value) + def action(self, event): """Triggered when the recording button is clicked on the GUI.""" + self.mouse_sensibility = settings.CONFIG.getint("DEFAULT", "Mouse Speed") listener_mouse = mouse.Listener( on_move=self.on_move, on_click=self.on_click, diff --git a/atbswp/custom_widgets.py b/atbswp/custom_widgets.py index 682f51a..921bec3 100644 --- a/atbswp/custom_widgets.py +++ b/atbswp/custom_widgets.py @@ -2,7 +2,7 @@ # atbswp: Record mouse and keyboard actions and reproduce them identically at will # -# Copyright (C) 2019 Mairo Rufus +# Copyright (C) 2019 Paul Mairo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/atbswp/gui.py b/atbswp/gui.py index 46f6ad2..86a03c7 100644 --- a/atbswp/gui.py +++ b/atbswp/gui.py @@ -1,6 +1,6 @@ # Record mouse and keyboard actions and reproduce them identically at will # -# Copyright (C) 2019 Mairo Rufus +# Copyright (C) 2019 Paul Mairo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -116,6 +116,11 @@ def settings_popup(self): self.Bind(wx.EVT_MENU, control.RecordCtrl.recording_timer, menu.Append(wx.ID_ANY, self.settings_text[8])) + + # Mouse speed + self.Bind(wx.EVT_MENU, + control.RecordCtrl.mouse_speed, + menu.Append(wx.ID_ANY, self.settings_text[9])) return menu def __init__(self, *args, **kwds): @@ -326,10 +331,10 @@ def on_about(self, event): info = wx.adv.AboutDialogInfo() info.Name = "atbswp" info.Version = f"{settings.VERSION}" - info.Copyright = (f"©{settings.YEAR} Mairo Rufus \n") + info.Copyright = (f"©{settings.YEAR} Paul Mairo \n") info.Description = "Record mouse and keyboard actions and reproduce them identically at will" info.WebSite = ("https://github.com/atbswp", "Project homepage") - info.Developers = ["Mairo Rufus"] + info.Developers = ["Paul Mairo"] info.License = "GNU General Public License V3" info.Icon = self.icon wx.adv.AboutBox(info) diff --git a/atbswp/lang/de b/atbswp/lang/de index c9bef7d..8e8189d 100644 --- a/atbswp/lang/de +++ b/atbswp/lang/de @@ -14,3 +14,4 @@ Immer oben Sprache Info Aufnahme-Timer +Aufnahmegeschwindigkeit der Maus diff --git a/atbswp/lang/en b/atbswp/lang/en index a6e3e71..c7eea06 100644 --- a/atbswp/lang/en +++ b/atbswp/lang/en @@ -14,3 +14,4 @@ Always on Top Language About Recording Timer +Mouse Recording Speed diff --git a/atbswp/lang/fr b/atbswp/lang/fr index 2807a56..3dcaf21 100644 --- a/atbswp/lang/fr +++ b/atbswp/lang/fr @@ -14,3 +14,4 @@ Toujours au-dessus Langue À propos Minuterie d'enregistrement +Vitesse d'enregistrement (souris) diff --git a/atbswp/lang/it b/atbswp/lang/it index 071ac07..54d628e 100644 --- a/atbswp/lang/it +++ b/atbswp/lang/it @@ -14,3 +14,4 @@ Sempre sopra Lingua di timer di registrazione +velocità di registrazione del mouse diff --git a/atbswp/lang/jp b/atbswp/lang/jp index 53bfd86..6126c2b 100644 --- a/atbswp/lang/jp +++ b/atbswp/lang/jp @@ -14,3 +14,4 @@ 言語 このアプリについて 記録開始までのタイマー +マウスの記録速度 diff --git a/atbswp/lang/tr b/atbswp/lang/tr index fb53791..190ab31 100644 --- a/atbswp/lang/tr +++ b/atbswp/lang/tr @@ -14,3 +14,4 @@ Her zaman üstte Dil hakkında kayıt zamanlayıcısı +fare kayıt hızı diff --git a/atbswp/settings.py b/atbswp/settings.py index 27e4d70..ca17e3e 100644 --- a/atbswp/settings.py +++ b/atbswp/settings.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # Record mouse and keyboard actions and reproduce them identically at will # -# Copyright (C) 2019 Mairo Rufus +# Copyright (C) 2019 Paul Mairo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -58,4 +58,5 @@ def save_config(): "Always On Top": True, "Language": "en", "Recording Timer": 0, + "Mouse Speed": 21, }