feat: add pulsemixer

This commit is contained in:
Sweetbread 2025-03-27 23:03:55 +03:00
parent ddd7250991
commit 1bd07d8062
3 changed files with 14 additions and 4 deletions

View File

@ -16,6 +16,10 @@
];
};
home.packages = with pkgs; [
pulsemixer
];
wayland.windowManager.hyprland.settings.exec-once = [ "ags run" ];
xdg.configFile."ags".source = (pkgs.callPackage ./packages/drvs/ags.nix { colors = config.lib.stylix.colors; });

View File

@ -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>
}

View File

@ -131,6 +131,7 @@
windowrulev2 = [
"float, title:(nmtui)"
"float, title:(pulsemixer)"
"float, title:(clipse)"
"size 622 652, title:(clipse)"
];