Run the input-method scripts with the system Python
A bare python resolves through PATH, so a mise, pyenv or venv interpreter could run them without the system's PyGObject. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0cd685946b
commit
a044bec0ab
5 files changed
+6
-6
No files matched your search
@@ -18,5 +18,5 @@ if [[ ${1:-} == "cycle" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
python "$OMARCHY_PATH/default/input-methods/configure.py" "$@"
|
/usr/bin/python3 "$OMARCHY_PATH/default/input-methods/configure.py" "$@"
|
||||||
fi
|
fi
|
||||||
@@ -14,7 +14,7 @@ fi
|
|||||||
|
|
||||||
method=${1:-}
|
method=${1:-}
|
||||||
if [[ -z $method ]]; then
|
if [[ -z $method ]]; then
|
||||||
python "$OMARCHY_PATH/default/input-methods/typing_setup.py" input
|
/usr/bin/python3 "$OMARCHY_PATH/default/input-methods/typing_setup.py" input
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -25,5 +25,5 @@ esac
|
|||||||
|
|
||||||
mapfile -t packages < <(jq -r --arg method "$method" '.[$method].packages[]' "$OMARCHY_PATH/default/input-methods/presets.json")
|
mapfile -t packages < <(jq -r --arg method "$method" '.[$method].packages[]' "$OMARCHY_PATH/default/input-methods/presets.json")
|
||||||
omarchy-pkg-add "${packages[@]}"
|
omarchy-pkg-add "${packages[@]}"
|
||||||
python "$OMARCHY_PATH/default/input-methods/typing_setup.py" add "$method"
|
/usr/bin/python3 "$OMARCHY_PATH/default/input-methods/typing_setup.py" add "$method"
|
||||||
echo "Input method added. Use Super+I or the Japanese/Korean input key to switch; existing custom Fcitx keys are preserved."
|
echo "Input method added. Use Super+I or the Japanese/Korean input key to switch; existing custom Fcitx keys are preserved."
|
||||||
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
python "$OMARCHY_PATH/default/input-methods/typing_setup.py" keyboard
|
/usr/bin/python3 "$OMARCHY_PATH/default/input-methods/typing_setup.py" keyboard
|
||||||
@@ -56,7 +56,7 @@ def choose(title, catalog, selected, kind, overrides=None):
|
|||||||
catalog = {**catalog, **{key: catalog.get(key, key) for key in selected}}
|
catalog = {**catalog, **{key: catalog.get(key, key) for key in selected}}
|
||||||
rows = picker_rows(catalog, selected)
|
rows = picker_rows(catalog, selected)
|
||||||
args = ["omarchy-menu-select", title] + list(rows.values())
|
args = ["omarchy-menu-select", title] + list(rows.values())
|
||||||
on_change = ["python", str(setup.ROOT / "default/input-methods/typing_setup.py"), "apply", kind, json.dumps({"catalog": catalog, "overrides": overrides or {}})]
|
on_change = ["/usr/bin/python3", str(setup.ROOT / "default/input-methods/typing_setup.py"), "apply", kind, json.dumps({"catalog": catalog, "overrides": overrides or {}})]
|
||||||
args += ["--", "--multiple", "--width", "620", "--maxheight", "650", "--on-change", json.dumps(on_change), "--change-key", "typing:" + kind]
|
args += ["--", "--multiple", "--width", "620", "--maxheight", "650", "--on-change", json.dumps(on_change), "--change-key", "typing:" + kind]
|
||||||
for key in selected:
|
for key in selected:
|
||||||
args += ["--selected", rows[key][1:]]
|
args += ["--selected", rows[key][1:]]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Singleton {
|
|||||||
// One reader and pending selection for every monitor's keyboard widget.
|
// One reader and pending selection for every monitor's keyboard widget.
|
||||||
Process {
|
Process {
|
||||||
id: watcher
|
id: watcher
|
||||||
command: ["/usr/bin/python", Quickshell.env("OMARCHY_PATH") + "/default/input-methods/indicator.py"]
|
command: ["/usr/bin/python3", Quickshell.env("OMARCHY_PATH") + "/default/input-methods/indicator.py"]
|
||||||
running: true
|
running: true
|
||||||
stdinEnabled: true
|
stdinEnabled: true
|
||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
|
|||||||
Reference in new issue
Block a user