1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

scripts/dpi: Constant blur/corner-radius scaling

Scale picom blur and corner radius according to a constant scale factor
much like we do for cursor sizes. This ideally would be defined
somewhere centrally, but this is better than nothing.

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock 2022-10-23 11:59:37 +01:00
parent 2907e24656
commit ea5f537303
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
2 changed files with 5 additions and 3 deletions

View File

@ -38,7 +38,7 @@ opacity-rule = [
blur: blur:
{ {
method = "dual_kawase"; method = "dual_kawase";
strength = 8; strength = 12;
}; };
blur-background-frame = true; blur-background-frame = true;
blur-background-fixed = true; blur-background-fixed = true;

View File

@ -4,7 +4,9 @@ set -eu
# Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup # Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
BLUR_STRENGTH=12
CURSOR_SIZE=28 CURSOR_SIZE=28
CORNER_RADIUS=9
xrdbget() { xrdbget() {
set -o pipefail set -o pipefail
@ -31,8 +33,8 @@ scale=$(( dpi/96 ))
cursor=$(( (dpi*CURSOR_SIZE)/96 )) cursor=$(( (dpi*CURSOR_SIZE)/96 ))
# Update picom scale # Update picom scale
sed -i -e "s/strength =.*$/strength = $(( dpi*8/96 ));/" \ sed -i -e "s/strength =.*$/strength = $(( (dpi*BLUR_STRENGTH)/96 ));/" \
-e "s/corner-radius =.*$/corner-radius = $(( dpi/13 ));/" \ -e "s/corner-radius =.*$/corner-radius = $(( (dpi*CORNER_RADIUS)/96 ));/" \
"$CONF_DIR/picom/picom.conf" & "$CONF_DIR/picom/picom.conf" &
# Build xsettingsd.conf # Build xsettingsd.conf