Commit | Line | Data |
---|---|---|
6db09847 SK |
1 | #! /bin/bash |
2 | ||
3 | set -e | |
4 | ||
1bce1dbc SK |
5 | DIR="$HOME/var/log/dmesg" |
6 | FILE="$DIR/warning.log" | |
7 | ||
8 | mkdir -p "$DIR" | |
6db09847 | 9 | sleep 3 # wait for dunst to hopefully restart |
1bce1dbc SK |
10 | sudo dmesg --follow --level=warn --since=now --ctime \ |
11 | | while read -r line | |
6db09847 SK |
12 | do |
13 | notify-send -u low 'dmesg warning' "$line" | |
1bce1dbc | 14 | echo "$line" >> "$FILE" |
6db09847 | 15 | done |