Skip to content

Commit f2b2be1

Browse files
committed
fixes
1 parent 79c91ef commit f2b2be1

File tree

7 files changed

+61
-21
lines changed

7 files changed

+61
-21
lines changed

Configs/.config/hyde/wallbash/scripts/spotify.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ configure_spicetify() {
2121
local cache_dir=$2
2222
local spotify_flags='--ozone-platform=wayland'
2323
local spotify_conf
24-
24+
2525
spicetify &>/dev/null
2626
mkdir -p ~/.config/spotify
2727
touch ~/.config/spotify/prefs
2828
spotify_conf=$(spicetify -c)
29-
29+
3030
sed -i -e "/^prefs_path/ s+=.*$+= $HOME/.config/spotify/prefs+g" \
31-
-e "/^spotify_path/ s+=.*$+= $spotify_path+g" \
32-
-e "/^spotify_launch_flags/ s+=.*$+= $spotify_flags+g" "$spotify_conf"
33-
31+
-e "/^spotify_path/ s+=.*$+= $spotify_path+g" \
32+
-e "/^spotify_launch_flags/ s+=.*$+= $spotify_flags+g" "$spotify_conf"
33+
3434
spicetify_themes_dir="$HOME/.config/spicetify/Themes"
3535
if [ ! -d "${spicetify_themes_dir}/Sleek" ]; then
3636
curl -L -o "${cache_dir}/landing/Spotify_Sleek.tar.gz" "https://github.com/HyDE-Project/HyDE/raw/master/Source/arcs/Spotify_Sleek.tar.gz"
@@ -59,29 +59,31 @@ if [ -n "${SPOTIFY_PATH}" ]; then
5959
6060
note: run with 'sudo' if only needed.
6161
EOF
62-
63-
elif [ -d "${XDG_DATA_HOME}/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify" ]; then
62+
63+
elif [ -d "${XDG_DATA_HOME}/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify" ]; then
6464
spotify_path="${XDG_DATA_HOME}/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify"
65-
elif [ -d /var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify ]; then
65+
print_log -sec "Spotify" " User Flatpak"
66+
elif [ -d /var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify ]; then
6667
spotify_path='/var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify'
67-
elif [ -f "${shareDir}/spotify-launcher/install/usr/bin/spotify" ]; then
68+
print_log -sec "Spotify" " System Flatpak"
69+
elif [ -f "${shareDir}/spotify-launcher/install/usr/bin/spotify" ]; then
6870
spotify_path="${shareDir}/spotify-launcher/install/usr/share/spotify"
69-
elif [ -d /opt/spotify ]; then
71+
print_log -sec "Spotify" " Spotify-launcher"
72+
elif [ -d /opt/spotify ]; then
7073
spotify_path='/opt/spotify'
74+
print_log -sec "Spotify" " System Package Manager"
7175
fi
7276

7377
if [ ! -w "${spotify_path}" ] || [ ! -w "${spotify_path}/Apps" ]; then
7478
notify_and_set_permissions "${spotify_path}"
75-
else
76-
printf "[info] using spotify path: %s\n" "${spotify_path}"
7779
fi
7880

79-
if (pkg_installed spotify && pkg_installed spicetify-cli) || [ -n "$spotify_path" ]; then
80-
81+
if (pkg_installed spotify && pkg_installed spicetify-cli) || [ -e "${spotify_path}" ]; then
82+
print_log -sec "Spotify" -stat "path" " ${spotify_path}"
8183
if [ "$(spicetify config | awk '{if ($1=="color_scheme") print $2}')" != "Wallbash" ] || [[ "${*}" == *"--reset"* ]]; then
8284
configure_spicetify "$spotify_path" "$cacheDir"
8385
fi
84-
86+
8587
if pgrep -x spotify >/dev/null; then
8688
pkill -x spicetify
8789
spicetify -q watch -s &

Configs/.local/lib/hyde/lockscreen.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/usr/bin/env bash
22

33
[[ "${HYDE_SHELL_INIT}" -ne 1 ]] && eval "$(hyde-shell init)"
4+
5+
lockscreen="${HYPRLAND_LOCKSCREEN:-$lockscreen}"
46
lockscreen="${LOCKSCREEN:-hyprlock}"
7+
lockscreen="${HYDE_LOCKSCREEN:-$lockscreen}"
58

69
case ${1} in
710
--get)

Configs/.local/share/hypr/variables.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ $start.XDG_PORTAL_RESET=hyde-shell resetxdgportal.sh
2424

2525
$start.AUTH_DIALOGUE=hyde-shell app -t service polkitkdeauth.sh
2626

