#!/bin/bash . "$HOME/.config/mabox/mabox.conf" backend=${picom_renderer:-glx} case "$LANG" in pl*) DISABLED="Kompozytor Picom zastał WYŁĄCZONY" ENABLED="Kompozytor Picom został URUCHOMIONY" ;; *) DISABLED="Picom compositor DISABLED" ENABLED="Picom compositor ENABLED" ;; esac if [ $(pgrep -u $USER picom) ]; then killall -u $USER picom notify-send.sh -i compton -t 5000 "Compositor" "$DISABLED" else CONFIGFILE="$HOME/.config/picom.conf" if [ -f "$CONFIGFILE" ];then picom --backend "$backend" --config "$CONFIGFILE" & notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED\nRenderer: $backend" else picom --backend "$backend" --config /usr/share/doc/picom/picom.conf.example & notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED\n Using picom example config file\nRenderer: $backend" fi fi exit