Don’t use -face suffix for faces
This commit is contained in:
parent
bcf5c5e3d4
commit
c31950cb30
18
pw-ui.el
18
pw-ui.el
@ -68,22 +68,22 @@ The indicator is displayed only on graphical terminals."
|
|||||||
:type '(alist :key-type symbol :value-type sexp)
|
:type '(alist :key-type symbol :value-type sexp)
|
||||||
:group 'pip-frame)
|
:group 'pip-frame)
|
||||||
|
|
||||||
(defface pipewire-label-face
|
(defface pipewire-label
|
||||||
'((t (:weight bold :overline t)))
|
'((t (:weight bold :overline t)))
|
||||||
"Face to use for PipeWire node group labels."
|
"Face to use for PipeWire node group labels."
|
||||||
:group 'pipewire)
|
:group 'pipewire)
|
||||||
|
|
||||||
(defface pipewire-default-object-face
|
(defface pipewire-default-object
|
||||||
'((t (:weight bold)))
|
'((t (:weight bold)))
|
||||||
"Face to use for PipeWire default sinks and sources."
|
"Face to use for PipeWire default sinks and sources."
|
||||||
:group 'pipewire)
|
:group 'pipewire)
|
||||||
|
|
||||||
(defface pipewire-muted-face
|
(defface pipewire-muted
|
||||||
'((t (:strike-through t)))
|
'((t (:strike-through t)))
|
||||||
"Face to use for muted PipeWire sinks and sources."
|
"Face to use for muted PipeWire sinks and sources."
|
||||||
:group 'pipewire)
|
:group 'pipewire)
|
||||||
|
|
||||||
(defface pipewire-volume-face
|
(defface pipewire-volume
|
||||||
'((t (:inverse-video t)))
|
'((t (:inverse-video t)))
|
||||||
"Face to use for displaying volumes of PipeWire objects."
|
"Face to use for displaying volumes of PipeWire objects."
|
||||||
:group 'pipewire)
|
:group 'pipewire)
|
||||||
@ -91,10 +91,10 @@ The indicator is displayed only on graphical terminals."
|
|||||||
(defvar pipewire-buffer "*PipeWire*")
|
(defvar pipewire-buffer "*PipeWire*")
|
||||||
|
|
||||||
(defun pw-ui--label (label)
|
(defun pw-ui--label (label)
|
||||||
(propertize (concat label ":") 'face 'pipewire-label-face))
|
(propertize (concat label ":") 'face 'pipewire-label))
|
||||||
|
|
||||||
(defun pw-ui--object-volume (object)
|
(defun pw-ui--object-volume (object)
|
||||||
(propertize (pw-lib-volume object) 'face 'pipewire-volume-face))
|
(propertize (pw-lib-volume object) 'face 'pipewire-volume))
|
||||||
|
|
||||||
(defun pw-ui--object-name (object)
|
(defun pw-ui--object-name (object)
|
||||||
(let* ((type (pw-lib-object-type object))
|
(let* ((type (pw-lib-object-type object))
|
||||||
@ -114,7 +114,7 @@ The indicator is displayed only on graphical terminals."
|
|||||||
(text (format "%4s: %s" id (pw-ui--object-name object)))
|
(text (format "%4s: %s" id (pw-ui--object-name object)))
|
||||||
(profile (when (equal type "Device")
|
(profile (when (equal type "Device")
|
||||||
(pw-lib-current-profile (pw-lib-object-id object))))
|
(pw-lib-current-profile (pw-lib-object-id object))))
|
||||||
(face (if (member id default-ids) 'pipewire-default-object-face 'default))
|
(face (if (member id default-ids) 'pipewire-default-object 'default))
|
||||||
(media-class (pw-lib-object-value object "media.class")))
|
(media-class (pw-lib-object-value object "media.class")))
|
||||||
(when media-class
|
(when media-class
|
||||||
(setq text (format "%s (%s)" text media-class)))
|
(setq text (format "%s (%s)" text media-class)))
|
||||||
@ -122,14 +122,14 @@ The indicator is displayed only on graphical terminals."
|
|||||||
(setq text (format "%s: %s" text profile)))
|
(setq text (format "%s: %s" text profile)))
|
||||||
(let ((volume-p (member type '("Node" "Port"))))
|
(let ((volume-p (member type '("Node" "Port"))))
|
||||||
(when (and volume-p (pw-lib-muted-p object))
|
(when (and volume-p (pw-lib-muted-p object))
|
||||||
(setq face `(:inherit (pipewire-muted-face ,face))))
|
(setq face `(:inherit (pipewire-muted ,face))))
|
||||||
(let ((label (propertize text 'face face)))
|
(let ((label (propertize text 'face face)))
|
||||||
(when volume-p
|
(when volume-p
|
||||||
(let ((volume (pw-lib-volume object)))
|
(let ((volume (pw-lib-volume object)))
|
||||||
(when volume
|
(when volume
|
||||||
(setq label (concat label " "
|
(setq label (concat label " "
|
||||||
(propertize (number-to-string volume)
|
(propertize (number-to-string volume)
|
||||||
'face 'pipewire-volume-face))))))
|
'face 'pipewire-volume))))))
|
||||||
label))))
|
label))))
|
||||||
|
|
||||||
(defun pw-ui--insert-line (line object)
|
(defun pw-ui--insert-line (line object)
|
||||||
|
Loading…
Reference in New Issue
Block a user