From f2dc080a350d9f2ff576e4d03a2ea1e5a4576d22 Mon Sep 17 00:00:00 2001
From: ArthurSonzogni <sonzogniarthur@gmail.com>
Date: Sun, 16 Aug 2020 00:24:18 +0200
Subject: [PATCH] Variou details:

- Put the MIT copyright at the end.
- Move the directory /other -> tools
- Various improvements.
---
 .clang-format                                 |  1 -
 README.md                                     |  5 +--
 doc/example_list.md                           | 35 ++++++++++++++++
 include/ftxui/component/checkbox.hpp          |  8 ++--
 include/ftxui/component/component.hpp         |  8 ++--
 include/ftxui/component/container.hpp         |  8 ++--
 include/ftxui/component/event.hpp             |  8 ++--
 include/ftxui/component/input.hpp             |  8 ++--
 include/ftxui/component/menu.hpp              |  8 ++--
 include/ftxui/component/radiobox.hpp          |  8 ++--
 include/ftxui/component/receiver.hpp          |  8 ++--
 .../ftxui/component/screen_interactive.hpp    |  8 ++--
 include/ftxui/component/toggle.hpp            | 10 ++---
 include/ftxui/dom/elements.hpp                |  8 ++--
 include/ftxui/dom/node.hpp                    |  8 ++--
 include/ftxui/dom/requirement.hpp             |  8 ++--
 include/ftxui/dom/take_any_args.hpp           |  8 ++--
 include/ftxui/screen/box.hpp                  |  8 ++--
 include/ftxui/screen/color.hpp                |  8 ++--
 include/ftxui/screen/screen.hpp               |  8 ++--
 include/ftxui/screen/string.hpp               |  8 ++--
 include/ftxui/util/autoreset.hpp              |  8 ++--
 src/ftxui/component/checkbox.cpp              |  8 ++--
 src/ftxui/component/component.cpp             |  8 ++--
 src/ftxui/component/container.cpp             |  8 ++--
 src/ftxui/component/container_test.cpp        |  8 ++--
 src/ftxui/component/event.cpp                 |  8 ++--
 src/ftxui/component/event_test.cpp            |  8 ++--
 src/ftxui/component/input.cpp                 |  8 ++--
 src/ftxui/component/menu.cpp                  |  8 ++--
 src/ftxui/component/radiobox.cpp              |  8 ++--
 src/ftxui/component/radiobox_test.cpp         |  8 ++--
 src/ftxui/component/receiver_test.cpp         |  8 ++--
 src/ftxui/component/screen_interactive.cpp    | 32 +++++++--------
 src/ftxui/component/toggle.cpp                |  8 ++--
 src/ftxui/component/toggle_test.cpp           | 40 +++++++++----------
 src/ftxui/dom/blink.cpp                       |  8 ++--
 src/ftxui/dom/bold.cpp                        |  8 ++--
 src/ftxui/dom/border.cpp                      |  8 ++--
 src/ftxui/dom/color.cpp                       |  8 ++--
 src/ftxui/dom/composite_decorator.cpp         |  8 ++--
 src/ftxui/dom/dbox.cpp                        |  8 ++--
 src/ftxui/dom/dim.cpp                         |  8 ++--
 src/ftxui/dom/flex.cpp                        |  8 ++--
 src/ftxui/dom/frame.cpp                       |  8 ++--
 src/ftxui/dom/gauge.cpp                       |  8 ++--
 src/ftxui/dom/gauge_test.cpp                  |  8 ++--
 src/ftxui/dom/graph.cpp                       |  8 ++--
 src/ftxui/dom/hbox.cpp                        |  8 ++--
 src/ftxui/dom/hbox_test.cpp                   |  8 ++--
 src/ftxui/dom/hflow.cpp                       |  8 ++--
 src/ftxui/dom/inverted.cpp                    |  8 ++--
 src/ftxui/dom/node.cpp                        |  8 ++--
 src/ftxui/dom/node_decorator.cpp              |  8 ++--
 src/ftxui/dom/node_decorator.hpp              |  8 ++--
 src/ftxui/dom/paragraph.cpp                   |  8 ++--
 src/ftxui/dom/separator.cpp                   |  8 ++--
 src/ftxui/dom/size.cpp                        |  8 ++--
 src/ftxui/dom/spinner.cpp                     |  8 ++--
 src/ftxui/dom/text.cpp                        |  8 ++--
 src/ftxui/dom/text_test.cpp                   |  8 ++--
 src/ftxui/dom/underlined.cpp                  |  8 ++--
 src/ftxui/dom/util.cpp                        |  8 ++--
 src/ftxui/dom/vbox.cpp                        |  8 ++--
 src/ftxui/dom/vbox_test.cpp                   |  8 ++--
 src/ftxui/screen/box.cpp                      |  8 ++--
 src/ftxui/screen/screen.cpp                   | 18 ++++-----
 src/ftxui/screen/string.cpp                   | 14 +++----
 src/ftxui/screen/terminal.cpp                 | 18 ++++-----
 src/ftxui/screen/terminal.hpp                 |  8 ++--
 src/ftxui/screen/wcwidth.cpp                  |  8 ++--
 {other => tools}/format.sh                    |  2 +-
 {other => tools}/license_headers.cpp          |  2 +-
 73 files changed, 352 insertions(+), 321 deletions(-)
 create mode 100644 doc/example_list.md
 rename {other => tools}/format.sh (85%)
 rename {other => tools}/license_headers.cpp (100%)

