screenoverlay 0.4.0__py3-none-any.whl → 0.4.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
screenoverlay/overlay.py CHANGED
@@ -23,7 +23,7 @@ except ImportError:
23
23
 
24
24
 
25
25
  class NativeBlurOverlay:
26
- def __init__(self, mode='blur', blur_strength=3, opacity=0.85, color_tint=(136, 136, 136)):
26
+ def __init__(self, mode='blur', blur_strength=3, opacity=0.85, color_tint=(136, 136, 136), all_screens=True):
27
27
  """
28
28
  Initialize native overlay
29
29
 
@@ -36,9 +36,11 @@ class NativeBlurOverlay:
36
36
  - blur_strength (int): How blurred/obscured (1-5, only for mode='blur')
37
37
  - opacity (float): Window opacity (0.0 to 1.0)
38
38
  - color_tint (tuple): RGB color tint (0-255)
39
+ - all_screens (bool): If True, blur all monitors. If False, only blur primary monitor (default: True)
39
40
  """
40
41
  self.mode = mode.lower()
41
42
  self.blur_strength = max(1, min(5, blur_strength))
43
+ self.all_screens = all_screens
42
44
 
43
45
  # Apply mode-specific settings
44
46
  if self.mode == 'black':
@@ -163,16 +165,22 @@ class NativeBlurOverlay:
163
165
  cmd = command_queue.get_nowait()
164
166
  if cmd == 'show':
165
167
  for win in self.windows:
166
- win.deiconify()
167
- win.lift()
168
+ try:
169
+ win.deiconify()
170
+ win.lift()
171
+ except Exception as e:
172
+ print(f"Warning: Failed to show window: {e}")
168
173
  elif cmd == 'hide':
169
174
  for win in self.windows:
170
- win.withdraw()
175
+ try:
176
+ win.withdraw()
177
+ except Exception as e:
178
+ print(f"Warning: Failed to hide window: {e}")
171
179
  elif cmd == 'stop':
172
180
  self.root.quit()
173
181
  return
174
- except:
175
- pass
182
+ except Exception as e:
183
+ print(f"Warning: Command queue error: {e}")
176
184
 
177
185
  # Check again in 10ms
178
186
  self.root.after(10, check_commands)
@@ -206,9 +214,13 @@ class NativeBlurOverlay:
206
214
  return [(0, 0, width, height)]
207
215
 
208
216
  def _create_windows(self):
209
- """Create overlay windows for all monitors"""
217
+ """Create overlay windows for all monitors (or just primary if all_screens=False)"""
210
218
  monitors = self._get_monitors()
211
219
 
220
+ # If all_screens is False, only use primary monitor
221
+ if not self.all_screens:
222
+ monitors = monitors[:1] # Only keep first monitor
223
+
212
224
  # Create primary root window
213
225
  self.root = tk.Tk()
214
226
  self.root.overrideredirect(True)
@@ -220,7 +232,7 @@ class NativeBlurOverlay:
220
232
  self._configure_window(self.root, x, y, width, height)
221
233
  self.windows.append(self.root)
222
234
 
223
- # Create additional windows for other monitors
235
+ # Create additional windows for other monitors (only if all_screens=True)
224
236
  for x, y, width, height in monitors[1:]:
225
237
  win = tk.Toplevel(self.root)
226
238
  win.overrideredirect(True)
@@ -279,7 +291,7 @@ class NativeBlurOverlay:
279
291
 
280
292
  def activate(self, duration=5):
281
293
  """Show native blur overlay and exit after duration"""
282
- self._create_window()
294
+ self._create_windows() # Use multi-monitor aware method
283
295
 
284
296
  # Auto-exit timer
285
297
  self._timer_id = self.root.after(int(duration * 1000), self.kill_completely)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: screenoverlay
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Cross-platform screen overlay with blur, black, white, and custom modes
5
5
  Home-page: https://github.com/pekay-ai/screenoverlay
6
6
  Author: Pekay
@@ -107,6 +107,10 @@ Overlay(mode='white').activate(duration=1)
107
107
 
108
108
  # Custom colored overlay
109
109
  Overlay(mode='custom', color_tint=(255, 100, 100), opacity=0.7).activate()
110
+
111
+ # Multi-monitor control
112
+ Overlay(mode='blur', all_screens=True).activate(duration=5) # Blur all monitors (default)
113
+ Overlay(mode='blur', all_screens=False).activate(duration=5) # Blur only primary monitor
110
114
  ```
111
115
 
112
116
  Press `ESC` to dismiss the overlay early.
@@ -222,7 +226,8 @@ Overlay(
222
226
  mode='blur', # 'blur', 'black', 'white', 'custom'
223
227
  blur_strength=3, # 1-5 (only for mode='blur')
224
228
  opacity=0.85, # 0.0-1.0
225
- color_tint=(136, 136, 136) # RGB tuple (0-255)
229
+ color_tint=(136, 136, 136), # RGB tuple (0-255)
230
+ all_screens=True # True = all monitors, False = primary only
226
231
  )
227
232
  ```
228
233
 
