Skip to content

Commit 122a432

Browse files
committed
2 parents 3cc4d04 + 3b1746d commit 122a432

File tree

4 files changed

+123
-21
lines changed

4 files changed

+123
-21
lines changed

Configs/.local/bin/hyde-shell

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ python_initialized() {
55

66
python "${LIB_DIR}/hyde/pyutils/pip_env.py" rebuild
77
}
8-
python_env="${XDG_STATE_HOME:-$HOME/.local/state}/hyde/pip_env/bin/activate"
9-
if [[ -r "${python_env}" ]]; then
10-
# shellcheck disable=SC1090
11-
source "${python_env}"
12-
else
13-
printf "Warning: Python virtual environment not found at %s\n" "${python_env}"
14-
printf "You may need to run 'hyde-shell pyinit' to set it up.\n"
15-
python_initialized
16-
fi
8+
9+
python_activate() {
10+
11+
local python_env="${XDG_STATE_HOME:-$HOME/.local/state}/hyde/pip_env/bin/activate"
12+
if [[ -r "${python_env}" ]]; then
13+
# shellcheck disable=SC1090
14+
source "${python_env}"
15+
else
16+
printf "Warning: Python virtual environment not found at %s\n" "${python_env}"
17+
printf "You may need to run 'hyde-shell pyinit' to set it up.\n"
18+
python_initialized
19+
fi
20+
21+
}
1722

