summaryrefslogtreecommitdiff
path: root/config/nushell/config.nu
blob: 1658d14989b5d106c6e6ef8f8a52826c69aa73d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
$env.config.buffer_editor = "vim"
$env.PROMPT_COMMAND_RIGHT = ""
$env.path ++= ["~/.local/bin"]
$env.config.show_banner = false
$env.config.table.mode = 'none'
$env.TERM = "xterm"
$env.USER = "coast"

$env.PROMPT_COMMAND = {
    let dir = (pwd | path basename)
    let home_dir = ($dir | str replace "coast" "home")
    $"(ansi reset)0 ($env.USER) ($home_dir) "
}

$env.PROMPT_INDICATOR = ""

let carapace_completer = {|spans|
    carapace $spans.0 nushell ...$spans | from json
}

$env.config = {
    show_banner: false
    completions: {
        case_sensitive: false
        quick: true
        partial: true
        algorithm: "fuzzy"
        external: {
            enable: true
            max_results: 100
            completer: $carapace_completer
        }
    }
}

alias sd = sudo
alias nano = vim
alias suod = sudo
alias sduo = sudo
alias hotp = htop
alias c = clear
alias dir = tree -idA

let bg0 = "#0f0f0f"
let bg1 = "#1a1a1a"
let bg2 = "#2a2a2a"
let bg3 = "#3a3a3a"
let fg0 = "#e0def4"
let fg1 = "#ebbcba"
let red    = "#eb6f92"
let green  = "#eb6f92"
let yellow = "#ea9a97"
let blue   = "#d7827e"
let purple = "#ea9a97"
let aqua   = "#ebbcba"
let orange = "#ea9a97"
let gray   = "#6e6a86"

let dark = {
    separator: $gray,
    leading_trailing_space_bg: $bg1,
    header: $yellow,
    datetime: $blue,
    filesize: $green,
    row_index: $gray,

    bool: $green,
    int: $orange,
    float: $yellow,
    string: $fg1,
    nothing: $gray,
    binary: $red,
    cell-path: $blue,
    hints: $gray,

    shape_garbage: { fg: $fg0 bg: $red attr: b },
    shape_bool: $green,
    shape_int: { fg: $orange attr: b },
    shape_float: { fg: $yellow attr: b },
    shape_range: { fg: $yellow attr: b },
    shape_internalcall: { fg: $aqua attr: b },
    shape_external: $blue,
    shape_externalarg: { fg: $green attr: b },
    shape_literal: $fg1,
    shape_operator: $orange,
    shape_signature: { fg: $yellow attr: b },
    shape_string: $purple,
    shape_filepath: $blue,
    shape_globpattern: { fg: $blue attr: b },
    shape_variable: $aqua,
    shape_flag: { fg: $yellow attr: b },
    shape_custom: { attr: b }
}

$env.config.color_config = $dark
$env.config.use_ansi_coloring = true

source ~/.config/nushell/starship.nu