Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- xdg-email
- +++ xdg-email
- @@ -394,6 +394,17 @@
- return 0
- }
- +run_claws()
- +{
- + claws-mail --compose "$1"
- + if [ $? -eq 0 ]
- + then
- + exit_success
- + else
- + exit_failure_operation_failed
- + fi
- +}
- +
- run_thunderbird()
- {
- local THUNDERBIRD MAILTO NEWMAILTO TO CC BCC SUBJECT BODY ATTACH
- @@ -523,25 +534,30 @@
- open_generic()
- {
- - IFS=":"
- - for browser in $BROWSER; do
- - if [ x"$browser" != x"" ]; then
- -
- - browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
- - if [ $? -ne 0 ]; then browser_with_arg=$browser;
- - fi
- -
- - if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
- - else $browser_with_arg;
- - fi
- -
- - if [ $? -eq 0 ]; then exit_success;
- - fi
- - fi
- - done
- -
- - exit_failure_operation_impossible "no method available for opening '$1'"
- -}
- + if pgrep -fl claws-mail
- + then
- + run_claws $1
- + else
- + IFS=":"
- + for browser in $BROWSER; do
- + if [ x"$browser" != x"" ]; then
- +
- + browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
- + if [ $? -ne 0 ]; then browser_with_arg=$browser;
- + fi
- +
- + if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
- + else $browser_with_arg;
- + fi
- +
- + if [ $? -eq 0 ]; then exit_success;
- + fi
- + fi
- + done
- +
- + exit_failure_operation_impossible "no method available for opening '$1'"
- + fi
- + }
- url_encode()
- {
- @@ -728,11 +744,7 @@
- open_xfce "${mailto}"
- ;;
- - lxde)
- - open_generic "${mailto}"
- - ;;
- -
- *)
- - exit_failure_operation_impossible "no method available for opening '${mailto}'"
- + open_generic "${mailto}"
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment