Release Update
Updated MacroPad to support Tabs, fix system tray behavior, and break apart the monolith
This commit is contained in:
parent
896875ce90
commit
5727a9ee68
77
README.md
77
README.md
@ -1,4 +1,4 @@
|
||||
# MP-Server
|
||||
# MacroPad Server
|
||||
|
||||
A versatile MacroPad server application that lets you create, manage, and execute custom macros from both a local interface and remotely via a web interface.
|
||||
|
||||
@ -8,8 +8,12 @@ A versatile MacroPad server application that lets you create, manage, and execut
|
||||
- **Application Macros**: Launch applications or scripts directly
|
||||
- **Key Modifiers**: Add Ctrl, Alt, Shift modifiers and Enter keypress to your text macros
|
||||
- **Custom Images**: Assign images to macros for easy identification
|
||||
- **Tabbed Organization**: Organize macros into categories with custom tabs
|
||||
- **Sorting Options**: Sort macros by name, type, or recent usage
|
||||
- **Web Interface**: Access and trigger your macros from other devices on your network
|
||||
- **System Tray Integration**: Runs silently in your system tray for easy access
|
||||
- **QR Code Generation**: Quickly connect mobile devices to the web interface
|
||||
- **System Tray Integration**: Minimize to tray, restore from tray menu
|
||||
- **Dark Theme UI**: Modern dark interface with improved usability
|
||||
- **Persistent Storage**: Macros are automatically saved for future sessions
|
||||
|
||||
## Requirements
|
||||
@ -23,6 +27,7 @@ A versatile MacroPad server application that lets you create, manage, and execut
|
||||
- Pillow (PIL)
|
||||
- flask_cors
|
||||
- waitress
|
||||
- qrcode
|
||||
|
||||
## Installation
|
||||
|
||||
@ -30,71 +35,3 @@ A versatile MacroPad server application that lets you create, manage, and execut
|
||||
2. Install the required dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
3. Run the application:
|
||||
```bash
|
||||
python mp-server-v2.py
|
||||
```
|
||||
|
||||
## Alternative Installation Method
|
||||
#### Windows only
|
||||
|
||||
1. Create a Folder you wish to run MacroPad from
|
||||
2. Download ```mp-serverv2.exe``` from the ```dist``` folder
|
||||
3. Accept the security notices, and run the application
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The executable is unsigned and may trigger security warnings. You may need to click "More info" and "Run anyway" in Windows SmartScreen or add an exception in your antivirus software.
|
||||
|
||||
## Usage
|
||||
|
||||
### Main Interface
|
||||
|
||||
When launched, MP-Server displays your existing macros with options to:
|
||||
|
||||
- **Add New Macro**: Create text snippets or application shortcuts
|
||||
- **Edit Macro**: Modify existing macros
|
||||
- **Delete Macro**: Remove unwanted macros
|
||||
- **Minimize to Tray**: Hide the application to your system tray
|
||||
- **Exit**: Close the application completely
|
||||
|
||||
### Creating a Macro
|
||||
|
||||
1. Click the "Add Macro" button
|
||||
2. Fill in the details:
|
||||
- **Name**: A descriptive name for your macro
|
||||
- **Type**: Choose between Text or Application
|
||||
- **Command/Text**: The text to insert or application command to run
|
||||
- **Modifiers**: Select any combination of Ctrl, Alt, Shift, and Enter
|
||||
- **Image**: Optionally add an image for visual identification
|
||||
3. Click "Save" to create your macro
|
||||
|
||||
### Remote Access
|
||||
|
||||
The application runs a web server enabling remote access:
|
||||
|
||||
1. Note your computer's local IP address (shown in the application header)
|
||||
2. From another device on the same network, open a web browser
|
||||
3. Navigate to `http://<your-ip-address>:40000`
|
||||
4. Click on any macro to execute it on your main computer
|
||||
|
||||
### System Tray
|
||||
|
||||
When minimized to the system tray:
|
||||
- Right-click the tray icon to show options
|
||||
- Select "Show" to restore the window
|
||||
- Select "Exit" to close the application
|
||||
|
||||
## Example Application Commands
|
||||
|
||||
### Windows Examples
|
||||
|
||||
#### Steam Applications
|
||||
```"C:\Program Files (x86)\Steam\steam.exe" steam://rungameid/2767030```
|
||||
|
||||
#### Chrome to a website
|
||||
|
||||
```"C:\Program Files\Google\Chrome\Application\chrome.exe" http://twitch.tv/shadowdao```
|
||||
|
||||
|
||||
#### Special Thanks to CatArgent_ on Twitch for proof reading my stuff and providing valuable feedback.
|
@ -1,6 +1,6 @@
|
||||
# Configuration and constants for MacroPad Server
|
||||
|
||||
VERSION = "0.7.5 Beta"
|
||||
VERSION = "0.8.0 Beta"
|
||||
DEFAULT_PORT = 40000
|
||||
|
||||
# UI Theme colors
|
||||
|
BIN
dist/main.exe → dist/macropad.exe
vendored
BIN
dist/main.exe → dist/macropad.exe
vendored
Binary file not shown.
38
macropad.spec
Normal file
38
macropad.spec
Normal file
@ -0,0 +1,38 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['main.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name='macropad',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
10
main.py
10
main.py
@ -76,8 +76,10 @@ class MacroPadServer:
|
||||
style.configure("TNotebook", background=THEME['bg_color'], borderwidth=0)
|
||||
style.configure("TNotebook.Tab", background=THEME['tab_bg'], foreground=THEME['fg_color'],
|
||||
padding=[12, 8], borderwidth=0)
|
||||
style.map("TNotebook.Tab", background=[("selected", THEME['tab_selected'])],
|
||||
foreground=[("selected", THEME['fg_color'])])
|
||||
style.map("TNotebook.Tab",
|
||||
background=[("selected", THEME['tab_selected'])],
|
||||
foreground=[("selected", THEME['fg_color'])],
|
||||
padding=[("selected", [12, 8])]) # Keep same padding when selected
|
||||
|
||||
def create_ui(self):
|
||||
"""Create the main user interface"""
|
||||
@ -438,8 +440,8 @@ class MacroPadServer:
|
||||
# Fall back to default font
|
||||
font = ImageFont.load_default()
|
||||
|
||||
# Draw "M" in the center
|
||||
text = "M"
|
||||
# Draw "MP" in the center
|
||||
text = "MP"
|
||||
bbox = draw.textbbox((0, 0), text, font=font)
|
||||
text_width = bbox[2] - bbox[0]
|
||||
text_height = bbox[3] - bbox[1]
|
||||
|
@ -217,7 +217,7 @@ class TabManager:
|
||||
"""Show tab management dialog"""
|
||||
dialog = tk.Toplevel(self.parent)
|
||||
dialog.title("Manage Tabs")
|
||||
dialog.geometry("400x300")
|
||||
dialog.geometry("450x400") # Increased width and height
|
||||
dialog.transient(self.parent)
|
||||
dialog.configure(bg=THEME['bg_color'])
|
||||
dialog.grab_set()
|
||||
@ -227,12 +227,12 @@ class TabManager:
|
||||
bg=THEME['bg_color'], fg=THEME['fg_color']).pack(pady=10)
|
||||
|
||||
# Create scrollable frame
|
||||
list_frame = ttk.Frame(dialog)
|
||||
list_frame = tk.Frame(dialog, bg=THEME['bg_color'])
|
||||
list_frame.pack(fill=tk.BOTH, expand=True, padx=10, pady=5)
|
||||
|
||||
canvas = tk.Canvas(list_frame, bg=THEME['bg_color'], highlightthickness=0)
|
||||
scrollbar = ttk.Scrollbar(list_frame, orient="vertical", command=canvas.yview)
|
||||
scrollable_frame = ttk.Frame(canvas)
|
||||
scrollable_frame = tk.Frame(canvas, bg=THEME['bg_color'])
|
||||
|
||||
scrollable_frame.bind(
|
||||
"<Configure>",
|
||||
@ -247,7 +247,7 @@ class TabManager:
|
||||
# Category entries for each macro
|
||||
category_vars = {}
|
||||
for macro_id, macro in self.macro_manager.macros.items():
|
||||
frame = ttk.Frame(scrollable_frame)
|
||||
frame = tk.Frame(scrollable_frame, bg=THEME['bg_color'])
|
||||
frame.pack(fill="x", pady=2, padx=5)
|
||||
|
||||
tk.Label(frame, text=macro["name"], bg=THEME['bg_color'], fg=THEME['fg_color'],
|
||||
@ -259,9 +259,9 @@ class TabManager:
|
||||
bg=THEME['highlight_color'], fg=THEME['fg_color'], insertbackground=THEME['fg_color'])
|
||||
entry.pack(side=tk.RIGHT, padx=(5, 0))
|
||||
|
||||
# Buttons
|
||||
button_frame = ttk.Frame(dialog)
|
||||
button_frame.pack(fill=tk.X, pady=10)
|
||||
# Buttons - use a fixed frame at bottom
|
||||
button_frame = tk.Frame(dialog, bg=THEME['bg_color'])
|
||||
button_frame.pack(side=tk.BOTTOM, fill=tk.X, pady=10)
|
||||
|
||||
def save_categories():
|
||||
for macro_id, category_var in category_vars.items():
|
||||
|
@ -1 +1 @@
|
||||
0.7.5
|
||||
0.8.0
|
Loading…
x
Reference in New Issue
Block a user