We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is an error with a widget in my own config, but I'm filing it here so I will remember to come back to it.
Here is the widget:
;; volume ;; (define (alsa-volume-get-volume) (let loop ((lines (with-input-from-pipe "amixer sget Master,0" read-lines))) (if (null? lines) #f (let ((m (string-match '(: (* any) "[" ($ (+ num)) "%] [" ($ (+ alpha)) "]") (first lines)))) (if m (list (string->number (second m)) (if (equal? "off" (third m)) #f #t)) (loop (rest lines))))))) (define alsa-volume-format (match-lambda (#f "") ((? string? text) text) ((level #f) '(color (1 0 0 1) "MUTE")) ((level #t) (let* ((indicator "▁▂▄▆█") (indicator-length (string-length indicator)) (n (inexact->exact (floor (* (min 100 level) 0.01 indicator-length))))) `(color (0.5 0.5 1 1) (font "DejaVu Sans Mono-8:bold" ,(string-pad-right (substring indicator 0 n) indicator-length)) ,(->string level)))))) (define (widget:alsa-volume) (widget:text format: alsa-volume-format init: (lambda (widget) (thread-start! (lambda () (call-with-input-pipe "stdbuf -oL alsactl monitor" (lambda (port) (let ((fileno (port->fileno port))) (let loop () (thread-wait-for-i/o! fileno input:) (read-line port) (update widget (alsa-volume-get-volume)) (loop))))))) (update widget (alsa-volume-get-volume)))))
Here is the error. Not sure about steps to reproduce:
Warning (#<thread: thread1753>): in thread: (>) bad argument type: (color (0.5 0.5 1 1) (font "DejaVu Sans Mono-8:bold" "▁▂▄▆ ") "89") Call history: mowedline.scm:338: max <--
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is an error with a widget in my own config, but I'm filing it here so I will remember to come back to it.
Here is the widget:
Here is the error. Not sure about steps to reproduce:
The text was updated successfully, but these errors were encountered: