diff --git a/lisp/sawfish/wm/prg/compton.jl b/lisp/sawfish/wm/prg/compton.jl index 5ffa4dcee..bb3dca2f7 100644 --- a/lisp/sawfish/wm/prg/compton.jl +++ b/lisp/sawfish/wm/prg/compton.jl @@ -27,6 +27,7 @@ rep.io.processes rep.io.timers rep.util.misc + rep.regexp sawfish.wm.misc sawfish.wm.custom sawfish.wm.windows @@ -244,6 +245,11 @@ :type (number 0 100 85 1) :after-set (lambda () (update-opacity 'notify))) + (defcustom compton-extra-args "" "Extra arguments to compton." + :depends opacity-enable + :group (appearance window-effects) + :type string) + ;; windows custom-settings entry (define-match-window-property 'opacity 'appearance '(number 0 100 100)) (define-match-window-property 'no-shadows 'appearance 'boolean) @@ -282,12 +288,13 @@ (when (program-exists-p "compton") (stop-compton) (setq %compton-proc (make-process)) - (start-process %compton-proc "compton" (format nil "%s" c-shadows) (format nil "%s" c-fade) (format nil "%s" c-avoid) (format nil "%s" c-zero) + (apply start-process %compton-proc "compton" (format nil "%s" c-shadows) (format nil "%s" c-fade) (format nil "%s" c-avoid) (format nil "%s" c-zero) "-r" (number->string blur-radius) "-o" (format nil "%s" c-trans) "-l" (number->string left-offset) "-t" (number->string top-offset) "-I" (format nil "%s" c-fade-i) "-O" (format nil "%s" c-fade-o) "-D" (number->string fade-time) "-m" (format nil "%s" c-menu-o) "--shadow-red" (format nil "%s" c-red) "--shadow-green" (format nil "%s" c-green) "--shadow-blue" (format nil "%s" c-blue) (format nil "%s" c-dad) "--detect-rounded-corners" "--shadow-exclude" (concat c-smenu) - "--shadow-exclude" "_COMPTON_SHADOW:32c = 0"))) + "--shadow-exclude" "_COMPTON_SHADOW:32c = 0" + (unless (= (length compton-extra-args) 0) (string-split "\\s+" compton-extra-args))))) (define (stop-compton) "Stop compton, if running."