My emacs installation has over time grown so that the startup has started taking multiple seconds. The only feasible way to run emacs then is in daemon mode and then connecting with emacsclient. In my init.el I have the following snippet:
(lambda () (when (display-graphic-p) (set-scroll-bar-mode 'right) (menu-bar-mode -1) (tool-bar-mode -1)))
This runs once on startup and and removes the toolbars atop graphical emacs, along with putting the scroll bar on the right hand side of the window. But in terminal emacs set-scroll-bar-mode is undefined, hence the surrounding if-statement.
The problem then is that this code runs on emacs startup, not when a client connects to the emacs daemon. Where do I hook up this function so that it's run for every new emacsclient that connects.