aboutsummaryrefslogtreecommitdiff
path: root/internal/configure.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-07-28 17:40:05 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-07-28 17:40:05 +0300
commit444245ecc6ebfd95d04a7f824cc002de5cf25905 (patch)
tree40c6b46e2db059c129cd5275846b7a14f0834864 /internal/configure.zsh
parentfcc769c58b62c3703ac01238a2c78628df2af175 (diff)
more wizard options
Diffstat (limited to 'internal/configure.zsh')
-rw-r--r--internal/configure.zsh6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/configure.zsh b/internal/configure.zsh
index 719b9f05..3de28df5 100644
--- a/internal/configure.zsh
+++ b/internal/configure.zsh
@@ -1,3 +1,5 @@
+typeset -gr __p9k_wizard_columns=70
+typeset -gr __p9k_wizard_lines=28
typeset -gr __p9k_zd=${ZDOTDIR:-$HOME}
typeset -gr __p9k_zd_u=${__p9k_zd/#(#b)$HOME(|\/*)/'~'$match[1]}
typeset -gr __p9k_cfg_basename=.p10k.zsh
@@ -15,7 +17,6 @@ function _p9k_can_configure() {
}
{
[[ -t 0 && -t 1 ]] || $0_error "no TTY"
- (( LINES >= 20 && COLUMNS >= 70 )) || $0_error "terminal size too small"
[[ -o multibyte ]] || $0_error "multibyte option is not set"
[[ "${#$(print -P '\u276F' 2>/dev/null)}" == 1 ]] || $0_error "shell doesn't support unicode"
[[ -w $__p9k_zd ]] || $0_error "$__p9k_zd_u is not writable"
@@ -27,6 +28,9 @@ function _p9k_can_configure() {
$0_error "cannot read $__p9k_root_dir_u/config/p10k-lean.zsh"
[[ -r $__p9k_root_dir/config/p10k-classic.zsh ]] ||
$0_error "cannot read $__p9k_root_dir_u/config/p10k-classic.zsh"
+
+ (( LINES >= __p9k_wizard_lines && COLUMNS >= __p9k_wizard_columns )) ||
+ $0_error "terminal size too small"
} always {
unfunction $0_error
}