The most simple solution to your actual problem -- avoiding the tool bar -- is to customize
Alternatively you can also put
(setq tool-bar-mode nil) into your init file.
The problem with
window-system in emacs daemon is that the virtual frame of the emacs daemon is not connected to any display. Since the init file runs in the daemon
window-system is nil.
Furthermore, you shouldn't use
windows-system as bool variable. Use
display-graphic-p instead. See the last section of the windows-systems doc.
The server creates display frames for clients on demand (with option
after-make-frame-functions is the right place to hook in if you want to tweak your graphical frames generated by an emacs daemon. In the following I give you an example:
(defun my-frame-tweaks (&optional frame)
"My personal frame tweaks."
(setq frame (selected-frame)))
;; For the case that the init file runs after the frame has been created.
;; Call of emacs without --daemon option.
;; For the case that the init file runs before the frame is created.
;; Call of emacs with --daemon option.
(add-hook 'after-make-frame-functions #'my-frame-tweaks t)