Added new distro Astra Linux
* Added support Fly DE * Improvment detected host model HP ProDesk 490 G3 MT Business PC - bette than - HP 805F ASUSTeK COMPUTER INC. X201EP - better than X201EP
This commit is contained in:
parent
ccd5d9f526
commit
088e0d484b
1 changed files with 105 additions and 4 deletions
105
neofetch
105
neofetch
|
@ -28,7 +28,7 @@
|
|||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
version=7.1.0
|
||||
version=7.1.1
|
||||
|
||||
# Fallback to a value of '5' for shells which support bash
|
||||
# but do not set the 'BASH_' shell variables (osh).
|
||||
|
@ -999,6 +999,20 @@ get_distro() {
|
|||
*) distro="OS Elbrus $(< /etc/mcst_version)"
|
||||
esac
|
||||
|
||||
elif [[ -f /etc/astra_version ]]; then
|
||||
distro="Astra Linux"
|
||||
distro_version="$(cat /etc/astra_version \
|
||||
| sed -nr 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')"
|
||||
if [[ $distro_version == "2.12"* ]]; then
|
||||
distro_codename="ALCE"
|
||||
else
|
||||
distro_codename="ALSE"
|
||||
fi
|
||||
case $distro_shorthand in
|
||||
on|tiny) distro=${distro} ;;
|
||||
*) distro="${distro} ${distro_version} ${distro_codename}"
|
||||
esac
|
||||
|
||||
elif type -p pveversion >/dev/null; then
|
||||
case $distro_shorthand in
|
||||
on|tiny) distro="Proxmox VE" ;;
|
||||
|
@ -1238,6 +1252,16 @@ get_model() {
|
|||
if [[ -d /system/app/ && -d /system/priv-app ]]; then
|
||||
model="$(getprop ro.product.brand) $(getprop ro.product.model)"
|
||||
|
||||
elif [[ -f /sys/devices/virtual/dmi/id/product_name &&
|
||||
-f /sys/devices/virtual/dmi/id/board_vendor ]]; then
|
||||
product_name=$(< /sys/devices/virtual/dmi/id/product_name)
|
||||
board_vendor=$(< /sys/devices/virtual/dmi/id/board_vendor)
|
||||
if [[ $product_name == *"$board_vendor"* ]]; then
|
||||
model=$product_name
|
||||
else
|
||||
model="$board_vendor $product_name"
|
||||
fi
|
||||
|
||||
elif [[ -f /sys/devices/virtual/dmi/id/board_vendor ||
|
||||
-f /sys/devices/virtual/dmi/id/board_name ]]; then
|
||||
model=$(< /sys/devices/virtual/dmi/id/board_vendor)
|
||||
|
@ -1811,6 +1835,10 @@ get_de() {
|
|||
if [[ $DESKTOP_SESSION == *regolith ]]; then
|
||||
de=Regolith
|
||||
|
||||
# Added support Fly for Astra Linux
|
||||
elif [[ $DESKTOP_SESSION == fly ]]; then
|
||||
de=Fly
|
||||
|
||||
elif [[ $XDG_CURRENT_DESKTOP ]]; then
|
||||
de=${XDG_CURRENT_DESKTOP/X\-}
|
||||
de=${de/Budgie:GNOME/Budgie}
|
||||
|
@ -2181,6 +2209,16 @@ get_wm_theme() {
|
|||
wm_theme=${wm_theme##*\\}
|
||||
wm_theme=${wm_theme%.*}
|
||||
;;
|
||||
|
||||
fly-wm)
|
||||
fly_config_file
|
||||
if grep -q 'DecorTheme' "${fly_config_file}" 2>/dev/null; then
|
||||
wm_theme=$(awk -F'=' '/^DecorTheme/{print $2}' "${fly_config_file}")
|
||||
fi
|
||||
if [ -z "$wm_theme" ] || [ "$wm_theme" = "Not Found" ]; then
|
||||
wm_theme=Default
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
wm_theme=$(trim_quotes "$wm_theme")
|
||||
|
@ -3179,6 +3217,28 @@ get_style() {
|
|||
type -p xfconf-query >/dev/null && \
|
||||
gtk2_theme="$(xfconf-query -c xsettings -p "$xfconf")"
|
||||
;;
|
||||
"Fly")
|
||||
fly_config_file
|
||||
if [[ $fly == "ColorScheme" ]]; then
|
||||
fly_theme=$(
|
||||
basename $(
|
||||
awk -F '=' '/^'"${fly}"'/{print $2}' "${HOME}/.fly/paletterc"
|
||||
)
|
||||
)
|
||||
if [[ $wm_theme == "Default" && $fly_theme != *"FlyDefault"* ]]; then
|
||||
fly_theme=$(awk -F '=' '/^'"${fly}"'/{print $2}'\
|
||||
"${HOME}/.config/fly-admin-themerc")
|
||||
fi
|
||||
elif [[ $fly == "IconTheme" ]]; then
|
||||
fly_theme=$(awk -F '=' '/^'"${fly}"'/{print $2}' "${fly_config_file}")
|
||||
elif [[ $fly == "DefaultFont" ]]; then
|
||||
fly_theme=$(awk -F'=' '/^'"${fly}"'/\
|
||||
{gsub(/"/, "", $2); \
|
||||
sub(/-.*/, "", $2); \
|
||||
print $2}' "${fly_config_file}")
|
||||
fi
|
||||
fly_theme+=" [$de], "
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check for general GTK2 Theme.
|
||||
|
@ -3245,7 +3305,7 @@ get_style() {
|
|||
fi
|
||||
|
||||
# Final string.
|
||||
theme="${kde_theme}${gtk2_theme}${gtk3_theme}"
|
||||
theme="${fly_theme}${kde_theme}${gtk2_theme}${gtk3_theme}"
|
||||
theme="${theme%, }"
|
||||
|
||||
# Make the output shorter by removing "[GTKX]" from the string.
|
||||
|
@ -3254,6 +3314,7 @@ get_style() {
|
|||
theme="${theme/ '[GTK2/3]'}"
|
||||
theme="${theme/ '[KDE]'}"
|
||||
theme="${theme/ '[Plasma]'}"
|
||||
theme="${theme/ '[Fly]'}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -3264,6 +3325,7 @@ get_theme() {
|
|||
gconf="gtk_theme"
|
||||
xfconf="/Net/ThemeName"
|
||||
kde="Name"
|
||||
fly="ColorScheme"
|
||||
|
||||
get_style
|
||||
}
|
||||
|
@ -3274,6 +3336,7 @@ get_icons() {
|
|||
gconf="icon_theme"
|
||||
xfconf="/Net/IconThemeName"
|
||||
kde="Theme"
|
||||
fly="IconTheme"
|
||||
|
||||
get_style
|
||||
icons="$theme"
|
||||
|
@ -3285,6 +3348,7 @@ get_font() {
|
|||
gconf="font_theme"
|
||||
xfconf="/Gtk/FontName"
|
||||
kde="font"
|
||||
fly="DefaultFont"
|
||||
|
||||
get_style
|
||||
font="$theme"
|
||||
|
@ -4854,6 +4918,11 @@ kde_config_dir() {
|
|||
kde_config_dir="${kde_config_dir/$'/:'*}"
|
||||
}
|
||||
|
||||
fly_config_file() {
|
||||
# Return main path the fly config file
|
||||
fly_config_file=${HOME}/.fly/theme/current.themerc
|
||||
}
|
||||
|
||||
term_padding() {
|
||||
# Get terminal padding to properly align cursor.
|
||||
[[ -z "$term" ]] && get_term
|
||||
|
@ -10237,6 +10306,38 @@ RO ROSA ROS ROSAROSAR ROSARO RO
|
|||
EOF
|
||||
;;
|
||||
|
||||
"Astra Linux"*)
|
||||
if [[ $ascii_distro == *"ALCE"* ]]; then
|
||||
set_colors 160 231
|
||||
else
|
||||
set_colors 32 231
|
||||
fi
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1} AA
|
||||
${c1} AaaA
|
||||
${c1} Aa${c2}/\\${c1}aA
|
||||
${c1} Aa${c2}/${c1}aa${c2}\\${c1}aA
|
||||
${c1} Aa${c2}/${c1}aAAa${c2}\\${c1}aA
|
||||
${c1} aA${c2}/${c1}aaAAaa${c2}\\${c1}Aa
|
||||
${c1} aA${c2}/${c1}aaAAAAaa${c2}\\${c1}Aa
|
||||
${c1} aaaaaaAAAAa${c2}/${c1}aaAAAAAAaa${c2}\\${c1}aAAAAaaaaa
|
||||
${c1} aAAa${c2}-----${c1}aaaaaAAAAAAAAAAaaaaa${c2}-----${c1}aAAa
|
||||
${c1} aAA${c2}\ ${c1}aAAAAAAAAAAAAAAAAAAAAAAa${c2} /${c1}AAa
|
||||
${c1} aAa${c2}\\${c1}aAAA${c2}\\${c1}AAAA${c2}\\${c1}AAAA${c2}\\${c1}AAA${c2}\\${c1}AAa${c2}/${c1}aAa
|
||||
${c1} aAa${c2}\\${c1}aA${c2}\\\\${c1}AAA${c2}\\\\${c1}AAA${c2}\\\\${c1}AA${c2}\\\\/${c1}aAa
|
||||
${c1} aAA${c2}\\${c1}aA${c2}\\\\${c1}AAA${c2}\\\\${c1}AAA${c2}\\\\${c1}Aa${c2}/${c1}AAa
|
||||
${c1} aA${c2}\\${c1}aA${c2}\\\\${c1}AAA${c2}\\\\${c1}AAA${c2}\\\\/${c1}Aa
|
||||
${c1} aA${c2}/${c1}AA${c2}\\\\\\${c1}AA${c2}\\\\\\${c1}AA${c2}\\\\\\${c1}Aa
|
||||
${c1} aA${c2}/\\${c1}AAa${c2}\\\\\\${c1}Aa${c2}\\\\\\${c1}Aa${c2}\\\\\\${c1}Aa
|
||||
${c1} aA${c2}/\\\\${c1}AAa${c2}\\\\/\\${c1}a${c2}\\\\\\${c1}Aa${c2}\\\\${c1}Aa
|
||||
${c1} aA${c2}/${c1}a${c2}\\\\\\${c1}Aa${c2}\\/${c1}AA${c2}\\\\\\\\\\${c1}Aa${c2}\\\\${c1}Aa
|
||||
${c1} aA${c2}/${c1}aA${c2}\\\\/${c1}aAa aAa${c2}\\\\\\${c1}Aa${c2}\\${c1}Aa
|
||||
${c1} aA${c2}/\\${c1}A${c2}\\/${c1}Aa aA${c2}\\\\${c1}A${c2}\\\\${c1}Aa
|
||||
${c1} A${c2}|/${c1}aaAa aAaa${c2}\\|${c1}A
|
||||
${c1} aAaa aaAa
|
||||
EOF
|
||||
;;
|
||||
|
||||
"sabotage"*)
|
||||
set_colors 4 7 1
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
|
|
Loading…
Reference in a new issue