add glowy shadows

This commit is contained in:
flick0
2023-10-22 15:47:40 +00:00
parent 10859c5371
commit 68b4575632
2 changed files with 14 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import os
import pywal
import numpy as np
import matplotlib as mpl
import time
def colormix(c1,c2,mix=0):
@@ -20,7 +21,7 @@ def apply(pre=None,wallpaper=None):
print(wallpaper)
print("colors::::: ",colors)
cmd = f"swww img '{wallpaper}' --transition-type simple --transition-step 15"
cmd = f"swww img '{wallpaper}' --transition-type grow --transition-step 1 --transition-duration 1 --transition-pos 0.5,1.0"
subprocess.run(cmd,shell=True)
with open(os.path.expanduser("~/.config/hypr/themes/colors_base"),"r") as cr:
@@ -47,7 +48,6 @@ def apply(pre=None,wallpaper=None):
f.write(f"{color}: {value}\n")
subprocess.run("touch ~/.config/hypr/themes/uicolors",shell=True)
subprocess.run("pkill -USR2 fish",shell=True)
# active borders
gradient = ""
@@ -67,6 +67,14 @@ def apply(pre=None,wallpaper=None):
print(cmd)
subprocess.run(cmd,shell=True)
cmd = f"hyprctl keyword decoration:col.shadow '0x33{colors['colors']['color5'][1:]}'"
print(cmd)
subprocess.run(cmd,shell=True)
cmd = f"hyprctl keyword decoration:col.shadow_inactive '0x22{colors['special']['background'][1:]}'"
print(cmd)
subprocess.run(cmd,shell=True)
#keyboard
cmd = f"asusctl led-mode static -c '{colors['colors']['color0'][1:]}'"
print(cmd)
@@ -96,7 +104,9 @@ gradient_color_8 = '{colors["colors"]["color7"]}'
with open(os.path.expanduser("~/.config/cava/config"),"w") as f:
f.write(conf)
time.sleep(0.5)
subprocess.run("pkill -USR2 cava",shell=True)
subprocess.run("pkill -USR2 fish",shell=True)
def main():
apply(wallpaper="/tmp/bg.png")

View File

@@ -5,8 +5,8 @@ exec=$THEME/scripts/apply.sh $THEME
decoration {
drop_shadow = true
shadow_range=100
shadow_render_power=5
col.shadow= 0x33000000
shadow_render_power=2
col.shadow= 0x55000000
col.shadow_inactive=0x22000000
rounding=15
}