is it possible to set different blank screen timeouts in Ubuntu 18.04 with Gnome when on battery or ac? The power settings menu provides only one field which is applied always, no matter of the current mode.
This question was already asked for the Unity desktop a while ago (How can I set a different screen timeout time when on battery than if I am plugged in?) and they did not find a solution but I had the hope that that might have changed with Gnome now.
Install "dconf Editor" tool.
search with the keyword "sleep".
go to the filed "sleep-inactive-ac-timeout"
Give your preferred amount of time in seconds.
go to the filed "sleep-Inctive-ac-type" and choose the preferred value. (i have set it to blank)
same thing do it for "battery mode" also.
No it's not possible. As of version 3.38, GNOME does not have different settings for this on ac/dc.
/org/gnome/desktop/session/idle-delay
/org/gnome/desktop/screensaver/lock-delay
Both are configurable via gui in gnome-settings.
Btw: as noted in the comments the accepted answer configures when the computer goes to sleep. That can be configured differently on ac/dc.