1823
initialized() {
1924
cat <<EOF
@@ -410,6 +415,7 @@ run_command() {
410415
exec bash "$dir/${1}.sh" "${@:2}"
411416
# Try .py extension
412417
elif [[ -f "$dir/${1}.py" ]]; then
418+
python_activate
413419
exec python "$dir/${1}.py" "${@:2}"
414420
# Try exact name (executable)
415421
elif [[ -f "$dir/${1}" && -x "$dir/${1}" ]]; then

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#!/usr/bin/env bash
22

3-
[[ "${HYDE_SHELL_INIT}" -ne 1 ]] && eval "$(hyde-shell init)"
4-
3+
# set variables
54
MODE=${1}
5+
scrDir=$(dirname "$(realpath "$0")")
6+
source $scrDir/globalcontrol.sh
7+
# ThemeSet="${confDir}/hypr/themes/theme.conf"
68

79
if [[ "$MODE" =~ ^[0-9]+$ ]]; then
810
RofiConf="gamelauncher_${MODE}"
911
else
1012
RofiConf="${MODE:-$ROFI_GAMELAUNCHER_STYLE}"
1113
fi
12-
RofiConf=${RofiConf:-"gamelauncher_5"}
14+
RofiConf=${RofiConf:-"steam_deck"}
1315

1416
# set rofi override
1517
elem_border=$((hypr_border * 2))
@@ -22,13 +24,14 @@ case ${MODE:-5} in
2224
monitor_info=()
2325
eval "$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) |
2426
"monitor_info=(\(.width) \(.height) \(.scale) \(.x) \(.y)) reserved_info=(\(.reserved | join(" ")))"')"
27+
percent=80
2528

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

3336
BG=$HOME/.local/share/hyde/rofi/assets/steamdeck_holographic.png
3437
BGfx=$HOME/.cache/hyde/landing/steamdeck_holographic_${monitor_width}x${monitor_height}.png
@@ -39,11 +42,9 @@ case ${MODE:-5} in
3942
fi
4043

4144
r_override="window {width: ${monitor_width}px; height: ${monitor_height}; background-image: url('${BGfx}',width);}
42-
element {border-radius:${elem_border}px;}
43-
element-icon {border-radius:${icon_border}px;}
44-
mainbox { padding: 25% 21% 25% 21%;}
45+
element-icon {border-radius:0px;}
46+
mainbox { padding: 17% 18%; }
4547
"
46-
# top right bottom left
4748
;;
4849

4950
*) ;;
@@ -91,7 +92,7 @@ fn_steam() {
9192
printf "%s\x00icon\x1f${libImage}\n" "${game}"
9293
done | rofi -dmenu \
9394
-theme-str "${r_override}" \
94-
-config $RofiConf
95+
-config "$RofiConf"
9596
)
9697
9798
# launch game
@@ -139,7 +140,8 @@ EOF
139140
# Handle if flatpak or pkgmgr
140141
run_lutris=""
141142
echo "$*"
142-
(flatpak list --columns=application | grep -q "net.lutris.Lutris") && run_lutris="flatpak run net.lutris.Lutris"
143+
(pkg_installed 'flatpak') &&
144+
(flatpak list --columns=application | grep -q "net.lutris.Lutris") && run_lutris="flatpak run net.lutris.Lutris"
143145
icon_path="${HOME}/.var/app/net.lutris.Lutris/data/lutris/coverart/"
144146
[ -z "${run_lutris}" ] && (pkg_installed 'lutris') && run_lutris="lutris"
145147

Configs/.local/share/hyde/rofi/themes/gamelauncher_5.rasi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,3 @@ element-text {
100100
background-color: transparent;
101101
text-color: inherit;
102102
}
103-
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/**
2+
* ROFI Layout
3+
*
4+
* Game launcher 4: steamdeck holographic fullscreen
5+
*
6+
* User: The HyDE Project [ steamdeck holographic fullscreen ]
7+
* Copyright: The HyDE Project
8+
*/
9+
10+
11+
// Config //
12+
configuration {
13+
modi: "drun";
14+
show-icons: true;
15+
drun-display-format: "{name}";
16+
font: "JetBrainsMono Nerd Font 8";
17+
kb-row-up: "k,Up";
18+
kb-row-down: "j,Down";
19+
kb-move-char-forward: "l,Right";
20+
kb-move-char-back: "h,Left";
21+
kb-cancel: "q,Escape";
22+
}
23+
24+
@theme "~/.config/rofi/theme.rasi"
25+
26+
27+
// Main //
28+
window {
29+
enabled: true;
30+
fullscreen: false;
31+
transparency: "real";
32+
cursor: "default";
33+
//background-image: this is dynamically set
34+
background-image: url("~/.local/share/hyde/rofi/steamdeck_holographic.png", width);
35+
background-color: transparent;
36+
}
37+
mainbox {
38+
enabled: true;
39+
children: [ "listview" ];
40+
background-color: transparent;
41+
orientation: horizontal;
42+
}
43+
44+
45+
// Lists //
46+
listview {
47+
enabled: true;
48+
columns: 3;
49+
rows: 2;
50+
flow: horizontal;
51+
spacing: 2.5em;
52+
padding: 4em 5em 2em 5em;
53+
cycle: true;
54+
dynamic: true;
55+
scrollbar: false;
56+
reverse: false;
57+
background-color: @main-bg;
58+
text-color: @main-fg;
59+
border-radius: 0.4em;
60+
}
61+
62+
63+
// Elements //
64+
element {
65+
enabled: true;
66+
orientation: vertical;
67+
spacing: 0em;
68+
border-radius: 0.4em;
69+
cursor: pointer;
70+
background-color: transparent;
71+
text-color: @main-fg;
72+
}
73+
74+
element selected.normal {
75+
background-color: @select-bg;
76+
text-color: @select-fg;
77+
}
78+
79+
element-icon {
80+
size: 24em;
81+
cursor: inherit;
82+
background-color: transparent;
83+
text-color: inherit;
84+
}
85+
86+
element-text {
87+
vertical-align: 0.5;
88+
horizontal-align: 0.5;
89+
spacing: 0em;
90+
padding: 10px;
91+
cursor: inherit;
92+
background-color: transparent;
93+
text-color: inherit;
94+
}
95+

0 commit comments

Comments
 (0)