upload
This commit is contained in:
33
usr/bin/mabox-compositor
Executable file
33
usr/bin/mabox-compositor
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# mabox-compositor - script to start|stop|restart picom
|
||||
# by Daniel Napora <napcok@gmail.com>
|
||||
|
||||
. "$HOME/.config/mabox/mabox.conf"
|
||||
|
||||
backend=${picom_renderer:-glx}
|
||||
|
||||
start() {
|
||||
CONFIGFILE="$HOME/.config/picom.conf"
|
||||
if [ -f "$CONFIGFILE" ];then
|
||||
picom --backend "$backend" --config "$CONFIGFILE" &
|
||||
else
|
||||
picom --backend "$backend" --config /dev/null &
|
||||
fi
|
||||
}
|
||||
stop() {
|
||||
if [ $(pgrep -u $USER picom) ]; then
|
||||
killall -u $USER picom
|
||||
fi
|
||||
}
|
||||
restart(){
|
||||
stop
|
||||
sleep 0.25
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--start|start) start;;
|
||||
--stop|stop) stop;;
|
||||
--restart|restart) restart;;
|
||||
esac
|
||||
exit 0
|
||||
Reference in New Issue
Block a user