Look for ATTRIB events for notifications updates; remove "Pickup" menu
Picking up call can be done from both dunst notification & notifications menu; so for more consistency / less bugs the Pickup menu entry has been removed.
This commit is contained in:
parent
7559984430
commit
c5b665ca4f
5 changed files with 5 additions and 15 deletions
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
NOTIFDIR="$XDG_CONFIG_HOME"/sxmo/notifications
|
||||
|
||||
# Takes 4 args:
|
||||
# (1) the filepath of the notification to write (or random to generate a random id)
|
||||
# (2) action notification invokes upon selecting
|
||||
# (3) the file to watch for deactivation.
|
||||
# (4) description of notification
|
||||
NOTIFFILEPATHTOWRITE="$1"
|
||||
ACTION="$2"
|
||||
WATCHFILE="$3"
|
||||
NOTIFMSG="$4"
|
||||
|
||||
writenotification() {
|
||||
lsof | grep "$WATCHFILE" && exit 0 # Already viewing watchfile, nops
|
||||
mkdir -p "$NOTIFDIR"
|
||||
if [ "$NOTIFFILEPATHTOWRITE" = "random" ]; then
|
||||
NOTIFFILEPATHTOWRITE="$NOTIFDIR/$(tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 10)"
|
||||
fi
|
||||
touch "$NOTIFFILEPATHTOWRITE"
|
||||
printf %b "$ACTION\n$WATCHFILE\n$NOTIFMSG\n" > "$NOTIFFILEPATHTOWRITE"
|
||||
}
|
||||
|
||||
[ "$#" -lt 4 ] && echo "Need >=4 args to create a notification" && exit 1
|
||||
writenotification
|
Loading…
Add table
Add a link
Reference in a new issue