dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit aedb24b66f6f9adb40a4462d98a53d0433df1d43
parent 208a1d1916ed3f4d5961e607093a444c36f97e0d
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu, 15 Oct 2020 14:40:08 +0200

notify: move function from shell to script

Former-commit-id: 6f32f841160e8a35521c8161bbfcfdc295f03c88
Diffstat:
Ascripts/notify | 8++++++++
Mshell/functions | 7-------
2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/scripts/notify b/scripts/notify @@ -0,0 +1,8 @@ +#!/bin/sh +[ $# -ge 2 ] || { printf "Arguments: title, message\n" && exit 1; } +group=${3:-$TERM} +if type terminal-notifier 1> /dev/null 2>&1; then + terminal-notifier -title "$1" -message "$2" -activate com.googlecode.iterm2 -group "$group" +else + printf '\a' +fi diff --git a/shell/functions b/shell/functions @@ -9,13 +9,6 @@ vimq() { vim -q <(eval "$(fc -nl -1)"); } # loa gpip(){ PIP_REQUIRE_VIRTUALENV="" pip "$@"; } # Access global pip while using virtualenvs nls() { expr `ls -l | wc -l | xargs echo` - 1; } # Count the number of files in the directory reload-completions() { rm ~/.zcompdump && compinit; } -notify() { - if type terminal-notifier &> /dev/null; then - terminal-notifier -title "$1" -message "$2" -activate com.googlecode.iterm2 - else - echo '\a' - fi -} reload() { local START_TIME=$SECONDS if [[ $SHELL = *"zsh"* ]]; then