diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 15:19:25 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 15:19:25 +0200 |
commit | 9b791ac8786eed2d242d0909dd2379f008952042 (patch) | |
tree | 403c08eb322e18d045606822911a7eb6036f0070 /bin/common/saf | |
parent | e614a330978ce7e7f6d130cc7d199150e16a409d (diff) | |
parent | 63c64f071ecd45cf66ab49d199a634cd8db27056 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/common/saf')
-rwxr-xr-x | bin/common/saf | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/common/saf b/bin/common/saf new file mode 100755 index 0000000..0c6fbc4 --- /dev/null +++ b/bin/common/saf @@ -0,0 +1,24 @@ +#!/bin/sh + +# Simple Ass Fetch by futxlii + +red="$(printf '\033[31m')" +green="$(printf '\033[32m')" +blue="$(printf '\033[34m')" +reset="$(printf '\033[0m')" + +for file in /etc/os-release /usr/lib/os-release +do + [ -f "$file" ] && . "$file" && break +done + +KERNEL="$(uname -r)" +UPTIME="$(uptime -p)"; UPTIME="${UPTIME##up }" +SHELL="$(basename "$SHELL")" + +cat <<EOF + ${red}- ${blue}${ID:-"unknown"} + ${red}- ${blue}$KERNEL + ${red}- ${blue}$UPTIME + ${red}- ${blue}$SHELL${reset} +EOF |