Skip to content

Commit

Permalink
feat: Upgrade nvim config
Browse files Browse the repository at this point in the history
Signed-off-by: Arturo Volpe <[email protected]>
  • Loading branch information
aVolpe committed Jun 27, 2020
1 parent f0afed2 commit 27f9971
Show file tree
Hide file tree
Showing 5 changed files with 317 additions and 288 deletions.
2 changes: 2 additions & 0 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ set -g @tpm_plugins ' \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-pain-control \
Morantron/tmux-fingers \
tmux-plugins/tmux-urlview \
tmux-plugins/tmux-yank \
'
# Other examples:
# github_username/plugin_name \
Expand Down
61 changes: 61 additions & 0 deletions matterhon_notification.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash

# Sample shell script for using notify-send with matterhorn This script
# works on Linux only. It depends on the 'notify-send' command.

# Positional parameters passed to this script by Matterhorn:
mentioned="${1?}"
sender="${2?}"
message="${3?}"

# Script options

# notify_URGENCIES
#
# The first word is the urgency for items where you are not mentioned.
# The second word is the urgency for items where you are mentioned.
# Use "none" to not be notified; otherwise use "low", "normal", or
# "critical".
notify_URGENCIES="normal normal"

# The desktop notification category
notify_CATEGORY="im.received"

# Notification header
notify_HEAD="$sender"

# Notification body
notify_BODY="$message"

getUrgencyHelper() {
if [ "$mentioned" == "1" ]
then
echo "$1"
else
if [ "$mentioned" == "2" ]
then
echo "$2"
else
echo "Error: mentioned value '$mentioned' unexpected" > /dev/stderr
exit 1
fi
fi
}

getUrgency() {
# We are using arguments as a poor man's bash array for portability
# shellcheck disable=SC2086
getUrgencyHelper $notify_URGENCIES
}

urgency=$(getUrgency)

printf -v NOW '%(%Y-%m-%d %H:%M:%S)T' -1

echo "$NOW: $@" >> ~/.matterhon_notifications

if [ ! -z "$urgency" ]
then
test "$urgency" = "none" ||
terminal-notifier -subtitle "$notify_HEAD:" -title "Matterhorn" -message "$notify_BODY"
fi
Loading

0 comments on commit 27f9971

Please sign in to comment.