diff --git a/.clang-format b/.clang-format
index 2dc5fa5e..0f21d0bb 100644
--- a/.clang-format
+++ b/.clang-format
@@ -2,4 +2,3 @@
 # http://clang.llvm.org/docs/ClangFormatStyleOptions.html
 BasedOnStyle: Chromium
 Standard: Cpp11
-IndentPPDirectives: BeforeHash
diff --git a/README.md b/README.md
index f3ae0cbc..b8d6795c 100644
--- a/README.md
+++ b/README.md
@@ -29,10 +29,7 @@ A simple C++ library for terminal based user interface.
  * Simple and elegant syntax (in my opinion).
  * Support for [UTF8](https://en.wikipedia.org/wiki/UTF-8) and [fullwidth chars](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) (→ 测试)
  * No dependencies.
- * Cross platform:
-   - Linux (main target)
-   - Windows (experimental, thanks to mauve@)
-   - Mac (never tested, but must WORK)
+ * Cross platform (mostly). Linux (main target), Windows (experimental), Mac.
 
 ## Example:
 ~~~cpp
diff --git a/doc/example_list.md b/doc/example_list.md
new file mode 100644
index 00000000..483fa6b1
--- /dev/null
+++ b/doc/example_list.md
@@ -0,0 +1,35 @@
+# Examples
+@example ./examples/util/print_key_press.cpp
+@example ./examples/dom/dbox.cpp
+@example ./examples/dom/separator.cpp
+@example ./examples/dom/style_color.cpp
+@example ./examples/dom/paragraph.cpp
+@example ./examples/dom/style_blink.cpp
+@example ./examples/dom/style_dim.cpp
+@example ./examples/dom/style_inverted.cpp
+@example ./examples/dom/graph.cpp
+@example ./examples/dom/package_manager.cpp
+@example ./examples/dom/window.cpp
+@example ./examples/dom/html_like.cpp
+@example ./examples/dom/border.cpp
+@example ./examples/dom/style_underlined.cpp
+@example ./examples/dom/gauge.cpp
+@example ./examples/dom/style_bold.cpp
+@example ./examples/dom/spinner.cpp
+@example ./examples/dom/style_gallery.cpp
+@example ./examples/dom/vbox_hbox.cpp
+@example ./examples/dom/size.cpp
+@example ./examples/dom/hflow.cpp
+@example ./examples/component/tab_vertical.cpp
+@example ./examples/component/gallery.cpp
+@example ./examples/component/checkbox.cpp
+@example ./examples/component/checkbox_in_frame.cpp
+@example ./examples/component/menu2.cpp
+@example ./examples/component/tab_horizontal.cpp
+@example ./examples/component/input.cpp
+@example ./examples/component/homescreen.cpp
+@example ./examples/component/radiobox.cpp
+@example ./examples/component/menu.cpp
+@example ./examples/component/menu_style.cpp
+@example ./examples/component/radiobox_in_frame.cpp
+@example ./examples/component/toggle.cpp
diff --git a/include/ftxui/component/checkbox.hpp b/include/ftxui/component/checkbox.hpp
index ffcee327..046abaaa 100644
--- a/include/ftxui/component/checkbox.hpp
+++ b/include/ftxui/component/checkbox.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_CHECKBOX_HPP
 #define FTXUI_COMPONENT_CHECKBOX_HPP
 
@@ -45,3 +41,7 @@ class CheckBox : public Component {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_CHECKBOX_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/component.hpp b/include/ftxui/component/component.hpp
index bd739f61..3c7129c8 100644
--- a/include/ftxui/component/component.hpp
+++ b/include/ftxui/component/component.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_COMPONENT_HPP
 #define FTXUI_COMPONENT_COMPONENT_HPP
 
@@ -57,3 +53,7 @@ class Component {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_COMPONENT_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/container.hpp b/include/ftxui/component/container.hpp
index 70fde164..444fa0a6 100644
--- a/include/ftxui/component/container.hpp
+++ b/include/ftxui/component/container.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_CONTAINER_HPP
 #define FTXUI_COMPONENT_CONTAINER_HPP
 
@@ -47,3 +43,7 @@ class Container : public Component {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_CONTAINER_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/event.hpp b/include/ftxui/component/event.hpp
index f24082ee..da109380 100644
--- a/include/ftxui/component/event.hpp
+++ b/include/ftxui/component/event.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_EVENT_HPP
 #define FTXUI_COMPONENT_EVENT_HPP
 
@@ -62,3 +58,7 @@ struct Event {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_EVENT_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/input.hpp b/include/ftxui/component/input.hpp
index 712696f8..e301eb4d 100644
--- a/include/ftxui/component/input.hpp
+++ b/include/ftxui/component/input.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_INPUT_H_
 #define FTXUI_COMPONENT_INPUT_H_
 
@@ -36,3 +32,7 @@ class Input : public Component {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_INPUT_H_ */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/menu.hpp b/include/ftxui/component/menu.hpp
index 91a709b9..66108e01 100644
--- a/include/ftxui/component/menu.hpp
+++ b/include/ftxui/component/menu.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_MENU
 #define FTXUI_COMPONENT_MENU
 
@@ -38,3 +34,7 @@ class Menu : public Component {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_MENU */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/radiobox.hpp b/include/ftxui/component/radiobox.hpp
index 726f7631..793e41d8 100644
--- a/include/ftxui/component/radiobox.hpp
+++ b/include/ftxui/component/radiobox.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_RADIOBOX_HPP
 #define FTXUI_COMPONENT_RADIOBOX_HPP
 
@@ -46,3 +42,7 @@ class RadioBox : public Component {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_RADIOBOX_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/receiver.hpp b/include/ftxui/component/receiver.hpp
index 86874fe6..ef65d814 100644
--- a/include/ftxui/component/receiver.hpp
+++ b/include/ftxui/component/receiver.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_RECEIVER_HPP_
 #define FTXUI_COMPONENT_RECEIVER_HPP_
 
@@ -118,3 +114,7 @@ Receiver<T> MakeReceiver() {
 }  // namespace ftxui
 
 #endif  // FTXUI_COMPONENT_RECEIVER_HPP_
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/screen_interactive.hpp b/include/ftxui/component/screen_interactive.hpp
index ce838f55..33279697 100644
--- a/include/ftxui/component/screen_interactive.hpp
+++ b/include/ftxui/component/screen_interactive.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
 #define FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
 
@@ -61,3 +57,7 @@ class ScreenInteractive : public Screen {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/component/toggle.hpp b/include/ftxui/component/toggle.hpp
index f0a2a653..d0f12903 100644
--- a/include/ftxui/component/toggle.hpp
+++ b/include/ftxui/component/toggle.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_COMPONENT_TOGGLE_H_
 #define FTXUI_COMPONENT_TOGGLE_H_
 
@@ -28,7 +24,7 @@ class Toggle : public Component {
   // Callback.
   std::function<void()> on_change = []() {};
   std::function<void()> on_enter = []() {};
-  
+
   // Component implementation.
   Element Render() override;
   bool OnEvent(Event) override;
@@ -37,3 +33,7 @@ class Toggle : public Component {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COMPONENT_TOGGLE_H_ */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/dom/elements.hpp b/include/ftxui/dom/elements.hpp
index d331ba58..1e20bb56 100644
--- a/include/ftxui/dom/elements.hpp
+++ b/include/ftxui/dom/elements.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_DOM_ELEMENTS_HPP
 #define FTXUI_DOM_ELEMENTS_HPP
 
@@ -108,3 +104,7 @@ TAKE_ANY_ARGS(hflow)
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_DOM_ELEMENTS_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/dom/node.hpp b/include/ftxui/dom/node.hpp
index b6868dfe..7998da6b 100644
--- a/include/ftxui/dom/node.hpp
+++ b/include/ftxui/dom/node.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_DOM_NODE_HPP
 #define FTXUI_DOM_NODE_HPP
 
@@ -50,3 +46,7 @@ void Render(Screen& screen, Node* node);
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_DOM_NODE_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/dom/requirement.hpp b/include/ftxui/dom/requirement.hpp
index c781c808..c2554232 100644
--- a/include/ftxui/dom/requirement.hpp
+++ b/include/ftxui/dom/requirement.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_DOM_REQUIREMENT_HPP
 #define FTXUI_DOM_REQUIREMENT_HPP
 
@@ -33,3 +29,7 @@ struct Requirement {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_REQUIREMENT_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/dom/take_any_args.hpp b/include/ftxui/dom/take_any_args.hpp
index 8de009b5..fecee238 100644
--- a/include/ftxui/dom/take_any_args.hpp
+++ b/include/ftxui/dom/take_any_args.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <type_traits>
 
 template <class T>
@@ -32,3 +28,7 @@ Elements unpack(Args... args) {
   Element container(Args... children) {                        \
     return container(unpack(std::forward<Args>(children)...)); \
   }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/screen/box.hpp b/include/ftxui/screen/box.hpp
index aaa9f456..3a643027 100644
--- a/include/ftxui/screen/box.hpp
+++ b/include/ftxui/screen/box.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_SCREEN_BOX_HPP
 #define FTXUI_SCREEN_BOX_HPP
 
@@ -19,3 +15,7 @@ struct Box {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_SCREEN_BOX_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/screen/color.hpp b/include/ftxui/screen/color.hpp
index 1a2d0588..3e46281b 100644
--- a/include/ftxui/screen/color.hpp
+++ b/include/ftxui/screen/color.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_SCREEN_COLOR
 #define FTXUI_SCREEN_COLOR
 
@@ -44,3 +40,7 @@ enum class Color : uint8_t {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_COLOR_H_ */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/screen/screen.hpp b/include/ftxui/screen/screen.hpp
index 98341f18..7caba267 100644
--- a/include/ftxui/screen/screen.hpp
+++ b/include/ftxui/screen/screen.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_SCREEN_SCREEN
 #define FTXUI_SCREEN_SCREEN
 
@@ -91,3 +87,7 @@ class Screen {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_SCREEN_SCREEN */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/screen/string.hpp b/include/ftxui/screen/string.hpp
index e6e5da9a..86899cc5 100644
--- a/include/ftxui/screen/string.hpp
+++ b/include/ftxui/screen/string.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_SCREEN_STRING_HPP
 #define FTXUI_SCREEN_STRING_HPP
 
@@ -23,3 +19,7 @@ int wstring_width_cjk(const std::wstring&);
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_SCREEN_STRING_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/include/ftxui/util/autoreset.hpp b/include/ftxui/util/autoreset.hpp
index aa09c000..f71c5df9 100644
--- a/include/ftxui/util/autoreset.hpp
+++ b/include/ftxui/util/autoreset.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_UTIL_AUTORESET_HPP
 #define FTXUI_UTIL_AUTORESET_HPP
 
@@ -24,3 +20,7 @@ class AutoReset {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_UTIL_AUTORESET_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/checkbox.cpp b/src/ftxui/component/checkbox.cpp
index 86e5dfb9..9f9cfd96 100644
--- a/src/ftxui/component/checkbox.cpp
+++ b/src/ftxui/component/checkbox.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/checkbox.hpp"
 
 #include <functional>
@@ -26,3 +22,7 @@ bool CheckBox::OnEvent(Event event) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/component.cpp b/src/ftxui/component/component.cpp
index fa07cc14..6588aee2 100644
--- a/src/ftxui/component/component.cpp
+++ b/src/ftxui/component/component.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/component.hpp"
 
 #include <assert.h>
@@ -63,3 +59,7 @@ bool Component::Focused() {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/container.cpp b/src/ftxui/component/container.cpp
index 3e052457..58abcc74 100644
--- a/src/ftxui/component/container.cpp
+++ b/src/ftxui/component/container.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/container.hpp"
 
 #include <algorithm>
@@ -111,3 +107,7 @@ Element Container::TabRender() {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/container_test.cpp b/src/ftxui/component/container_test.cpp
index a8c6e6b3..e28646e2 100644
--- a/src/ftxui/component/container_test.cpp
+++ b/src/ftxui/component/container_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/container.hpp"
 
 #include "gtest/gtest.h"
@@ -78,3 +74,7 @@ TEST(ContainerTest, HorizontalEvent) {
   EXPECT_EQ(container.ActiveChild(), &c1);
   container.OnEvent(Event::TabReverse);
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/event.cpp b/src/ftxui/component/event.cpp
index cff815ee..a523494c 100644
--- a/src/ftxui/component/event.cpp
+++ b/src/ftxui/component/event.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/event.hpp"
 
 #include <iostream>
@@ -189,3 +185,7 @@ Event Event::F12 = Event::Special("\x1B[24~");
 Event Event::Custom = Event::Special({0});
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/event_test.cpp b/src/ftxui/component/event_test.cpp
index d17866ca..5830991d 100644
--- a/src/ftxui/component/event_test.cpp
+++ b/src/ftxui/component/event_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/event.hpp"
 #include "ftxui/component/receiver.hpp"
 
@@ -47,3 +43,7 @@ TEST(Event, Character) {
   }
   EXPECT_FALSE(event_receiver->Receive(&received));
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/input.cpp b/src/ftxui/component/input.cpp
index f5d6f63b..db04765c 100644
--- a/src/ftxui/component/input.cpp
+++ b/src/ftxui/component/input.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/input.hpp"
 
 #include <algorithm>
@@ -97,3 +93,7 @@ bool Input::OnEvent(Event event) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/menu.cpp b/src/ftxui/component/menu.cpp
index 321edbb7..12b5ee34 100644
--- a/src/ftxui/component/menu.cpp
+++ b/src/ftxui/component/menu.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/menu.hpp"
 
 #include <algorithm>
@@ -53,3 +49,7 @@ bool Menu::OnEvent(Event event) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/radiobox.cpp b/src/ftxui/component/radiobox.cpp
index 6e89d956..ff7d169f 100644
--- a/src/ftxui/component/radiobox.cpp
+++ b/src/ftxui/component/radiobox.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/radiobox.hpp"
 
 #include <algorithm>
@@ -55,3 +51,7 @@ bool RadioBox::OnEvent(Event event) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/radiobox_test.cpp b/src/ftxui/component/radiobox_test.cpp
index 22a75660..8fd5c2d3 100644
--- a/src/ftxui/component/radiobox_test.cpp
+++ b/src/ftxui/component/radiobox_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/radiobox.hpp"
 
 #include "gtest/gtest.h"
@@ -80,3 +76,7 @@ TEST(RadioboxTest, Navigation) {
   EXPECT_EQ(radiobox.focused, 1);
   radiobox.OnEvent(Event::TabReverse);
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/receiver_test.cpp b/src/ftxui/component/receiver_test.cpp
index 7cdd513f..8d06cc8e 100644
--- a/src/ftxui/component/receiver_test.cpp
+++ b/src/ftxui/component/receiver_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/receiver.hpp"
 
 #include <thread>
@@ -76,3 +72,7 @@ TEST(Receiver, BasicWithThread) {
   t12.join();
   t23.join();
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp
index 125a82c2..7f7d8e99 100644
--- a/src/ftxui/component/screen_interactive.cpp
+++ b/src/ftxui/component/screen_interactive.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/screen_interactive.hpp"
 
 #include <stdio.h>
@@ -18,23 +14,23 @@
 #include "ftxui/screen/terminal.hpp"
 
 #if defined(_WIN32)
-  #define DEFINE_CONSOLEV2_PROPERTIES
-  #define WIN32_LEAN_AND_MEAN
-  #ifndef NOMINMAX
-    #define NOMINMAX
-  #endif
-  #include <Windows.h>
-  #ifndef UNICODE
-    #error Must be compiled in UNICODE mode
-  #endif
+#define DEFINE_CONSOLEV2_PROPERTIES
+#define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#include <Windows.h>
+#ifndef UNICODE
+#error Must be compiled in UNICODE mode
+#endif
 #else
-  #include <termios.h>
-  #include <unistd.h>
+#include <termios.h>
+#include <unistd.h>
 #endif
 
 // Quick exit is missing in standard CLang headers
 #if defined(__clang__) && defined(__APPLE__)
-  #define quick_exit(a) exit(a)
+#define quick_exit(a) exit(a)
 #endif
 
 namespace ftxui {
@@ -365,3 +361,7 @@ std::function<void()> ScreenInteractive::ExitLoopClosure() {
 }
 
 }  // namespace ftxui.
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/toggle.cpp b/src/ftxui/component/toggle.cpp
index 59786a28..c7be19e2 100644
--- a/src/ftxui/component/toggle.cpp
+++ b/src/ftxui/component/toggle.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/toggle.hpp"
 
 #include <algorithm>
@@ -54,3 +50,7 @@ bool Toggle::OnEvent(Event event) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/component/toggle_test.cpp b/src/ftxui/component/toggle_test.cpp
index cf376d60..acb19ef3 100644
--- a/src/ftxui/component/toggle_test.cpp
+++ b/src/ftxui/component/toggle_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/component/toggle.hpp"
 
 #include "gtest/gtest.h"
@@ -83,23 +79,23 @@ TEST(ToggleTest, OnChange) {
   int counter = 0;
   toggle.on_change = [&] { counter++; };
 
-  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft)); // Reached far left.
+  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft));  // Reached far left.
   EXPECT_EQ(counter, 0);
 
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight)); // [0] -> [1]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight));  // [0] -> [1]
   EXPECT_EQ(counter, 1);
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight)); // [1] -> [2]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight));  // [1] -> [2]
   EXPECT_EQ(counter, 2);
- 
-  EXPECT_FALSE(toggle.OnEvent(Event::ArrowRight)); // Reached far right.
+
+  EXPECT_FALSE(toggle.OnEvent(Event::ArrowRight));  // Reached far right.
   EXPECT_EQ(counter, 2);
 
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft)); // [2] -> [1]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft));  // [2] -> [1]
   EXPECT_EQ(counter, 3);
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft)); // [1] -> [0]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft));  // [1] -> [0]
   EXPECT_EQ(counter, 4);
 
-  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft)); // Reached far left.
+  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft));  // Reached far left.
   EXPECT_EQ(counter, 4);
 }
 
@@ -110,29 +106,33 @@ TEST(ToggleTest, OnEnter) {
   int counter = 0;
   toggle.on_enter = [&] { counter++; };
 
-  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft)); // Reached far left.
+  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft));  // Reached far left.
   EXPECT_TRUE(toggle.OnEvent(Event::Return));
   EXPECT_EQ(counter, 1);
 
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight)); // [0] -> [1]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight));  // [0] -> [1]
   EXPECT_TRUE(toggle.OnEvent(Event::Return));
   EXPECT_EQ(counter, 2);
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight)); // [1] -> [2]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowRight));  // [1] -> [2]
   EXPECT_TRUE(toggle.OnEvent(Event::Return));
   EXPECT_EQ(counter, 3);
