Use intern instead of read in the macro
Graphical vs tty depends on the frame

Run corresponding configuration after frame creation.
Load frame configuration at frame creation