kenenet 0.1.3__py3-none-any.whl → 0.1.5__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.
kenenet/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
- import inspect, sys, zhmiscellany, keyboard
2
- from PIL import ImageGrab
1
+ import inspect, sys, zhmiscellany, keyboard, mss
2
+
3
3
  global get_pos_cooldown
4
4
  def adding(a, b):
5
5
  return a + b
@@ -8,12 +8,14 @@ def get_pos(key='f10', kill=False):
8
8
  def _get_pos(key):
9
9
  while True:
10
10
  keyboard.wait(key)
11
- image = ImageGrab.grab()
12
- x, y = zhmiscellany.misc.get_mouse_xy()
13
- rgb = image.getpixel((x, y))
11
+ with mss.mss() as sct:
12
+ x, y = zhmiscellany.misc.get_mouse_xy()
13
+ monitor = next(m for m in sct.monitors if m["left"] <= x < m["left"] + m["width"] and m["top"] <= y < m["top"] + m["height"])
14
+ screenshot = sct.grab(monitor)
15
+ rgb = screenshot.pixel(x - monitor["left"], y - monitor["top"])
14
16
  color = f"\033[38;2;{rgb[0]};{rgb[1]};{rgb[2]}m"
15
17
  reset = "\033[0m"
16
- print(f"Coordinates: ({x}, {y}), RGB: {color}{rgb}{reset}")
18
+ print(f"Coordinates: ({x}, {y}), RGB: {rgb} {color}████████{reset}")
17
19
  if kill:
18
20
  print('killing process')
19
21
  zhmiscellany.misc.die()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kenenet
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: dude what the fuck even is this package
5
5
  Home-page: https://www.youtube.com/@KiddyKene
6
6
  Author: kiddykene
@@ -0,0 +1,5 @@
1
+ kenenet/__init__.py,sha256=76mfcNtSLA7WkY7_0TVGA7L55W2cndvKOw3hWP-I5F0,1254
2
+ kenenet-0.1.5.dist-info/METADATA,sha256=fB0NE9UjGJ5QgMJzHdtbq46jdvodpzIj_Ayq0CreYIw,513
3
+ kenenet-0.1.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
4
+ kenenet-0.1.5.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
+ kenenet-0.1.5.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- kenenet/__init__.py,sha256=vWtYGTS4QqrRNsXIWweKEblcUfHKciqCy1H3ldWgIzs,1017
2
- kenenet-0.1.3.dist-info/METADATA,sha256=QHzCXDjJ57oEr0hhQZ9ZXHSj9zn5T9KGNXFgqyly55k,513
3
- kenenet-0.1.3.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
4
- kenenet-0.1.3.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
- kenenet-0.1.3.dist-info/RECORD,,