mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-07 16:54:21 +02:00
picom: adapt shadow radius to DPI
This commit is contained in:
parent
3770929742
commit
21743fa9b0
2 changed files with 8 additions and 5 deletions
|
@ -1,11 +1,14 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
|
||||
POLYBAR_HEIGHT=$((20 * DPI / 96))
|
||||
dpi=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
|
||||
|
||||
POLYBAR_HEIGHT=$((20 * dpi / 96))
|
||||
SHADOW_RADIUS=$((12 * dpi / 96))
|
||||
|
||||
# Configure picom
|
||||
cat ~/.config/i3/dotfiles/picom.conf \
|
||||
| sed -e "s/@POLYBAR_HEIGHT@/$POLYBAR_HEIGHT/" \
|
||||
| sed -e "s/@SHADOW_RADIUS@/$SHADOW_RADIUS/" \
|
||||
> $XDG_RUNTIME_DIR/i3/picom.conf.new
|
||||
|
||||
# Put new configuration file in place
|
||||
|
|
|
@ -38,9 +38,9 @@ opacity-rule = [
|
|||
fade-in-step = 0.08;
|
||||
fade-out-step = 0.08;
|
||||
shadow-opacity = 0.5;
|
||||
shadow-radius = 10;
|
||||
shadow-offset-x = -3;
|
||||
shadow-offset-y = -3;
|
||||
shadow-radius = @SHADOW_RADIUS@;
|
||||
shadow-offset-x = 0;
|
||||
shadow-offset-y = 0;
|
||||
shadow-exclude-reg = "x@POLYBAR_HEIGHT@+0+0"
|
||||
wintypes:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue