Skip to content

Instantly share code, notes, and snippets.

@elig0n
Created April 18, 2020 20:16
Show Gist options
  • Save elig0n/d4ed3fc22375d40d2657d4ccbfd002a8 to your computer and use it in GitHub Desktop.
Save elig0n/d4ed3fc22375d40d2657d4ccbfd002a8 to your computer and use it in GitHub Desktop.
bunnyfetch.sh
#!/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&> /dev/null | grep "WM_NAME" | cut -f2 -d \" )"
[[ -z $wmname ]] && wmname="$(xprop -root | awk -F$'"' '/^_NET_WM_NAME/{print $2}' )"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment