Compare commits
2 Commits
58565f774d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c09655c2ba | ||
|
|
40bc3b09f2 |
4
REQUIREMENTS.txt
Normal file
4
REQUIREMENTS.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
argcomplete
|
||||
argparse
|
||||
|
||||
rgbw_colorspace_converter
|
||||
@@ -1,6 +1,7 @@
|
||||
#! /usr/bin/env python3
|
||||
# PYTHON_ARGCOMPLETE_OK
|
||||
|
||||
import argparse
|
||||
import argcomplete, argparse
|
||||
import subprocess
|
||||
|
||||
from rgbw_colorspace_converter.colors.converters import RGB
|
||||
@@ -33,7 +34,7 @@ PANSEXUAL_PRIDE_SPIRO_DISCO_BALL = [27, 179, 255]
|
||||
|
||||
def template_pansexual():
|
||||
|
||||
command = ""
|
||||
command = "echo 0 > /proc/led/led_mode;"
|
||||
|
||||
for port in range(1, 19):
|
||||
if port < 7:
|
||||
@@ -51,7 +52,7 @@ def template_pansexual():
|
||||
|
||||
def template_bisexual():
|
||||
|
||||
command = ""
|
||||
command = "echo 0 > /proc/led/led_mode;"
|
||||
|
||||
for port in range(1, 19):
|
||||
if port < 8:
|
||||
@@ -69,7 +70,7 @@ def template_bisexual():
|
||||
|
||||
def template_trans():
|
||||
|
||||
command = ""
|
||||
command = "echo 0 > /proc/led/led_mode;"
|
||||
|
||||
for port in range(1, 19):
|
||||
if port < 5:
|
||||
@@ -93,7 +94,7 @@ def template_trans():
|
||||
|
||||
def template_lesbian():
|
||||
|
||||
command = ""
|
||||
command = "echo 0 > /proc/led/led_mode;"
|
||||
|
||||
for port in range(1, 19):
|
||||
if port < 5:
|
||||
@@ -117,7 +118,7 @@ def template_lesbian():
|
||||
|
||||
def template_lgbtq():
|
||||
|
||||
command = ""
|
||||
command = "echo 0 > /proc/led/led_mode;"
|
||||
|
||||
for port in range(1, 19):
|
||||
if port < 4:
|
||||
@@ -143,6 +144,9 @@ def template_lgbtq():
|
||||
|
||||
|
||||
def get_color_commands(port, red, green, blue, white):
|
||||
if args.color:
|
||||
command = "echo 0 > /proc/led/led_mode;"
|
||||
else:
|
||||
command = ""
|
||||
command += "echo {} r {} > /proc/led/led_color; ".format(port, red * 64)
|
||||
command += "echo {} g {} > /proc/led/led_color; ".format(port, green * 64)
|
||||
@@ -153,7 +157,7 @@ def get_color_commands(port, red, green, blue, white):
|
||||
|
||||
|
||||
def flush_leds():
|
||||
command = "echo 0 > /proc/led/led_mode"
|
||||
command = "echo 0 > /proc/led/led_mode;"
|
||||
|
||||
return command
|
||||
|
||||
@@ -184,7 +188,7 @@ if __name__ == "__main__":
|
||||
group.add_argument(
|
||||
"-t",
|
||||
"--template",
|
||||
help="sets a predefined template. Valid options are LESBIAN or LGBTQ",
|
||||
help="Sets a predefined pride template.",
|
||||
choices=["lesbian", "lgbtq", "trans", "bisexual", "pansexual"],
|
||||
)
|
||||
group.add_argument(
|
||||
@@ -196,6 +200,7 @@ if __name__ == "__main__":
|
||||
metavar=("PORT", "RED", "GREEN", "BLUE"),
|
||||
)
|
||||
|
||||
argcomplete.autocomplete(parser)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.flush:
|
||||
|
||||
Reference in New Issue
Block a user