initial commit

This commit is contained in:
2025-09-17 23:05:25 -04:00
commit ee78eef527
17 changed files with 610 additions and 0 deletions

18
nativemsg/bg.py Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env -S python3
import sys
import struct
import subprocess
# Read a message from stdin and decode it.
rawLength = sys.stdin.buffer.read(4)
if len(rawLength) == 0:
sys.exit(0)
# Read the length of the message
messageLength: int = struct.unpack("@I", rawLength)[0]
# Decode the message
message = sys.stdin.buffer.read(messageLength).decode("utf-8")
# Run the background setting with a link to the image
_ = subprocess.run(["setbg", "-tw", message.replace('"', "")])