Don't display Theme, Icons, Font or Window Manager if X isn't running
This commit is contained in:
parent
ba2c66daa7
commit
058e0bc3e6
7
fetch
7
fetch
|
@ -540,7 +540,7 @@ getuptime () {
|
|||
"Mac OS X" | *"BSD")
|
||||
# Get boot time in seconds
|
||||
boot="$(sysctl -n kern.boottime)"
|
||||
boot="${boot/{ sec = }"
|
||||
boot="${boot/'{ sec = '}"
|
||||
boot=${boot/,*}
|
||||
|
||||
# Get current date in seconds
|
||||
|
@ -763,7 +763,7 @@ getwm () {
|
|||
case "$os" in
|
||||
"Mac OS X") wm="Quartz Compositor" ;;
|
||||
"Windows") wm="Explorer" ;;
|
||||
*) wm="Unknown" ;;
|
||||
"Linux" | *"BSD") return ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
@ -1176,6 +1176,9 @@ getresolution () {
|
|||
# Theme/Icons/Font {{{
|
||||
|
||||
getstyle () {
|
||||
# If X isn't running don't print the theme.
|
||||
[ ! -n "$DISPLAY" ] && return
|
||||
|
||||
# Fix weird output when the function
|
||||
# is run multiple times.
|
||||
unset gtk2theme gtk3theme
|
||||
|
|
Reference in New Issue