mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-30 21:34:21 +02:00
picom: compute an offset for shadows
This commit is contained in:
parent
d5dbb906b4
commit
100a23fb03
2 changed files with 5 additions and 3 deletions
|
@ -4,11 +4,13 @@ dpi=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
|
|||
|
||||
POLYBAR_HEIGHT=$((20 * dpi / 96))
|
||||
SHADOW_RADIUS=$((12 * dpi / 96))
|
||||
SHADOW_OFFSET=$((SHADOW_RADIUS*2/3))
|
||||
|
||||
# Configure picom
|
||||
cat ~/.config/i3/dotfiles/picom.conf \
|
||||
| sed -e "s/@POLYBAR_HEIGHT@/$POLYBAR_HEIGHT/" \
|
||||
| sed -e "s/@SHADOW_RADIUS@/$SHADOW_RADIUS/" \
|
||||
| sed -e "s/@SHADOW_OFFSET@/$SHADOW_OFFSET/" \
|
||||
> $XDG_RUNTIME_DIR/i3/picom.conf.new
|
||||
|
||||
# Put new configuration file in place
|
||||
|
|
|
@ -37,10 +37,10 @@ opacity-rule = [
|
|||
# Shadow and fading
|
||||
fade-in-step = 0.08;
|
||||
fade-out-step = 0.08;
|
||||
shadow-opacity = 0.5;
|
||||
shadow-opacity = 1;
|
||||
shadow-radius = @SHADOW_RADIUS@;
|
||||
shadow-offset-x = 0;
|
||||
shadow-offset-y = 0;
|
||||
shadow-offset-x = -@SHADOW_OFFSET@;
|
||||
shadow-offset-y = -@SHADOW_OFFSET@;
|
||||
shadow-exclude-reg = "x@POLYBAR_HEIGHT@+0+0"
|
||||
wintypes:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue