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,32 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
NOTIFDIR="$XDG_CONFIG_HOME"/sxmo/notifications
|
||||
|
||||
notificationmenu() {
|
||||
CHOICES="Close Menu"
|
||||
for NOTIFFILE in "$NOTIFDIR"/*; do
|
||||
NOTIFMSG="$(tail -n+3 "$NOTIFFILE" | tr "\n^" " ")"
|
||||
NOTIFHRANDMIN="$(stat --printf %y "$NOTIFFILE" | grep -oE '[0-9]{2}:[0-9]{2}')"
|
||||
CHOICES="
|
||||
$CHOICES
|
||||
$NOTIFHRANDMIN - $NOTIFMSG ^ $NOTIFFILE
|
||||
"
|
||||
done
|
||||
|
||||
PICKEDCONTENT="$(
|
||||
printf "%b" "$CHOICES" |
|
||||
xargs -0 echo |
|
||||
sed '/^[[:space:]]*$/d' |
|
||||
awk '{$1=$1};1' |
|
||||
cut -d^ -f1 |
|
||||
dmenu -c -i -fn "Terminus-18" -p "Notifs" -l 10
|
||||
)"
|
||||
|
||||
[ "$PICKEDCONTENT" = "Close Menu" ] && exit 1
|
||||
|
||||
PICKEDNOTIFFILE="$(echo "$CHOICES" | grep "$PICKEDCONTENT" | cut -d^ -f2 | tr -d ' ')"
|
||||
NOTIFACTION="$(head -n1 "$PICKEDNOTIFFILE")"
|
||||
eval "$NOTIFACTION" &
|
||||
rm "$PICKEDNOTIFFILE"
|
||||
}
|
||||
|
||||
notificationmenu
|
Loading…
Add table
Add a link
Reference in a new issue