v0.1
This commit is contained in:
parent
eebe641c16
commit
4c9fd72cc2
3 changed files with 45 additions and 1 deletions
1
NoNative.urls
Symbolic link
1
NoNative.urls
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/holm/.config/NoNative/NoNative.urls
|
44
nonative.sh
44
nonative.sh
|
@ -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
1
seafile
Symbolic link
|
@ -0,0 +1 @@
|
|||
nonative.sh
|
Loading…
Add table
Add a link
Reference in a new issue