common/fs: re-organize ~/Books to be simpler

This commit is contained in:
2024-10-29 06:06:48 +00:00
parent 864e75afce
commit e89cf69aa5
10 changed files with 21 additions and 1 deletions

View File

@@ -6,6 +6,9 @@
"dev"
"ref"
"use"
"Books/Audiobook"
"Books/Books"
"Books/Visual"
"Books/local"
"Music"

View File

@@ -19,6 +19,7 @@
sandbox.whitelistDbus = [ "user" ]; # mpris
sandbox.whitelistWayland = true;
sandbox.extraHomePaths = [
"Books/Audiobooks"
"Books/local"
"Books/servo"
];

View File

@@ -6,6 +6,9 @@
sandbox.autodetectCliPaths = "existingOrParent";
sandbox.extraHomePaths = [
"archive"
"Books/Audiobooks"
"Books/Books"
"Books/Visual"
"Books/local"
"Books/servo"
"records"

View File

@@ -7,6 +7,7 @@
sandbox.whitelistDri = true; # reduces startup time and subjective page flip time
sandbox.whitelistWayland = true;
sandbox.extraHomePaths = [
"Books/Books"
"Books/local"
"Books/servo"
"tmp" #< for downloaded files

View File

@@ -50,6 +50,7 @@ in {
sandbox.whitelistDri = true; # reduces startup time and subjective page flip time
sandbox.whitelistWayland = true;
sandbox.extraHomePaths = [
"Books/Books"
"Books/local"
"Books/servo"
];

View File

@@ -194,6 +194,8 @@ in
".local/share/applications" #< for xdg-terminal-exec (sane-cast)
# it's common for album (or audiobook, podcast) images/lyrics/metadata to live adjacent to the primary file.
# CLI detection is too poor to pick those up, so expose the common media dirs to the sandbox to make that *mostly* work.
"Books/Audiobooks"
"Books/Visual"
"Books/local"
"Books/servo"
"Music"

View File

@@ -99,6 +99,9 @@ in
sandbox.extraHomePaths = [
".local/share/applications" #< to locate .desktop files
"Apps" #< provide a means to transition from the filebrowser to the app launcher
"Books/Audiobooks"
"Books/Books"
"Books/Visual"
"Books/local"
"Books/servo"
"Music"

View File

@@ -20,6 +20,9 @@ in
# for file-chooser portal users (fractal, firefox, ...), need to provide anything they might want.
# i think (?) portal users can only access the files here interactively, i.e. by me interacting with the portal's visual filechooser,
# so shoving stuff here is trusting the portal but not granting any trust to the portal user.
"Books/Audiobooks"
"Books/Books"
"Books/Visual"
"Books/local"
"Books/servo"
"Music"

View File

@@ -14,6 +14,9 @@ in
# for file-chooser portal users (fractal, firefox, ...), need to provide anything they might want.
# i think (?) portal users can only access the files here interactively, i.e. by me interacting with the portal's visual filechooser,
# so shoving stuff here is trusting the portal but not granting any trust to the portal user.
"Books/Audiobooks"
"Books/Books"
"Books/Visual"
"Books/local"
"Books/servo"
"Music"

View File

@@ -59,7 +59,7 @@ syncHost() {
rsync -arv --exclude servo-macros "$mobyHome/Pictures/" "$deskoHome/Pictures/from/moby/"
# copy books from servo to moby; delete old/untracked ones, but keep KOreader state files (sdr)
ifExists /mnt/servo/media/Books/Books \
rsync -arv --delete --exclude '*.sdr' /mnt/servo/media/Books/ "$mobyHome/Books/local/servo/"
rsync -arv --delete --exclude '*.sdr' /mnt/servo/media/Books/ "$mobyHome/Books/"
# copy music
ifExists /mnt/servo/media/Music/Various.Artists \
sane-sync-music --compat /mnt/servo/media/Music "$mobyHome/Music" "${syncFlags[@]}"