@@ -234,6 +239,7 @@ Overlay(
234
239
  | `blur_strength` | int | `3` | Blur intensity 1-5 (only for blur mode) |
235
240
  | `opacity` | float | `0.85` | Window opacity 0.0 (transparent) to 1.0 (opaque) |
236
241
  | `color_tint` | tuple | `(136, 136, 136)` | RGB color values (0-255) |
242
+ | `all_screens` | bool | `True` | If `True`, blur all monitors. If `False`, blur only primary monitor |
237
243
 
238
244
  ### `activate()` Method
239
245
 
@@ -484,11 +490,63 @@ Contributions are welcome! Here's how you can help:
484
490
 
485
491
  ---
486
492
 
487
- ## 📄 License
493
+ ## 📄 Licensing
494
+
495
+ ScreenOverlay uses a **dual-license model** similar to xlwings:
496
+
497
+ ### 🆓 Non-Commercial Use (Free)
498
+
499
+ Free for individuals and non-commercial purposes:
500
+
501
+ ✅ Personal projects
502
+ ✅ Educational use
503
+ ✅ Academic research
504
+ ✅ Open source projects (OSI-approved licenses)
505
+ ✅ Non-profit organizations
506
+ ✅ Evaluation and testing
507
+
508
+ **No license key needed** - just `pip install screenoverlay` and start using it!
509
+
510
+ ### 💼 Commercial Use (License Required)
511
+
512
+ A commercial license is required if you use ScreenOverlay:
513
+
514
+ 💼 At a company or for commercial purposes
515
+ 🏢 In a commercial product or service
516
+ 💰 For client work or revenue-generating activities
517
+ 🔧 In any business context
518
+
519
+ #### Pricing:
520
+
521
+ | License Type | Price | Use Case |
522
+ |--------------|-------|----------|
523
+ | 👨‍💻 **Developer** | $149/year | Single developer |
524
+ | 👥 **Team** | $699/year | Up to 5 developers |
525
+ | 🏢 **Enterprise** | Custom | Unlimited developers + priority support |
526
+
527
+ **All commercial licenses include:**
528
+
529
+ ✅ Commercial use rights
530
+ ✅ Priority email support
531
+ ✅ Perpetual license for purchased version
532
+ ✅ 1 year of updates
533
+
534
+ **[Purchase License](mailto:ppnicky@gmail.com?subject=ScreenOverlay%20Commercial%20License) | [Contact Sales](mailto:ppnicky@gmail.com?subject=ScreenOverlay%20Enterprise%20Inquiry)**
535
+
536
+ ### ❓ Which License Do I Need?
488
537
 
489
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
538
+ **Simple rule:** If you're using it in a business/commercial context, you need a commercial license.
490
539
 
491
- **Why MIT?** We believe privacy tools should be freely accessible to everyone. Use it in your personal projects, integrate it into your commercial applications, or fork it to create something entirely new. No restrictions, no complications.
540
+ | Scenario | License Needed |
541
+ |----------|----------------|
542
+ | Personal side project (no revenue) | 🆓 Non-Commercial |
543
+ | Learning Python at home | 🆓 Non-Commercial |
544
+ | University research project | 🆓 Non-Commercial |
545
+ | Open source project (MIT, GPL, etc.) | 🆓 Non-Commercial |
546
+ | Using at your company/job | 💼 Commercial |
547
+ | Building a SaaS product | 💼 Commercial |
548
+ | Freelance client work | 💼 Commercial |
549
+ | Integrating into commercial software | 💼 Commercial |
492
550
 
493
551
  ---
494
552
 
@@ -0,0 +1,7 @@
1
+ screenoverlay/__init__.py,sha256=NX7qDYscRGygfi9p6HJC_gT876L8wNpX1f01sS1mxPc,256
2
+ screenoverlay/overlay.py,sha256=LRlwYVFTIudri2Z-9cDLNsgpf6Itnl5cCO2M2cDu0qA,18690
3
+ screenoverlay-0.4.2.dist-info/licenses/LICENSE,sha256=QlEjK4tuMjNEYVlvzaIhxfsCeU8hcGZyuT85cm1YChE,1084
4
+ screenoverlay-0.4.2.dist-info/METADATA,sha256=LgLMK4MIXrDtMx4pFzGRXn6ups6N6jWJ2g1k2g4v90Q,17132
5
+ screenoverlay-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ screenoverlay-0.4.2.dist-info/top_level.txt,sha256=kfPL07o_kJ-mlb14Ps2zp_tIYnD8GfsSXlbDxDF6Eic,14
7
+ screenoverlay-0.4.2.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- screenoverlay/__init__.py,sha256=NX7qDYscRGygfi9p6HJC_gT876L8wNpX1f01sS1mxPc,256
2
- screenoverlay/overlay.py,sha256=h3z8tl33oB-i4q91Zoc7-mqjypnbYOtZNi5fQKmeoI8,17843
3
- screenoverlay-0.4.0.dist-info/licenses/LICENSE,sha256=QlEjK4tuMjNEYVlvzaIhxfsCeU8hcGZyuT85cm1YChE,1084
4
- screenoverlay-0.4.0.dist-info/METADATA,sha256=6XJrI12_VPcULWDkiq69itu6THJW9dhCXD3jAEz63v4,15143
5
- screenoverlay-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- screenoverlay-0.4.0.dist-info/top_level.txt,sha256=kfPL07o_kJ-mlb14Ps2zp_tIYnD8GfsSXlbDxDF6Eic,14
7
- screenoverlay-0.4.0.dist-info/RECORD,,