Disable screen ratio calculation if bc isn't installed
This commit is contained in:
parent
940ed0653a
commit
e5beddfe1a
|
@ -467,6 +467,7 @@ fluxion_set_resolution() { # Windows + Resolution
|
|||
SCREEN_SIZE_Y=$(printf '%.*f\n' 0 $(echo $SCREEN_SIZE | sed -e s'/x/ /'g | awk '{print $2}'))
|
||||
|
||||
# Calculate proportional windows
|
||||
if hash bc ;then
|
||||
PROPOTION=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$SCREEN_SIZE_Y}")/1 | bc)
|
||||
NEW_SCREEN_SIZE_X=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$FLUXIONWindowRatio}")/1 | bc)
|
||||
NEW_SCREEN_SIZE_Y=$(echo $(awk "BEGIN {print $SCREEN_SIZE_Y/$FLUXIONWindowRatio}")/1 | bc)
|
||||
|
@ -494,6 +495,7 @@ fluxion_set_resolution() { # Windows + Resolution
|
|||
# Big
|
||||
TOPLEFTBIG="-geometry $NEW_SCREEN_SIZE_BIG_Xx$NEW_SCREEN_SIZE_BIG_Y+0+0"
|
||||
TOPRIGHTBIG="-geometry $NEW_SCREEN_SIZE_BIG_Xx$NEW_SCREEN_SIZE_BIG_Y-0+0"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue