Merge pull request #1062 from psychon/use-awesome-client-arguments
Make use of awesome-client commands
This commit is contained in:
commit
2e97b68dac
|
@ -304,10 +304,10 @@ the upper right corner of the screen.
|
|||
### How to restart or quit awesome?
|
||||
|
||||
You can use the keybinding "Mod4+Ctrl+r" or by selecting restart in the menu.
|
||||
You could call `awesome.restart` either from the Lua prompt widget, or by
|
||||
passing it to `awesome-client`:
|
||||
You could call `awesome.restart` either from the Lua prompt widget, or via
|
||||
`awesome-client`:
|
||||
|
||||
$ echo 'awesome.restart()' | awesome-client
|
||||
$ awesome-client 'awesome.restart()'
|
||||
|
||||
You can also send the `SIGHUP` signal to the awesome process. Find the PID using
|
||||
`ps`, `pgrep` or use `pkill`:
|
||||
|
|
|
@ -188,7 +188,7 @@ start_awesome() {
|
|||
cd - >/dev/null
|
||||
|
||||
# Wait until the interface for awesome-client is ready (D-Bus interface).
|
||||
wait_until_success "wait for awesome startup via awesome-client" "echo 'return 1' | DISPLAY=$D '$AWESOME_CLIENT' 2>&1"
|
||||
wait_until_success "wait for awesome startup via awesome-client" "DISPLAY=$D '$AWESOME_CLIENT' 'return 1' 2>&1"
|
||||
}
|
||||
|
||||
# Count errors.
|
||||
|
|
|
@ -44,14 +44,16 @@ a_dbus_send()
|
|||
$DBUS_SEND --dest=$DBUS_DEST --type=method_call --print-reply \
|
||||
$DBUS_PATH $DBUS_METHOD string:"$1" | tail -n +2
|
||||
ret=$?
|
||||
if [ "$ret" != 0 ] && [ "$ISATTY" != 0 ]; then
|
||||
if [ "$ret" != 0 ] && [ "$FATAL_ERRORS" != 0 ]; then
|
||||
echo "E: $DBUS_SEND failed." >&2
|
||||
exit $ret
|
||||
fi
|
||||
}
|
||||
|
||||
FATAL_ERRORS="$ISATTY"
|
||||
if [ $# -ne 0 ]
|
||||
then
|
||||
FATAL_ERRORS="1"
|
||||
for arg in "$@" ; do
|
||||
a_dbus_send "$arg"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue