💄 style(hypr): formatting and indenting
This commit is contained in:
parent
818d16ece2
commit
f187ab008c
1 changed files with 17 additions and 12 deletions
|
@ -10,6 +10,7 @@ gradient = [
|
||||||
"#8aadf4",
|
"#8aadf4",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def color_range(*args):
|
def color_range(*args):
|
||||||
l = []
|
l = []
|
||||||
for i, color in enumerate(args):
|
for i, color in enumerate(args):
|
||||||
|
@ -18,13 +19,17 @@ def color_range(*args):
|
||||||
l.extend(color.range_to(args[i + 1], 25))
|
l.extend(color.range_to(args[i + 1], 25))
|
||||||
return l
|
return l
|
||||||
|
|
||||||
|
|
||||||
def rgb_to_hex(r, g, b):
|
def rgb_to_hex(r, g, b):
|
||||||
return '%02x%02x%02x' % (r,g,b)
|
return "%02x%02x%02x" % (r, g, b)
|
||||||
|
|
||||||
|
|
||||||
def set_color(r, g, b):
|
def set_color(r, g, b):
|
||||||
print(rgb_to_hex(r, g, b))
|
print(rgb_to_hex(r, g, b))
|
||||||
subprocess.run(f"hyprctl keyword general:col.active_border 0xff{rgb_to_hex(r,g,b)}".split())
|
subprocess.run(
|
||||||
#subprocess.run(f"hyprctl keyword general:col.inactive_border 0x66{rgb_to_hex(r,g,b)}".split())
|
f"hyprctl keyword general:col.active_border 0xff{rgb_to_hex(r,g,b)}".split()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
colors = color_range(*[Color(i) for i in gradient])
|
colors = color_range(*[Color(i) for i in gradient])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue