Skip to content
Snippets Groups Projects
Commit ddb1dde9 authored by nimrod's avatar nimrod
Browse files

Added flatpak-kill for sending signals using pkill to flatpak applications.

parent 88fcec4d
Branches
No related tags found
No related merge requests found
...@@ -221,6 +221,21 @@ match_ssl_pair () { ...@@ -221,6 +221,21 @@ match_ssl_pair () {
return "$exitcode" return "$exitcode"
} }
flatpak-kill () {
if [ "$#" -lt 1 ]
then
echo "You must specify application name." >> /dev/stderr
false
else
name="$1"
shift
for pid in $(flatpak ps --columns=application,pid | awk "tolower(\$2) ~ /$name/ {print \$3}")
do
pkill "$pid" "$@"
done
fi
}
__run_duration () { __run_duration () {
if [ -f "$HOME/.prerun.$$" ] if [ -f "$HOME/.prerun.$$" ]
then then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment