feat: add pulsemixer

This commit is contained in:
Sweetbread 2025-03-27 23:03:55 +03:00
parent 715b67db90
commit 4c0add9c7b
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" ]; wayland.windowManager.hyprland.settings.exec-once = [ "ags run" ];
xdg.configFile."ags".source = (pkgs.callPackage ./packages/drvs/ags.nix { colors = config.lib.stylix.colors; }); 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 { bind } from "astal"
import { execAsync } from "astal/process"
import Wp from "gi://AstalWp" import Wp from "gi://AstalWp"
export default function Audio() { export default function Audio() {
const speaker = Wp.get_default()?.audio.defaultSpeaker! const speaker = Wp.get_default()?.audio.defaultSpeaker!
return <box className="AudioSlider"> return <button
className="AudioSlider"
onClicked={() => { execAsync("ghostty --title=pulsemixer -e pulsemixer") }}>
<box>
<icon icon={bind(speaker, "volumeIcon")} /> <icon icon={bind(speaker, "volumeIcon")} />
<label label={bind(speaker, "volume").as(v => `${Math.floor(v*100)}%`)} /> <label label={bind(speaker, "volume").as(v => `${Math.floor(v*100)}%`)} />
</box> </box>
</button>
} }

View File

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