fixed formatting - use only tabs, no spaces

pull/10/head
Jakub Klinkovský 12 years ago
parent 6321427214
commit 5ec919f7c0

@ -5,13 +5,13 @@
# Copyright (C) 2009-2011, Daniel J Griffiths <ghost1227@archlinux.us>
# Thanks to:
#
# Andrwe beta-testing and submitting the fix for the all
# important X incrementation function
# brisbin33 code cleanup
# tigrmesh finding a critical issue with the gnome-session handler
# Profjim several incredibly useful patches
# lambchops468 consolekit and hibernation patches
# CasperVector Massive rearchitecturing and code sanitation
# Andrwe beta-testing and submitting the fix for the all
# important X incrementation function
# brisbin33 code cleanup
# tigrmesh finding a critical issue with the gnome-session handler
# Profjim several incredibly useful patches
# lambchops468 consolekit and hibernation patches
# CasperVector Massive rearchitecturing and code sanitation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -46,8 +46,8 @@ yesno()
eval value=\$${1}
case "$value" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) return 0;;
[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) return 1;;
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) return 0;;
[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) return 1;;
*) warn "Invalid value for \`$1'; falling back to \`no' for now.";;
esac
}
@ -132,40 +132,40 @@ case ${flaglist[$binindex]} in
[Xx])
clear
# If X is already running and locktty=yes, activate it
# If X is already running and locktty=yes, activate it
if $(yesno locktty); then
if xdpyinfo -display ":$display.0" &> /dev/null; then
chvt "$((display+xtty))"
exitnormal
fi
fi
# Get the first empty display.
display=0
while ((display < 7)); do
if dpyinfo=$(xdpyinfo -display ":$display.0" 2>&1 1>/dev/null) ||
# Display is in use by another user.
[[ "$dpyinfo" == 'No protocol specified'* ]] ||
# Invalid MIT cookie.
[[ "$dpyinfo" == 'Invalid MIT'* ]]
then
let display+=1
else
break
fi
done
# run X in current tty
if [[ $xtty == "keep" ]]; then
vt=$(tty)
vt=${vt#/dev/}
if [[ $vt != tty* ]]; then
error "error: invalid TTY"
exiterror
fi
vt=${vt#tty}
fi
# Get the first empty display.
display=0
while ((display < 7)); do
if dpyinfo=$(xdpyinfo -display ":$display.0" 2>&1 1>/dev/null) ||
# Display is in use by another user.
[[ "$dpyinfo" == 'No protocol specified'* ]] ||
# Invalid MIT cookie.
[[ "$dpyinfo" == 'Invalid MIT'* ]]
then
let display+=1
else
break
fi
done
# run X in current tty
if [[ $xtty == "keep" ]]; then
vt=$(tty)
vt=${vt#/dev/}
if [[ $vt != tty* ]]; then
error "error: invalid TTY"
exiterror
fi
vt=${vt#tty}
else
vt=$((xtty+display))
vt=$((xtty+display))
fi
serverargs=":${display} $serverargs vt$vt"
@ -185,3 +185,4 @@ case ${flaglist[$binindex]} in
;;
esac
# vim:set ts=4 sw=4 noet:

@ -5,13 +5,13 @@
# Copyright (C) 2009-2011, Daniel J Griffiths <ghost1227@archlinux.us>
# Thanks to:
#
# Andrwe beta-testing and submitting the fix for the all
# important X incrementation function
# brisbin33 code cleanup
# tigrmesh finding a critical issue with the gnome-session handler
# Profjim several incredibly useful patches
# lambchops468 consolekit and hibernation patches
# CasperVector Massive rearchitecturing and code sanisation
# Andrwe beta-testing and submitting the fix for the all
# important X incrementation function
# brisbin33 code cleanup
# tigrmesh finding a critical issue with the gnome-session handler
# Profjim several incredibly useful patches
# lambchops468 consolekit and hibernation patches
# CasperVector Massive rearchitecturing and code sanisation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -82,16 +82,18 @@ nohup startx $* > /dev/null 2>&1 &
# If wait(1) returns with a value >128, it was interrupted by kill(1),
# so registration was sucessful.
if $consolekit; then
if [[ -n "$clockpid" ]]; then
if wait "$clockpid" >& /dev/null
then
kill "$dbuspid"
error "ConsoleKit registration timed out."
exit 1
else
kill "$dbuspid"
info "ConsoleKit registration succeeded."
exit 0
fi
fi
if [[ -n "$clockpid" ]]; then
if wait "$clockpid" >& /dev/null
then
kill "$dbuspid"
error "ConsoleKit registration timed out."
exit 1
else
kill "$dbuspid"
info "ConsoleKit registration succeeded."
exit 0
fi
fi
fi
# vim:set ts=4 sw=4 noet:

Loading…
Cancel
Save