Configuring screen timeout/lock based on location
Found it. idle-delay
must be of type uint32
and not a string like the other two values. So this works for me:
=work su -c "dconf write /org/gnome/desktop/screensaver/lock-enabled true" k
=work su -c "dconf write /org/gnome/desktop/session/idle-delay 'uint32 120'" k
=work su -c "dconf write /org/gnome/settings-daemon/plugins/power/sleep-display-ac 120" k
=work su -c "dconf write /org/gnome/settings-daemon/plugins/power/sleep-display-battery 120" k
!work su -c "dconf write /org/gnome/desktop/screensaver/lock-enabled false" k
!work su -c "dconf write /org/gnome/desktop/session/idle-delay 'uint32 0'" k
!work su -c "dconf write /org/gnome/settings-daemon/plugins/power/sleep-display-ac 0" k
!work su -c "dconf write /org/gnome/settings-daemon/plugins/power/sleep-display-battery 0" k