summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-11-29 22:38:56 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-11-29 22:38:56 -0500
commita12f3189bcf6d2cf277acfa7824961b158bd57e6 (patch)
treef90abee14a9ba0918de7171c9223fd7079e29b41 /.local
parent8d5402c81566b7dbef4839a78b5cb2623b9857a0 (diff)
stuff
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/pick4
-rwxr-xr-x.local/bin/x-pdf3
-rwxr-xr-x.local/bin/x-terminal-emulator3
-rwxr-xr-x.local/bin/x-www-browser3
4 files changed, 5 insertions, 8 deletions
diff --git a/.local/bin/pick b/.local/bin/pick
index ed2d44d..6dc905f 100755
--- a/.local/bin/pick
+++ b/.local/bin/pick
@@ -19,7 +19,7 @@ if [[ $1 = -s ]]; then
shift
# Scan to find a running instance
for prog in "$@"; do
- if [[ -n "`pgrep $prog`" ]]; then
+ if [[ -n "$(pgrep "${prog%% *}")" ]]; then
printf '%s\n' "$prog"
exit 0
fi
@@ -28,7 +28,7 @@ fi
# Scan to find one that is installed
for prog in "$@"; do
- if [[ -x "`which $prog 2>/dev/null`" ]]; then
+ if [[ -x "$(which "${prog%% *}" 2>/dev/null)" ]]; then
printf '%s\n' "$prog"
exit 0
fi
diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf
index 3610fde..cfaa258 100755
--- a/.local/bin/x-pdf
+++ b/.local/bin/x-pdf
@@ -1,4 +1,3 @@
#!/bin/sh
-`pick zathura mupdf okular evince xpdf` "$@"
-exit $?
+eval $(pick atril zathura mupdf okular evince xpdf 'emacsclient -c') "$@"
diff --git a/.local/bin/x-terminal-emulator b/.local/bin/x-terminal-emulator
index 049b081..075dda5 100755
--- a/.local/bin/x-terminal-emulator
+++ b/.local/bin/x-terminal-emulator
@@ -1,4 +1,3 @@
#!/bin/sh
-`pick emacsterm urxvt gnome-terminal xterm` "$@"
-exit $?
+eval $(pick 'emacsterm -c' 'urxvt' 'xterm' 'gnome-terminal') "$@"
diff --git a/.local/bin/x-www-browser b/.local/bin/x-www-browser
index bbd8943..945dcfc 100755
--- a/.local/bin/x-www-browser
+++ b/.local/bin/x-www-browser
@@ -1,4 +1,3 @@
#!/bin/sh
-`pick -s conkeror iceweasel icecat firefox` "$@"
-exit $?
+eval $(pick -s iceweasel icecat firefox conkeror) "$@"