diff options
| author | auric <auric7@protonmail.com> | 2025-09-11 18:00:59 -0500 |
|---|---|---|
| committer | auric <auric7@protonmail.com> | 2025-09-11 18:00:59 -0500 |
| commit | 38a82bc7e3569b7502a652c9f3fea37a017c0ccb (patch) | |
| tree | db4551326bf98c02a099c5df213a1dff047c2ca8 /browsers/firefox/accent_host.py | |
| parent | 61eaeb858dbe12dcf1596b725a3bab1df66569f4 (diff) | |
Remove browsers
Diffstat (limited to 'browsers/firefox/accent_host.py')
| -rwxr-xr-x | browsers/firefox/accent_host.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/browsers/firefox/accent_host.py b/browsers/firefox/accent_host.py deleted file mode 100755 index ec0a166..0000000 --- a/browsers/firefox/accent_host.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python3 -import json -import os -import struct -import subprocess -import sys - -def send(msg): - data = json.dumps(msg).encode('utf-8') - sys.stdout.buffer.write(struct.pack('I', len(data))) - sys.stdout.buffer.write(data) - sys.stdout.buffer.flush() - -def read(): - raw = sys.stdin.buffer.read(4) - if len(raw) == 0: - return None - length = struct.unpack('I', raw)[0] - return json.loads(sys.stdin.buffer.read(length).decode('utf-8')) - -def get_accent(): - try: - helper = os.path.join(os.path.dirname(__file__), '..', 'getaccent') - color = subprocess.check_output([helper], stderr=subprocess.DEVNULL).decode().strip() - if color: - return color - except Exception: - pass - return '#000000' - -while True: - msg = read() - if msg is None: - break - if msg.get('query') == 'color': - send({'color': get_accent()}) |
