summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/fetch76
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
8host="$(hostname)"
9os='Void Linux'
10kernel="$(uname -sr)"
11uptime="$(uptime -p | sed 's/up //')"
12packages="$(xbps-query -l | wc -l)"
13shell="$(basename "$SHELL")"
14
15## UI DETECTION
16
17if [ -n "${DE}" ]; then
18 ui="${DE}"
19 uitype='DE'
20elif [ -n "${WM}" ]; then
21 ui="${WM}"
22 uitype='WM'
23elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then
24 ui="${XDG_CURRENT_DESKTOP}"
25 uitype='DE'
26elif [ -n "${DESKTOP_SESSION}" ]; then
27 ui="${DESKTOP_SESSION}"
28 uitype='DE'
29elif [ -f "${HOME}/.xinitrc" ]; then
30 ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
31 uitype='WM'
32elif [ -f "${HOME}/.xsession" ]; then
33 ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)"
34 uitype='WM'
35else
36 ui='unknown'
37 uitype='UI'
38fi
39
40## DEFINE COLORS
41
42# probably don't change these
43if [ -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)"
54fi
55
56# you can change these
57lc="${reset}${bold}${green}" # labels
58nc="${reset}${bold}${green}" # user and hostname
59ic="${reset}" # info
60c0="${reset}${bold}${green}" # first color
61c1="${reset}${green}" # second color
62
63## OUTPUT
64
65cat <<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
75EOF
76