Compare commits
No commits in common. "e9273dcf09813f4f729ac7fbfa5af2dca00a495b" and "55977bbc704f3031a89fcf73cd7dbec0f0b7167a" have entirely different histories.
e9273dcf09
...
55977bbc70
@ -86,13 +86,6 @@ If the given KEY doesn't exist in OBJECT, return DEFAULT."
|
|||||||
(or (cdr (assoc key (pw-lib--object-info object)))
|
(or (cdr (assoc key (pw-lib--object-info object)))
|
||||||
default))
|
default))
|
||||||
|
|
||||||
(defun pw-lib-properties (object)
|
|
||||||
"Return names of PipeWire OBJECT properties.
|
|
||||||
The returned value is a list of strings.
|
|
||||||
The corresponding values can be retrieved using `pw-lib-object-value'
|
|
||||||
function."
|
|
||||||
(cl-remove-if-not #'stringp (mapcar #'car (pw-lib--object-info object))))
|
|
||||||
|
|
||||||
(defun pw-lib-object-type (object)
|
(defun pw-lib-object-type (object)
|
||||||
"Return PipeWire type of OBJECT as a string.
|
"Return PipeWire type of OBJECT as a string.
|
||||||
E.g. \"Device\", \"Node\", \"Port\", \"Client\", ..."
|
E.g. \"Device\", \"Node\", \"Port\", \"Client\", ..."
|
||||||
|
18
pw-ui.el
18
pw-ui.el
@ -96,7 +96,6 @@ The indicator is displayed only on graphical terminals."
|
|||||||
:group 'pipewire)
|
:group 'pipewire)
|
||||||
|
|
||||||
(defvar pipewire-buffer "*PipeWire*")
|
(defvar pipewire-buffer "*PipeWire*")
|
||||||
(defvar pipewire-properties-buffer "*PipWire-properties*")
|
|
||||||
|
|
||||||
(defun pw-ui--label (label)
|
(defun pw-ui--label (label)
|
||||||
(propertize (concat label ":") 'face 'pipewire-label))
|
(propertize (concat label ":") 'face 'pipewire-label))
|
||||||
@ -110,7 +109,7 @@ The indicator is displayed only on graphical terminals."
|
|||||||
'("application.name")
|
'("application.name")
|
||||||
(let ((prefix (concat (downcase type) ".")))
|
(let ((prefix (concat (downcase type) ".")))
|
||||||
(mapcar (lambda (suffix) (concat prefix suffix))
|
(mapcar (lambda (suffix) (concat prefix suffix))
|
||||||
'("nick" "description" "name"))))))
|
'("description" "name"))))))
|
||||||
(or (cl-find-if #'identity
|
(or (cl-find-if #'identity
|
||||||
(mapcar (lambda (p) (pw-lib-object-value object p))
|
(mapcar (lambda (p) (pw-lib-object-value object p))
|
||||||
description-properties))
|
description-properties))
|
||||||
@ -382,20 +381,6 @@ Otherwise ask for the Node to set as the default Node."
|
|||||||
(pw-ui--update))
|
(pw-ui--update))
|
||||||
(error "Nothing to set a profile for here")))
|
(error "Nothing to set a profile for here")))
|
||||||
|
|
||||||
(defun pipewire-properties ()
|
|
||||||
"Display properties of the object at the current point."
|
|
||||||
(interactive)
|
|
||||||
(if-let ((object (pw-ui--current-object)))
|
|
||||||
(progn
|
|
||||||
(pop-to-buffer pipewire-properties-buffer)
|
|
||||||
(let ((inhibit-read-only t))
|
|
||||||
(erase-buffer)
|
|
||||||
(dolist (p (sort (pw-lib-properties object) #'string-lessp))
|
|
||||||
(insert (format "%s: %s\n" p (pw-lib-object-value object p)))))
|
|
||||||
(goto-char (point-min))
|
|
||||||
(view-mode))
|
|
||||||
(error "No PipeWire object here")))
|
|
||||||
|
|
||||||
(defvar pipewire-mode-map
|
(defvar pipewire-mode-map
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
(define-key map "d" 'pipewire-set-default)
|
(define-key map "d" 'pipewire-set-default)
|
||||||
@ -406,7 +391,6 @@ Otherwise ask for the Node to set as the default Node."
|
|||||||
(define-key map "-" 'pipewire-decrease-volume)
|
(define-key map "-" 'pipewire-decrease-volume)
|
||||||
(define-key map "+" 'pipewire-increase-volume-single)
|
(define-key map "+" 'pipewire-increase-volume-single)
|
||||||
(define-key map "_" 'pipewire-decrease-volume-single)
|
(define-key map "_" 'pipewire-decrease-volume-single)
|
||||||
(define-key map " " 'pipewire-properties)
|
|
||||||
map))
|
map))
|
||||||
|
|
||||||
(define-derived-mode pipewire-mode special-mode "PW"
|
(define-derived-mode pipewire-mode special-mode "PW"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user