Skip to content

Commit

Permalink
Merge pull request #12 from mm--/compton-enhancements
Browse files Browse the repository at this point in the history
Allow passing of extra arguments to compton
  • Loading branch information
Nanolx committed Jan 31, 2015
2 parents 2ce73c7 + 511cdca commit f7e3a43
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lisp/sawfish/wm/prg/compton.jl
Expand Up @@ -27,6 +27,7 @@
rep.io.processes
rep.io.timers
rep.util.misc
rep.regexp
sawfish.wm.misc
sawfish.wm.custom
sawfish.wm.windows
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit f7e3a43

Please sign in to comment.