-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmotd
executable file
·28 lines (23 loc) · 845 Bytes
/
motd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
source ~/.local/bin/colors
DISTRO=`cat /etc/lsb-release | grep DISTRIB_ID | head -n 1 | cut -d = -f 2 | sed 's/\"//g'`
KERNEL_NAME=`uname -s`
KERNEL_RELEASE=`uname -r`
PKGNUM=`ls -d /var/db/pkg/*/* | wc -l`
UPTIME=`uptime -p | sed 's/up //'`
if [ -n "$DISPLAY" ]; then
WMNAME=`xprop -root _NET_WM_NAME | cut -d \" -f 2`
else
WMNAME="console"
fi
cat << EOF
${c01} .--.---.
${c01} ( \\'--'/ ) ${c07}$USER @ $HOSTNAME
${c01} ( '..-...' ) ${c12}distro ${c05}$DISTRO $KERNEL_NAME
${c01} '.'-._.'.' ${c12}uptime ${c05}$UPTIME
${c06} <'-.,.-> ${c12}kernel ${c05}$KERNEL_RELEASE
${c06} \`\\( ${c12}packages ${c05}$PKGNUM
${c06} < \\ /\\ ${c12}shell ${c05}$SHELL
${c06} __ \\|/ ${c12}wm ${c05}$WMNAME
${c06} \\${c07}
EOF