mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: package much-secripts and dns-sledgehammer
This commit is contained in:
@@ -124,6 +124,8 @@
|
||||
scripts.interdimensional-cable
|
||||
scripts.dmenubluetooth
|
||||
scripts.manual-sort
|
||||
scripts.much-scripts
|
||||
scripts.dns-sledgehammer
|
||||
ts
|
||||
scripts.vg
|
||||
scripts.fkill
|
||||
|
||||
@@ -21,6 +21,26 @@ in rec {
|
||||
name = "instaget";
|
||||
};
|
||||
|
||||
dns-sledgehammer = pkgs.writers.writeDashBin "dns-sledgehammer" ''
|
||||
${pkgs.coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf
|
||||
'';
|
||||
|
||||
much-scripts = pkgs.symlinkJoin {
|
||||
name = "much-scripts";
|
||||
paths = [
|
||||
(wrapScript {
|
||||
packages = [ pkgs.notmuch pkgs.msmtp pkgs.jq ];
|
||||
name = "mail-send";
|
||||
script = ./mail-send.sh;
|
||||
})
|
||||
(wrapScript {
|
||||
name = "mail-kill";
|
||||
script = ./mail-kill.sh;
|
||||
packages = [ pkgs.notmuch ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
showkeys-toggle = pkgs.writers.writeDashBin "showkeys-toggle" ''
|
||||
if ${pkgs.procps}/bin/pgrep screenkey; then
|
||||
exec ${pkgs.procps}/bin/pkill screenkey
|
||||
|
||||
20
packages/scripts/mail-kill.sh
Normal file
20
packages/scripts/mail-kill.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#! /bin/sh
|
||||
set -efu
|
||||
|
||||
if ! notmuch search --exclude=false tag:deleted | tac | grep .; then
|
||||
echo 'No killed mail.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf 'want do rm these mail? [y/N] '
|
||||
read REPLY
|
||||
case "$REPLY" in
|
||||
y|Y) :;; # continue
|
||||
*)
|
||||
echo 'abort.'
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
notmuch search --output=files --exclude=false tag:deleted | xargs -l rm -v
|
||||
notmuch new
|
||||
Reference in New Issue
Block a user