add qs mic toggle

This commit is contained in:
outfoxxed 2025-11-18 01:02:30 -08:00
parent c37a1de490
commit 6c6900299d
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 75 additions and 0 deletions

View file

@ -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 = ,XF86AudioPlay, exec, qs -c shell ipc call mpris playPause
bind = ,XF86AudioNext, exec, qs -c shell ipc call mpris next bind = ,XF86AudioNext, exec, qs -c shell ipc call mpris next
bind = ,XF86AudioPrev, exec, qs -c shell ipc call mpris previous 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, h, hy3:movefocus, l
bind = $mod, j, hy3:movefocus, d bind = $mod, j, hy3:movefocus, d

64
modules/user/dokapon.nix Normal file
View file

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

View file

@ -1,6 +1,7 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Quickshell import Quickshell
import Quickshell.Io
import Quickshell.Services.Pipewire import Quickshell.Services.Pipewire
import qs.bar import qs.bar
@ -40,4 +41,13 @@ BarWidgetInner {
} }
} }
} }
IpcHandler {
target: "audio"
function toggleMic(): void {
const source = Pipewire.defaultAudioSource;
source.audio.muted = !source.audio.muted;
}
}
} }