summaryrefslogtreecommitdiffstats
path: root/sh.nix
blob: 36ae7ee73682eca16aa9c0f6d5cc66157f88f425 (plain) (blame)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
{
  config,
  lib,
  pkgs,
  ...
}: {
  programs.bash = {
    enable = true;
  };
  programs.zsh = {
    enable = true;
    enableCompletion = true; # Enables zsh-completions
    autosuggestion.enable = true; # Enables zsh-autosuggestions
    syntaxHighlighting.enable = true; # Enables zsh-syntax-highlighting
    oh-my-zsh = {
      enable = true;
      plugins = [
        "git" # Git plugin
        "colored-man-pages" # Colored man pages
        "alias-finder" # Find aliases for commands
      ];
      theme = "";
    };
    initContent = ''
           # Powerlevel10k configuration
           source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
      source ${./.p10k.zsh}
           # Initialize zoxide
           eval "$(zoxide init zsh)"

           # Initialize fzf
           source <(fzf --zsh)

           # Source fzf-tab (needs to be after fzf)
           source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh

           # Custom aliases
           alias ll="ls -la"
           alias gs="git status"

      bindkey '^ ' autosuggest-execute
    '';
  };

  home.packages = with pkgs; [
    zoxide
    fzf
    starship
  ];

  programs.fish = {
    enable = true;
    generateCompletions = true;
    interactiveShellInit = ''
      fish_vi_key_bindings
      set -U fish_greeting
      zoxide init fish | source
      fzf --fish | source
      starship init fish | source
      set -gx EDITOR nvim
      set -gx VISUAL nvim
    '';
  };

  # hodgepodge of these two themes:https://starship.rs/presets/catppuccin-powerline, https://starship.rs/presets/tokyo-night
  #(#a3aed2)\
  home.file.".config/starship.toml".text = ''
    format = """
    [](fg:#a3aed2)\
    $username\
    [](bg:#769ff0 fg:#a3aed2)\
    $directory\
    [](fg:#769ff0 bg:#394260)\
    $git_branch\
    $git_status\
    [](fg:#394260 bg:#212736)\
    $nodejs\
    $rust\
    $golang\
    $php\
    $c\
    $java\
    $kotlin\
    $haskell\
    $python\
    [](fg:#212736 bg:#1d2230)\
    $time\
    [ ](fg:#1d2230)\
    \n$character"""


    palette = 'colours'
    add_newline = false

    [username]
    show_always = true
    style_user = "bg:#a3aed2 fg:#090c0c"
    style_root = "bg:#a3aed2 fg:#090c0c"
    format = '[ $user ]($style)'

    [directory]
    style = "fg:#e3e5e5 bg:#769ff0"
    format = "[ $path ]($style)"
    truncation_length = 3
    truncation_symbol = "…/"

    [directory.substitutions]
    "Documents" = "󰈙 "
    "Downloads" = " "
    "Music" = " "
    "Pictures" = " "

    [git_branch]
    symbol = ""
    style = "bg:#394260"
    format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'

    [git_status]
    style = "bg:#394260"
    format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'

    [nodejs]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [rust]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [golang]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [php]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [c]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [java]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [kotlin]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [haskell]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'

    [python]
    symbol = ""
    style = "bg:#212736"
    format = '[[ $symbol ](fg:#769ff0 bg:#212736)]($style)'


    [time]
    disabled = false
    time_format = "%R" # Hour:Minute Format
    style = "bg:#1d2230"
    format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)'

    [character]
    disabled = false
    success_symbol = '[❯](bold fg:green)'
    error_symbol = '[❯](bold fg:red)'
    vimcmd_symbol = '[❮](bold fg:green)'
    vimcmd_replace_one_symbol = '[❮](bold fg:lavender)'
    vimcmd_replace_symbol = '[❮](bold fg:lavender)'
    vimcmd_visual_symbol = '[❮](bold fg:yellow)'

    [palettes.colours]
    rosewater = "#f5e0dc"
    flamingo = "#f2cdcd"
    pink = "#f5c2e7"
    mauve = "#cba6f7"
    red = "#f38ba8"
    maroon = "#eba0ac"
    peach = "#fab387"
    yellow = "#f9e2af"
    green = "#a6e3a1"
    teal = "#94e2d5"
    sky = "#89dceb"
    sapphire = "#74c7ec"
    blue = "#89b4fa"
    lavender = "#b4befe"
    text = "#cdd6f4"
    subtext1 = "#bac2de"
    subtext0 = "#a6adc8"
    overlay2 = "#9399b2"
    overlay1 = "#7f849c"
    overlay0 = "#6c7086"
    surface2 = "#585b70"
    surface1 = "#45475a"
    surface0 = "#313244"
    base = "#1e1e2e"
    mantle = "#181825"
    crust = "#11111b"
  '';
}