aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--bash/env.sh1
-rw-r--r--navi.yaml32
-rw-r--r--wt.json76
-rw-r--r--zsh/zshrc19
4 files changed, 77 insertions, 51 deletions
diff --git a/bash/env.sh b/bash/env.sh
index 28929cf..4891067 100644
--- a/bash/env.sh
+++ b/bash/env.sh
@@ -4,6 +4,7 @@ export EDITOR="$(command -v vim 2>/dev/null || command -v vi)"
export VISUAL="code --wait"
export GPG_TTY=$(tty)
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
+export MANROFFOPT="-c"
export STARSHIP_LOG="error"
export FZF_PREVIEW_COMMAND="bat --style=numbers,changes --wrap never --color always {} || cat {} || tree -C {}"
export FZF_CTRL_T_OPTS="--min-height 30 --preview-window down:60% --preview-window noborder --preview '($FZF_PREVIEW_COMMAND) 2> /dev/null'"
diff --git a/navi.yaml b/navi.yaml
new file mode 100644
index 0000000..89723f7
--- /dev/null
+++ b/navi.yaml
@@ -0,0 +1,32 @@
+# THIS IS EXPERIMENTAL
+# the config file schema may change at any time
+
+style:
+ tag:
+ color: cyan # text color. possible values: https://bit.ly/3gloNNI
+ width_percentage: 26 # column width relative to the terminal window
+ min_width: 20 # minimum column width as number of characters
+ comment:
+ color: blue
+ width_percentage: 42
+ min_width: 45
+ snippet:
+ color: white
+
+finder:
+ command: fzf # equivalent to the --finder option
+ # overrides: --tac # equivalent to the --fzf-overrides option
+ # overrides_var: --tac # equivalent to the --fzf-overrides-var option
+
+# cheats:
+ # paths:
+ # - /path/to/some/dir
+ # - /path/to/another/dir
+ # path: /path/to/some/dir # (DEPRECATED) equivalent to the --path option
+
+# search:
+ # tags: git,!checkout # equivalent to the --tag-rules option
+
+shell:
+ command: zsh # shell used for shell out. possible values: bash, zsh, dash, ...
+
diff --git a/wt.json b/wt.json
index 7e3e54b..d70263d 100644
--- a/wt.json
+++ b/wt.json
@@ -1,19 +1,22 @@
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
- "actions":
- [
+ "actions": [
{
- "command":
- {
+ "command": {
+ "action": "closeTab"
+ },
+ "keys": "ctrl+w"
+ },
+ {
+ "command": {
"action": "openSettings",
"target": "settingsUI"
},
"keys": "ctrl+comma"
},
{
- "command":
- {
+ "command": {
"action": "openSettings"
},
"keys": "ctrl+shift+comma"
@@ -23,62 +26,48 @@
"keys": "ctrl+v"
},
{
- "command":
- {
+ "command": {
"action": "newTab"
}
},
{
- "command": "find"
- },
- {
- "command":
- {
+ "command": {
"action": "openSettings",
"target": "defaultsFile"
},
"keys": "ctrl+alt+comma"
},
{
- "command":
- {
- "action": "closeTab"
- },
- "keys": "ctrl+w"
- },
- {
- "command":
- {
- "action": "commandPalette"
- },
- "keys": "f1"
- },
- {
"command": "unbound",
"keys": "ctrl+f"
},
{
"command": "unbound",
"keys": "ctrl+t"
+ },
+ {
+ "command": "find"
+ },
+ {
+ "command": {
+ "action": "commandPalette"
+ },
+ "keys": "f1"
}
],
"alwaysShowNotificationIcon": true,
"confirmCloseAllTabs": false,
"defaultProfile": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
- "disabledProfileSources":
- [
+ "disabledProfileSources": [
"Windows.Terminal.Azure"
],
"experimental.rendering.forceFullRepaint": true,
"initialCols": 100,
"initialRows": 30,
"multiLinePasteWarning": false,
- "profiles":
- {
- "defaults":
- {
- "bellStyle":
- [
+ "profiles": {
+ "defaults": {
+ "bellStyle": [
"window",
"taskbar"
],
@@ -86,19 +75,18 @@
"colorScheme": "vscode-dark",
"cursorColor": "#D4D4D4",
"cursorShape": "filledBox",
- "font":
- {
+ "font": {
"face": "FiraCode NF",
"size": 11
},
"padding": "8",
"useAcrylic": true
},
- "list":
- [
+ "list": [
{
"guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
"hidden": false,
+ "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
"name": "Debian",
"source": "Windows.Terminal.Wsl"
},
@@ -115,6 +103,13 @@
"name": "Loki"
},
{
+ "commandline": "C:\\Users\\tobyv\\.ssh\\wsl-ssh.bat door",
+ "guid": "{2d87a771-a5dd-44d5-b32d-ce8688b41f7c}",
+ "hidden": false,
+ "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
+ "name": "Door"
+ },
+ {
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
@@ -122,8 +117,7 @@
}
]
},
- "schemes":
- [
+ "schemes": [
{
"background": "#0C0C0C",
"black": "#0C0C0C",
diff --git a/zsh/zshrc b/zsh/zshrc
index 2c7a8fb..32b74df 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -27,27 +27,26 @@ fpath=(~/.local/share/zsh/site-functions "${fpath[@]}")
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
for f in ~/.zsh/*.*sh; do source $f; done
-
# fzf settings
-export FZF_DEFAULT_COMMAND='fd --type f'
+export FZF_DEFAULT_COMMAND="fd --type f || git ls-tree -r --name-only HEAD || rg --files || find ."
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
-_fzf_compgen_path() {
+command -v fd &>/dev/null && _fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}
-_fzf_compgen_dir() {
+command -v fd &>/dev/null && _fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
-# starship prompt
-eval "$(starship init zsh)"
+eval "$(starship init zsh 2>/dev/null)"
+eval "$(navi widget zsh 2>/dev/null)"
-function set_win_title() {
- folder=$(sed "s/$USER/~/g" <<<$PWD:t)
+set_win_title() {
+ folder=$(sed "s/$USER/~/g" <<<$PWD:t)
- window_title="\033]0;$USER@$HOST: $folder\007"
- echo -ne "$window_title"
+ window_title="\033]0;$USER@$HOST: $folder\007"
+ echo -ne "$window_title"
}
precmd_functions+=(set_win_title)