Skip to content

Commit

Permalink
suspend further notifactions for a given kernel once seen
Browse files Browse the repository at this point in the history
  • Loading branch information
bkw777 committed May 19, 2020
1 parent 14db4d2 commit b339fe3
Show file tree
Hide file tree
Showing 20 changed files with 817 additions and 724 deletions.
6 changes: 4 additions & 2 deletions lib/notify-action-debug.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
printf -v DT "%(%Y%m%d%H%M%S)T_${RANDOM}" -1
LF=/tmp/.mainline_notify_action_${DT}.log
set > ${LF}
mainline-gtk --debug 2>&1 >> ${LF}
echo ${DT} > ${LF}
printf "%s %s\n" "${0}" "${@}" >> ${LF}
set >> ${LF}
${@} 2>&1 >> ${LF}
7 changes: 3 additions & 4 deletions lib/notify_send/notify-send.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ notify() {
maybe_run_action_handler
}

notify_close () {
notify_close() {
gdbus call "${NOTIFY_ARGS[@]}" --method org.freedesktop.Notifications.CloseNotification "$1" >/dev/null
}

Expand Down Expand Up @@ -285,13 +285,12 @@ while (( $# > 0 )) ; do
;;
-R|--replace-file|--replace-file=*)
[[ "$1" = --replace-file=* ]] && filename="${1#*=}" || { shift; filename="$1"; }
if [[ -s "$filename" ]]; then
REPLACE_ID="$(< $filename)"
fi
[[ -s "$filename" ]] && read REPLACE_ID < $filename
STORE_ID="$filename"
;;
-s|--close|--close=*)
[[ "$1" = --close=* ]] && close_id="${1#*=}" || { shift; close_id="$1"; }
case "$close_id" in ""|R|replace-file) [[ "${REPLACE_ID}" ]] && close_id=${REPLACE_ID} ;; esac
notify_close "$close_id"
exit $?
;;
Expand Down
Loading

0 comments on commit b339fe3

Please sign in to comment.