diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/.local/bin/fetch | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/bin/.local/bin/fetch b/bin/.local/bin/fetch deleted file mode 100755 index 05cb71e..0000000 --- a/bin/.local/bin/fetch +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # ufetch-void - tiny system info for void | ||
4 | |||
5 | ## INFO | ||
6 | |||
7 | # user is already defined | ||
8 | host="$(hostname)" | ||
9 | os='Void Linux' | ||
10 | kernel="$(uname -sr)" | ||
11 | uptime="$(uptime -p | sed 's/up //')" | ||
12 | packages="$(xbps-query -l | wc -l)" | ||
13 | shell="$(basename "$SHELL")" | ||
14 | |||
15 | ## UI DETECTION | ||
16 | |||
17 | if [ -n "${DE}" ]; then | ||
18 | ui="${DE}" | ||
19 | uitype='DE' | ||
20 | elif [ -n "${WM}" ]; then | ||
21 | ui="${WM}" | ||
22 | uitype='WM' | ||
23 | elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then | ||
24 | ui="${XDG_CURRENT_DESKTOP}" | ||
25 | uitype='DE' | ||
26 | elif [ -n "${DESKTOP_SESSION}" ]; then | ||
27 | ui="${DESKTOP_SESSION}" | ||
28 | uitype='DE' | ||
29 | elif [ -f "${HOME}/.xinitrc" ]; then | ||
30 | ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" | ||
31 | uitype='WM' | ||
32 | elif [ -f "${HOME}/.xsession" ]; then | ||
33 | ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)" | ||
34 | uitype='WM' | ||
35 | else | ||
36 | ui='unknown' | ||
37 | uitype='UI' | ||
38 | fi | ||
39 | |||
40 | ## DEFINE COLORS | ||
41 | |||
42 | # probably don't change these | ||
43 | if [ -x "$(command -v tput)" ]; then | ||
44 | bold="$(tput bold)" | ||
45 | black="$(tput setaf 0)" | ||
46 | red="$(tput setaf 1)" | ||
47 | green="$(tput setaf 2)" | ||
48 | yellow="$(tput setaf 3)" | ||
49 | blue="$(tput setaf 4)" | ||
50 | magenta="$(tput setaf 5)" | ||
51 | cyan="$(tput setaf 6)" | ||
52 | white="$(tput setaf 7)" | ||
53 | reset="$(tput sgr0)" | ||
54 | fi | ||
55 | |||
56 | # you can change these | ||
57 | lc="${reset}${bold}${green}" # labels | ||
58 | nc="${reset}${bold}${green}" # user and hostname | ||
59 | ic="${reset}" # info | ||
60 | c0="${reset}${bold}${green}" # first color | ||
61 | c1="${reset}${green}" # second color | ||
62 | |||
63 | ## OUTPUT | ||
64 | |||
65 | cat <<EOF | ||
66 | |||
67 | ${c0} _______ ${nc}${USER}${ic}@${nc}${host}${reset} | ||
68 | ${c1} ${c0}\_____ \`- ${lc}OS: ${ic}${os}${reset} | ||
69 | ${c1} /\ ${c0}___ \`- \ ${lc}KERNEL: ${ic}${kernel}${reset} | ||
70 | ${c1} | | ${c0}/ \ | | ${lc}UPTIME: ${ic}${uptime}${reset} | ||
71 | ${c1} | | ${c0}\___/ | | ${lc}PACKAGES: ${ic}${packages}${reset} | ||
72 | ${c1} \ \`-_____ ${c0}\/ ${lc}SHELL: ${ic}${shell}${reset} | ||
73 | ${c1} \`-______\ ${lc}${uitype}: ${ic}${ui}${reset} | ||
74 | |||
75 | EOF | ||
76 | |||