- 
-  EXPECT_FALSE(toggle.OnEvent(Event::ArrowRight)); // Reached far right.
+
+  EXPECT_FALSE(toggle.OnEvent(Event::ArrowRight));  // Reached far right.
   EXPECT_TRUE(toggle.OnEvent(Event::Return));
   EXPECT_EQ(counter, 4);
 
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft)); // [2] -> [1]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft));  // [2] -> [1]
   EXPECT_TRUE(toggle.OnEvent(Event::Return));
   EXPECT_EQ(counter, 5);
-  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft)); // [1] -> [0]
+  EXPECT_TRUE(toggle.OnEvent(Event::ArrowLeft));  // [1] -> [0]
   EXPECT_TRUE(toggle.OnEvent(Event::Return));
   EXPECT_EQ(counter, 6);
 
-  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft)); // Reached far left.
+  EXPECT_FALSE(toggle.OnEvent(Event::ArrowLeft));  // Reached far left.
   EXPECT_TRUE(toggle.OnEvent(Event::Return));
   EXPECT_EQ(counter, 7);
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/blink.cpp b/src/ftxui/dom/blink.cpp
index d26e451a..bf07de03 100644
--- a/src/ftxui/dom/blink.cpp
+++ b/src/ftxui/dom/blink.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node_decorator.hpp"
 
