-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpicom-reload.sh
executable file
·40 lines (24 loc) · 1.1 KB
/
picom-reload.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#call on saturation, sharpness #or color change -deprecated
path="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
conf=$path/profiles/current
tempshader=$path/shaders/universal_template.glsl
activeshader=$path/shaders/universal_active.glsl
readvar=$path/readvar.sh
cp -f "$tempshader" "$activeshader"
saturation=$("$readvar" "$conf" saturation)
sed -i "s\SATURATION_VALUE\\$saturation\g" "$activeshader"
sharpness=$("$readvar" "$conf" sharpness)
sed -i "s\SHARPNESS_VALUE\\$sharpness\g" "$activeshader"
dim=$("$readvar" "$conf" dim)
sed -i "s\DIM_VALUE\\$dim\g" "$activeshader"
dimslope=$("$readvar" "$conf" dimslope)
sed -i "s\DIMSLOPE_VALUE\\$dimslope\g" "$activeshader"
useeffects=$("$readvar" "$conf" useeffects)
sed -i "s\USEEFFECTS_VALUE\\$useeffects\g" "$activeshader"
#sed -i "s\R_VALUE\\$(~/scr/readvar.sh "$conf" r)\g" "$activeshader"
#sed -i "s\G_VALUE\\$(~/scr/readvar.sh "$conf" g)\g" "$activeshader"
#sed -i "s\B_VALUE\\$(~/scr/readvar.sh "$conf" b)\g" "$activeshader"
kill $(pgrep -f "picom ")
picom --backend glx --no-use-damage --window-shader-fg "$activeshader" &
exit 0