Move the 'xplorer' alias to a binary

Using an alias does not work well when calling it from the WM's
launcher.
This commit is contained in:
Rodolphe Breard 2016-10-31 18:03:54 +01:00
parent 399b685d3f
commit 9d1859928f
2 changed files with 11 additions and 4 deletions

View file

@ -17,10 +17,6 @@ hash sqlmap 2>/dev/null && alias sqlmap='sqlmap --user-agent="Mozilla/5.0 (compa
hash sqlmap 2>/dev/null && alias sqlmap-tor='sqlmap --tor --tor-type=SOCKS5'
hash steam 2>/dev/null && alias steam='find ~/.local/share/Steam/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete; steam'
for name in 'thunar' 'pcmanfm'; do
hash "$name" 2>/dev/null && alias xplorer="$name"
done
if hash chromium 2>/dev/null; then
chromium-tor() {
killall chromium

11
bin/xplorer Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -euo pipefail
IFS=$'\n\t'
for name in 'pcmanfm' 'thunar'; do
if hash "$name" 2>/dev/null; then
"$name"
break
fi
done