Skip to content

Commit 760d5b4

Browse files
authored
Merge branch 'rc' into dev
2 parents 5c50528 + 1468145 commit 760d5b4

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Configs/.local/lib/hyde/gamelauncher.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ elem_border=$((hypr_border * 2))
1818
icon_border=$((elem_border - 3))
1919
r_override="element{border-radius:${elem_border}px;} element-icon{border-radius:${icon_border}px;}"
2020

21-
[[ -z $MODE ]] && MODE=5
22-
case $MODE in
21+
[[ -n "${ROFI_GAMELAUNCHER_STYLE}" ]] && MODE=${ROFI_GAMELAUNCHER_STYLE}
22+
case ${MODE:-5} in
2323
5)
24-
monitor_info=()
25-
eval "$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) |
24+
monitor_info=()
25+
eval "$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) |
2626
"monitor_info=(\(.width) \(.height) \(.scale) \(.x) \(.y)) reserved_info=(\(.reserved | join(" ")))"')"
2727

28-
# Remove decimal point from scale and convert to integer (e.g., 1.25 -> 125)
29-
monitor_scale="${monitor_info[2]//./}"
30-
# Calculate display width adjusted for scale (95% of actual width)
31-
monitor_width=$((monitor_info[0] * 95 / monitor_scale))
32-
# Calculate display height adjusted for scale (95% of actual height)
33-
monitor_height=$((monitor_info[1] * 95 / monitor_scale))
28+
# Remove decimal point from scale and convert to integer (e.g., 1.25 -> 125)
29+
monitor_scale="${monitor_info[2]//./}"
30+
# Calculate display width adjusted for scale (95% of actual width)
31+
monitor_width=$((monitor_info[0] * 95 / monitor_scale))
32+
# Calculate display height adjusted for scale (95% of actual height)
33+
monitor_height=$((monitor_info[1] * 95 / monitor_scale))
3434

3535
BG=$HOME/.local/share/hyde/rofi/assets/steamdeck_holographic.png
3636
BGfx=$HOME/.cache/hyde/landing/steamdeck_holographic_${monitor_width}x${monitor_height}.png
@@ -48,7 +48,7 @@ monitor_height=$((monitor_info[1] * 95 / monitor_scale))
4848
# top right bottom left
4949
;;
5050

51-
*) : ;;
51+
*) ;;
5252
esac
5353

5454
fn_steam() {
@@ -61,8 +61,8 @@ fn_steam() {
6161
# SteamLib might contain more than one path
6262
ManifestList=$(grep '"path"' $SteamLib | awk -F '"' '{print $4}' | while read sp; do
6363
64-
#Manifests for current path
65-
find "${sp}/steamapps" -type f -name "appmanifest_*.acf" 2>/dev/null
64+
#Manifests for current path
65+
find "${sp}/steamapps" -type f -name "appmanifest_*.acf" 2>/dev/null
6666
done)
6767
6868
if [ -z "${ManifestList}" ]; then
@@ -88,7 +88,7 @@ fn_steam() {
8888
appid=$(echo "${acf}" | cut -d '|' -f 2)
8989
game=$(echo "${acf}" | cut -d '|' -f 1)
9090
# find the lib image
91-
libImage=$(find "${SteamThumb}/${appid}/" -type f -name "${libraryThumbName}" | head -1)
91+
libImage=$(find "${SteamThumb}/${appid}/" -type f -name "${libraryThumbName}" | head -1)
9292
printf "%s\x00icon\x1f${libImage}\n" "${game}" >&2
9393
printf "%s\x00icon\x1f${libImage}\n" "${game}"
9494
done | rofi -dmenu \
@@ -97,7 +97,7 @@ fn_steam() {
9797
)
9898
9999
# launch game
100-
if [ -n "$RofiSel" ]; then
100+
if [ -n "$RofiSel" ]; then
101101
launchid=$(echo "$GameList" | grep "$RofiSel" | cut -d '|' -f 2)
102102
103103
headerImage=$(find "${SteamThumb}/${launchid}/" -type f -name "*${libraryHeaderName}")

0 commit comments

Comments
 (0)