@@ -29,3 +25,7 @@ Element blink(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/bold.cpp b/src/ftxui/dom/bold.cpp
index 4865bfd2..f959e814 100644
--- a/src/ftxui/dom/bold.cpp
+++ b/src/ftxui/dom/bold.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node_decorator.hpp"
 
@@ -29,3 +25,7 @@ Element bold(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/border.cpp b/src/ftxui/dom/border.cpp
index 3a58d233..cd0da337 100644
--- a/src/ftxui/dom/border.cpp
+++ b/src/ftxui/dom/border.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-#include <algorithm>
 
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node.hpp"
@@ -164,3 +160,7 @@ Decorator borderWith(Pixel pixel) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/color.cpp b/src/ftxui/dom/color.cpp
index abf648a5..c48fdc63 100644
--- a/src/ftxui/dom/color.cpp
+++ b/src/ftxui/dom/color.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node_decorator.hpp"
 
@@ -101,3 +97,7 @@ Decorator bgcolor(Color c) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/composite_decorator.cpp b/src/ftxui/dom/composite_decorator.cpp
index d0eccdd4..c8183276 100644
--- a/src/ftxui/dom/composite_decorator.cpp
+++ b/src/ftxui/dom/composite_decorator.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node.hpp"
 
@@ -40,3 +36,7 @@ Element align_right(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/dbox.cpp b/src/ftxui/dom/dbox.cpp
index e8e2dd35..f0964171 100644
--- a/src/ftxui/dom/dbox.cpp
+++ b/src/ftxui/dom/dbox.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <algorithm>
 
 #include "ftxui/dom/elements.hpp"
@@ -52,3 +48,7 @@ Element dbox(Elements children) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/dim.cpp b/src/ftxui/dom/dim.cpp
index 286d8424..7b6b68ad 100644
--- a/src/ftxui/dom/dim.cpp
+++ b/src/ftxui/dom/dim.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node_decorator.hpp"
 
@@ -31,3 +27,7 @@ Element dim(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/flex.cpp b/src/ftxui/dom/flex.cpp
index b6042dd6..2e8705b2 100644
--- a/src/ftxui/dom/flex.cpp
+++ b/src/ftxui/dom/flex.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node.hpp"
 
@@ -155,3 +151,7 @@ Element notflex(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/frame.cpp b/src/ftxui/dom/frame.cpp
index f2d666f9..537aabd7 100644
--- a/src/ftxui/dom/frame.cpp
+++ b/src/ftxui/dom/frame.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <algorithm>
 
 #include "ftxui/dom/elements.hpp"
@@ -127,3 +123,7 @@ Element yframe(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/gauge.cpp b/src/ftxui/dom/gauge.cpp
index 747f1e39..d448036a 100644
--- a/src/ftxui/dom/gauge.cpp
+++ b/src/ftxui/dom/gauge.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node.hpp"
 
@@ -62,3 +58,7 @@ Element gauge(float progress) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/gauge_test.cpp b/src/ftxui/dom/gauge_test.cpp
index eca33388..10563967 100644
--- a/src/ftxui/dom/gauge_test.cpp
+++ b/src/ftxui/dom/gauge_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/screen/screen.hpp"
 #include "gtest/gtest.h"
@@ -33,3 +29,7 @@ TEST(GaugeTest, one) {
 
   EXPECT_EQ("███████████", screen.ToString());
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/graph.cpp b/src/ftxui/dom/graph.cpp
index e3ecc1c3..67f0cd36 100644
--- a/src/ftxui/dom/graph.cpp
+++ b/src/ftxui/dom/graph.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 
 namespace ftxui {
@@ -51,3 +47,7 @@ Element graph(GraphFunction graph_function) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/hbox.cpp b/src/ftxui/dom/hbox.cpp
index 3c51f3ba..3ff91e00 100644
--- a/src/ftxui/dom/hbox.cpp
+++ b/src/ftxui/dom/hbox.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <algorithm>
 
 #include "ftxui/dom/elements.hpp"
@@ -145,3 +141,7 @@ Element hbox(Elements children) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/hbox_test.cpp b/src/ftxui/dom/hbox_test.cpp
index 63ffec02..dbeac3a6 100644
--- a/src/ftxui/dom/hbox_test.cpp
+++ b/src/ftxui/dom/hbox_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/screen/screen.hpp"
 #include "gtest/gtest.h"
@@ -353,3 +349,7 @@ TEST(HBoxTest, FlexGrow_NoFlex_FlewShrink) {
     EXPECT_EQ(expectations[i], screen.ToString());
   }
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/hflow.cpp b/src/ftxui/dom/hflow.cpp
index d2b8309b..ee6ff047 100644
--- a/src/ftxui/dom/hflow.cpp
+++ b/src/ftxui/dom/hflow.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <algorithm>
 
 #include "ftxui/dom/elements.hpp"
@@ -77,3 +73,7 @@ Element hflow(Elements children) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/inverted.cpp b/src/ftxui/dom/inverted.cpp
index 76badb82..4b06dad4 100644
--- a/src/ftxui/dom/inverted.cpp
+++ b/src/ftxui/dom/inverted.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node_decorator.hpp"
 
@@ -29,3 +25,7 @@ Element inverted(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/node.cpp b/src/ftxui/dom/node.cpp
index a347b11b..628356d4 100644
--- a/src/ftxui/dom/node.cpp
+++ b/src/ftxui/dom/node.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/node.hpp"
 
 namespace ftxui {
@@ -52,3 +48,7 @@ void Render(Screen& screen, Node* node) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/node_decorator.cpp b/src/ftxui/dom/node_decorator.cpp
index f62c9187..db5c39a5 100644
--- a/src/ftxui/dom/node_decorator.cpp
+++ b/src/ftxui/dom/node_decorator.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/node_decorator.hpp"
 
 namespace ftxui {
@@ -17,3 +13,7 @@ void NodeDecorator::SetBox(Box box) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/node_decorator.hpp b/src/ftxui/dom/node_decorator.hpp
index d26c5984..0336b04c 100644
--- a/src/ftxui/dom/node_decorator.hpp
+++ b/src/ftxui/dom/node_decorator.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_DOM_NODE_DECORATOR_H_
 #define FTXUI_DOM_NODE_DECORATOR_H_
 
@@ -21,3 +17,7 @@ class NodeDecorator : public Node {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_DOM_NODE_DECORATOR_H_ */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/paragraph.cpp b/src/ftxui/dom/paragraph.cpp
index 2c5d9cf3..7b9e0e23 100644
--- a/src/ftxui/dom/paragraph.cpp
+++ b/src/ftxui/dom/paragraph.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <sstream>
 
 #include "ftxui/dom/elements.hpp"
@@ -19,3 +15,7 @@ Elements paragraph(std::wstring the_text) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/separator.cpp b/src/ftxui/dom/separator.cpp
index 4ae2a7ab..a95701c8 100644
--- a/src/ftxui/dom/separator.cpp
+++ b/src/ftxui/dom/separator.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/node.hpp"
 
 namespace ftxui {
@@ -58,3 +54,7 @@ Element separator(Pixel pixel) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/size.cpp b/src/ftxui/dom/size.cpp
index e21bbe1f..dc6d1157 100644
--- a/src/ftxui/dom/size.cpp
+++ b/src/ftxui/dom/size.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <algorithm>
 
 #include "ftxui/dom/elements.hpp"
@@ -84,3 +80,7 @@ Decorator size(Direction direction, Constraint constraint, int value) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/spinner.cpp b/src/ftxui/dom/spinner.cpp
index c9b8c2af..a534ea30 100644
--- a/src/ftxui/dom/spinner.cpp
+++ b/src/ftxui/dom/spinner.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node.hpp"
 
@@ -261,3 +257,7 @@ Element spinner(int c, size_t index) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/text.cpp b/src/ftxui/dom/text.cpp
index 25c278d4..6c90b318 100644
--- a/src/ftxui/dom/text.cpp
+++ b/src/ftxui/dom/text.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <algorithm>
 #include "ftxui/dom/node.hpp"
 #include "ftxui/screen/string.hpp"
@@ -77,3 +73,7 @@ Element vtext(std::wstring text) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/text_test.cpp b/src/ftxui/dom/text_test.cpp
index b4004624..d4f6e0e0 100644
--- a/src/ftxui/dom/text_test.cpp
+++ b/src/ftxui/dom/text_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/screen/screen.hpp"
 #include "gtest/gtest.h"
@@ -84,3 +80,7 @@ TEST(TextTest, CJK_3) {
       "└──┘",
       screen.ToString());
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/underlined.cpp b/src/ftxui/dom/underlined.cpp
index 6b5835f2..ade9266e 100644
--- a/src/ftxui/dom/underlined.cpp
+++ b/src/ftxui/dom/underlined.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/dom/node_decorator.hpp"
 
@@ -29,3 +25,7 @@ Element underlined(Element child) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/util.cpp b/src/ftxui/dom/util.cpp
index d5f46725..d4c45e0d 100644
--- a/src/ftxui/dom/util.cpp
+++ b/src/ftxui/dom/util.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 
 namespace ftxui {
@@ -32,3 +28,7 @@ Element operator|(Element e, Decorator d) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/vbox.cpp b/src/ftxui/dom/vbox.cpp
index 919bab42..f20951eb 100644
--- a/src/ftxui/dom/vbox.cpp
+++ b/src/ftxui/dom/vbox.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include <algorithm>
 #include <iostream>
 
@@ -146,3 +142,7 @@ Element vbox(Elements children) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/dom/vbox_test.cpp b/src/ftxui/dom/vbox_test.cpp
index 3afad305..cffa74aa 100644
--- a/src/ftxui/dom/vbox_test.cpp
+++ b/src/ftxui/dom/vbox_test.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/dom/elements.hpp"
 #include "ftxui/screen/screen.hpp"
 #include "gtest/gtest.h"
@@ -358,3 +354,7 @@ TEST(VBoxText, FlexGrow_NoFlex_FlewShrink) {
     EXPECT_EQ(expectations[i], rotate(screen.ToString()));
   }
 }
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/screen/box.cpp b/src/ftxui/screen/box.cpp
index 05f5a293..85a17e00 100644
--- a/src/ftxui/screen/box.cpp
+++ b/src/ftxui/screen/box.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/screen/box.hpp"
 
 #include <algorithm>
@@ -17,3 +13,7 @@ Box Box::Intersection(Box a, Box b) {
   };
 }
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/screen/screen.cpp b/src/ftxui/screen/screen.cpp
index 67c3b6e5..453240f0 100644
--- a/src/ftxui/screen/screen.cpp
+++ b/src/ftxui/screen/screen.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/screen/screen.hpp"
 
 #include <algorithm>
@@ -12,11 +8,11 @@
 #include "ftxui/screen/terminal.hpp"
 
 #if defined(_WIN32)
-  #define WIN32_LEAN_AND_MEAN
-  #ifndef NOMINMAX
-    #define NOMINMAX
-  #endif
-  #include <Windows.h>
+#define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#include <Windows.h>
 #endif
 
 namespace ftxui {
@@ -249,3 +245,7 @@ void Screen::ApplyShader() {
 // clang-format on
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/screen/string.cpp b/src/ftxui/screen/string.cpp
index e3afd568..215a78e9 100644
--- a/src/ftxui/screen/string.cpp
+++ b/src/ftxui/screen/string.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/screen/string.hpp"
 
 #include <codecvt>
@@ -9,8 +5,8 @@
 
 namespace ftxui {
 #ifdef _MSC_VER
-  #pragma warning(push)
-  #pragma warning(disable : 4996)  // codecvt_utf8_utf16 is deprecated
+#pragma warning(push)
+#pragma warning(disable : 4996)  // codecvt_utf8_utf16 is deprecated
 #endif
 
 std::string to_string(const std::wstring& s) {
@@ -24,7 +20,11 @@ std::wstring to_wstring(const std::string& s) {
 }
 
 #ifdef _MSC_VER
-  #pragma warning(pop)
+#pragma warning(pop)
 #endif
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/screen/terminal.cpp b/src/ftxui/screen/terminal.cpp
index 2c5f07f1..549a336a 100644
--- a/src/ftxui/screen/terminal.cpp
+++ b/src/ftxui/screen/terminal.cpp
@@ -1,18 +1,14 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #include "ftxui/screen/terminal.hpp"
 
 #include <stdio.h>
 
 #if defined(_WIN32)
-  #define WIN32_LEAN_AND_MEAN
-  #define NOMINMAX
-  #include <Windows.h>
+#define WIN32_LEAN_AND_MEAN
+#define NOMINMAX
+#include <Windows.h>
 #else
-  #include <sys/ioctl.h>
-  #include <unistd.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
 #endif
 
 #include <iostream>
@@ -38,3 +34,7 @@ Terminal::Dimensions Terminal::Size() {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/screen/terminal.hpp b/src/ftxui/screen/terminal.hpp
index 8e295963..b25bec75 100644
--- a/src/ftxui/screen/terminal.hpp
+++ b/src/ftxui/screen/terminal.hpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 #ifndef FTXUI_CORE_TERMINAL_HPP
 #define FTXUI_CORE_TERMINAL_HPP
 
@@ -20,3 +16,7 @@ class Terminal {
 }  // namespace ftxui
 
 #endif /* end of include guard: FTXUI_CORE_TERMINAL_HPP */
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/src/ftxui/screen/wcwidth.cpp b/src/ftxui/screen/wcwidth.cpp
index 92e3697a..6d3bcdbc 100644
--- a/src/ftxui/screen/wcwidth.cpp
+++ b/src/ftxui/screen/wcwidth.cpp
@@ -1,7 +1,3 @@
-// Copyright 2020 Arthur Sonzogni. All rights reserved.
-// Use of this source code is governed by the MIT license that can be found in
-// the LICENSE file.
-
 /*
  * This is an implementation of wcwidth() and wcswidth() (defined in
  * IEEE Std 1002.1-2001) for Unicode.
@@ -307,3 +303,7 @@ int wstring_width_cjk(const std::wstring& text) {
 }
 
 }  // namespace ftxui
+
+// Copyright 2020 Arthur Sonzogni. All rights reserved.
+// Use of this source code is governed by the MIT license that can be found in
+// the LICENSE file.
diff --git a/other/format.sh b/tools/format.sh
similarity index 85%
rename from other/format.sh
rename to tools/format.sh
index b91b0d0e..b5febfd7 100755
--- a/other/format.sh
+++ b/tools/format.sh
@@ -8,7 +8,7 @@ for file in $files
 do
   if ! grep -q Copyright $file
   then
-    cat ./other/license_headers.cpp $file >$file.new && mv $file.new $file
+    cat $file ./other/license_headers.cpp > $file.new && mv $file.new $file
   fi
 done
 
diff --git a/other/license_headers.cpp b/tools/license_headers.cpp
similarity index 100%
rename from other/license_headers.cpp
rename to tools/license_headers.cpp
index 81c04074..e7e7258f 100644
--- a/other/license_headers.cpp
+++ b/tools/license_headers.cpp
@@ -1,4 +1,4 @@
+
 // Copyright 2020 Arthur Sonzogni. All rights reserved.
 // Use of this source code is governed by the MIT license that can be found in
 // the LICENSE file.
-
-- 
GitLab