mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-02 01:04:26 +02:00
picom: use a wrapper script to template picom configuration file
This commit is contained in:
parent
9371fff442
commit
3770929742
5 changed files with 20 additions and 5 deletions
13
bin/picom-configure
Executable file
13
bin/picom-configure
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p')
|
||||
POLYBAR_HEIGHT=$((20 * DPI / 96))
|
||||
|
||||
# Configure picom
|
||||
cat ~/.config/i3/dotfiles/picom.conf \
|
||||
| sed -e "s/@POLYBAR_HEIGHT@/$POLYBAR_HEIGHT/" \
|
||||
> $XDG_RUNTIME_DIR/i3/picom.conf.new
|
||||
|
||||
# Put new configuration file in place
|
||||
cmp $XDG_RUNTIME_DIR/i3/picom.conf.new $XDG_RUNTIME_DIR/i3/picom.conf 2> /dev/null || \
|
||||
mv $XDG_RUNTIME_DIR/i3/picom.conf.new $XDG_RUNTIME_DIR/i3/picom.conf
|
Loading…
Add table
Add a link
Reference in a new issue