mako: Remove notification inhibitor
Upstream wants to implement modes, which collide with the patch that I used.
This commit is contained in:
parent
36c0c67e36
commit
10a63f585d
|
@ -29,17 +29,6 @@ in
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
# TODO: Remove patch once mako > 1.4.1 is released and in nixpkgs
|
|
||||||
mako = prev.mako.overrideAttrs (o: o // {
|
|
||||||
patches = [
|
|
||||||
# Adds makoctl set
|
|
||||||
(prev.fetchpatch {
|
|
||||||
url = "https://github.com/emersion/mako/commit/782ef66b04d5d927fe19254be175e0b5ddff343f.patch";
|
|
||||||
sha256 = "1qjaxhf11fyysmi9l8vwrz2vag3lcbllx8y8v2fgg3p52a7cwdjs";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
# TODO: Remove when pavucontrol > 4.0 is released
|
# TODO: Remove when pavucontrol > 4.0 is released
|
||||||
pavucontrol = prev.pavucontrol.overrideAttrs (o: o // {
|
pavucontrol = prev.pavucontrol.overrideAttrs (o: o // {
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -387,37 +387,6 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
|
||||||
deactivated = " ";
|
deactivated = " ";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"custom/notification_inhibitor" = {
|
|
||||||
exec = pkgs.writeShellScript "notification-inhibitor-watch-state" ''
|
|
||||||
set -euo pipefail
|
|
||||||
(echo; ${pkgs.inotify-tools}/bin/inotifywait -m -e close_write ${lib.escapeShellArg makoInhibitStateFile} 2>/dev/null) \
|
|
||||||
| (while read line; do
|
|
||||||
if [ "$(${pkgs.coreutils}/bin/cat ${lib.escapeShellArg makoInhibitStateFile})" = "1" ]; then
|
|
||||||
echo '{"alt": "active", "class": "active"}'
|
|
||||||
else
|
|
||||||
echo '{"alt": "inactive", "class": "inactive"}'
|
|
||||||
fi
|
|
||||||
done)
|
|
||||||
'';
|
|
||||||
return-type = "json";
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
active = "${lrm}ﮖ ";
|
|
||||||
inactive = "${lrm}ﮗ ";
|
|
||||||
};
|
|
||||||
tooltip = false;
|
|
||||||
on-click = pkgs.writeShellScript "toggle-notification-inhibit" ''
|
|
||||||
set -e
|
|
||||||
current_state="$(${pkgs.coreutils}/bin/cat ${lib.escapeShellArg makoInhibitStateFile})"
|
|
||||||
if [ "$current_state" = "0" ]; then
|
|
||||||
${pkgs.mako}/bin/makoctl set invisible=true
|
|
||||||
echo 1 > ${lib.escapeShellArg makoInhibitStateFile}
|
|
||||||
else
|
|
||||||
${pkgs.mako}/bin/makoctl set invisible=false
|
|
||||||
echo 0 > ${lib.escapeShellArg makoInhibitStateFile}
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
backlight = {
|
backlight = {
|
||||||
format = "{percent}% {icon}";
|
format = "{percent}% {icon}";
|
||||||
format-icons = [ " " " " " " " " " " " " " " ];
|
format-icons = [ " " " " " " " " " " " " " " ];
|
||||||
|
@ -574,11 +543,6 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
|
||||||
Install.WantedBy = [ "sway-session.target" ];
|
Install.WantedBy = [ "sway-session.target" ];
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStartPre = toString (pkgs.writeShellScript "reset-mako-inhibit-state" ''
|
|
||||||
set -e
|
|
||||||
${pkgs.coreutils}/bin/mkdir -p "$(${pkgs.coreutils}/bin/dirname ${lib.escapeShellArg makoInhibitStateFile})"
|
|
||||||
echo 0 > ${lib.escapeShellArg makoInhibitStateFile}
|
|
||||||
'');
|
|
||||||
ExecStart = "${pkgs.mako}/bin/mako";
|
ExecStart = "${pkgs.mako}/bin/mako";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue