From fbfb29c27fd8a83421816a0cdaaa2381cb750845 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Mon, 8 May 2023 16:14:42 +0200 Subject: [PATCH] Add wake-me-up script and wmu alias Runs a command and sends a notification if it takes longer than a second --- bin/wake-me-up | 7 +++++++ shell/alias | 1 + 2 files changed, 8 insertions(+) create mode 100755 bin/wake-me-up diff --git a/bin/wake-me-up b/bin/wake-me-up new file mode 100755 index 0000000..5bfc4ea --- /dev/null +++ b/bin/wake-me-up @@ -0,0 +1,7 @@ +#!/bin/sh + +start=$(date +%s) +$@ +if [ $(($(date +%s) - $start)) -gt 0 ] + then notify-send "Command finished:" "$*" +fi diff --git a/shell/alias b/shell/alias index 9bd3d5b..c7b38bb 100644 --- a/shell/alias +++ b/shell/alias @@ -19,6 +19,7 @@ alias sakura='oneko -bg "#ffddee" -sakura -name sakura' alias setclip='xclip -selection c' alias tmux='tmux -2' alias w='watch -t -d -n 1' +alias wmu='wake-me-up' # Funny alias please='sudo'