Repository navigation
Expand file tree
/
Copy pathMac Resolution Edit.command
More file actions
executable file
·68 lines (56 loc) · 1.73 KB
/
Copy pathMac Resolution Edit.command
File metadata and controls
executable file
·68 lines (56 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# A utilities script that aids in the editing of SMITE setting without being in game.
# Date : (2015-10-08)
# Last revision : (2015-10-08 3:50)
# Licence : GPLv3
# Author : Rolando Islas
SETTING_PATH="$HOME/Documents/My Games/Smite/BattleGame/Config/BattleSystemSettings.ini"
RESULT="\n"
clear
echo -e "This script will aid in the editing of SMITE's settings.\n"
function setFullscreen {
RESULT="$RESULT fullscreen: $1\n"
sed -i '' -E "s/Fullscreen=.*/Fullscreen=$1/" "$SETTING_PATH"
}
function setBorderless {
RESULT="$RESULT borderless: $1\n"
sed -i '' -E "s/Borderless=.*/Borderless=$1/" "$SETTING_PATH"
}
function setResolution {
RESULT="$RESULT resolution: $1 $2\n"
sed -i '' -E "s/ResX=.*/ResX=$1/" "$SETTING_PATH"
sed -i '' -E "s/ResY=.*/ResY=$2/" "$SETTING_PATH"
}
function run {
echo -e "Settings found at '$SETTING_PATH'.\n"
echo "Enable fullscreen?"
select yn in "Yes" "No"; do
case $yn in
Yes ) setFullscreen true; fullscreen=true; break;;
No ) setFullscreen false; fullscreen=false; break;;
esac
done
if [[ $fullscreen = false ]]; then
echo "Enable borderess window?"
select yn in "Yes" "No"; do
case $yn in
Yes ) setBorderless true; break;;
No ) setBorderless false; break;;
esac
done
fi
read res <<<$(system_profiler SPDisplaysDataType | grep Resolution | grep -oE -m1 '[0-9]{3,}')
echo "Suggested resolution: $res"
read -p "Enter desired X resolution: " x
read -p "Enter desired Y resolution: " y
if [[ -n $x ]] && [[ -n $y ]]; then
setResolution $x $y
fi
echo "The follwoing settings have been applied:"
echo -e $RESULT
}
if [[ -f "$SETTING_PATH" ]]; then
run
else
echo -e "Settings not found in '$SETTING_PATH'.\nLaunch SMITE at least once to generate the file."
fi