add 'wmclass/".wmclass" aux executable/launcher configuration
This commit is contained in:
parent
f9dabb8994
commit
c34dff1247
|
@ -310,6 +310,10 @@
|
|||
[x-flags? (and (eq? kind 'mred)
|
||||
(eq? (system-type) 'unix)
|
||||
(not (script-variant? variant)))]
|
||||
[flags (let ([m (assq 'wm-class aux)])
|
||||
(if m
|
||||
(list* "-J" (cdr m) flags)
|
||||
flags))]
|
||||
[post-flags (cond
|
||||
[x-flags? (skip-x-flags flags)]
|
||||
[alt-exe null]
|
||||
|
@ -556,7 +560,15 @@
|
|||
(with-input-from-file (cdar l)
|
||||
(lambda ()
|
||||
(let ([d (read)])
|
||||
(list (cons 'uti-exports d))))))))))
|
||||
(list (cons 'uti-exports d))))))))
|
||||
(let ([l (try 'wm-class #".wmclass")])
|
||||
(if (null? l)
|
||||
l
|
||||
(with-handlers ([exn:fail:filesystem? (lambda (x) null)])
|
||||
(list (cons 'wm-class
|
||||
(regexp-replace #rx"(?:\r\n|\r|\n)$"
|
||||
(file->string (cdar l))
|
||||
""))))))))
|
||||
|
||||
(define (build-aux-from-path aux-root)
|
||||
(let ([aux-root (if (string? aux-root) (string->path aux-root) aux-root)])
|
||||
|
@ -571,7 +583,8 @@
|
|||
(try #".lch")
|
||||
(try #".creator")
|
||||
(try #".filetypes")
|
||||
(try #".utiexports"))))
|
||||
(try #".utiexports")
|
||||
(try #".wmclass"))))
|
||||
|
||||
(define (make-gracket-program-launcher file collection dest)
|
||||
(make-mred-launcher (list "-l-" (string-append collection "/" file))
|
||||
|
|
|
@ -252,7 +252,7 @@ currently supported keys are as follows:
|
|||
executable, instead of a wrapper binary that execs the
|
||||
original; the default is @racket[#f].}
|
||||
|
||||
@item{@racket['relative?] (Unix, Windows, Mac OS X): A boolean;
|
||||
@item{@racket['relative?] (Unix, Windows, Mac OS X) : A boolean;
|
||||
@racket[#t] means that, to the degree that the generated
|
||||
executable must refer to another, it can use a relative path
|
||||
(so the executables can be moved together, but not
|
||||
|
@ -260,6 +260,9 @@ currently supported keys are as follows:
|
|||
absolute paths should be used (so the generated executable can
|
||||
be moved).}
|
||||
|
||||
@item{@racket['wm-class] (Unix) : A string; used as the default
|
||||
@tt{WM_CLASS} program class for the program's windows.}
|
||||
|
||||
]
|
||||
|
||||
If the @racket[#:collects-path] argument is @racket[#f], then the
|
||||
|
|
|
@ -340,6 +340,9 @@ are as follows:
|
|||
@racket[read] content (a single S-expression); for use on
|
||||
Mac OS X}
|
||||
|
||||
@item{@filepath{.wmclass} @'rarr @racket['wm-class] as the literal
|
||||
content, removing a trailing newline if any; for use on Unix}
|
||||
|
||||
]}
|
||||
|
||||
@defparam[current-launcher-variant variant symbol?]{
|
||||
|
|
Loading…
Reference in New Issue
Block a user