Skip to content

Commit 05a4054

Browse files
authored
Merge pull request #47 from wpoely86/bookmarks
Create booksmarks for VSC directories
2 parents 7450177 + 1fbb16a commit 05a4054

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

apps/common_files/desktops/xfce.sh.erb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ EOF
109109
AUTOSTART_XFCE_DESKTOP=$XFCE_JOB_CONFIG/autostart
110110
mkdir $AUTOSTART_XFCE_DESKTOP
111111

112+
# make sure the gtk bookmark file is present
113+
BOOKMARKS="$CONFIG_DIR/gtk-3.0/bookmarks"
114+
mkdir -p "$(dirname "$BOOKMARKS")"
115+
touch "$BOOKMARKS"
112116

113117
# Only set running apps as icon (0=no icons; 1=running apps; 2=restore usual home etc icons)
114118
AUTOSTART_HIDE_ICONS=$OOD_SESSION_STAGED_ROOT/hide_icons.desktop
@@ -205,6 +209,24 @@ function make_desktop_env {
205209
fi
206210
}
207211

212+
213+
function make_bookmark() {
214+
local varname="$1"
215+
local val="${!varname}"
216+
217+
# Skip if variable is unset or empty
218+
[ -z "$val" ] && return 0
219+
220+
# Escape spaces for URI
221+
local uri="file://${val// /%20}"
222+
local label="$varname"
223+
224+
# Only add if label is not already present
225+
if ! grep -q " ${label}$" "$BOOKMARKS"; then
226+
echo "${uri} ${label}" >> "$BOOKMARKS"
227+
fi
228+
}
229+
208230
# # keep in sync with config vscood.rb VscOodPaths
209231
# if [ -d /dodrio/scratch ]; then
210232
# # This is tier1
@@ -231,6 +253,7 @@ function make_desktop_env {
231253

232254
for env_var in VSC_HOME VSC_DATA VSC_SCRATCH VSC_DATA_VO_USER VSC_SCRATCH_VO_USER VSC_DATA_VO VSC_SCRATCH_VO; do
233255
make_desktop_env $env_var
256+
make_bookmark $env_var
234257
done
235258

236259

ondemand-vub.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Summary: Scripts, customizations and tools for Open OnDemand
55
Name: ondemand-vub
6-
Version: 2.05
6+
Version: 2.06
77
Release: 1
88
BuildArch: noarch
99
License: GPL
@@ -57,6 +57,8 @@ Scripts, customizations and tools for Open OnDemand as used at the VUB.
5757
/var/www/ood/apps/sys
5858

5959
%changelog
60+
* Thu Nov 13 2025 Ward Poelmans <[email protected]>
61+
- Create bookmarks for VSC directories
6062
* Tue Nov 11 2025 Samuel Moors <[email protected]>
6163
- Add 3D Slicer app
6264
* Wed Nov 05 2025 Alex Domingo <[email protected]>

0 commit comments

Comments
 (0)