More advanced o command that opens multiple files

Use a little script for `o` instead of a simple alias to xdg-open. This
way multiple files can be opened.
This commit is contained in:
Jean-Claude 2024-01-16 12:12:47 +01:00
parent 262341bc00
commit 029c467a6f
Signed by: jeanclaude
GPG Key ID: 8A300F57CBB9F63E
3 changed files with 19 additions and 1 deletions

18
Scripts/o Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
show_help() {
echo "Usage: $0 [OPTION] [FILE]..."
echo "Open the provided FILEs using xdg-open."
echo
echo "Options:"
echo " -h, --help Display this help menu."
exit 0
}
if [ "$1" == "--help" ] || [ "$1" == "-h" ] || [ "$#" -eq 0 ]; then
show_help
fi
for var in "$@"; do
xdg-open "$var" &
done

View File

@ -162,6 +162,7 @@ then
sudo bash -c "$(declare -f linker); linker \"$dotfiles/Scripts/scrotMenu.sh\" '/bin/scrotMenu.sh'"
sudo bash -c "$(declare -f linker); linker \"$dotfiles/Scripts/monitorMenu.sh\" '/bin/monitorMenu.sh'"
linker "$dotfiles/Scripts/wwan.sh" ~/bin/wwan.sh
linker "$dotfiles/Scripts/o" ~/bin/o
fi
## WM

View File

@ -19,7 +19,6 @@ alias md='mkdir -p'
alias l='ls -lah'
alias tree='tree -a'
alias c='clear'
alias o='xdg-open'
alias g='git'
alias copy='xclip'
alias copyc='xclip -selection clipboard'