mirror of
https://github.com/EnumeratedDev/stormfetch.git
synced 2026-09-15 23:46:12 +00:00
DISPLAY_PROTOCOL Variable and separate monitor resolutions (On X11)
Added a DISPLAY_PROTOCOL variable Resolution information has been converted to a Golang function and now lists different monitors separately
This commit is contained in:
+11
-16
@@ -5,20 +5,15 @@ echo -e "${C3}Hostname: ${C4}$(cat /etc/hostname)"
|
||||
echo -e "${C3}Kernel: ${C4}$(uname -s) $(uname -r)"
|
||||
echo -e "${C3}Packages: ${C4}$(get_packages)"
|
||||
echo -e "${C3}Shell: ${C4}${USER_SHELL}"
|
||||
if [ ! -z "$CPU_MODEL" ]; then
|
||||
echo -e "${C3}CPU: ${C4}${CPU_MODEL} (${CPU_THREADS} threads)"
|
||||
fi
|
||||
if [ ! -z "$GPU_MODEL" ]; then
|
||||
echo -e "${C3}GPU: ${C4}${GPU_MODEL}"
|
||||
fi
|
||||
if [ ! -z "$MEM_TOTAL" ] && [ ! -z "$MEM_USED" ]; then
|
||||
echo -e "${C3}Memory: ${C4}${MEM_USED} MiB / ${MEM_TOTAL} MiB"
|
||||
fi
|
||||
if xhost >& /dev/null ; then
|
||||
if [ ! -z "$DE_WM" ]; then
|
||||
echo -e "${C3}DE/WM: ${C4}${DE_WM}"
|
||||
fi
|
||||
if command_exists xdpyinfo ; then
|
||||
echo -e "${C3}Screen Resolution: ${C4}$(get_screen_resolution)"
|
||||
fi
|
||||
if [ ! -z "$CPU_MODEL" ]; then echo -e "${C3}CPU: ${C4}${CPU_MODEL} (${CPU_THREADS} threads)"; fi
|
||||
if [ ! -z "$GPU_MODEL" ]; then echo -e "${C3}GPU: ${C4}${GPU_MODEL}"; fi
|
||||
if [ ! -z "$MEM_TOTAL" ] && [ ! -z "$MEM_USED" ]; then echo -e "${C3}Memory: ${C4}${MEM_USED} MiB / ${MEM_TOTAL} MiB"; fi
|
||||
if [ ! -z "$DISPLAY_PROTOCOL" ]; then
|
||||
echo -e "${C3}Display Protocol: ${C4}${DISPLAY_PROTOCOL}"
|
||||
for i in $(seq ${CONNECTED_MONITORS}); do
|
||||
monitor="MONITOR$i"
|
||||
echo -e "${C3}Screen $i: ${C4}${!monitor}"
|
||||
done
|
||||
fi
|
||||
if [ ! -z "$DE_WM" ]; then echo -e "${C3}DE/WM: ${C4}${DE_WM}"; fi
|
||||
|
||||
|
||||
@@ -9,12 +9,6 @@ command_exists() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_screen_resolution() {
|
||||
if xhost >& /dev/null && command_exists xdpyinfo; then
|
||||
xdpyinfo | grep dimensions | tr -s ' ' | cut -d " " -f3
|
||||
fi
|
||||
}
|
||||
|
||||
get_packages() {
|
||||
ARRAY=()
|
||||
if command_exists dpkg; then
|
||||
|
||||
Reference in New Issue
Block a user