feat: add pulsemixer
This commit is contained in:
1 parent
715b67db90
commit
4c0add9c7b
3 files changed
+14
-4
No files matched your search
@@ -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