feat(bar): remove speaker and microphone control

This commit is contained in:
tux
2025-09-25 19:31:44 +05:30
parent 978f15c305
commit 3d56d83fa8
2 changed files with 0 additions and 38 deletions

View File

@@ -10,7 +10,6 @@ import { Tailscale } from "./tailscale";
import { Time } from "./time"; import { Time } from "./time";
import { Tray } from "./tray"; import { Tray } from "./tray";
import { FocusedClient, WorkspaceButton } from "./workspace"; import { FocusedClient, WorkspaceButton } from "./workspace";
import { Volume } from "./volume";
export const WINDOW_NAME = "bar"; export const WINDOW_NAME = "bar";
@@ -43,7 +42,6 @@ export const Bar = (gdkmonitor: Gdk.Monitor) => {
<GPU /> <GPU />
<Profile /> <Profile />
<Tailscale /> <Tailscale />
<Volume />
<Battery /> <Battery />
<Tray /> <Tray />
<Time /> <Time />

View File

@@ -1,36 +0,0 @@
import { createBinding } from "ags";
import AstalWp from "gi://AstalWp";
export const Volume = () => {
const { defaultSpeaker: speaker, defaultMicrophone: microphone } =
AstalWp.get_default()!;
const speakerIsMuted = createBinding(speaker, "mute");
return (
<>
<box cssClasses={["pill", "volume"]} spacing={5}>
<image
iconName={speakerIsMuted((val) =>
val ? "fa-speaker-muted-symbolic" : "fa-speaker-symbolic",
)}
/>
<slider
widthRequest={100}
onChangeValue={({ value }) => speaker.set_volume(value)}
value={createBinding(speaker, "volume")}
/>
</box>
<box cssClasses={["pill", "volume"]} spacing={5}>
<image iconName="fa-microphone-symbolic" />
<slider
widthRequest={100}
onChangeValue={({ value }) => microphone.set_volume(value)}
value={createBinding(microphone, "volume")}
/>
</box>
</>
);
};