dotfiles/dot_config/hypr/scripts/executable_rgb_borders
punkfairie a53c7bb844
Add .config/cava/config
Add .config/dunst/dunstrc
Add .config/hypr/component/waybar/config
Add .config/hypr/component/waybar/style.css
Add .config/hypr/autostart
Add .config/hypr/hyprland.conf
Add .config/hypr/scripts/expand_toolbar
Add .config/hypr/scripts/launch_waybar
Add .config/hypr/scripts/lock
Add .config/hypr/scripts/rgb
Add .config/hypr/scripts/rgb_borders
Add .config/hypr/scripts/screenshot
Add .config/hypr/scripts/toolbar_state
Add .config/hypr/scripts/wall
Add .config/hypr/scripts/workspaces
Add .config/hypr/scripts/tools/dynamic
Add .config/hypr/scripts/tools/expand
Add .config/hypr/scripts/tools/notif
Add .config/hypr/scripts/tools/start_dyn
Add .config/hypr/store/dynamic_out.txt
Add .config/hypr/store/latest_notif
Add .config/hypr/store/prev.txt
Add .config/hypr/wallpapers/cloud.png
Add .config/hypr/wallpapers/clouds_realism.jpg
Add .config/hypr/wallpapers/evening-sky.png
Add .config/hypr/wallpapers/flower.jpg
Add .config/hypr/wallpapers/mountain.png
Add .config/hypr/wallpapers/totoro.png
Add .config/hypr/wallpapers/train.jpg
Update .config/packages/archgirlie
Add .config/wofi/config
Add .config/wofi/menu
Add .config/wofi/menu.css
Add .config/wofi/style.css
2024-05-18 14:34:14 -07:00

37 lines
No EOL
940 B
Python

#!/usr/bin/python
import subprocess
import time
from colour import Color
gradient = [
"#ff0000",
"#00ff00",
"#0000ff",
]
def color_range(*args):
l = []
for i,color in enumerate(args):
if i == len(args)-1:
break
l.extend(color.range_to(args[i+1], 25))
return l
def rgb_to_hex(r,g,b):
return '%02x%02x%02x' % (r,g,b)
def set_color(r,g,b):
print(rgb_to_hex(r,g,b))
subprocess.run(f"hyprctl keyword dwindle:col.group_border_active 0xff{rgb_to_hex(r,g,b)}".split())
subprocess.run(f"hyprctl keyword dwindle:col.group_border 0x66{rgb_to_hex(r,g,b)}".split())
colors = color_range(*[Color(i) for i in gradient])
while 1:
for col in colors:
set_color(int(col.red*255), int(col.green*255), int(col.blue*255))
time.sleep(0.05)
for col in colors[::-1]:
set_color(int(col.red*255), int(col.green*255), int(col.blue*255))
time.sleep(0.05)