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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D
Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul
l 2>&1` ; then DE=gnome; | 339 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D
Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul
l 2>&1` ; then DE=gnome; |
340 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul
l 2>&1; then DE=xfce; | 340 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul
l 2>&1; then DE=xfce; |
341 elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>
&1; then DE=xfce | 341 elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>
&1; then DE=xfce |
342 fi | 342 fi |
343 | 343 |
344 if [ x"$DE" = x"" ]; then | 344 if [ x"$DE" = x"" ]; then |
345 # fallback to checking $DESKTOP_SESSION | 345 # fallback to checking $DESKTOP_SESSION |
346 case "$DESKTOP_SESSION" in | 346 case "$DESKTOP_SESSION" in |
347 gnome) | 347 gnome) |
348 DE=gnome; | 348 DE=gnome; |
| 349 ;; |
349 LXDE) | 350 LXDE) |
350 DE=lxde; | 351 DE=lxde; |
351 ;; | 352 ;; |
352 xfce|xfce4) | 353 xfce|xfce4) |
353 DE=xfce; | 354 DE=xfce; |
354 ;; | 355 ;; |
355 esac | 356 esac |
356 fi | 357 fi |
357 | 358 |
358 if [ x"$DE" = x"" ]; then | 359 if [ x"$DE" = x"" ]; then |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 if [ "$action" = "suspend" ] ; then | 981 if [ "$action" = "suspend" ] ; then |
981 # Start tracking $window_id and resume the screensaver once it disappears | 982 # Start tracking $window_id and resume the screensaver once it disappears |
982 ( track_window ) 2> /dev/null > /dev/null & | 983 ( track_window ) 2> /dev/null > /dev/null & |
983 fi | 984 fi |
984 | 985 |
985 if [ $result -eq 0 ]; then | 986 if [ $result -eq 0 ]; then |
986 exit_success | 987 exit_success |
987 else | 988 else |
988 exit_failure_operation_failed | 989 exit_failure_operation_failed |
989 fi | 990 fi |
OLD | NEW |