import { bind, Variable } from 'astal'; import { Gtk, Widget } from 'astal/gtk3'; import AstalWp from 'gi://AstalWp'; import Separator from '../misc/separator'; import Streams from './streams'; const ICON_SEP = 6; export default () => { const audio = AstalWp.get_default()?.get_audio(); if (!audio) { throw new Error('Could not find default audio devices.'); } // TODO: make a stack to have outputs, inputs and currently playing apps // TODO: figure out ports and profiles const Shown = Variable('outputs'); const stack = ( {bind(audio, 'speakers').as(Streams)} {bind(audio, 'microphones').as(Streams)} ) as Widget.Stack; const StackButton = ({ label = '', iconName = '' }) => ( ) as Widget.Button; return ( {stack} ); };