История изменений
Исправление intelfx, (текущая версия) :
Энджой. Это нужно засунуть в отдельный скрипт и запускать с амперсандом в конце (т. е. чтобы форкнулось в фон) из ещё одного скрипта в xinitrc.d (не из того же!).
#!/bin/bash
function assert() {
if ! eval "[[ $1 ]]"; then echo "Assertion failed: '$1'" >&2; exit 1; fi
}
while read message; do
if [[ "$message" == *"member=PrepareForSleep"* ]]; then
# read PrepareForSleep's arguments: a single boolean
read type value
assert "'$type' == 'boolean'"
if [[ "$value" == "false" ]]; then
# false means "after resume". do what we have to
source /etc/X11/xinit/xinitrc.d/99-synclient
fi
elif [[ "$message" == *"member=NameAcquired"* ]]; then
# I don't know why this signal is reported, but well
# read NameAcquired's arguments: a single string
read type value
assert "'$type' == 'string'"
else
echo "Wrong signal: '$message'" >&2
exit 1
fi
done < <(dbus-monitor --system --monitor "interface='org.freedesktop.login1.Manager',member='PrepareForSleep'")
Исправление intelfx, :
Энджой.
#!/bin/bash
function assert() {
if ! eval "[[ $1 ]]"; then echo "Assertion failed: '$1'" >&2; exit 1; fi
}
while read message; do
if [[ "$message" == *"member=PrepareForSleep"* ]]; then
# read PrepareForSleep's arguments: a single boolean
read type value
assert "'$type' == 'boolean'"
if [[ "$value" == "false" ]]; then
# false means "after resume". do what we have to
source /etc/X11/xinit/xinitrc.d/99-synclient
fi
elif [[ "$message" == *"member=NameAcquired"* ]]; then
# I don't know why this signal is reported, but well
# read NameAcquired's arguments: a single string
read type value
assert "'$type' == 'string'"
else
echo "Wrong signal: '$message'" >&2
exit 1
fi
done < <(dbus-monitor --system --monitor "interface='org.freedesktop.login1.Manager',member='PrepareForSleep'")
Исправление intelfx, :
Энджой.
#!/bin/bash
function assert() {
if ! eval "[[ $1 ]]"; then echo "Assertion failed: '$1'" >&2; exit 1; fi
}
while read message; do
if [[ "$message" == *"member=PrepareForSleep"* ]]; then
# read PrepareForSleep's arguments: a single boolean
read type value
assert "'$type' == 'boolean'"
if [[ "$value" == "false" ]]; then
# false means "after resume". do what we have to
/etc/X11/xinit/xinitrc.d/99-synclient
fi
elif [[ "$message" == *"member=NameAcquired"* ]]; then
# I don't know why this signal is reported, but well
# read NameAcquired's arguments: a single string
read type value
assert "'$type' == 'string'"
else
echo "Wrong signal: '$message'" >&2
exit 1
fi
done < <(dbus-monitor --system --monitor "interface='org.freedesktop.login1.Manager',member='PrepareForSleep'")
Исходная версия intelfx, :
Энджой.
#!/bin/bash
function assert() {
if ! eval "[[ $1 ]]"; then echo "Assertion failed: '$1'" >&2; exit 1; fi
}
while read message; do
if [[ "$message" = *"member=PrepareForSleep"* ]]; then
# read PrepareForSleep's arguments: a single boolean
read type value
assert "'$type' == 'boolean'"
if [[ "$value" == "false" ]]; then
# false means "after resume". do what we have to
/etc/X11/xinit/xinitrc.d/99-synclient
fi
elif [[ "$message" = *"member=NameAcquired"* ]]; then
# I don't know why this signal is reported, but well
# read NameAcquired's arguments: a single string
read type value
assert "'$type' == 'string'"
else
echo "Wrong signal: '$message'" >&2
exit 1
fi
done < <(dbus-monitor --system --monitor "interface='org.freedesktop.login1.Manager',member='PrepareForSleep'")