Fix sounds in mako

This commit is contained in:
Alexander Bantyev 2023-01-23 20:35:45 +04:00
parent 9bf4aab609
commit 9779beaf0d
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5

View File

@ -1,7 +1,11 @@
{ pkgs, config, ... }: { { pkgs, config, ... }: {
home-manager.users.balsoft = { home-manager.users.balsoft = {
systemd.user.services.mako = { systemd.user.services.mako = {
Service = { ExecStart = "${pkgs.mako}/bin/mako"; }; Service = {
ExecStart = "${pkgs.mako}/bin/mako";
Environment =
[ "PATH=${pkgs.lib.makeBinPath [ pkgs.bash pkgs.mpv ]}" ];
};
Install = { Install = {
After = [ "sway-session.target" ]; After = [ "sway-session.target" ];
WantedBy = [ "sway-session.target" ]; WantedBy = [ "sway-session.target" ];
@ -23,8 +27,7 @@
maxIconSize = 24; maxIconSize = 24;
extraConfig = let extraConfig = let
play = sound: play = sound:
pkgs.writeShellScript "play-${sound}" "mpv ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/${sound}.oga";
"${pkgs.mpv}/bin/mpv ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/${sound}.oga";
in '' in ''
on-notify=exec ${play "message"} on-notify=exec ${play "message"}
[app-name=yubikey-touch-detector] [app-name=yubikey-touch-detector]