docs: avoid dashes and simplify wording
This commit is contained in:
1 parent
29b3024dc1
commit
c80fff41d0
14 files changed
+79
-78
No files matched your search
+4
-4
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# bottles-opener - double-click a file and it opens in its Windows program,
|
||||
# bottles-opener: double-click a file and it opens in its Windows program,
|
||||
# inside its bottle
|
||||
#
|
||||
# Copyright (C) 2026 Felitendo
|
||||
@@ -35,7 +35,7 @@ fi
|
||||
_bo_need_bottles() {
|
||||
bo_installs_detect
|
||||
(( ${#BO_INSTALLS[@]} )) && return 0
|
||||
bo_bad "$(bo_msg "Bottles is not installed - neither the package nor the Flatpak was found.")"
|
||||
bo_bad "$(bo_msg "Bottles is not installed. Neither the package nor the Flatpak was found.")"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ bo_do_enable() {
|
||||
if bo_watch_available; then
|
||||
bo_watch_enable || bo_note "$(bo_msg "Could not start the watcher for newly installed programs.")"
|
||||
else
|
||||
bo_note "$(bo_msg "No systemd user session - newly installed programs will not be picked up on their own.")"
|
||||
bo_note "$(bo_msg "No systemd user session, so newly installed programs will not be picked up on their own.")"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -220,7 +220,7 @@ _bo_find_program() {
|
||||
if (( ${#hits[@]} == 0 )); then
|
||||
bo_bad "$(bo_msg "No program called \"%s\" was found. \"bottles-opener programs\" lists them all." "$want")"
|
||||
else
|
||||
bo_bad "$(bo_msg "More than one program is called \"%s\" - name the bottle as well." "$want")"
|
||||
bo_bad "$(bo_msg "More than one program is called \"%s\". Name the bottle as well." "$want")"
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
+2
-2
@@ -89,7 +89,7 @@ _bo_file_put() {
|
||||
local path="$1" content="$2" rc
|
||||
|
||||
if ! _bo_owned "$path"; then
|
||||
bo_bad "$(bo_msg "Not overwriting %s - it was not written by this program." "$path")"
|
||||
bo_bad "$(bo_msg "Not overwriting %s: this program did not write it." "$path")"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -193,7 +193,7 @@ bo_apply() {
|
||||
|
||||
# Unreadable looks like empty, and converging on empty removes everything.
|
||||
if [[ -n $BO_SCAN_ERROR ]]; then
|
||||
bo_bad "$(bo_msg "Bottles could not be read - is python3 with PyYAML installed? Nothing was changed.")"
|
||||
bo_bad "$(bo_msg "Bottles could not be read. Is python3 with PyYAML installed? Nothing was changed.")"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
+2
-2
@@ -112,8 +112,8 @@ bo_assoc_compute() {
|
||||
done
|
||||
|
||||
# A detected type is the default when this program teaches the system the
|
||||
# type - nothing else could open it. A type the system knows already
|
||||
# belongs to some application somebody chose, and only gets "Open With".
|
||||
# type, because nothing else could open it. A type the system knows already
|
||||
# belongs to an app somebody chose, so it only gets "Open With".
|
||||
for k in "${!BO_A_EXT[@]}"; do
|
||||
[[ ${BO_A_STATE[k]} == auto ]] || continue
|
||||
ext="${BO_A_EXT[k]}"
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ bo_types_set() {
|
||||
mkdir -p "$(dirname "$BO_TYPES")" || return 1
|
||||
if [[ ! -e $BO_TYPES ]]; then
|
||||
{
|
||||
printf '# %s - file types changed by hand\n' "$BO_PRETTY"
|
||||
printf '# %s: file types changed by hand\n' "$BO_PRETTY"
|
||||
printf '#\n'
|
||||
printf '# Written by `%s`. Nothing here needs editing by hand.\n' "$BO_NAME"
|
||||
} > "$BO_TYPES" || return 1
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Writes one icon of a Windows program as PNG to stdout - the largest image of
|
||||
# it, the way Explorer would pick it for a big view.
|
||||
# Writes one icon of a Windows program as PNG to stdout. It picks the largest
|
||||
# image, like Explorer does for a big view.
|
||||
#
|
||||
# Usage: icon.py <file> [index]
|
||||
# <file> an .exe or .dll, an .ico, or a .png
|
||||
|
||||
+4
-4
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# The bottle's registry is asked first (scan.py): whatever an installer
|
||||
# registered there is what Windows would open. This table is for programs
|
||||
# that registered nothing - portable installs, copied folders.
|
||||
# that registered nothing, like portable installs or copied folders.
|
||||
|
||||
# Format: <pattern>|<ext>[=<switch>] ...
|
||||
#
|
||||
@@ -80,9 +80,9 @@ BO_KNOWN_PROGRAMS=(
|
||||
# Format: <ext>|<MIME type>|<description>|<magic>|<generic icon>|<flags>
|
||||
#
|
||||
# <magic>: string:<text> or big32:<hex>, matched at offset 0.
|
||||
# <flags>: "own" defines the type even where the system has the extension
|
||||
# already, as something else - .mpp is Musepack audio there, not a Project
|
||||
# file. The magic tells the two apart.
|
||||
# <flags>: "own" defines the type even where the system already uses the
|
||||
# extension for something else. For example, .mpp is Musepack audio there, not
|
||||
# a Project file. The magic tells the two apart.
|
||||
BO_KNOWN_TYPES=(
|
||||
# Office
|
||||
"ppa|application/x-ms-powerpoint-addin|PowerPoint add-in||x-office-presentation|"
|
||||
|
||||
+7
-7
@@ -184,7 +184,7 @@ bo_ui_status() {
|
||||
_bo_row "Bottles" "${BO_C_YELLOW}$(bo_msg "not found")${BO_C_RESET}"
|
||||
elif [[ -n $BO_SCAN_ERROR ]]; then
|
||||
_bo_row "Bottles" \
|
||||
"${BO_C_RED}$(bo_msg "could not be read - is python3 with PyYAML installed?")${BO_C_RESET}"
|
||||
"${BO_C_RED}$(bo_msg "could not be read (is python3 with PyYAML installed?)")${BO_C_RESET}"
|
||||
else
|
||||
_bo_row "Bottles" "$where"
|
||||
fi
|
||||
@@ -201,7 +201,7 @@ bo_ui_status() {
|
||||
if (( BO_N_ACTIVE )); then
|
||||
_bo_row "$(bo_msg "File types")" "$exts"
|
||||
else
|
||||
_bo_row "$(bo_msg "File types")" "${BO_C_DIM}$(bo_msg "none yet - add one under File types")${BO_C_RESET}"
|
||||
_bo_row "$(bo_msg "File types")" "${BO_C_DIM}$(bo_msg "none yet, add one under File types")${BO_C_RESET}"
|
||||
fi
|
||||
|
||||
if bo_watch_available; then
|
||||
@@ -250,7 +250,7 @@ bo_ui_settings() {
|
||||
done
|
||||
|
||||
bo_msg_into "Settings"; title="$BO_MSG_RESULT"
|
||||
bo_msg_into "Up/Down select - Space changes - q goes back"
|
||||
bo_msg_into "Up/Down: select, Space: change, q: back"
|
||||
hint="$BO_MSG_RESULT"
|
||||
|
||||
_bo_clearseq
|
||||
@@ -327,7 +327,7 @@ bo_ui_pick_program() {
|
||||
labels+=("$BO_LABEL")
|
||||
done
|
||||
|
||||
bo_msg_into "Up/Down select - Enter picks - q cancels"
|
||||
bo_msg_into "Up/Down: select, Enter: pick, q: cancel"
|
||||
hint="$BO_MSG_RESULT"
|
||||
_bo_clearseq
|
||||
_bo_term_rows 7
|
||||
@@ -416,7 +416,7 @@ bo_ui_programs() {
|
||||
local -a labels=() pexts=()
|
||||
|
||||
bo_msg_into "Programs"; title="$BO_MSG_RESULT"
|
||||
bo_msg_into "Up/Down select - Enter edits its file types - q goes back"
|
||||
bo_msg_into "Up/Down: select, Enter: edit file types, q: back"
|
||||
hint="$BO_MSG_RESULT"
|
||||
bo_msg_into "No programs found in any bottle."; empty="$BO_MSG_RESULT"
|
||||
|
||||
@@ -501,11 +501,11 @@ bo_ui_types() {
|
||||
local l_default l_openwith l_off l_missing l_added
|
||||
|
||||
bo_msg_into "File types"; title="$BO_MSG_RESULT"
|
||||
bo_msg_into "Up/Down select - Space switches - a adds one - Del removes - q goes back"
|
||||
bo_msg_into "Up/Down: select, Space: switch, a: add, Del: remove, q: back"
|
||||
hint="$BO_MSG_RESULT"
|
||||
bo_msg_into "\"double-click\" opens it; \"Open With\" only lists the program there."
|
||||
legend="$BO_MSG_RESULT"
|
||||
bo_msg_into "File opening is off - this is what it would do."
|
||||
bo_msg_into "File opening is off. This is what it would do."
|
||||
warn="$BO_MSG_RESULT"
|
||||
bo_msg_into "No file types yet. Press a to add one."
|
||||
empty="$BO_MSG_RESULT"
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Lists the bottles and programs of one Bottles installation, and the file
|
||||
# types each program registered in its bottle's registry - the way Windows
|
||||
# types each program registered in its bottle's registry. That is how Windows
|
||||
# knows them: extension -> ProgID -> open command, icon and description.
|
||||
#
|
||||
# Runs on the host, or inside the Bottles Flatpak fed through stdin, so it only
|
||||
|
||||
Reference in new issue
Block a user