Change bar colors with album cover in the most retarded way possible

This commit is contained in:
Wizzard
2023-10-16 20:21:13 -04:00
parent 79dcfa7b83
commit 62285d572b
4 changed files with 76 additions and 36 deletions

23
tap_in.py Normal file
View File

@@ -0,0 +1,23 @@
import sys
import time
import pyautogui
print("Arguments received:", sys.argv)
def write_color_to_file(color):
with open("/tmp/bar_color.txt", "w") as f:
f.write(color)
print(f"Successfully wrote color {color} to /tmp/bar_color.txt")
def simulate_f7_keypress():
time.sleep(1) # Give a little time for the file to be written
pyautogui.press('f7')
print("Simulated F7 keypress")
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python tap_in.py <color>")
else:
color = sys.argv[1]
write_color_to_file(color)
simulate_f7_keypress()