mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-01 13:30:35 +00:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
709cb6dbae | |||
810f21415e | |||
3e982b3303 | |||
cfeb3a841f | |||
60af93add3 | |||
b64eaf88c5 | |||
e8d96c45a0 | |||
d8826f608c | |||
07a99d3aa1 | |||
b4791a0b7d | |||
e43a59ce7b | |||
fc98118ac5 |
@ -23,7 +23,7 @@ Keybinds are backed up to *$XDG_CONFIG_HOME/starcitizen-lug/keybinds/*
|
||||
`Manage Lutris Runners`
|
||||
- Quickly install and delete Lutris wine runners
|
||||
|
||||
`User Folder Maintenance and Troubleshooting`
|
||||
`Maintenance and Troubleshooting`
|
||||
- `Switch the helper between LIVE and PTU`
|
||||
- Toggle between targeting LIVE or PTU for all of the above options. Defaults to LIVE on each run.
|
||||
|
||||
@ -34,12 +34,15 @@ Keybinds are backed up to *$XDG_CONFIG_HOME/starcitizen-lug/keybinds/*
|
||||
- To re-import your keybinds from within the game, select them from the list:
|
||||
- *Options->Keybindings->Control Profiles*
|
||||
|
||||
- `Delete my shaders only`
|
||||
- `Delete my shaders folder only`
|
||||
- Sometimes all you need to do between major version updates is delete your shaders directory.
|
||||
|
||||
- `Delete my DXVK cache`
|
||||
- A troubleshooting step that sometimes helps fix various issues and crashes.
|
||||
|
||||
- `Display Helper and Star Citizen directories`
|
||||
- Show all the directories currently in use by both the Helper and Star Citizen.
|
||||
|
||||
- `Reset Helper configs`
|
||||
- Delete the configs saved by the helper in *$XDG_CONFIG_HOME/starcitizen-lug/*
|
||||
|
||||
@ -62,4 +65,5 @@ Arch Linux: https://aur.archlinux.org/packages/lug-helper/
|
||||
- https://github.com/pstn
|
||||
- https://github.com/gort818
|
||||
- https://github.com/victort
|
||||
- https://github.com/Wrzlprnft
|
||||
- Runner Downloader inspired by https://github.com/richardtatum/sc-runner-updater
|
||||
|
@ -43,6 +43,7 @@
|
||||
# Contributor: https://github.com/pstn
|
||||
# Contributor: https://github.com/gort818
|
||||
# Contributor: https://github.com/victort
|
||||
# Contributor: https://github.com/Wrzlprnft
|
||||
# Runner Downloader inspired by:
|
||||
# https://github.com/richardtatum/sc-runner-updater
|
||||
############################################################################
|
||||
@ -129,7 +130,7 @@ fi
|
||||
# Github repo and script version info
|
||||
repo="the-sane/lug-helper"
|
||||
releases_url="https://github.com/the-sane/lug-helper/releases"
|
||||
current_version="v1.9.2"
|
||||
current_version="v1.10"
|
||||
|
||||
############################################################################
|
||||
############################################################################
|
||||
@ -491,6 +492,37 @@ getdirs() {
|
||||
backup_path="$conf_dir/$conf_subdir"
|
||||
}
|
||||
|
||||
# Display all directories currently used by this helper and Star Citizen
|
||||
display_dirs() {
|
||||
# Helper configs and keybinds
|
||||
if [ -d "$conf_dir/$conf_subdir" ]; then
|
||||
dirs_list+=("\n\nHelper configuration:\n$conf_dir/$conf_subdir\n\nKeybind backups:\n$conf_dir/$conf_subdir/keybinds")
|
||||
fi
|
||||
|
||||
# Wine prefix
|
||||
if [ -f "$conf_dir/$conf_subdir/$wine_conf" ]; then
|
||||
dirs_list+="\n\nWine prefix:\n$(cat "$conf_dir/$conf_subdir/$wine_conf")"
|
||||
fi
|
||||
|
||||
# Star Citizen installation
|
||||
if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then
|
||||
dirs_list+="\n\nStar Citizen game directory:\n$(cat "$conf_dir/$conf_subdir/$game_conf")"
|
||||
fi
|
||||
|
||||
# Lutris runners
|
||||
if [ -d "$runners_dir" ]; then
|
||||
dirs_list+="\n\nLutris Runners:\n$runners_dir"
|
||||
fi
|
||||
|
||||
# Formatting
|
||||
message_heading="These directories are currently being used by this Helper and Star Citizen"
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
message_heading="<b>$message_heading</b>"
|
||||
fi
|
||||
|
||||
message info "$message_heading\n${dirs_list[@]}"
|
||||
}
|
||||
|
||||
# Save exported keybinds, wipe the USER directory, and restore keybinds
|
||||
sanitize() {
|
||||
# Prompt user to back up the current keybinds in the game
|
||||
@ -1133,7 +1165,13 @@ preflight_check() {
|
||||
|
||||
# Display the results of the preflight check
|
||||
if [ -z "$preflight_fail_string" ]; then
|
||||
message info "Preflight Check Complete\n\nYour system is optimized for Star Citizen!\n\n$preflight_pass_string"
|
||||
# Formatting
|
||||
message_heading="Preflight Check Complete"
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
message_heading="<b>$message_heading</b>"
|
||||
fi
|
||||
|
||||
message info "$message_heading\n\nYour system is optimized for Star Citizen!\n\n$preflight_pass_string"
|
||||
else
|
||||
if [ -z "$preflight_action_funcs" ]; then
|
||||
message warning "$preflight_pass_string$preflight_fail_string"
|
||||
@ -1202,13 +1240,14 @@ maintenance_menu() {
|
||||
sanitize_msg="Delete my Star Citizen USER folder and preserve my keybinds"
|
||||
shaders_msg="Delete my shaders folder only (Do this after each game update)"
|
||||
vidcache_msg="Delete my DXVK cache"
|
||||
dirs_msg="Display Helper and Star Citizen directories"
|
||||
reset_msg="Reset Helper configs"
|
||||
quit_msg="Return to the main menu"
|
||||
|
||||
# Set the options to be displayed in the menu
|
||||
menu_options=("$version_msg" "$sanitize_msg" "$shaders_msg" "$vidcache_msg" "$reset_msg" "$quit_msg")
|
||||
menu_options=("$version_msg" "$sanitize_msg" "$shaders_msg" "$vidcache_msg" "$dirs_msg" "$reset_msg" "$quit_msg")
|
||||
# Set the corresponding functions to be called for each of the options
|
||||
menu_actions=("set_version" "sanitize" "rm_shaders" "rm_dxvkcache" "reset_helper" "menu_loop_done")
|
||||
menu_actions=("set_version" "sanitize" "rm_shaders" "rm_dxvkcache" "display_dirs" "reset_helper" "menu_loop_done")
|
||||
|
||||
# Calculate the total height the menu should be
|
||||
menu_height="$(($menu_option_height * ${#menu_options[@]} + $menu_text_height))"
|
||||
@ -1224,7 +1263,7 @@ maintenance_menu() {
|
||||
# Get a random Penguin's Star Citizen referral code
|
||||
referral_randomizer() {
|
||||
# Populate the referral codes array
|
||||
referral_codes=("STAR-4TZD-6KMM" "STAR-4XM2-VM99" "STAR-2NPY-FCR2" "STAR-T9Z9-7W6P" "STAR-VLBF-W2QR" "STAR-BYR6-YHMF" "STAR-3X2H-VZMX" "STAR-BRWN-FB9T" "STAR-FG6Y-N4Q4" "STAR-VLD6-VZRG" "STAR-T9KF-LV77" "STAR-4XHB-R7RF" "STAR-9NVF-MRN7" "STAR-3Q4W-9TC3" "STAR-3SBK-7QTT" "STAR-XFBT-9TTK" "STAR-F3H9-YPHN" "STAR-BYK6-RCCL" "STAR-XCKH-W6T7" "STAR-H292-39WK" "STAR-ZRT5-PJB7" "STAR-GMBP-SH9Y" "STAR-PLWB-LMFY" "STAR-TNZN-H4ZT" "STAR-T5G5-L2GJ" "STAR-6TPV-7QH2" "STAR-THHD-TV3Y")
|
||||
referral_codes=("STAR-4TZD-6KMM" "STAR-4XM2-VM99" "STAR-2NPY-FCR2" "STAR-T9Z9-7W6P" "STAR-VLBF-W2QR" "STAR-BYR6-YHMF" "STAR-3X2H-VZMX" "STAR-BRWN-FB9T" "STAR-FG6Y-N4Q4" "STAR-VLD6-VZRG" "STAR-T9KF-LV77" "STAR-4XHB-R7RF" "STAR-9NVF-MRN7" "STAR-3Q4W-9TC3" "STAR-3SBK-7QTT" "STAR-XFBT-9TTK" "STAR-F3H9-YPHN" "STAR-BYK6-RCCL" "STAR-XCKH-W6T7" "STAR-H292-39WK" "STAR-ZRT5-PJB7" "STAR-GMBP-SH9Y" "STAR-PLWB-LMFY" "STAR-TNZN-H4ZT" "STAR-T5G5-L2GJ" "STAR-6TPV-7QH2" "STAR-THHD-TV3Y" "STAR-7ZFS-PK2L" "STAR-SRQN-43TB" "STAR-9TDG-D4H9" "STAR-BPH3-THJC" "STAR-HL3M-R5KC" "STAR-GBS5-LTVB" "STAR-CJ3Y-KZZ4" "STAR-5GRM-7HBY" "STAR-G2GX-Y2QJ" "STAR-YWY3-H4XX" "STAR-6VGM-PTKC" "STAR-T6MZ-QFHX" "STAR-T2K6-LXFW" "STAR-XN25-9CJJ" "STAR-47V3-4QGB")
|
||||
# Pick a random array element. Scale a floating point number for
|
||||
# a more random distribution than simply calling RANDOM
|
||||
random_code="${referral_codes[$(awk '{srand($2); print int(rand()*$1)}' <<< "${#referral_codes[@]} $RANDOM")]}"
|
||||
@ -1289,7 +1328,7 @@ live_or_ptu="$live_dir"
|
||||
lutris_needs_restart="false"
|
||||
|
||||
# Check if a newer verison of the script is available
|
||||
latest_version=$(get_latest_release "$repo")
|
||||
latest_version="$(get_latest_release "$repo")"
|
||||
|
||||
if [ "$latest_version" != "$current_version" ]; then
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
@ -1316,8 +1355,9 @@ Usage: lug-helper <options>
|
||||
-s, --delete-shaders Delete Star Citizen shaders directory
|
||||
-c, --delete-dxvk-cache Delete Star Citizen dxvk cache file
|
||||
-t, --target=[live|ptu] Target LIVE or PTU (default live)
|
||||
-g, --use-gui=[yes|no] Use Zenity GUI (default yes)
|
||||
-g, --use-gui=[yes|no] Use Zenity GUI if available (default yes)
|
||||
-r, --get-referral Get a random LUG member's Star Citizen referral code
|
||||
-d, --show-directories Show all Star Citizen and LUG Helper directories
|
||||
-x, --reset-helper Delete saved lug-helper configs
|
||||
"
|
||||
exit 0
|
||||
@ -1366,6 +1406,9 @@ Usage: lug-helper <options>
|
||||
--get-referral | -r )
|
||||
cargs+=("referral_randomizer")
|
||||
;;
|
||||
--show-directories | -d )
|
||||
cargs+=("display_dirs")
|
||||
;;
|
||||
--reset-helper | -x )
|
||||
cargs+=("reset_helper")
|
||||
;;
|
||||
@ -1397,7 +1440,7 @@ while true; do
|
||||
# Configure the menu options
|
||||
preflight_msg="Preflight Check (System Optimization)"
|
||||
runners_msg="Manage Lutris Runners"
|
||||
maintenance_msg="User Folder Maintenance and Troubleshooting"
|
||||
maintenance_msg="Maintenance and Troubleshooting"
|
||||
randomizer_msg="Get a random Penguin's Star Citizen referral code"
|
||||
quit_msg="Quit"
|
||||
|
||||
|
Reference in New Issue
Block a user