feat: add pulsemixer
This commit is contained in:
@ -1,11 +1,16 @@
|
||||
import { bind } from "astal"
|
||||
import { execAsync } from "astal/process"
|
||||
import Wp from "gi://AstalWp"
|
||||
|
||||
export default function Audio() {
|
||||
const speaker = Wp.get_default()?.audio.defaultSpeaker!
|
||||
|
||||
return <box className="AudioSlider">
|
||||
<icon icon={bind(speaker, "volumeIcon")} />
|
||||
<label label={bind(speaker, "volume").as(v => `${Math.floor(v*100)}%`)} />
|
||||
</box>
|
||||
return <button
|
||||
className="AudioSlider"
|
||||
onClicked={() => { execAsync("ghostty --title=pulsemixer -e pulsemixer") }}>
|
||||
<box>
|
||||
<icon icon={bind(speaker, "volumeIcon")} />
|
||||
<label label={bind(speaker, "volume").as(v => `${Math.floor(v*100)}%`)} />
|
||||
</box>
|
||||
</button>
|
||||
}
|
||||
|
Reference in New Issue
Block a user