OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 #--------------------------------------------- | 2 #--------------------------------------------- |
3 # xdg-settings | 3 # xdg-settings |
4 # | 4 # |
5 # Utility script to get various settings from the desktop environment. | 5 # Utility script to get various settings from the desktop environment. |
6 # | 6 # |
7 # Refer to the usage() function below for usage. | 7 # Refer to the usage() function below for usage. |
8 # | 8 # |
9 # Copyright 2009, Google Inc. | 9 # Copyright 2009, Google Inc. |
10 # | 10 # |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 case "$(uname 2>/dev/null)" in | 399 case "$(uname 2>/dev/null)" in |
400 Darwin) | 400 Darwin) |
401 DE=darwin; | 401 DE=darwin; |
402 ;; | 402 ;; |
403 esac | 403 esac |
404 fi | 404 fi |
405 | 405 |
406 if [ x"$DE" = x"gnome" ]; then | 406 if [ x"$DE" = x"gnome" ]; then |
407 # gnome-default-applications-properties is only available in GNOME 2.x | 407 # gnome-default-applications-properties is only available in GNOME 2.x |
408 # but not in GNOME 3.x | 408 # but not in GNOME 3.x |
409 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" | 409 which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome
3" |
410 fi | 410 fi |
411 } | 411 } |
412 | 412 |
413 #---------------------------------------------------------------------------- | 413 #---------------------------------------------------------------------------- |
414 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 414 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
415 # It also always returns 1 in KDE 3.4 and earlier | 415 # It also always returns 1 in KDE 3.4 and earlier |
416 # Simply return 0 in such case | 416 # Simply return 0 in such case |
417 | 417 |
418 kfmclient_fix_exit_code() | 418 kfmclient_fix_exit_code() |
419 { | 419 { |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 ;; | 956 ;; |
957 | 957 |
958 generic) | 958 generic) |
959 dispatch_generic "$@" | 959 dispatch_generic "$@" |
960 ;; | 960 ;; |
961 | 961 |
962 *) | 962 *) |
963 exit_failure_operation_impossible "unknown desktop environment" | 963 exit_failure_operation_impossible "unknown desktop environment" |
964 ;; | 964 ;; |
965 esac | 965 esac |
OLD | NEW |