From 6c6900299d253071aba4761630a8b1468f490f61 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Tue, 18 Nov 2025 01:02:30 -0800 Subject: [PATCH] add qs mic toggle --- modules/hyprland/hyprland.conf | 1 + modules/user/dokapon.nix | 64 +++++++++++++++++++ .../shell/bar/audio/AudioControls.qml | 10 +++ 3 files changed, 75 insertions(+) create mode 100644 modules/user/dokapon.nix diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index 9fb22c8..6be884e 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -197,6 +197,7 @@ bind = ,XF86AudioStop, exec, qs -c shell ipc call mpris pauseAll bind = ,XF86AudioPlay, exec, qs -c shell ipc call mpris playPause bind = ,XF86AudioNext, exec, qs -c shell ipc call mpris next bind = ,XF86AudioPrev, exec, qs -c shell ipc call mpris previous +bind = $mod, m, exec, qs -c shell ipc call audio toggleMic bind = $mod, h, hy3:movefocus, l bind = $mod, j, hy3:movefocus, d diff --git a/modules/user/dokapon.nix b/modules/user/dokapon.nix new file mode 100644 index 0000000..ac1df6e --- /dev/null +++ b/modules/user/dokapon.nix @@ -0,0 +1,64 @@ +{ nixpak, pkgs, ... }: +let + dokaponGameDir = "/home/admin/Downloads/dokapon/game"; + + mkNixPak = nixpak.lib.nixpak { + inherit (pkgs) lib; + inherit pkgs; + }; + + dokapon = mkNixPak { + config = + { sloth, ... }: + { + app.package = pkgs.writeShellScriptBin "dokapon" '' + cd ${dokaponGameDir} + exec ${pkgs.wine64}/bin/wine64 DkkStm.exe "$@" + ''; + + flatpak.appId = "com.dokapon.kingdom"; + + bubblewrap = { + network = true; + + bind.rw = [ + (sloth.concat' sloth.xdgDataHome "/dokapon") + (sloth.concat' sloth.homeDir "/.wine") + "/tmp" + "/run/user/1000" + ]; + + bind.ro = [ + (sloth.concat' dokaponGameDir "") + ]; + + sockets = { + wayland = true; + pipewire = true; + pulse = true; + }; + + env = { + WINEDEBUG = "-all"; + WINEESYNC = "1"; + XDG_DATA_HOME = sloth.concat' sloth.xdgDataHome ""; + XDG_CACHE_HOME = sloth.concat' sloth.xdgCacheHome ""; + }; + }; + + dbus.policies = { + "org.freedesktop.Notifications" = "talk"; + }; + + gpu.enable = true; + locale.enable = true; + fonts.enable = true; + }; + + }; +in +{ + environment.systemPackages = [ + dokapon.config.env + ]; +} diff --git a/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml b/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml index f910307..f9b10c1 100644 --- a/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml +++ b/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml @@ -1,6 +1,7 @@ import QtQuick import QtQuick.Layouts import Quickshell +import Quickshell.Io import Quickshell.Services.Pipewire import qs.bar @@ -40,4 +41,13 @@ BarWidgetInner { } } } + + IpcHandler { + target: "audio" + + function toggleMic(): void { + const source = Pipewire.defaultAudioSource; + source.audio.muted = !source.audio.muted; + } + } }