dotfiles/gui/picom.sh

34 lines
1.1 KiB
Bash
Raw Normal View History

2020-11-02 04:08:18 +00:00
#!/bin/sh
2020-09-17 16:02:24 +00:00
2020-11-02 04:08:18 +00:00
set -e
2020-11-08 16:26:14 +00:00
DIR=$(dirname "$(readlink -f "$0")")
2020-11-02 04:08:18 +00:00
. "$DIR/../env.sh"
2020-09-17 16:02:24 +00:00
2020-11-21 18:07:26 +00:00
log 'Setting up picom'
2020-09-17 16:02:24 +00:00
2020-11-08 16:26:14 +00:00
# install dpes
2020-09-17 16:02:24 +00:00
case "$PM" in
apt)
# install build tools
2020-11-21 18:07:26 +00:00
! has_cmd pip3 && . "$PDIR/python/install.sh"
2020-09-18 04:16:15 +00:00
sudo pip3 install meson
2020-09-17 16:02:24 +00:00
# install dependencies
2020-09-18 04:16:15 +00:00
sudo apt install -y ninja-build libxext-dev libxcb1-dev libxcb-damage0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxcb-xinerama0-dev libxcb-glx0-dev libpixman-1-dev libdbus-1-dev libconfig-dev libgl1-mesa-dev libpcre3-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev
2020-09-17 16:02:24 +00:00
;;
pacman)
2020-11-21 18:07:26 +00:00
sudo pacman -S --noconfirm --needed uthash ninja meson
2020-09-17 16:02:24 +00:00
;;
esac
2020-09-19 15:33:13 +00:00
# build and install picom
2020-11-21 18:07:26 +00:00
intorepo https://github.com/klesh/picom.git "$DIR/repos/picom"
2020-11-08 16:26:14 +00:00
meson --buildtype=release . build
sudo ninja -C build install
exitrepo
2020-11-21 18:07:26 +00:00
sudo cp -f "$DIR/picom/picomdaemon" "$PREFIX/bin"
2020-11-08 16:26:14 +00:00
sudo chmod +x "$PREFIX/bin/picomdaemon"
echo 'picom installed'
2020-09-18 18:01:58 +00:00
# configuration
2020-11-21 18:07:26 +00:00
lnsf "$DIR/picom/picom.conf" "$XDG_CONFIG_HOME/picom/picom.conf"