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:
parent
2907e24656
commit
ea5f537303
@ -38,7 +38,7 @@ opacity-rule = [
|
||||
blur:
|
||||
{
|
||||
method = "dual_kawase";
|
||||
strength = 8;
|
||||
strength = 12;
|
||||
};
|
||||
blur-background-frame = true;
|
||||
blur-background-fixed = true;
|
||||
|
@ -4,7 +4,9 @@ set -eu
|
||||
# Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup
|
||||
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
|
||||
BLUR_STRENGTH=12
|
||||
CURSOR_SIZE=28
|
||||
CORNER_RADIUS=9
|
||||
|
||||
xrdbget() {
|
||||
set -o pipefail
|
||||
@ -31,8 +33,8 @@ scale=$(( dpi/96 ))
|
||||
cursor=$(( (dpi*CURSOR_SIZE)/96 ))
|
||||
|
||||
# Update picom scale
|
||||
sed -i -e "s/strength =.*$/strength = $(( dpi*8/96 ));/" \
|
||||
-e "s/corner-radius =.*$/corner-radius = $(( dpi/13 ));/" \
|
||||
sed -i -e "s/strength =.*$/strength = $(( (dpi*BLUR_STRENGTH)/96 ));/" \
|
||||
-e "s/corner-radius =.*$/corner-radius = $(( (dpi*CORNER_RADIUS)/96 ));/" \
|
||||
"$CONF_DIR/picom/picom.conf" &
|
||||
|
||||
# Build xsettingsd.conf
|
||||
|
Loading…
Reference in New Issue
Block a user