From: Matthew Owens Date: Wed, 29 Jul 2020 18:08:02 +0000 (+0100) Subject: new scripts X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=03e0dc4abcb9aed05f6c6273be8891ba391d33eb;p=scripts.git new scripts --- diff --git a/dorf b/dorf new file mode 100755 index 0000000..1508904 --- /dev/null +++ b/dorf @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$EUID" -ne 0 ]; then + echo "$0 wasn't run as root, dwarftherapist won't be run" +else + sysctl -w kernel.yama.ptrace_scope=0 + sudo -u mokou dwarftherapist + sysctl -w kernel.yama.ptrace_scope=1 +fi diff --git a/mailcount b/mailcount new file mode 100755 index 0000000..3f122b5 --- /dev/null +++ b/mailcount @@ -0,0 +1,5 @@ +#!/bin/sh + +count=$(ls ~/.local/share/mail/matthew/INBOX/new | wc -l) + +[ $count -ne 0 ] && echo "$count" diff --git a/numupdates b/numupdates new file mode 100755 index 0000000..7c91851 --- /dev/null +++ b/numupdates @@ -0,0 +1,4 @@ +#!/bin/bash + +n=$((checkupdates && checkupdates-aur) | wc -l) +[ $n -eq 0 ] || echo $n