diff options
| -rwxr-xr-x | screenshot.sh | 5 | ||||
| -rwxr-xr-x | since.sh | 8 | ||||
| -rwxr-xr-x | sys.sh | 30 |
3 files changed, 43 insertions, 0 deletions
diff --git a/screenshot.sh b/screenshot.sh new file mode 100755 index 0000000..e0019d1 --- /dev/null +++ b/screenshot.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +DIR=/tmp/screenshot + +mkdir -p $DIR && gnome-screenshot --area --file $DIR/$(date +"%Y-%m-%d.%H:%M:%S.png") diff --git a/since.sh b/since.sh new file mode 100755 index 0000000..40d4ca5 --- /dev/null +++ b/since.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +CUR=$(journalctl -qS today | awk 'NR == 1 { print $3 " "; end }') +DIFF=$(($(date +%s) - $(date --date $CUR +%s))) +UPTIME=$(date -u --date @$DIFF "+%H:%M:%S") + +echo "<txt>$CUR</txt>" +echo "<tool>$UPTIME</tool>" @@ -0,0 +1,30 @@ +#!/bin/bash + +INSTALLED=$(cat /usr/lib/modules/extramodules-ARCH/version) +CURRENT=$(uname -r) + +KERNEL=$(echo $CURRENT | cut -d- -f1) +UPDATES=$(checkupdates) + +NUPDATES=0 +STATUS= + +if test -n "$UPDATES"; then + NUPDATES=$(wc -l <<<$UPDATES) +fi + +if grep -q "^linux " <<<$UPDATES; then + STATUS="$STATUS(+)" +fi + +if test "$CURRENT" != "$INSTALLED"; then + STATUS="$STATUS(-)" +fi + +echo "<txt>sys: ${KERNEL}${STATUS}, upd: ${NUPDATES}</txt>" + +if test -z "$UPDATES"; then + echo "<tool>no updates</tool>" +else + echo "<tool>$UPDATES</tool>" +fi |
