diff --git a/MANUAL.md b/MANUAL.md
index ff2bb7c..d50a7aa 100644
--- a/MANUAL.md
+++ b/MANUAL.md
@@ -3,6 +3,7 @@
- [proton manual](#proton-manual)
- [.proton](#proton)
- [Editor configuration](#editor-configuration)
+ - [Configuring proton core itself](#configuring-proton-core-itself)
- [Syntax specific configuration](#syntax-specific-configuration)
- [Custom SPC keybinding](#custom-spc-keybinding)
- [Editor keymaps](#editor-keymaps)
@@ -37,6 +38,15 @@ would result in 2 vectors:
["editor.softWrap" true]
```
+### Configuring proton core itself
+
+There are several settings that allow users to customize proton's behaviour. These are under the `proton.core` namespace and can be seen [README for the core layer](/src/cljs/proton/layers/core/README.md). To set them to values other than the defaults add a row to your `.proton` file as above. For example:
+
+```
+;; Prefer to skip the welcome screen if there is nothing important being shown
+["proton.core.alwaysShowWelcomeScreen" false]
+```
+
### Syntax specific configuration
proton also supports configuration of `.xxx.source` kind of settings. Due to the leading dot, configuration for this is slightly different than with the previous settings. Use the `:scopeSelector` key inside the third vector element (options) like so:
diff --git a/src/cljs/proton/core.cljs b/src/cljs/proton/core.cljs
index 0c4e864..d090ea5 100644
--- a/src/cljs/proton/core.cljs
+++ b/src/cljs/proton/core.cljs
@@ -112,7 +112,6 @@
(defn init []
(go
(proton/init-proton-mode-keymaps!)
- (atom-env/show-modal-panel)
(atom-env/insert-process-step! "Initialising proton... Just a moment!" "")
(let [{:keys [additional-packages layers configuration disabled-packages keybindings keymaps]} (proton/load-config)
editor-default editor-config/default
@@ -130,7 +129,14 @@
all-keymaps (into [] (distinct (concat keymaps (:keymaps editor-default) (proton/keymaps-for-layers all-layers))))
all-keybindings (helpers/deep-merge (proton/keybindings-for-layers all-layers) keybindings)
wipe-configs? (true? (config-map "proton.core.wipeUserConfigs"))
- all-packages (pm/register-packages (into (hash-map) (concat (map pm/register-installable selected-packages) (map pm/register-removable disabled-packages))))]
+ all-packages (pm/register-packages (into (hash-map) (concat (map pm/register-installable selected-packages) (map pm/register-removable disabled-packages))))
+ to-install (pm/get-to-install all-packages)
+ to-remove (pm/get-to-remove (filter (comp not pm/is-bundled?) all-packages))]
+
+ ;; Show welcome screen if there are packages to install/remove or the option to always show is enabled
+ (if (or (config-map "proton.core.alwaysShowWelcomeScreen") (> (count to-install) 0) (> (count to-remove) 0) )
+ (atom-env/show-modal-panel))
+
;; wipe existing config
(when wipe-configs?
(do
@@ -153,24 +159,22 @@
(atom-env/mark-last-step-as-completed!)
;; Install all necessary packages
- (let [to-install (pm/get-to-install all-packages)]
- (if (> (count to-install) 0)
- (do
- (atom-env/insert-process-step! (str "Installing " (count to-install) " new package(s)") "")
- (doseq [package to-install]
- (atom-env/insert-process-step! (str "Installing " (name package) ""))
- ( (count to-install) 0)
+ (do
+ (atom-env/insert-process-step! (str "Installing " (count to-install) " new package(s)") "")
+ (doseq [package to-install]
+ (atom-env/insert-process-step! (str "Installing " (name package) ""))
+ ( (count to-remove) 0)
- (do
- (atom-env/insert-process-step! (str "Removing " (count to-remove) " orphaned package(s)") "")
- (doseq [package to-remove]
- (atom-env/insert-process-step! (str "Removing " (name package) ""))
- ( (count to-remove) 0)
+ (do
+ (atom-env/insert-process-step! (str "Removing " (count to-remove) " orphaned package(s)") "")
+ (doseq [package to-remove]
+ (atom-env/insert-process-step! (str "Removing " (name package) ""))
+ ( (count to-install) 0) (> (count to-remove) 0) )
+ (.setTimeout js/window #(atom-env/hide-modal-panel) (config-map "proton.core.post-init-timeout"))))))))
(defn on-space []
(reset! current-chain [])
diff --git a/src/cljs/proton/layers/core/README.md b/src/cljs/proton/layers/core/README.md
index f48205f..22c83f7 100644
--- a/src/cljs/proton/layers/core/README.md
+++ b/src/cljs/proton/layers/core/README.md
@@ -8,18 +8,19 @@ The core layer should get included by default. No installation needed.
### Configuration
-| Name | Default | Type | Description |
-|-----------------------------------|----------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------|
-| `proton.core.showTabBar` | false | __boolean__ | whether the tab bar should be visible by default |
-| `proton.core.relativeLineNumbers` | false | __boolean__ | whether to use relative line numbers instead of absolute ones |
-| `proton.core.vim-provider` | :vim-mode-plus | __keyword__ | which vim emulation provider to use. Possible options are `:vim-mode-plus` and `:vim-mode` |
-| `proton.core.wipeUserConfigs` | true | __boolean__ | always reset atom configuration before applying conifgs from layers and `~/.proton` |
-| `proton.core.whichKeyDelay` | 0.4 | __number__ | which-key modal delay in seconds |
-| `proton.core.whichKeyDelayOnInit` | false | __boolean__ | which-key modal delay for first show up and no delay when shown |
-| `proton.core.whichKeyDisabled` | false | __boolean__ | which-key modal always hidden |
-| `proton.core.inputProvider` | :vim-mode-plus | __keyword__ | editor input. available options are :vim-mode-plus, :vim-mode, :emacs, :default. You need to reload editor to apply changes properly |
-| `proton.core.leaderKey` | "space" | __string__ | proton leader key binding. For non-vim modes its value is `alt-m` if not set manualy by user |
-| `proton.core.modeKey` | "," | __string__ | proton major mode key alias to quickly invoke `SPC m`. For non-vim modes its value is `ctrl-alt-m` if not set by user |
+| Name | Default | Type | Description |
+|---------------------------------------|----------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------|
+| `proton.core.alwaysShowWelcomeScreen` | true | __boolean__ | whether the welcome screen is always shown, even when there are only expected messages.
+| `proton.core.showTabBar` | false | __boolean__ | whether the tab bar should be visible by default |
+| `proton.core.relativeLineNumbers` | false | __boolean__ | whether to use relative line numbers instead of absolute ones |
+| `proton.core.vim-provider` | :vim-mode-plus | __keyword__ | which vim emulation provider to use. Possible options are `:vim-mode-plus` and `:vim-mode` |
+| `proton.core.wipeUserConfigs` | true | __boolean__ | always reset atom configuration before applying conifgs from layers and `~/.proton` |
+| `proton.core.whichKeyDelay` | 0.4 | __number__ | which-key modal delay in seconds |
+| `proton.core.whichKeyDelayOnInit` | false | __boolean__ | which-key modal delay for first show up and no delay when shown |
+| `proton.core.whichKeyDisabled` | false | __boolean__ | which-key modal always hidden |
+| `proton.core.inputProvider` | :vim-mode-plus | __keyword__ | editor input. available options are :vim-mode-plus, :vim-mode, :emacs, :default. You need to reload editor to apply changes properly |
+| `proton.core.leaderKey` | "space" | __string__ | proton leader key binding. For non-vim modes its value is `alt-m` if not set manualy by user |
+| `proton.core.modeKey` | "," | __string__ | proton major mode key alias to quickly invoke `SPC m`. For non-vim modes its value is `ctrl-alt-m` if not set by user |
### Key Bindings
diff --git a/src/cljs/proton/layers/core/core.cljs b/src/cljs/proton/layers/core/core.cljs
index 2f96600..7421cb4 100644
--- a/src/cljs/proton/layers/core/core.cljs
+++ b/src/cljs/proton/layers/core/core.cljs
@@ -29,6 +29,7 @@
["proton.core.relativeLineNumbers" false]
["proton.core.quickOpenProvider" :normal]
["proton.core.post-init-timeout" 3000]
+ ["proton.core.alwaysShowWelcomeScreen" true]
["proton.core.wipeUserConfigs" true]
["proton.core.whichKeyDelay" 0.4]
["proton.core.whichKeyDelayOnInit" false]