Update argparser to work with launcher mode

This commit is contained in:
2021-08-29 19:40:24 +02:00
parent 9cad6fc050
commit 9a3e36fcb1
2 changed files with 20 additions and 26 deletions

View File

@@ -12,13 +12,15 @@ check_dir() {
for application in "$dir/"*; do
file="$(basename "$application")"
sed "s/Exec=/Exec=bwrap --name='$file' --profile=gui /gi" "$application" > "$target/$file"
sed "s/Exec=/Exec=bwshell --name '$file' --profile gui /gi" "$application" > "$target/$file"
done
}
dirs=("/usr/share/applications" "$HOME/.local/share/applications")
target="$1"
mkdir -p "$target"
for dir in "${dirs[@]}"; do
check_dir "$dir"
done
done