Change lock from i3lock to gnome-screensaver. And change command reboot/... to dbus-send.