Dotfiles config update (2022-04-15)

This commit is contained in:
q3aql 2022-04-15 15:12:04 +02:00
parent b74873d0e2
commit 1d07d918f1

View File

@ -39,6 +39,9 @@ end
set shell (fish --version | cut -d " " -f 3) set shell (fish --version | cut -d " " -f 3)
if test -f /usr/bin/xrandr if test -f /usr/bin/xrandr
set resolution (xrandr 2> /dev/null | grep "*" | head -1 | tr -s " " | cut -d " " -f 2) set resolution (xrandr 2> /dev/null | grep "*" | head -1 | tr -s " " | cut -d " " -f 2)
if test -n "$resolution"
set resolution "No display"
end
else else
set resolution "No display" set resolution "No display"
end end
@ -53,7 +56,6 @@ else if test -f /usr/bin/lscpu
else else
set cpu_model "Unknown" set cpu_model "Unknown"
end end
if test -f /proc/meminfo if test -f /proc/meminfo
set mem_total_kb (cat /proc/meminfo | grep -i "memtotal" | tr -s " " | cut -d ":" -f 2) set mem_total_kb (cat /proc/meminfo | grep -i "memtotal" | tr -s " " | cut -d ":" -f 2)
set mem_total_kb_num (echo $mem_total_kb | tr -s " " | cut -d " " -f 2) set mem_total_kb_num (echo $mem_total_kb | tr -s " " | cut -d " " -f 2)
@ -65,10 +67,13 @@ else if test -f /usr/bin/lsmem
else else
set mem_total "Unknown" set mem_total "Unknown"
end end
set arch_system (uname -m) set arch_system (uname -m)
set hostname_host $hostname set hostname_host $hostname
if test -n "$XDG_SESSION_TYPE"
set session_type "tty"
else
set session_type {$XDG_SESSION_TYPE} set session_type {$XDG_SESSION_TYPE}
end
#echo "" #echo ""
#echo "" #echo ""