mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 15:14:58 +08:00
Former-commit-id: 67b11d1981
Former-commit-id: dc97e48128477f0c5c3ad9d79cfc9dcebebc597e
Former-commit-id: f90e0fc6a0402204d95c93b14ed8ce4bb3498bfd
Former-commit-id: b184e1b44758e9bff8b3dd460fc97159626a97b0
52 lines
900 B
Bash
Executable file
52 lines
900 B
Bash
Executable file
#!/bin/bash
|
|
# Tiny colored fetch script
|
|
# Requires Typicons Font to display the icons
|
|
# elenapan @ github
|
|
|
|
f=3 b=4
|
|
for j in f b; do
|
|
for i in {0..7}; do
|
|
printf -v $j$i %b "\e[${!j}${i}m"
|
|
done
|
|
done
|
|
d=$'\e[1m'
|
|
t=$'\e[0m'
|
|
v=$'\e[7m'
|
|
|
|
# Items
|
|
sep=
|
|
s=$d$f0$sep$t
|
|
|
|
w=
|
|
wifiname="$(iwgetid | cut -d \" -f2)"
|
|
|
|
h=
|
|
wmname="$(xprop -id $(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t | grep "WM_NAME" | cut -f2 -d \")"
|
|
|
|
k=
|
|
kernel="$(uname -r | cut -d '-' -f1)"
|
|
|
|
r=
|
|
resolution="$(xwininfo -root | grep geometry | awk '{print $2}' | cut -d + -f1)"
|
|
|
|
sh=
|
|
shell=$(basename $SHELL)
|
|
|
|
# (\ /)
|
|
# ( · ·)
|
|
# c(")(")
|
|
|
|
# (\ /)
|
|
# ( . .)
|
|
# c(")(")
|
|
|
|
tput clear
|
|
cat << EOF
|
|
|
|
$d$f1$h $t$wmname
|
|
(\ /) $f3$k $t$kernel
|
|
( $d. .$t) $f2$sh $t$shell
|
|
c($f1"$t)($f1"$t) $f5$r $t$resolution
|
|
$f4$w $t$wifiname
|
|
|
|
EOF
|