Skip to content

Commit

Permalink
Aggiunti custom scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cunialino committed Jul 26, 2021
1 parent 7980a2a commit e72e635
Show file tree
Hide file tree
Showing 3 changed files with 630 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .local/bin/comp_mgr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
#
# Start a composition manager.
# (xcompmgr in this case)

comphelp() {
echo "Composition Manager:"
echo " (re)start: COMP"
echo " stop: COMP -s"
echo " query: COMP -q"
echo " returns 0 if composition manager is running, else 1"
exit
}

checkcomp() {
pgrep xcompmgr &>/dev/null
}

stopcomp() {
checkcomp && killall xcompmgr
}

startcomp() {
stopcomp
# Example settings only. Replace with your own.
xcompmgr -CcfF -I-.015 -O-.03 -D6 -t-1 -l-3 -r4.2 -o.5 &
exit
}
togglecomp(){
if pgrep xcompmgr &>/dev/null; then
echo "Turning xcompmgr OFF"
pkill xcompmgr &
else
echo "Turning xcompmgr ON"
xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
fi
}

case "$1" in
"") startcomp ;;
"-t") togglecomp ;;
"-s") stopcomp; exit ;;
*) comphelp ;;
esac
Loading

0 comments on commit e72e635

Please sign in to comment.