xsession: make compton settings depend on GLX driver

This commit is contained in:
Vincent Bernat 2018-07-28 10:28:27 +02:00
parent f0953a9291
commit 23581a2bcd
2 changed files with 11 additions and 3 deletions

View file

@ -1,6 +1,3 @@
-- Spawn a composoting manager
awful.util.spawn("compton --backend glx --xrender-sync --xrender-sync-fence --vsync opengl-swc --paint-on-overlay", false)
-- Start idempotent commands
local execute = {
-- Kill any running nm-applet

View file

@ -51,4 +51,15 @@ rfkill block all 2> /dev/null
redshift -l 6.666:46.533 -t 6500:3900 2> /dev/null &
systemd-run -q --scope --user tmux start-server
case $(glxinfo | awk -F': ' '($1 == "OpenGL vendor string") {print $2}') in
"NVIDIA Corporation")
compton --daemon --backend glx --refresh-rate 60 --vsync opengl-swc --glx-no-stencil --glx-swap-method 4
;;
*)
compton --daemon --backend glx --xrender-sync --xrender-sync-fence --vsync opengl-swc --paint-on-overlay
;;
esac
exec awesome