mirror of
https://github.com/Kron4ek/Conty
synced 2024-12-26 09:58:38 +01:00
Auto replace home path in launch arguments for custom home dirs
This commit is contained in:
parent
269c899cac
commit
f669dbfb29
1 changed files with 13 additions and 1 deletions
|
@ -608,6 +608,9 @@ run_bwrap () {
|
||||||
unset non_standard_home
|
unset non_standard_home
|
||||||
unset xsockets
|
unset xsockets
|
||||||
unset mount_opt
|
unset mount_opt
|
||||||
|
unset command_line
|
||||||
|
|
||||||
|
command_line=("${@}")
|
||||||
|
|
||||||
if [ -n "${WAYLAND_DISPLAY}" ]; then
|
if [ -n "${WAYLAND_DISPLAY}" ]; then
|
||||||
wayland_socket="${WAYLAND_DISPLAY}"
|
wayland_socket="${WAYLAND_DISPLAY}"
|
||||||
|
@ -634,6 +637,15 @@ run_bwrap () {
|
||||||
--setenv "HOME" "${NEW_HOME}" \
|
--setenv "HOME" "${NEW_HOME}" \
|
||||||
--setenv "XDG_CONFIG_HOME" "${NEW_HOME}"/.config \
|
--setenv "XDG_CONFIG_HOME" "${NEW_HOME}"/.config \
|
||||||
--setenv "XDG_DATA_HOME" "${NEW_HOME}"/.local/share)
|
--setenv "XDG_DATA_HOME" "${NEW_HOME}"/.local/share)
|
||||||
|
|
||||||
|
unset command_line
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [[ "${arg}" == *"${HOME}"* ]]; then
|
||||||
|
arg="$(echo "${arg/"$HOME"/"$NEW_HOME"}")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
command_line+=("${arg}")
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -795,7 +807,7 @@ run_bwrap () {
|
||||||
"${unshare_net[@]}" \
|
"${unshare_net[@]}" \
|
||||||
"${set_vars[@]}" \
|
"${set_vars[@]}" \
|
||||||
--setenv PATH "${CUSTOM_PATH}" \
|
--setenv PATH "${CUSTOM_PATH}" \
|
||||||
"$@"
|
"${command_line[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_function () {
|
exit_function () {
|
||||||
|
|
Loading…
Reference in a new issue