mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-10-27 19:20:43 +01:00
cool script
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ isNixOS, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.mako = {
|
services.mako = {
|
||||||
@@ -20,7 +20,11 @@
|
|||||||
border-color = "#89b4fa";
|
border-color = "#89b4fa";
|
||||||
progress-color = "over #313244";
|
progress-color = "over #313244";
|
||||||
output = "DP-1";
|
output = "DP-1";
|
||||||
on-notify = "exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga";
|
on-notify =
|
||||||
|
if isNixOS then
|
||||||
|
"exec ${pkgs.pulseaudio}/bin/paplay ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/dialog-information.oga"
|
||||||
|
else
|
||||||
|
"exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
@@ -31,7 +35,13 @@
|
|||||||
border-color=#FF6347
|
border-color=#FF6347
|
||||||
|
|
||||||
[urgency=critical]
|
[urgency=critical]
|
||||||
on-notify=exec paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga
|
on-notify =
|
||||||
|
${
|
||||||
|
if isNixOS then
|
||||||
|
"exec ${pkgs.pulseaudio}/bin/paplay ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/dialog-information.oga"
|
||||||
|
else
|
||||||
|
"exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga"
|
||||||
|
};
|
||||||
border-color=#FF0000
|
border-color=#FF0000
|
||||||
|
|
||||||
[mode=do-not-disturb]
|
[mode=do-not-disturb]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
isNixOS,
|
isNixOS,
|
||||||
lib,
|
lib,
|
||||||
userConfig,
|
userConfig,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -288,7 +289,17 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
bindl = [
|
bindl = [
|
||||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle && ~/.local/bin/check-if-muted.sh"
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle && ${pkgs.writeShellScript "check-muted" ''
|
||||||
|
MUTED=$(${
|
||||||
|
if isNixOS then "${pkgs.wireplumber}/bin/wpctl" else "/usr/bin/wpctl"
|
||||||
|
} get-volume @DEFAULT_AUDIO_SINK@ | ${pkgs.gnugrep}/bin/grep -iq muted; echo $?)
|
||||||
|
|
||||||
|
if [[ $MUTED -eq 0 ]]; then
|
||||||
|
${pkgs.libnotify}/bin/notify-send "Audio muted" -a 'wp-vol' -t 1000
|
||||||
|
else
|
||||||
|
${pkgs.libnotify}/bin/notify-send "Audio unmuted" -a 'wp-vol' -t 1000
|
||||||
|
fi
|
||||||
|
''}"
|
||||||
", XF86AudioNext, exec, playerctl next"
|
", XF86AudioNext, exec, playerctl next"
|
||||||
", Pause, exec, playerctl play-pause"
|
", Pause, exec, playerctl play-pause"
|
||||||
"$mainMod, Pause, exec, playerctl play-pause --player spotify"
|
"$mainMod, Pause, exec, playerctl play-pause --player spotify"
|
||||||
|
|||||||
Reference in New Issue
Block a user