27-
$start.BAR=hyde-shell app -u hyde-bar.scope -- waybar.py --watch
28-
$start.WALLPAPER=hyde-shell app -u hyde-wallpaper.scope -- wallpaper.sh --start --global
27+
$start.BAR=hyde-shell app -u hyde-$XDG_SESSION_DESKTOP-waybar-watcher.service -t service -- waybar.py --watch # we specify `-waybar` because this unit is specific for waybar.py ↓ . `hyde-$XDG_SESSION_DESKTOP-bar.service -t service` should be used for other bars.
28+
$start.WALLPAPER=hyde-shell app -u hyde-$XDG_SESSION_DESKTOP-wallpaper.service -t service -- wallpaper.sh --start --global
2929
$start.NOTIFICATIONS=hyde-shell app -t service dunst
3030

3131
$start.TEXT_CLIPBOARD=hyde-shell app -t service wl-paste --type text --watch cliphist store

Configs/.local/share/waybar/menus/hyde-menu.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@
108108
</child>
109109

110110

111+
<child>
112+
<object class="GtkMenuItem" id="waybar-style-select">
113+
<property name="label"> Select Sytle</property>
114+
</object>
115+
</child>
116+
117+
118+
111119
<child>
112120
<object class="GtkMenuItem" id="waybar-layout-next">
113121
<property name="label"> Next Layout</property>
@@ -165,6 +173,27 @@
165173
</child>
166174

167175

176+
<child>
177+
<object class="GtkMenuItem" id="lockscreen_menu">
178+
<property name="label"> Lockscreen</property>
179+
<child type="submenu">
180+
<object class="GtkMenu">
181+
182+
<child>
183+
<object class="GtkMenuItem" id="lockscreen-select">
184+
<property name="label"> Select ockscreen</property>
185+
</object>
186+
</child>
187+
188+
189+
</object>
190+
</child>
191+
</object>
192+
</child>
193+
194+
195+
196+
168197
<child>
169198
<object class="GtkMenuItem" id="shaders_menu">
170199
<property name="label"> Shaders</property>

Configs/.local/share/waybar/modules/custom-cava.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"custom/cava": {
33
"format": "{0}",
4-
"exec": "hyde-shell app cava.py waybar --json",
4+
"exec": "hyde-shell cava.py waybar --json",
55
"restart-interval": 1,
66
"hide-empty": true,
77
"return-type": "json",

Configs/.local/share/waybar/modules/custom-hyde-menu.jsonc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
"theme-import": "hyde-shell app -T -- hydectl theme import",
1818
"waybar-restart": "hyde-shell waybar -ubg",
1919
"waybar-reload-css": "sed -i '${/^$/d;}' $XDG_CONFIG_HOME/waybar/style.css",
20-
"waybar-layout-select": "hyde-shell waybar --select",
20+
"waybar-layout-select": "hyde-shell waybar --select-layout",
21+
"waybar-style-select": "hyde-shell waybar --select-style",
2122
"waybar-layout-next": "hyde-shell waybar --update --next",
2223
"waybar-layout-previous": "hyde-shell waybar --update --prev",
24+
"lockscreen-select": "hyde-shell lockscreen --select",
2325
"workflows-select": "hyde-shell workflows --select;pkill -RTMIN+19 waybar",
2426
"shaders-select": "hyde-shell shaders --select;pkill -RTMIN+19 waybar",
2527
"keybinds-hint": "hyde-shell keybinds_hint",

Scripts/restore_svc.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ while IFS='|' read -r service context command || [ -n "$service" ]; do
5252
print_log -y "[exec] " "Service ${service} (${context}): $command"
5353

5454
if [ "$flg_DryRun" -ne 1 ]; then
55-
if [ "$context" = "user" ]; then
55+
if [ "$context" = "user" ] ; then
56+
if [[ -n "${DBUS_SESSION_BUS_ADDRESS}" ]] && [[ -n $XDG_RUNTIME_DIR ]];then
5657
systemctl --user "${cmd_array[@]}" "${service}.service"
58+
else
59+
print_log -sec "services" -stat "error" "DBUS_SESSION_BUS_ADDRESS or XDG_RUNTIME_DIR not set for user service" -y " skipping"
60+
fi
5761
else
5862
sudo systemctl "${cmd_array[@]}" "${service}.service"
5963
fi
@@ -68,4 +72,4 @@ while IFS='|' read -r service context command || [ -n "$service" ]; do
6872

6973
done < "${scrDir}/restore_svc.lst"
7074

71-
print_log -sec "services" -stat "completed" "service updates"
75+
print_log -sec "services" -stat "completed" "service updated successfully"

0 commit comments

Comments
 (0)