Scripts version 2242

This commit is contained in:
Mikhail Tergoev
2024-01-11 22:52:31 +03:00
parent 5295899293
commit b2690ffec1
5 changed files with 28 additions and 18 deletions

View File

@ -494,7 +494,7 @@ gui_vkBasalt () {
}
gui_MangoHud() {
gui_MangoHud () {
KEY_MH_GUI=$RANDOM
LIST_MH=(
arch battery battery_icon battery_time battery_watt core_bars core_load
@ -567,32 +567,30 @@ gui_MangoHud() {
YAD_MH_SET=$(<"${PORT_WINE_TMP_PATH}/tmp_yad_mh_set")
FPS_LIMIT=$(<"${PORT_WINE_TMP_PATH}/tmp_yad_mh_fps_limit")
if command -v xrand 2>/dev/null; then
if command -v xrand 2>/dev/null ; then
MONITOR_HEIGHT=$(xrandr | grep -oP 'current\s+\K[0-9]+ x [0-9]+' | awk '{print $3}')
MH_FONT_SIZE="font_size=$(expr $MONITOR_HEIGHT / 45)"
fi
INT_COUNT_FX=0
for read_list_mh in ${YAD_MH_SET}; do
if [[ "$read_list_mh" == "TRUE" ]]; then
export GUI_MH_RESULT+="${LIST_MH[$INT_COUNT_FX]},"
export INT_COUNT_FX=0
for read_list_mh in ${YAD_MH_SET} ; do
if [[ "$read_list_mh" == "TRUE" ]]
then export GUI_MH_RESULT+="${LIST_MH[$INT_COUNT_FX]},"
fi
export INT_COUNT_FX=$((INT_COUNT_FX + 1))
((INT_COUNT_FX++))
done
if [ -n "$MH_FONT_SIZE" ]; then
GUI_MH_RESULT="${GUI_MH_RESULT}${MH_FONT_SIZE}"
else
GUI_MH_RESULT="${GUI_MH_RESULT%,}"
if [[ -n "$MH_FONT_SIZE" ]]
then GUI_MH_RESULT="${GUI_MH_RESULT}${MH_FONT_SIZE}"
else GUI_MH_RESULT="${GUI_MH_RESULT%,}"
fi
if [[ "${FPS_LIMIT}" != "disabled" ]] ; then
export GUI_MH_RESULT=${GUI_MH_RESULT},fps_limit=${FPS_LIMIT}
export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" == "disabled" ]] ; then
export GUI_MH_RESULT="$(echo ${GUI_MH_RESULT} | sed "s/,fps_limit=${FPS_LIMIT_VAR}//" | sed "s/,fps_limit=//")"
elif [[ "${FPS_LIMIT}" == "disabled" ]]
then export GUI_MH_RESULT="$(echo ${GUI_MH_RESULT} | sed "s/,fps_limit=${FPS_LIMIT_VAR}//" | sed "s/,fps_limit=//")"
fi
export MANGOHUD_CONFIG="${GUI_MH_RESULT}"
edit_db_from_gui MANGOHUD_CONFIG PW_MANGOHUD FPS_LIMIT