Install office and video editing apps and set default apps

This commit is contained in:
SirBlob committed 2026-09-24 04:58:56 +00:00
1 parent 84ce54933b
commit 2df1454219
6 files changed
+86 -2

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ It runs these steps, in this order, and every one of them is idempotent:
| 1. Directories | creates the 19 directories the shell and scripts expect, before anything writes into them | | 1. Directories | creates the 19 directories the shell and scripts expect, before anything writes into them |
| 2. `BLOB_PATH` | symlinks `~/.local/share/blob` to this checkout | | 2. `BLOB_PATH` | symlinks `~/.local/share/blob` to this checkout |
| 3. Packages | installs what is missing from `packages/`, bootstrapping `yay` first on a machine that has no AUR helper | | 3. Packages | installs what is missing from `packages/`, bootstrapping `yay` first on a machine that has no AUR helper |
| 4. Config | copies `hypr/`, the themed app configs, `blob/shell.json`, and the uwsm environment into `~/.config`, and writes `/etc/profile.d/blob.sh` so a login shell finds the `blob` command | | 4. Config | copies `hypr/`, the themed app configs, `blob/shell.json`, and the uwsm environment into `~/.config`, sets the default apps for images, video, PDFs and office files, and writes `/etc/profile.d/blob.sh` so a login shell finds the `blob` command |
| 5. First theme | links `~/wallpapers` to the checkout, applies `flats` headless, picks a background, and links the btop and Neovim theme files, so the first login is not a blank desktop | | 5. First theme | links `~/wallpapers` to the checkout, applies `flats` headless, picks a background, and links the btop and Neovim theme files, so the first login is not a blank desktop |
| 6. User units | installs the session services into `~/.config/systemd/user` and enables them | | 6. User units | installs the session services into `~/.config/systemd/user` and enables them |
| 7. systemd drop-ins | writes the shutdown timeouts, oomd thresholds, plocate prune paths, and sleep hooks under `/etc` | | 7. systemd drop-ins | writes the shutdown timeouts, oomd thresholds, plocate prune paths, and sleep hooks under `/etc` |
+5
View File
@@ -17,6 +17,7 @@ with `--check`.
| `install/steps/services.sh` | system services, systemd drop-ins, user units | | `install/steps/services.sh` | system services, systemd drop-ins, user units |
| `install/steps/boot.sh` | the Plymouth boot splash, GRUB, and other-OS detection | | `install/steps/boot.sh` | the Plymouth boot splash, GRUB, and other-OS detection |
| `install/steps/theme.sh` | the wallpaper link, the first theme, the first background | | `install/steps/theme.sh` | the wallpaper link, the first theme, the first background |
| `install/steps/apps.sh` | default applications for images, video, PDFs and office files |
| `install/steps/login.sh` | SDDM, the session entry, and the first launch | | `install/steps/login.sh` | SDDM, the session entry, and the first launch |
| `install/steps/reload.sh` | reloading systemd, the user services, and a running session | | `install/steps/reload.sh` | reloading systemd, the user services, and a running session |
@@ -45,6 +46,10 @@ with `--check`.
panels come up full of blanks. `fonts.conf` binds `monospace` to panels come up full of blanks. `fonts.conf` binds `monospace` to
`JetBrainsMono Nerd Font`; `blob font set` rewrites the same file, and the `JetBrainsMono Nerd Font`; `blob font set` rewrites the same file, and the
installer then reports it as a local change and keeps your choice. installer then reports it as a local change and keeps your choice.
Default applications are set in `~/.config/mimeapps.list`: `imv` for
images, `mpv` for video and audio, `evince` for PDFs, and LibreOffice for
documents, spreadsheets and presentations. A file type that already has a
default there is left alone. See [packages.md](packages.md#desktop-applications).
`~/.bashrc` gets one line sourcing `session/bashrc`. The line is added once, `~/.bashrc` gets one line sourcing `session/bashrc`. The line is added once,
a `.bak` is kept, and a `~/.bashrc` that already has it is left alone. a `.bak` is kept, and a `~/.bashrc` that already has it is left alone.
`session/profile.sh` also goes to `/etc/profile.d/blob.sh`, which sources `session/profile.sh` also goes to `/etc/profile.d/blob.sh`, which sources
+17
View File
@@ -136,6 +136,23 @@ Omarchy's own package list, because they were installed by hand on this machine:
`playerctl` is in official `extra`, so it sits in the repo list. `playerctl` is in official `extra`, so it sits in the repo list.
## Desktop applications
The everyday apps come from the official repositories with everything else:
| Package | Opens |
| --- | --- |
| `imv` | images |
| `mpv` | video and audio |
| `evince` | PDFs |
| `libreoffice-fresh` | documents, spreadsheets and presentations (Writer, Calc, Impress) |
| `kdenlive` | video editing |
`install.sh` makes them the default for their file types through `xdg-mime`,
which writes `~/.config/mimeapps.list`. A type that already has a default in
that file is left alone, so a choice you made yourself always wins, and an app
that is not installed is skipped.
## The boot splash ## The boot splash
`install.sh` sets the splash to `branding/blob_boot.png`. To change it later: `install.sh` sets the splash to `branding/blob_boot.png`. To change it later:
+2
View File
@@ -51,6 +51,7 @@ source "$repo_dir/install/steps/config.sh"
source "$repo_dir/install/steps/services.sh" source "$repo_dir/install/steps/services.sh"
source "$repo_dir/install/steps/boot.sh" source "$repo_dir/install/steps/boot.sh"
source "$repo_dir/install/steps/theme.sh" source "$repo_dir/install/steps/theme.sh"
source "$repo_dir/install/steps/apps.sh"
source "$repo_dir/install/steps/login.sh" source "$repo_dir/install/steps/login.sh"
source "$repo_dir/install/steps/reload.sh" source "$repo_dir/install/steps/reload.sh"
@@ -73,6 +74,7 @@ install_bash_integration
install_user_units install_user_units
install_systemd_dropins install_systemd_dropins
install_zen_config install_zen_config
install_default_apps
link_wallpapers link_wallpapers
install_default_theme install_default_theme
+53
View File
@@ -0,0 +1,53 @@
mimeapps_file="$config_dir/mimeapps.list"
default_app_associations=(
"imv.desktop:image/png image/jpeg image/gif image/webp image/bmp image/tiff image/avif image/heif image/svg+xml"
"mpv.desktop:video/mp4 video/x-matroska video/webm video/quicktime video/x-msvideo video/mpeg video/ogg audio/mpeg audio/flac audio/ogg audio/x-wav audio/mp4"
"org.gnome.Evince.desktop:application/pdf"
"libreoffice-writer.desktop:application/vnd.oasis.opendocument.text application/msword application/vnd.openxmlformats-officedocument.wordprocessingml.document application/rtf"
"libreoffice-calc.desktop:application/vnd.oasis.opendocument.spreadsheet application/vnd.ms-excel application/vnd.openxmlformats-officedocument.spreadsheetml.sheet text/csv"
"libreoffice-impress.desktop:application/vnd.oasis.opendocument.presentation application/vnd.ms-powerpoint application/vnd.openxmlformats-officedocument.presentationml.presentation"
)
mime_default_chosen() {
[[ -f $mimeapps_file ]] || return 1
awk -v mime="$1" '
/^\[/ { in_defaults = ($0 == "[Default Applications]"); next }
in_defaults && index($0, mime "=") == 1 { found = 1 }
END { exit found ? 0 : 1 }
' "$mimeapps_file"
}
install_default_apps() {
if ! command -v xdg-mime &>/dev/null; then
say "SKIP default applications (xdg-utils not installed)"
return 0
fi
local pending=() entry desktop_file mime_types mime_type
for entry in "${default_app_associations[@]}"; do
desktop_file="${entry%%:*}"
mime_types="${entry#*:}"
[[ -f /usr/share/applications/$desktop_file ]] || continue
for mime_type in $mime_types; do
mime_default_chosen "$mime_type" && continue
pending+=("$desktop_file:$mime_type")
done
done
if (( ${#pending[@]} == 0 )); then
say "ok default applications"
return 0
fi
note_change
if [[ $check == true ]]; then
say "would set ${#pending[@]} default application association(s)"
return 0
fi
for entry in "${pending[@]}"; do
xdg-mime default "${entry%%:*}" "${entry#*:}"
done
say "set ${#pending[@]} default application association(s)"
}
+8 -1
View File
@@ -126,12 +126,19 @@ tesseract-data-eng
qrencode qrencode
zbar zbar
# Media # Media: video and audio player, image viewer, PDF viewer
mpv mpv
mpv-mpris mpv-mpris
imv imv
evince evince
# Office and video editing
libreoffice-fresh
kdenlive
# Default application associations, set by install/steps/apps.sh
xdg-utils
# Files # Files
nautilus nautilus
nautilus-python nautilus-python