diff --git a/home/config/mako/default.nix b/home/config/mako/default.nix index 7ce97702..f14016cc 100644 --- a/home/config/mako/default.nix +++ b/home/config/mako/default.nix @@ -1,6 +1,7 @@ { - pkgs, + __findFile, config, + pkgs, ... }: let alpha = config.module.style.opacity.hex; @@ -16,6 +17,7 @@ in { height = 120; icons = 0; margin = 32; + on-notify = "exec ${pkgs.pipewire}/bin/pw-cat -p ${}"; text-color = "#${config.module.style.color.bg.dark}"; width = 480; }; diff --git a/home/config/sway/module/Screenshot.nix b/home/config/sway/module/Screenshot.nix index 3825091b..0cd3fa99 100644 --- a/home/config/sway/module/Screenshot.nix +++ b/home/config/sway/module/Screenshot.nix @@ -1,4 +1,5 @@ { + __findFile, config, lib, pkgs, @@ -15,6 +16,8 @@ selection = "slurp -d -b ${color.bg.light}${opacity} -c ${color.fg.light} -w 0 -s 00000000"; in { text = let + notifyStart = "${pkgs.pipewire}/bin/pw-cat -p ${} &"; + notifyEnd = "${pkgs.pipewire}/bin/pw-cat -p ${} &"; picEdit = ''swappy -f - -o -''; picFull = ''-o $(swaymsg -t get_outputs | jq -r ".[] | select(.focused) | .name") -''; picPrepFile = prepFile "\${XDG_PICTURES_DIR[0]}" "png"; @@ -106,12 +109,14 @@ in { ${getSelection} ${getTransform} ${vidPrepFile} + ${notifyStart} ${updateWaybar} ${vidStart} ${vidSelected} + ${notifyEnd} + ${updateWaybar} ${vidMuxAudio} ${vidTransform} ${vidRefLatestFile} - ${updateWaybar} }; ''); @@ -119,26 +124,32 @@ in { ${vidStop} || { ${getTransform} ${vidPrepFile} + ${notifyStart} ${updateWaybar} ${vidStart} ${vidFull} + ${notifyEnd} + ${updateWaybar} ${vidMuxAudio} ${vidTransform} ${vidRefLatestFile} - ${updateWaybar} }; ''); FullscreenScreenshot = pkgs.writeShellScriptBin "FullscreenScreenshot" (util.trimTabs '' + ${notifyEnd} ${picPrepFile} - ${screenshot} ${picFull} | ${picToFile} | ${picToBuffer} && ${picRefLatestFile} + ${screenshot} ${picFull} | ${picToFile} | ${picToBuffer} || exit + ${picRefLatestFile} ''); SelectScreenshot = pkgs.writeShellScriptBin "SelectScreenshot" (util.trimTabs '' ${getSelection} + ${notifyEnd} ${picPrepFile} - ${screenshot} ${picSelected} | ${picEdit} | ${picToFile} | ${picToBuffer} && ${picRefLatestFile} + ${screenshot} ${picSelected} | ${picEdit} | ${picToFile} | ${picToBuffer} || exit + ${picRefLatestFile} ''); in '' bindsym --to-code $mod+y exec ${lib.getExe FullscreenScreenshot} diff --git a/static/Notification.ogg b/static/Notification.ogg new file mode 100644 index 00000000..b8ee1eb2 Binary files /dev/null and b/static/Notification.ogg differ diff --git a/static/Screenrec.ogg b/static/Screenrec.ogg new file mode 100644 index 00000000..031a1c8e Binary files /dev/null and b/static/Screenrec.ogg differ diff --git a/static/Screenshot.ogg b/static/Screenshot.ogg new file mode 100644 index 00000000..fb485036 Binary files /dev/null and b/static/Screenshot.ogg differ