~repos /config

#brew#nushell

git clone https://pyrossh.dev/repos/config.git

Common configuration


9463dd3b Peter John

1 year ago
initial commit
Files changed (10) hide show
  1. .gitignore +8 -0
  2. .vscode/extensions.json +5 -0
  3. brewfile +0 -37
  4. ghostty/config +28 -0
  5. helix/config.toml +19 -0
  6. iterm2.json +0 -237
  7. nushell/config.nu +899 -0
  8. nushell/env.nu +45 -0
  9. settings.json +2 -2
  10. setup.sh +10 -16
.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ .android
2
+ swiftpm
3
+ configstore
4
+ containers
5
+ NuGet
6
+ nushell/history.txt
7
+ pyrossh_keystore.jks
8
+ github-copilot
.vscode/extensions.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "recommendations": [
3
+ "TheNuProjectContributors.vscode-nushell-lang"
4
+ ],
5
+ }
brewfile DELETED
@@ -1,37 +0,0 @@
1
- brew 'fish'
2
- brew 'fisher'
3
- brew 'helix'
4
- brew 'zellij'
5
- brew 'colima'
6
- brew 'docker'
7
- brew 'kubectl'
8
- brew 'kubectx'
9
- brew 'openjdk'
10
- brew 'gradle'
11
- brew 'mas'
12
- brew 'cocoapods'
13
- brew 'kdoctor'
14
- brew 'nextdns'
15
- brew 'node'
16
-
17
- cask 'visual-studio-code'
18
- cask 'android-studio'
19
- cask 'intellij-idea'
20
- cask 'iterm2'
21
- cask 'google-chrome'
22
- cask 'obsidian'
23
- cask 'secretive'
24
- cask 'mpv'
25
- cask 'stats'
26
- cask 'font-ubuntu'
27
- cask 'font-ubuntu-mono font-ubuntu'
28
- cask 'zed'
29
- cask 'postico'
30
-
31
- # others
32
- cask '1password'
33
- cask 'microsoft-teams'
34
- cask 'microsoft-edge'
35
- cask 'microsoft-outlook'
36
- cask 'microsoft-office'
37
- cask 'slack'
ghostty/config ADDED
@@ -0,0 +1,28 @@
1
+ background = #191d27
2
+ foreground = #f4f4f4
3
+ cursor-color = #feffff
4
+ cursor-text = #feffff
5
+ selection-background = #89b0e8
6
+ selection-foreground = #b16e6c
7
+ palette = 0=#000000
8
+ palette = 1=#8b1a11
9
+ palette = 2=#69c44a
10
+ palette = 3=#98992f
11
+ palette = 4=#6b61f6
12
+ palette = 5=#d257da
13
+ palette = 6=#69c1ce
14
+ palette = 7=#f4f4f4
15
+ palette = 8=#656565
16
+ palette = 9=#d22d1f
17
+ palette = 10=#62d53f
18
+ palette = 11=#e5e54a
19
+ palette = 12=#6287f7
20
+ palette = 13=#d12ddc
21
+ palette = 14=#6287f7
22
+ palette = 15=#f4f4f4
23
+ font-size = 17
24
+ font-family = Ubuntu Mono
25
+ font-style = Regular
26
+ font-thicken = true
27
+ font-thicken-strength = 255
28
+ # theme = Monokai Pro Spectrum
helix/config.toml ADDED
@@ -0,0 +1,19 @@
1
+ theme = "dark_plus"
2
+
3
+ [editor.cursor-shape]
4
+ normal = "block"
5
+ insert = "bar"
6
+ select = "bar"
7
+
8
+
9
+ [editor.indent-guides]
10
+ render = true
11
+
12
+ [editor.statusline]
13
+ left = ["mode", "spinner", "version-control", "file-modification-indicator"]
14
+ center = ["file-name"]
15
+ right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type", "total-line-numbers"]
16
+ separator = "│"
17
+ mode.normal = "NORMAL"
18
+ mode.insert = "INSERT"
19
+ mode.select = "SELECT"
iterm2.json DELETED
@@ -1,237 +0,0 @@
1
- {
2
- "Ansi 6 Color": {
3
- "Red Component": 0.25882352941176473,
4
- "Color Space": "sRGB",
5
- "Blue Component": 0.81960784313725488,
6
- "Alpha Component": 1,
7
- "Green Component": 0.7686274509803922
8
- },
9
- "Tags": [],
10
- "Ansi 12 Color": {
11
- "Red Component": 0.34509803921568627,
12
- "Color Space": "sRGB",
13
- "Blue Component": 1,
14
- "Alpha Component": 1,
15
- "Green Component": 0.53725490196078429
16
- },
17
- "Ansi 0 Color": {
18
- "Green Component": 0,
19
- "Red Component": 0,
20
- "Blue Component": 0
21
- },
22
- "Draw Powerline Glyphs": true,
23
- "Bold Color": {
24
- "Red Component": 0.95686274509803926,
25
- "Color Space": "sRGB",
26
- "Blue Component": 0.95686274509803926,
27
- "Alpha Component": 1,
28
- "Green Component": 0.95686274509803926
29
- },
30
- "Normal Font": "UbuntuMono-Regular 18",
31
- "Ansi 1 Color": {
32
- "Red Component": 0.59999999999999998,
33
- "Color Space": "sRGB",
34
- "Blue Component": 0.0039215686274509786,
35
- "Alpha Component": 1,
36
- "Green Component": 0
37
- },
38
- "Ansi 2 Color": {
39
- "Red Component": 0.25098039215686274,
40
- "Color Space": "sRGB",
41
- "Blue Component": 0.19215686274509805,
42
- "Alpha Component": 1,
43
- "Green Component": 0.7803921568627451
44
- },
45
- "Rows": 25,
46
- "Default Bookmark": "No",
47
- "Ansi 3 Color": {
48
- "Red Component": 0.59999999999999998,
49
- "Color Space": "sRGB",
50
- "Blue Component": 0,
51
- "Alpha Component": 1,
52
- "Green Component": 0.59999999999999998
53
- },
54
- "Non-ASCII Anti Aliased": true,
55
- "Use Bright Bold": true,
56
- "Ansi 10 Color": {
57
- "Red Component": 0,
58
- "Color Space": "sRGB",
59
- "Blue Component": 0,
60
- "Alpha Component": 1,
61
- "Green Component": 0.85098039215686272
62
- },
63
- "Ambiguous Double Width": false,
64
- "Jobs to Ignore": [
65
- "rlogin",
66
- "ssh",
67
- "slogin",
68
- "telnet"
69
- ],
70
- "Ansi 15 Color": {
71
- "Red Component": 0.95686274509803926,
72
- "Color Space": "sRGB",
73
- "Blue Component": 0.95686274509803926,
74
- "Alpha Component": 1,
75
- "Green Component": 0.95686274509803926
76
- },
77
- "Foreground Color": {
78
- "Red Component": 0.95686274509803926,
79
- "Color Space": "sRGB",
80
- "Blue Component": 0.95686274509803926,
81
- "Alpha Component": 1,
82
- "Green Component": 0.95686274509803926
83
- },
84
- "Use Tab Color": false,
85
- "Blinking Cursor": false,
86
- "Disable Window Resizing": true,
87
- "Sync Title": false,
88
- "Prompt Before Closing 2": false,
89
- "BM Growl": true,
90
- "Command": "",
91
- "Description": "iTerm2",
92
- "Mouse Reporting": true,
93
- "Screen": -1,
94
- "Selection Color": {
95
- "Red Component": 0.49770425799806617,
96
- "Color Space": "sRGB",
97
- "Blue Component": 0.92981290817260742,
98
- "Alpha Component": 1,
99
- "Green Component": 0.69699200708257314
100
- },
101
- "Initial Use Transparency": true,
102
- "Columns": 80,
103
- "Idle Code": 0,
104
- "Working Dirctory": "\/Users\/peterjohn",
105
- "Ansi 13 Color": {
106
- "Red Component": 0.89803921568627454,
107
- "Color Space": "sRGB",
108
- "Blue Component": 0.89411764705882357,
109
- "Alpha Component": 1,
110
- "Green Component": 0.0039215686274509786
111
- },
112
- "Title Components": 128,
113
- "Brighten Bold Text": true,
114
- "Custom Command": "No",
115
- "ASCII Anti Aliased": true,
116
- "Non Ascii Font": "Monaco 12",
117
- "Vertical Spacing": 1,
118
- "Use Bold Font": true,
119
- "Option Key Sends": 0,
120
- "Selected Text Color": {
121
- "Red Component": 0.74152278900146484,
122
- "Color Space": "sRGB",
123
- "Blue Component": 0.41893920307893495,
124
- "Alpha Component": 1,
125
- "Green Component": 0.41893920307893495
126
- },
127
- "Background Color": {
128
- "Red Component": 0.094117647058823528,
129
- "Color Space": "sRGB",
130
- "Blue Component": 0.15686274509803921,
131
- "Alpha Component": 1,
132
- "Green Component": 0.11764705882352941
133
- },
134
- "Character Encoding": 4,
135
- "Ansi 11 Color": {
136
- "Red Component": 0.90196078431372551,
137
- "Color Space": "sRGB",
138
- "Blue Component": 0,
139
- "Alpha Component": 1,
140
- "Green Component": 0.89803921568627454
141
- },
142
- "Thin Strokes": 0,
143
- "Use Italic Font": true,
144
- "Unlimited Scrollback": true,
145
- "Keyboard Map": {
146
- "0x77-0x100000-0xd": {
147
- "Version": 1,
148
- "Action": 38,
149
- "Text": ":ToggleTerm\\n",
150
- "Label": ""
151
- }
152
- },
153
- "Window Type": 0,
154
- "Cursor Type": 1,
155
- "Background Image Location": "",
156
- "Blur": false,
157
- "Allow Title Setting": false,
158
- "Scrollback Lines": 0,
159
- "Send Code When Idle": false,
160
- "Close Sessions On End": true,
161
- "Terminal Type": "xterm-256color",
162
- "Visual Bell": true,
163
- "Flashing Bell": false,
164
- "Silence Bell": false,
165
- "Use Underline Color": false,
166
- "Ansi 14 Color": {
167
- "Red Component": 0.34509803921568627,
168
- "Color Space": "sRGB",
169
- "Blue Component": 1,
170
- "Alpha Component": 1,
171
- "Green Component": 0.53725490196078429
172
- },
173
- "Unicode Version": 9,
174
- "ASCII Ligatures": false,
175
- "Name": "iTerm2",
176
- "Cursor Text Color": {
177
- "Green Component": 1,
178
- "Red Component": 1,
179
- "Blue Component": 1
180
- },
181
- "Shortcut": "",
182
- "Cursor Color": {
183
- "Red Component": 1,
184
- "Color Space": "sRGB",
185
- "Blue Component": 1,
186
- "Alpha Component": 1,
187
- "Green Component": 1
188
- },
189
- "Transparency": 0,
190
- "Guid": "8EB11186-A4A6-4322-97BC-8385D9A5C82C",
191
- "Custom Directory": "Recycle",
192
- "Horizontal Spacing": 1,
193
- "Ansi 4 Color": {
194
- "Red Component": 0.43137254901960786,
195
- "Color Space": "sRGB",
196
- "Blue Component": 1,
197
- "Alpha Component": 1,
198
- "Green Component": 0.38039215686274508
199
- },
200
- "Right Option Key Sends": 0,
201
- "Use Non-ASCII Font": false,
202
- "Ansi 7 Color": {
203
- "Red Component": 0.95686274509803926,
204
- "Color Space": "sRGB",
205
- "Blue Component": 0.95686274509803926,
206
- "Alpha Component": 1,
207
- "Green Component": 0.95686274509803926
208
- },
209
- "Ansi 8 Color": {
210
- "Red Component": 0.40000000000000002,
211
- "Color Space": "sRGB",
212
- "Blue Component": 0.40000000000000002,
213
- "Alpha Component": 1,
214
- "Green Component": 0.40000000000000002
215
- },
216
- "Ansi 9 Color": {
217
- "Red Component": 0.90196078431372551,
218
- "Color Space": "sRGB",
219
- "Blue Component": 0.0039215686274509786,
220
- "Alpha Component": 1,
221
- "Green Component": 0
222
- },
223
- "Link Color": {
224
- "Red Component": 0.34509803921568627,
225
- "Color Space": "sRGB",
226
- "Blue Component": 1,
227
- "Alpha Component": 1,
228
- "Green Component": 0.53725490196078429
229
- },
230
- "Ansi 5 Color": {
231
- "Red Component": 0.8901960784313725,
232
- "Color Space": "sRGB",
233
- "Blue Component": 0.88235294117647056,
234
- "Alpha Component": 1,
235
- "Green Component": 0.29803921568627451
236
- }
237
- }
nushell/config.nu ADDED
@@ -0,0 +1,899 @@
1
+ # Nushell Config File
2
+ #
3
+ # version = "0.100.0"
4
+
5
+ # For more information on defining custom themes, see
6
+ # https://www.nushell.sh/book/coloring_and_theming.html
7
+ # And here is the theme collection
8
+ # https://github.com/nushell/nu_scripts/tree/main/themes
9
+ let dark_theme = {
10
+ # color for nushell primitives
11
+ separator: white
12
+ leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
13
+ header: green_bold
14
+ empty: blue
15
+ # Closures can be used to choose colors for specific values.
16
+ # The value (in this case, a bool) is piped into the closure.
17
+ # eg) {|| if $in { 'light_cyan' } else { 'light_gray' } }
18
+ bool: light_cyan
19
+ int: white
20
+ filesize: cyan
21
+ duration: white
22
+ date: purple
23
+ range: white
24
+ float: white
25
+ string: white
26
+ nothing: white
27
+ binary: white
28
+ cell-path: white
29
+ row_index: green_bold
30
+ record: white
31
+ list: white
32
+ block: white
33
+ hints: dark_gray
34
+ search_result: { bg: red fg: white }
35
+ shape_and: purple_bold
36
+ shape_binary: purple_bold
37
+ shape_block: blue_bold
38
+ shape_bool: light_cyan
39
+ shape_closure: green_bold
40
+ shape_custom: green
41
+ shape_datetime: cyan_bold
42
+ shape_directory: cyan
43
+ shape_external: cyan
44
+ shape_externalarg: green_bold
45
+ shape_external_resolved: light_yellow_bold
46
+ shape_filepath: cyan
47
+ shape_flag: blue_bold
48
+ shape_float: purple_bold
49
+ # shapes are used to change the cli syntax highlighting
50
+ shape_garbage: { fg: white bg: red attr: b }
51
+ shape_glob_interpolation: cyan_bold
52
+ shape_globpattern: cyan_bold
53
+ shape_int: purple_bold
54
+ shape_internalcall: cyan_bold
55
+ shape_keyword: cyan_bold
56
+ shape_list: cyan_bold
57
+ shape_literal: blue
58
+ shape_match_pattern: green
59
+ shape_matching_brackets: { attr: u }
60
+ shape_nothing: light_cyan
61
+ shape_operator: yellow
62
+ shape_or: purple_bold
63
+ shape_pipe: purple_bold
64
+ shape_range: yellow_bold
65
+ shape_record: cyan_bold
66
+ shape_redirection: purple_bold
67
+ shape_signature: green_bold
68
+ shape_string: green
69
+ shape_string_interpolation: cyan_bold
70
+ shape_table: blue_bold
71
+ shape_variable: purple
72
+ shape_vardecl: purple
73
+ shape_raw_string: light_purple
74
+ }
75
+
76
+ let light_theme = {
77
+ # color for nushell primitives
78
+ separator: dark_gray
79
+ leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
80
+ header: green_bold
81
+ empty: blue
82
+ # Closures can be used to choose colors for specific values.
83
+ # The value (in this case, a bool) is piped into the closure.
84
+ # eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } }
85
+ bool: dark_cyan
86
+ int: dark_gray
87
+ filesize: cyan_bold
88
+ duration: dark_gray
89
+ date: purple
90
+ range: dark_gray
91
+ float: dark_gray
92
+ string: dark_gray
93
+ nothing: dark_gray
94
+ binary: dark_gray
95
+ cell-path: dark_gray
96
+ row_index: green_bold
97
+ record: dark_gray
98
+ list: dark_gray
99
+ block: dark_gray
100
+ hints: dark_gray
101
+ search_result: { fg: white bg: red }
102
+ shape_and: purple_bold
103
+ shape_binary: purple_bold
104
+ shape_block: blue_bold
105
+ shape_bool: light_cyan
106
+ shape_closure: green_bold
107
+ shape_custom: green
108
+ shape_datetime: cyan_bold
109
+ shape_directory: cyan
110
+ shape_external: cyan
111
+ shape_externalarg: green_bold
112
+ shape_external_resolved: light_purple_bold
113
+ shape_filepath: cyan
114
+ shape_flag: blue_bold
115
+ shape_float: purple_bold
116
+ # shapes are used to change the cli syntax highlighting
117
+ shape_garbage: { fg: white bg: red attr: b }
118
+ shape_glob_interpolation: cyan_bold
119
+ shape_globpattern: cyan_bold
120
+ shape_int: purple_bold
121
+ shape_internalcall: cyan_bold
122
+ shape_keyword: cyan_bold
123
+ shape_list: cyan_bold
124
+ shape_literal: blue
125
+ shape_match_pattern: green
126
+ shape_matching_brackets: { attr: u }
127
+ shape_nothing: light_cyan
128
+ shape_operator: yellow
129
+ shape_or: purple_bold
130
+ shape_pipe: purple_bold
131
+ shape_range: yellow_bold
132
+ shape_record: cyan_bold
133
+ shape_redirection: purple_bold
134
+ shape_signature: green_bold
135
+ shape_string: green
136
+ shape_string_interpolation: cyan_bold
137
+ shape_table: blue_bold
138
+ shape_variable: purple
139
+ shape_vardecl: purple
140
+ shape_raw_string: light_purple
141
+ }
142
+
143
+ # External completer example
144
+ # let carapace_completer = {|spans|
145
+ # carapace $spans.0 nushell ...$spans | from json
146
+ # }
147
+
148
+ # The default config record. This is where much of your global configuration is setup.
149
+ $env.config = {
150
+ show_banner: false # true or false to enable or disable the welcome banner at startup
151
+
152
+ ls: {
153
+ use_ls_colors: true # use the LS_COLORS environment variable to colorize output
154
+ clickable_links: true # enable or disable clickable links. Your terminal has to support links.
155
+ }
156
+
157
+ rm: {
158
+ always_trash: false # always act as if -t was given. Can be overridden with -p
159
+ }
160
+
161
+ table: {
162
+ mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
163
+ index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
164
+ show_empty: true # show 'empty list' and 'empty record' placeholders for command output
165
+ padding: { left: 1, right: 1 } # a left right padding of each column in a table
166
+ trim: {
167
+ methodology: wrapping # wrapping or truncating
168
+ wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
169
+ truncating_suffix: "..." # A suffix used by the 'truncating' methodology
170
+ }
171
+ header_on_separator: false # show header text on separator/border line
172
+ footer_inheritance: false # render footer in parent table if child is big enough (extended table option)
173
+ # abbreviated_row_count: 10 # limit data rows from top and bottom after reaching a set point
174
+ }
175
+
176
+ error_style: "fancy" # "fancy" or "plain" for screen reader-friendly error messages
177
+
178
+ # Whether an error message should be printed if an error of a certain kind is triggered.
179
+ display_errors: {
180
+ exit_code: false # assume the external command prints an error message
181
+ # Core dump errors are always printed, and SIGPIPE never triggers an error.
182
+ # The setting below controls message printing for termination by all other signals.
183
+ termination_signal: true
184
+ }
185
+
186
+ # datetime_format determines what a datetime rendered in the shell would look like.
187
+ # Behavior without this configuration point will be to "humanize" the datetime display,
188
+ # showing something like "a day ago."
189
+ datetime_format: {
190
+ # normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables
191
+ # table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format
192
+ }
193
+
194
+ explore: {
195
+ status_bar_background: { fg: "#1D1F21", bg: "#C4C9C6" },
196
+ command_bar_text: { fg: "#C4C9C6" },
197
+ highlight: { fg: "black", bg: "yellow" },
198
+ status: {
199
+ error: { fg: "white", bg: "red" },
200
+ warn: {}
201
+ info: {}
202
+ },
203
+ selected_cell: { bg: light_blue },
204
+ }
205
+
206
+ history: {
207
+ max_size: 1000_000 # Session has to be reloaded for this to take effect
208
+ sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
209
+ file_format: "plaintext" # "sqlite" or "plaintext"
210
+ isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions.
211
+ }
212
+
213
+ completions: {
214
+ case_sensitive: false # set to true to enable case-sensitive completions
215
+ quick: true # set this to false to prevent auto-selecting completions when only one remains
216
+ partial: true # set this to false to prevent partial filling of the prompt
217
+ algorithm: "prefix" # prefix or fuzzy
218
+ sort: "smart" # "smart" (alphabetical for prefix matching, fuzzy score for fuzzy matching) or "alphabetical"
219
+ external: {
220
+ enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
221
+ max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
222
+ completer: null # check 'carapace_completer' above as an example
223
+ }
224
+ use_ls_colors: true # set this to true to enable file/path/directory completions using LS_COLORS
225
+ }
226
+
227
+ cursor_shape: {
228
+ emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default)
229
+ vi_insert: block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default)
230
+ vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default)
231
+ }
232
+
233
+ color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
234
+ footer_mode: 25 # always, never, number_of_rows, auto
235
+ float_precision: 2 # the precision for displaying floats in tables
236
+ buffer_editor: null # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.VISUAL and $env.EDITOR
237
+ use_ansi_coloring: true
238
+ bracketed_paste: true # enable bracketed paste, currently useless on windows
239
+ edit_mode: emacs # emacs, vi
240
+ shell_integration: {
241
+ # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title
242
+ osc2: true
243
+ # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory
244
+ osc7: true
245
+ # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8
246
+ osc8: true
247
+ # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal
248
+ osc9_9: false
249
+ # osc133 is several escapes invented by Final Term which include the supported ones below.
250
+ # 133;A - Mark prompt start
251
+ # 133;B - Mark prompt end
252
+ # 133;C - Mark pre-execution
253
+ # 133;D;exit - Mark execution finished with exit code
254
+ # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is
255
+ osc133: true
256
+ # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features
257
+ # 633;A - Mark prompt start
258
+ # 633;B - Mark prompt end
259
+ # 633;C - Mark pre-execution
260
+ # 633;D;exit - Mark execution finished with exit code
261
+ # 633;E - Explicitly set the command line with an optional nonce
262
+ # 633;P;Cwd=<path> - Mark the current working directory and communicate it to the terminal
263
+ # and also helps with the run recent menu in vscode
264
+ osc633: true
265
+ # reset_application_mode is escape \x1b[?1l and was added to help ssh work better
266
+ reset_application_mode: true
267
+ }
268
+ render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
269
+ use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
270
+ highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which.
271
+ recursion_limit: 50 # the maximum number of times nushell allows recursion before stopping it
272
+
273
+ plugins: {} # Per-plugin configuration. See https://www.nushell.sh/contributor-book/plugins.html#configuration.
274
+
275
+ plugin_gc: {
276
+ # Configuration for plugin garbage collection
277
+ default: {
278
+ enabled: true # true to enable stopping of inactive plugins
279
+ stop_after: 10sec # how long to wait after a plugin is inactive to stop it
280
+ }
281
+ plugins: {
282
+ # alternate configuration for specific plugins, by name, for example:
283
+ #
284
+ # gstat: {
285
+ # enabled: false
286
+ # }
287
+ }
288
+ }
289
+
290
+ hooks: {
291
+ pre_prompt: [{ null }] # run before the prompt is shown
292
+ pre_execution: [{ null }] # run before the repl input is run
293
+ env_change: {
294
+ PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
295
+ }
296
+ display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline
297
+ command_not_found: { null } # return an error message when a command is not found
298
+ }
299
+
300
+ menus: [
301
+ # Configuration for default nushell menus
302
+ # Note the lack of source parameter
303
+ {
304
+ name: completion_menu
305
+ only_buffer_difference: false
306
+ marker: "| "
307
+ type: {
308
+ layout: columnar
309
+ columns: 4
310
+ col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
311
+ col_padding: 2
312
+ }
313
+ style: {
314
+ text: green
315
+ selected_text: { attr: r }
316
+ description_text: yellow
317
+ match_text: { attr: u }
318
+ selected_match_text: { attr: ur }
319
+ }
320
+ }
321
+ {
322
+ name: ide_completion_menu
323
+ only_buffer_difference: false
324
+ marker: "| "
325
+ type: {
326
+ layout: ide
327
+ min_completion_width: 0,
328
+ max_completion_width: 50,
329
+ max_completion_height: 10, # will be limited by the available lines in the terminal
330
+ padding: 0,
331
+ border: true,
332
+ cursor_offset: 0,
333
+ description_mode: "prefer_right"
334
+ min_description_width: 0
335
+ max_description_width: 50
336
+ max_description_height: 10
337
+ description_offset: 1
338
+ # If true, the cursor pos will be corrected, so the suggestions match up with the typed text
339
+ #
340
+ # C:\> str
341
+ # str join
342
+ # str trim
343
+ # str split
344
+ correct_cursor_pos: false
345
+ }
346
+ style: {
347
+ text: green
348
+ selected_text: { attr: r }
349
+ description_text: yellow
350
+ match_text: { attr: u }
351
+ selected_match_text: { attr: ur }
352
+ }
353
+ }
354
+ {
355
+ name: history_menu
356
+ only_buffer_difference: true
357
+ marker: "? "
358
+ type: {
359
+ layout: list
360
+ page_size: 10
361
+ }
362
+ style: {
363
+ text: green
364
+ selected_text: green_reverse
365
+ description_text: yellow
366
+ }
367
+ }
368
+ {
369
+ name: help_menu
370
+ only_buffer_difference: true
371
+ marker: "? "
372
+ type: {
373
+ layout: description
374
+ columns: 4
375
+ col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
376
+ col_padding: 2
377
+ selection_rows: 4
378
+ description_rows: 10
379
+ }
380
+ style: {
381
+ text: green
382
+ selected_text: green_reverse
383
+ description_text: yellow
384
+ }
385
+ }
386
+ ]
387
+
388
+ keybindings: [
389
+ {
390
+ name: completion_menu
391
+ modifier: none
392
+ keycode: tab
393
+ mode: [emacs vi_normal vi_insert]
394
+ event: {
395
+ until: [
396
+ { send: menu name: completion_menu }
397
+ { send: menunext }
398
+ { edit: complete }
399
+ ]
400
+ }
401
+ }
402
+ {
403
+ name: completion_previous_menu
404
+ modifier: shift
405
+ keycode: backtab
406
+ mode: [emacs, vi_normal, vi_insert]
407
+ event: { send: menuprevious }
408
+ }
409
+ {
410
+ name: ide_completion_menu
411
+ modifier: control
412
+ keycode: space
413
+ mode: [emacs vi_normal vi_insert]
414
+ event: {
415
+ until: [
416
+ { send: menu name: ide_completion_menu }
417
+ { send: menunext }
418
+ { edit: complete }
419
+ ]
420
+ }
421
+ }
422
+ {
423
+ name: history_menu
424
+ modifier: control
425
+ keycode: char_r
426
+ mode: [emacs, vi_insert, vi_normal]
427
+ event: { send: menu name: history_menu }
428
+ }
429
+ {
430
+ name: help_menu
431
+ modifier: none
432
+ keycode: f1
433
+ mode: [emacs, vi_insert, vi_normal]
434
+ event: { send: menu name: help_menu }
435
+ }
436
+ {
437
+ name: next_page_menu
438
+ modifier: control
439
+ keycode: char_x
440
+ mode: emacs
441
+ event: { send: menupagenext }
442
+ }
443
+ {
444
+ name: undo_or_previous_page_menu
445
+ modifier: control
446
+ keycode: char_z
447
+ mode: emacs
448
+ event: {
449
+ until: [
450
+ { send: menupageprevious }
451
+ { edit: undo }
452
+ ]
453
+ }
454
+ }
455
+ {
456
+ name: escape
457
+ modifier: none
458
+ keycode: escape
459
+ mode: [emacs, vi_normal, vi_insert]
460
+ event: { send: esc } # NOTE: does not appear to work
461
+ }
462
+ {
463
+ name: cancel_command
464
+ modifier: control
465
+ keycode: char_c
466
+ mode: [emacs, vi_normal, vi_insert]
467
+ event: { send: ctrlc }
468
+ }
469
+ {
470
+ name: quit_shell
471
+ modifier: control
472
+ keycode: char_d
473
+ mode: [emacs, vi_normal, vi_insert]
474
+ event: { send: ctrld }
475
+ }
476
+ {
477
+ name: clear_screen
478
+ modifier: control
479
+ keycode: char_l
480
+ mode: [emacs, vi_normal, vi_insert]
481
+ event: { send: clearscreen }
482
+ }
483
+ {
484
+ name: search_history
485
+ modifier: control
486
+ keycode: char_q
487
+ mode: [emacs, vi_normal, vi_insert]
488
+ event: { send: searchhistory }
489
+ }
490
+ {
491
+ name: open_command_editor
492
+ modifier: control
493
+ keycode: char_o
494
+ mode: [emacs, vi_normal, vi_insert]
495
+ event: { send: openeditor }
496
+ }
497
+ {
498
+ name: move_up
499
+ modifier: none
500
+ keycode: up
501
+ mode: [emacs, vi_normal, vi_insert]
502
+ event: {
503
+ until: [
504
+ { send: menuup }
505
+ { send: up }
506
+ ]
507
+ }
508
+ }
509
+ {
510
+ name: move_down
511
+ modifier: none
512
+ keycode: down
513
+ mode: [emacs, vi_normal, vi_insert]
514
+ event: {
515
+ until: [
516
+ { send: menudown }
517
+ { send: down }
518
+ ]
519
+ }
520
+ }
521
+ {
522
+ name: move_left
523
+ modifier: none
524
+ keycode: left
525
+ mode: [emacs, vi_normal, vi_insert]
526
+ event: {
527
+ until: [
528
+ { send: menuleft }
529
+ { send: left }
530
+ ]
531
+ }
532
+ }
533
+ {
534
+ name: move_right_or_take_history_hint
535
+ modifier: none
536
+ keycode: right
537
+ mode: [emacs, vi_normal, vi_insert]
538
+ event: {
539
+ until: [
540
+ { send: historyhintcomplete }
541
+ { send: menuright }
542
+ { send: right }
543
+ ]
544
+ }
545
+ }
546
+ {
547
+ name: move_one_word_left
548
+ modifier: control
549
+ keycode: left
550
+ mode: [emacs, vi_normal, vi_insert]
551
+ event: { edit: movewordleft }
552
+ }
553
+ {
554
+ name: move_one_word_right_or_take_history_hint
555
+ modifier: control
556
+ keycode: right
557
+ mode: [emacs, vi_normal, vi_insert]
558
+ event: {
559
+ until: [
560
+ { send: historyhintwordcomplete }
561
+ { edit: movewordright }
562
+ ]
563
+ }
564
+ }
565
+ {
566
+ name: move_to_line_start
567
+ modifier: none
568
+ keycode: home
569
+ mode: [emacs, vi_normal, vi_insert]
570
+ event: { edit: movetolinestart }
571
+ }
572
+ {
573
+ name: move_to_line_start
574
+ modifier: control
575
+ keycode: char_a
576
+ mode: [emacs, vi_normal, vi_insert]
577
+ event: { edit: movetolinestart }
578
+ }
579
+ {
580
+ name: move_to_line_end_or_take_history_hint
581
+ modifier: none
582
+ keycode: end
583
+ mode: [emacs, vi_normal, vi_insert]
584
+ event: {
585
+ until: [
586
+ { send: historyhintcomplete }
587
+ { edit: movetolineend }
588
+ ]
589
+ }
590
+ }
591
+ {
592
+ name: move_to_line_end_or_take_history_hint
593
+ modifier: control
594
+ keycode: char_e
595
+ mode: [emacs, vi_normal, vi_insert]
596
+ event: {
597
+ until: [
598
+ { send: historyhintcomplete }
599
+ { edit: movetolineend }
600
+ ]
601
+ }
602
+ }
603
+ {
604
+ name: move_to_line_start
605
+ modifier: control
606
+ keycode: home
607
+ mode: [emacs, vi_normal, vi_insert]
608
+ event: { edit: movetolinestart }
609
+ }
610
+ {
611
+ name: move_to_line_end
612
+ modifier: control
613
+ keycode: end
614
+ mode: [emacs, vi_normal, vi_insert]
615
+ event: { edit: movetolineend }
616
+ }
617
+ {
618
+ name: move_down
619
+ modifier: control
620
+ keycode: char_n
621
+ mode: [emacs, vi_normal, vi_insert]
622
+ event: {
623
+ until: [
624
+ { send: menudown }
625
+ { send: down }
626
+ ]
627
+ }
628
+ }
629
+ {
630
+ name: move_up
631
+ modifier: control
632
+ keycode: char_p
633
+ mode: [emacs, vi_normal, vi_insert]
634
+ event: {
635
+ until: [
636
+ { send: menuup }
637
+ { send: up }
638
+ ]
639
+ }
640
+ }
641
+ {
642
+ name: delete_one_character_backward
643
+ modifier: none
644
+ keycode: backspace
645
+ mode: [emacs, vi_insert]
646
+ event: { edit: backspace }
647
+ }
648
+ {
649
+ name: delete_one_word_backward
650
+ modifier: control
651
+ keycode: backspace
652
+ mode: [emacs, vi_insert]
653
+ event: { edit: backspaceword }
654
+ }
655
+ {
656
+ name: delete_one_character_forward
657
+ modifier: none
658
+ keycode: delete
659
+ mode: [emacs, vi_insert]
660
+ event: { edit: delete }
661
+ }
662
+ {
663
+ name: delete_one_character_forward
664
+ modifier: control
665
+ keycode: delete
666
+ mode: [emacs, vi_insert]
667
+ event: { edit: delete }
668
+ }
669
+ {
670
+ name: delete_one_character_backward
671
+ modifier: control
672
+ keycode: char_h
673
+ mode: [emacs, vi_insert]
674
+ event: { edit: backspace }
675
+ }
676
+ {
677
+ name: delete_one_word_backward
678
+ modifier: control
679
+ keycode: char_w
680
+ mode: [emacs, vi_insert]
681
+ event: { edit: backspaceword }
682
+ }
683
+ {
684
+ name: move_left
685
+ modifier: none
686
+ keycode: backspace
687
+ mode: vi_normal
688
+ event: { edit: moveleft }
689
+ }
690
+ {
691
+ name: newline_or_run_command
692
+ modifier: none
693
+ keycode: enter
694
+ mode: emacs
695
+ event: { send: enter }
696
+ }
697
+ {
698
+ name: move_left
699
+ modifier: control
700
+ keycode: char_b
701
+ mode: emacs
702
+ event: {
703
+ until: [
704
+ { send: menuleft }
705
+ { send: left }
706
+ ]
707
+ }
708
+ }
709
+ {
710
+ name: move_right_or_take_history_hint
711
+ modifier: control
712
+ keycode: char_f
713
+ mode: emacs
714
+ event: {
715
+ until: [
716
+ { send: historyhintcomplete }
717
+ { send: menuright }
718
+ { send: right }
719
+ ]
720
+ }
721
+ }
722
+ {
723
+ name: redo_change
724
+ modifier: control
725
+ keycode: char_g
726
+ mode: emacs
727
+ event: { edit: redo }
728
+ }
729
+ {
730
+ name: undo_change
731
+ modifier: control
732
+ keycode: char_z
733
+ mode: emacs
734
+ event: { edit: undo }
735
+ }
736
+ {
737
+ name: paste_before
738
+ modifier: control
739
+ keycode: char_y
740
+ mode: emacs
741
+ event: { edit: pastecutbufferbefore }
742
+ }
743
+ {
744
+ name: cut_word_left
745
+ modifier: control
746
+ keycode: char_w
747
+ mode: emacs
748
+ event: { edit: cutwordleft }
749
+ }
750
+ {
751
+ name: cut_line_to_end
752
+ modifier: control
753
+ keycode: char_k
754
+ mode: emacs
755
+ event: { edit: cuttolineend }
756
+ }
757
+ {
758
+ name: cut_line_from_start
759
+ modifier: control
760
+ keycode: char_u
761
+ mode: emacs
762
+ event: { edit: cutfromstart }
763
+ }
764
+ {
765
+ name: swap_graphemes
766
+ modifier: control
767
+ keycode: char_t
768
+ mode: emacs
769
+ event: { edit: swapgraphemes }
770
+ }
771
+ {
772
+ name: move_one_word_left
773
+ modifier: alt
774
+ keycode: left
775
+ mode: emacs
776
+ event: { edit: movewordleft }
777
+ }
778
+ {
779
+ name: move_one_word_right_or_take_history_hint
780
+ modifier: alt
781
+ keycode: right
782
+ mode: emacs
783
+ event: {
784
+ until: [
785
+ { send: historyhintwordcomplete }
786
+ { edit: movewordright }
787
+ ]
788
+ }
789
+ }
790
+ {
791
+ name: move_one_word_left
792
+ modifier: alt
793
+ keycode: char_b
794
+ mode: emacs
795
+ event: { edit: movewordleft }
796
+ }
797
+ {
798
+ name: move_one_word_right_or_take_history_hint
799
+ modifier: alt
800
+ keycode: char_f
801
+ mode: emacs
802
+ event: {
803
+ until: [
804
+ { send: historyhintwordcomplete }
805
+ { edit: movewordright }
806
+ ]
807
+ }
808
+ }
809
+ {
810
+ name: delete_one_word_forward
811
+ modifier: alt
812
+ keycode: delete
813
+ mode: emacs
814
+ event: { edit: deleteword }
815
+ }
816
+ {
817
+ name: delete_one_word_backward
818
+ modifier: alt
819
+ keycode: backspace
820
+ mode: emacs
821
+ event: { edit: backspaceword }
822
+ }
823
+ {
824
+ name: delete_one_word_backward
825
+ modifier: alt
826
+ keycode: char_m
827
+ mode: emacs
828
+ event: { edit: backspaceword }
829
+ }
830
+ {
831
+ name: cut_word_to_right
832
+ modifier: alt
833
+ keycode: char_d
834
+ mode: emacs
835
+ event: { edit: cutwordright }
836
+ }
837
+ {
838
+ name: upper_case_word
839
+ modifier: alt
840
+ keycode: char_u
841
+ mode: emacs
842
+ event: { edit: uppercaseword }
843
+ }
844
+ {
845
+ name: lower_case_word
846
+ modifier: alt
847
+ keycode: char_l
848
+ mode: emacs
849
+ event: { edit: lowercaseword }
850
+ }
851
+ {
852
+ name: capitalize_char
853
+ modifier: alt
854
+ keycode: char_c
855
+ mode: emacs
856
+ event: { edit: capitalizechar }
857
+ }
858
+ # The following bindings with `*system` events require that Nushell has
859
+ # been compiled with the `system-clipboard` feature.
860
+ # If you want to use the system clipboard for visual selection or to
861
+ # paste directly, uncomment the respective lines and replace the version
862
+ # using the internal clipboard.
863
+ {
864
+ name: copy_selection
865
+ modifier: control_shift
866
+ keycode: char_c
867
+ mode: emacs
868
+ event: { edit: copyselection }
869
+ # event: { edit: copyselectionsystem }
870
+ }
871
+ {
872
+ name: cut_selection
873
+ modifier: control_shift
874
+ keycode: char_x
875
+ mode: emacs
876
+ event: { edit: cutselection }
877
+ # event: { edit: cutselectionsystem }
878
+ }
879
+ # {
880
+ # name: paste_system
881
+ # modifier: control_shift
882
+ # keycode: char_v
883
+ # mode: emacs
884
+ # event: { edit: pastesystem }
885
+ # }
886
+ {
887
+ name: select_all
888
+ modifier: control_shift
889
+ keycode: char_a
890
+ mode: emacs
891
+ event: { edit: selectall }
892
+ }
893
+ ]
894
+ }
895
+ source $"($nu.home-path)/.cargo/env.nu"
896
+ def repo-push [] {
897
+ git update-server-info
898
+ aws s3 sync --delete .git s3://pyrossh-repos-prd/(basename (pwd)).git
899
+ }
nushell/env.nu ADDED
@@ -0,0 +1,45 @@
1
+ # Specifies how environment variables are:
2
+ # - converted from a string to a value on Nushell startup (from_string)
3
+ # - converted from a value back to a string when running external commands (to_string)
4
+ # Note: The conversions happen *after* config.nu is loaded
5
+ $env.ENV_CONVERSIONS = {
6
+ "PATH": {
7
+ from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
8
+ to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
9
+ }
10
+ "Path": {
11
+ from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
12
+ to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
13
+ }
14
+ }
15
+
16
+ # Directories to search for scripts when calling source or use
17
+ # The default for this is $nu.default-config-dir/scripts
18
+ $env.NU_LIB_DIRS = [
19
+ ($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts
20
+ ($nu.data-dir | path join 'completions') # default home for nushell completions
21
+ ]
22
+
23
+ # Directories to search for plugin binaries when calling register
24
+ # The default for this is $nu.default-config-dir/plugins
25
+ $env.NU_PLUGIN_DIRS = [
26
+ ($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins
27
+ ]
28
+
29
+ $env.PROMPT_COMMAND = { || oh-my-posh print primary --config $'/opt/homebrew/opt/oh-my-posh/themes/zash.omp.json' }
30
+ $env.PROMPT_INDICATOR = $"(ansi y)$> (ansi reset)"
31
+
32
+ use std "path add"
33
+ $env.PATH = ($env.PATH | split row (char esep))
34
+ $env.JAVA_HOME = "/Applications/Android Studio.app/Contents/jbr/Contents/Home"
35
+ $env.ANDROID_HOME = "/Users/pyrossh/Library/Android/sdk"
36
+ $env.NDK_HOME = "/Users/pyrossh/Library/Android/sdk/ndk/29.0.13113456"
37
+ path add /opt/homebrew/bin
38
+ path add /opt/homebrew/opt/openjdk/bin
39
+ path add /opt/homebrew/opt/ruby/bin
40
+ path add ~/.cargo/bin
41
+ path add ~/Library/Android/sdk/platform-tools/
42
+ path add ~/.dotnet
43
+ path add ~/.dotnet/tools
44
+ path add ~/.local/bin
45
+ path add /usr/local/bin
settings.json CHANGED
@@ -64,5 +64,5 @@
64
64
  "editor.defaultFormatter": "svelte.svelte-vscode"
65
65
  },
66
66
  "editor.stickyScroll.enabled": false,
67
- "terminal.integrated.defaultProfile.osx": "fish"
67
+ "terminal.integrated.defaultProfile.osx": "nu"
68
- }
68
+ }
setup.sh CHANGED
@@ -1,19 +1,13 @@
1
- brew bundle
2
- echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells
1
+ brew install tig typst nu helix zellij podman openjdk gradle mas cocoapods bun rclone jandedobbeleer/oh-my-posh/oh-my-posh
3
- chsh -s /opt/homebrew/bin/fish
4
- fish
5
- set -x LANG en_US.UTF-8
6
- set -x LC_ALL en_US.UTF-8
7
- fisher install pure-fish/pure
8
- fisher install IlanCosman/tide@v5
9
- fish_add_path /opt/homebrew/bin
10
- fish_add_path /opt/homebrew/opt/openjdk/bin
11
- fish_add_path /opt/homebrew/opt/ruby/bin
12
- fish_add_path ~/Library/Android/sdk/platform-tools/
13
2
 
3
+ brew --cask install ghostty void android-studio google-chrome obsidian secretive mpv stats pika font-ubuntu-mono
4
+
14
- mas install 497799835 // installs xcode
5
+ mas install 497799835 # installs xcode
6
+ echo /opt/homebrew/bin/nu | sudo tee -a /etc/shells
7
+ chsh -s /opt/homebrew/bin/nu
8
+ launchctl setenv PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin
9
+ launchctl setenv XDG_CONFIG_HOME /Users/pyrossh/Code/pyrossh/config
15
- launchctl setenv JAVA_HOME "/opt/homebrew/opt/openjdk"
10
+ launchctl setenv JAVA_HOME "/Applications/Android Studio.app/Contents/jbr/Contents/Home"
16
11
  launchctl setenv ANDROID_HOME ~/Library/Android/sdk
17
- launchctl setenv NPM_TOKEN value
18
12
  launchctl setenv EDITOR hx
19
- git config --global --add --bool push.autoSetupRemote true
13
+ git config --global --add --bool push.autoSetupRemote true