dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit faa5072a2039f0964decebd4fdaa70fec0de50fe
parent f290e3e486c2e10622f2542495cd85c556d6c134
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 15 Jan 2020 13:48:34 +0100

Add notify-send wrapper that allows reading from stdin

Diffstat:
A.local/bin/notify | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/.local/bin/notify b/.local/bin/notify @@ -0,0 +1,12 @@ +#!/bin/sh + +if ! command -v notify-send >/dev/null 2>&1; then + echo >&2 'error: notify-send not installed' + exit 1 +fi + +if [ $# -eq 0 ]; then + notify-send "$(cat)" +else + notify-send "$@" +fi