This commit is contained in:
holm / Christian Müller 2025-06-08 16:06:00 +02:00
parent eebe641c16
commit 4c9fd72cc2
3 changed files with 45 additions and 1 deletions

1
NoNative.urls Symbolic link
View file

@ -0,0 +1 @@
/home/holm/.config/NoNative/NoNative.urls

View file

@ -1,3 +1,45 @@
#!/bin/bash
echo "NoNative"
# command = Name of the Web"App"
# set by name of symlink
#
# Example:
# ln -s ~/bin/github /bin/github
#
# or given as first argument:
# noNative github
command=$(basename $0)
if [[ $1 ]]; then
command=$1
fi
# Function runNative() declares what
# to do with the urls
runNative() {
chromium --app=$1 %U
}
if [[ $command == "noNative" || $command == "--list" ]]; then
printf " %20s %s" [COMMAND] [URL]
fi
while IFS= read -r line; do
key=${line%% *}
value=${line#* }
if [[ $command == "noNative" || $command == "--list" ]]; then
if [[ $key ]]; then
if [[ $key == "#" ]]; then
key=$value
value=""
fi
if [[ $value ]]; then
printf "%20s %s\n" $key $value
else
printf "\n" $key
fi
fi
elif [[ "$key" == $command ]]; then
runNative $value
echo $value
fi
done <~/.config/NoNative/NoNative.urls

1
seafile Symbolic link
View file

@ -0,0 +1 @@
nonative.sh