OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 #--------------------------------------------- | 2 #--------------------------------------------- |
3 # xdg-screensaver | 3 # xdg-screensaver |
4 # | 4 # |
5 # Utility script to control screensaver. | 5 # Utility script to control screensaver. |
6 # | 6 # |
7 # Refer to the usage() function below for usage. | 7 # Refer to the usage() function below for usage. |
8 # | 8 # |
9 # Copyright 2006, Bryce Harrington <bryce@osdl.org> | 9 # Copyright 2006, Bryce Harrington <bryce@osdl.org> |
10 # | 10 # |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 case "$(uname 2>/dev/null)" in | 354 case "$(uname 2>/dev/null)" in |
355 Darwin) | 355 Darwin) |
356 DE=darwin; | 356 DE=darwin; |
357 ;; | 357 ;; |
358 esac | 358 esac |
359 fi | 359 fi |
360 | 360 |
361 if [ x"$DE" = x"gnome" ]; then | 361 if [ x"$DE" = x"gnome" ]; then |
362 # gnome-default-applications-properties is only available in GNOME 2.x | 362 # gnome-default-applications-properties is only available in GNOME 2.x |
363 # but not in GNOME 3.x | 363 # but not in GNOME 3.x |
364 which gnome-default-applications-properties 2> /dev/null || DE="gnome3" | 364 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" |
365 fi | 365 fi |
366 } | 366 } |
367 | 367 |
368 #---------------------------------------------------------------------------- | 368 #---------------------------------------------------------------------------- |
369 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 369 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
370 # It also always returns 1 in KDE 3.4 and earlier | 370 # It also always returns 1 in KDE 3.4 and earlier |
371 # Simply return 0 in such case | 371 # Simply return 0 in such case |
372 | 372 |
373 kfmclient_fix_exit_code() | 373 kfmclient_fix_exit_code() |
374 { | 374 { |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 if [ "$action" = "suspend" ] ; then | 975 if [ "$action" = "suspend" ] ; then |
976 # Start tracking $window_id and resume the screensaver once it disappears | 976 # Start tracking $window_id and resume the screensaver once it disappears |
977 ( track_window ) 2> /dev/null > /dev/null & | 977 ( track_window ) 2> /dev/null > /dev/null & |
978 fi | 978 fi |
979 | 979 |
980 if [ $result -eq 0 ]; then | 980 if [ $result -eq 0 ]; then |
981 exit_success | 981 exit_success |
982 else | 982 else |
983 exit_failure_operation_failed | 983 exit_failure_operation_failed |
984 fi | 984 fi |
OLD | NEW |