blob: 0dcd77fb71f75e38169cd0f3fe5a734c83298f12 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/sh
# Obtain an id from ~/.config/dunst/dunstifyIDs by grepping a word.
# Use with dunstify for autoreplacing notifications by string identifier.
configFile="$HOME/.config/dunst/dunstifyIDs"
[ ! -f "$configFile" ] && dunstify "'$configFile' missing!" && exit 1
id="$(grep "$1" <"$configFile" | awk '{print $2}')"
[ -z "$id" ] && dunstify "'$1' ID not set in '$configFile'" && exit 1
echo "$id"
|