Change bar colors with album cover in the most retarded way possible
This commit is contained in:
23
tap_in.py
Normal file
23
tap_in.py
Normal 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()
|
||||
Reference in New Issue
Block a user