Compare commits

...

11 Commits

Author SHA1 Message Date
turtlebasket
7df984d8c9 more nvim overhaul 2026-02-19 17:52:47 -08:00
turtlebasket
c33c7583f1 misc tweaks; cleanup irrelevant 2026-02-19 17:52:31 -08:00
turtlebasket
5c5128be85 neovim cfg overhaul 2026-02-19 14:28:34 -08:00
4d34926921 git split diffs tool 2026-02-04 17:39:59 -08:00
b64a2c9030 update ntfy scripts 2026-02-04 17:32:54 -08:00
8c520df5bd zed 2026-02-02 18:50:51 -08:00
cd72f8cffd hs, ghostty changes 2026-02-01 11:48:41 -08:00
837111c722 decalva vsc/cursor keybindgs 2026-01-21 15:04:32 -08:00
fd51ecd814 ghostty 2026-01-21 15:03:06 -08:00
151cd20a95 misc macos updates 2025-10-22 14:07:45 -07:00
6a6cd3bc79 misc macos updates 2025-07-18 11:42:05 -07:00
31 changed files with 2901 additions and 5410 deletions

View File

@@ -1,14 +1,10 @@
# Environment # Environment
![macOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=macos&logoColor=F0F0F0)
![Fedora](https://img.shields.io/badge/Fedora-294172?style=for-the-badge&logo=fedora&logoColor=white)
![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)
## Contents ## Contents
- [Configs](./config/) - [Configs](./config/)
- [Old setup stuff](./setup/)
- [Misc. scripts](./scripts/) - [Misc. scripts](./scripts/)
- [Old setup stuff](./setup/)
## Software List ## Software List
@@ -19,12 +15,11 @@
- [MiddleClick](https://github.com/artginzburg/MiddleClick-BigSur) - [MiddleClick](https://github.com/artginzburg/MiddleClick-BigSur)
- [LinearMouse](https://linearmouse.org/) - [LinearMouse](https://linearmouse.org/)
- [OpenInTerminal](https://github.com/Ji4n1ng/OpenInTerminal) - [OpenInTerminal](https://github.com/Ji4n1ng/OpenInTerminal)
- [Raycast](https://www.raycast.com/)
### Windows ### Windows
- [AutoHotKey v1](https://www.autohotkey.com/download/1.1/) - [AutoHotKey v1](https://www.autohotkey.com/download/1.1/)
- ShareX - ShareX
- Powershell Core - Powershell Core
- Windows Terminal
- WSL (native feature)

View File

@@ -1,4 +1,4 @@
// Place your key bindings in this file to override the defaultsauto[] // Place your key bindings in this file to override the defaults
[ [
{ {
"key": "cmd+1", "key": "cmd+1",
@@ -140,6 +140,10 @@
"key": "alt+cmd+0", "key": "alt+cmd+0",
"command": "workbench.action.focusLastEditorGroup" "command": "workbench.action.focusLastEditorGroup"
}, },
{
"key": "cmd+h",
"command": "workbench.action.toggleAuxiliaryBar"
},
{ {
"key": "cmd+g", "key": "cmd+g",
"command": "git-graph.view" "command": "git-graph.view"
@@ -197,816 +201,6 @@
"key": "ctrl+shift+4", "key": "ctrl+shift+4",
"command": "workbench.action.terminal.focusAtIndex4" "command": "workbench.action.terminal.focusAtIndex4"
}, },
{
"key": "ctrl+alt+c i",
"command": "-calva.debug.instrument",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "shift+tab",
"command": "-calva-fmt.tabDedent",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+l",
"command": "-calva-fmt.alignCurrentForm",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "tab",
"command": "-calva-fmt.formatCurrentForm",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !inSnippetMode && !inlineSuggestionVisible && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+i",
"command": "-calva-fmt.tabIndent",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+p i",
"command": "-calva-fmt.inferParens",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+alt+right",
"command": "-paredit.barfSexpBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+left",
"command": "-paredit.barfSexpForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+c",
"command": "-paredit.convolute",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "backspace",
"command": "-paredit.deleteBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "delete",
"command": "-paredit.deleteForward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "ctrl+shift+alt+b",
"command": "-paredit.dragSexprBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+up",
"command": "-paredit.dragSexprBackward",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+j",
"command": "-paredit.dragSexprBackwardDown",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+u",
"command": "-paredit.dragSexprBackwardUp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+f",
"command": "-paredit.dragSexprForward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+down",
"command": "-paredit.dragSexprForward",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+d",
"command": "-paredit.dragSexprForwardDown",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+k",
"command": "-paredit.dragSexprForwardUp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+w",
"command": "-paredit.sexpRangeExpansion",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+backspace",
"command": "-paredit.forceDeleteBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "alt+delete",
"command": "-paredit.forceDeleteForward",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "ctrl+shift+j",
"command": "-paredit.joinSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+backspace",
"command": "-paredit.killListBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+delete",
"command": "-paredit.killListForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+k",
"command": "-paredit.killRight",
"when": "calva:keybindingsEnabled && editorTextFocus && !selectionAnchorSet && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+backspace",
"command": "-paredit.killSexpBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+delete",
"command": "-paredit.killSexpForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+up",
"command": "-paredit.backwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+left",
"command": "-paredit.backwardSexp",
"when": "calva:cursorBeforeComment && editorLangId == 'clojure' || calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !config.calva.paredit.hijackVSCodeDefaults && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+left",
"command": "-paredit.backwardSexp",
"when": "calva:cursorBeforeComment && editorLangId == 'clojure' || calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+up",
"command": "-paredit.backwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+down",
"command": "-paredit.forwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+right",
"command": "-paredit.forwardSexp",
"when": "calva:cursorAfterComment && editorLangId == 'clojure' || calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !config.calva.paredit.hijackVSCodeDefaults && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+right",
"command": "-paredit.forwardSexp",
"when": "calva:cursorAfterComment && editorLangId == 'clojure' || calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+end",
"command": "-paredit.closeList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+down",
"command": "-paredit.forwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+p ctrl+alt+r",
"command": "-paredit.raiseSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+q",
"command": "-paredit.rewrapQuote",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+p",
"command": "-paredit.rewrapParens",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+s",
"command": "-paredit.rewrapSquare",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+c",
"command": "-paredit.rewrapCurly",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+h",
"command": "-paredit.rewrapSet",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+up",
"command": "-paredit.selectBackwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "shift+alt+left",
"command": "-paredit.selectBackwardSexp",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorAfterComment && !calva:cursorBeforeComment && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+home",
"command": "-paredit.selectOpenList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+up",
"command": "-paredit.selectBackwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+w space",
"command": "-paredit.rangeForDefun",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+down",
"command": "-paredit.selectForwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "shift+alt+right",
"command": "-paredit.selectForwardSexp",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorAfterComment && !calva:cursorBeforeComment && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+end",
"command": "-paredit.selectCloseList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+down",
"command": "-paredit.selectForwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+k",
"command": "-paredit.selectRight",
"when": "calva:keybindingsEnabled && editorTextFocus && !selectionAnchorSet && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+w",
"command": "-paredit.sexpRangeContraction",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+left",
"command": "-paredit.slurpSexpBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+right",
"command": "-paredit.slurpSexpForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "-paredit.spliceSexpKillBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+delete",
"command": "-paredit.spliceSexpKillForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+s",
"command": "-paredit.spliceSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+s",
"command": "-paredit.splitSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+p ctrl+alt+m",
"command": "-paredit.togglemode",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+t",
"command": "-paredit.transpose",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+q",
"command": "-paredit.wrapAroundQuote",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+p",
"command": "-paredit.wrapAroundParens",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+s",
"command": "-paredit.wrapAroundSquare",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+c",
"command": "-paredit.wrapAroundCurly",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r c",
"command": "-paredit.addRichComment",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "escape",
"command": "-calva.clearInlineResults",
"when": "calva:hasInlineResults && calva:keybindingsEnabled && editorTextFocus && !editorHasMultipleSelections && !editorHasSelection && !editorReadOnly && !hasOtherSuggestions && !inlineSuggestionVisible && !parameterHintsVisible && !selectionAnchorSet && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+c",
"command": "-calva.connect",
"when": "calva:keybindingsEnabled && workspaceFolderCount > 0"
},
{
"key": "ctrl+alt+c alt+c",
"command": "-calva.connectNonProjectREPL",
"when": "calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+c ctrl+c",
"command": "-calva.copyLastResults",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+enter",
"command": "-calva.evaluateEnclosingForm",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+enter",
"command": "-calva.evaluateSelection",
"when": "calva:keybindingsEnabled && editorTextFocus && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c r",
"command": "-calva.evaluateSelectionReplace",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c c",
"command": "-calva.evaluateSelectionAsComment",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+f",
"command": "-calva.evaluateFiddleForSourceFile",
"when": "calva:connected && calva:keybindingsEnabled && !calva:activeEditorIsFiddle"
},
{
"key": "ctrl+shift+alt+enter",
"command": "-calva.evaluateStartOfFileToCursor",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+enter",
"command": "-calva.evaluateToCursor",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorHasSelection && editorLangId == 'clojure'"
},
{
"key": "shift+alt+enter",
"command": "-calva.evaluateTopLevelFormToCursor",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+enter",
"command": "-calva.evaluateSelectionToSelectionEnd",
"when": "calva:keybindingsEnabled && editorHasSelection && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "alt+enter",
"command": "-calva.evaluateCurrentTopLevelForm",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+space",
"command": "-calva.evaluateTopLevelFormAsComment",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+d",
"command": "-calva.interruptAllEvaluations",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c enter",
"command": "-calva.loadFile",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c f",
"command": "-calva.openFiddleForSourceFile",
"when": "calva:keybindingsEnabled && !calva:activeEditorIsFiddle"
},
{
"key": "ctrl+alt+c f",
"command": "-calva.openSourceFileForFiddle",
"when": "calva:activeEditorIsFiddle && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+o d",
"command": "-calva.printClojureDocsToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+r d",
"command": "-calva.printClojureDocsToRichComment",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+p",
"command": "-calva.printLastStacktrace",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+u",
"command": "-calva.requireREPLUtilities",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c shift+t",
"command": "-calva.runAllTests",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+t",
"command": "-calva.runTestUnderCursor",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+space enter",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space ,",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space .",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space -",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space backspace",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space left",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space right",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space up",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space down",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space tab",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 0",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 1",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 2",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 3",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 4",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 5",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 6",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 7",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 8",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 9",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space a",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space b",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space c",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space d",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space e",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space f",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space g",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space h",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space i",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space j",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space k",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space l",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space m",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space n",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space o",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space p",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space q",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space r",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space s",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space t",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space u",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space v",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space w",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space x",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space y",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space z",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space space",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+c ctrl+t",
"command": "-calva.rerunTests",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c t",
"command": "-calva.runNamespaceTests",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+b",
"command": "-calva.switchCljsBuild",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+c ctrl+s",
"command": "-calva.selectCurrentForm",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+e",
"command": "-calva.sendCurrentFormToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+space",
"command": "-calva.sendCurrentTopLevelFormToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+o o",
"command": "-calva.showFileForOutputWindowNS",
"when": "calva:connected && calva:keybindingsEnabled && calva:outputWindowActive"
},
{
"key": "alt+down",
"command": "-calva.showNextReplHistoryEntry",
"when": "calva:connected && calva:keybindingsEnabled && calva:outputWindowActive && calva:replHistoryCommandsActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+o o",
"command": "-calva.showOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive"
},
{
"key": "alt+up",
"command": "-calva.showPreviousReplHistoryEntry",
"when": "calva:connected && calva:keybindingsEnabled && calva:outputWindowActive && calva:replHistoryCommandsActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+j",
"command": "-calva.jackIn",
"when": "calva:keybindingsEnabled && workspaceFolderCount > 0"
},
{
"key": "ctrl+alt+c ctrl+alt+r",
"command": "-calva.startOrConnectRepl"
},
{
"key": "ctrl+alt+c n",
"command": "-calva.setOutputWindowNamespace",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+t t",
"command": "-calva.tapSelection",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+t space",
"command": "-calva.tapCurrentTopLevelForm",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+o s",
"command": "-calva.toggleEvaluationSendCodeToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c p",
"command": "-calva.togglePrettyPrint",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+s",
"command": "-calva.toggleCLJCSession",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "enter",
"command": "-calva.evaluateOutputWindowForm",
"when": "calva:keybindingsEnabled && calva:outputWindowActive && calva:outputWindowSubmitOnEnter && editorTextFocus && !suggestWidgetVisible"
},
{
"key": "ctrl+home",
"command": "-paredit.openList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+cmd+e",
"command": "calva.selectCurrentForm"
},
{
"key": "alt+up",
"command": "calva.showPreviousReplHistoryEntry"
},
{
"key": "alt+down",
"command": "calva.showNextReplHistoryEntry"
},
{
"key": "alt+enter",
"command": "calva.evaluateSelectionReplace"
},
{ {
"key": "alt+c", "key": "alt+c",
"command": "workbench.panel.chatSidebar" "command": "workbench.panel.chatSidebar"
@@ -1022,8 +216,45 @@
"when": "viewContainer.workbench.view.explorer.enabled" "when": "viewContainer.workbench.view.explorer.enabled"
}, },
{ {
"key": "cmd+h", "key": "shift+cmd+i",
"command": "-editor.action.simpleInlineDiffs.rejectAll", "command": "composerMode.chat"
"when": "editorTextFocus && hasDisplayedSimpleDiff" },
{
"key": "shift+cmd+i",
"command": "-composer.newAgentChat"
},
{
"key": "cmd+; shift+cmd+i",
"command": "-testing.toggleInlineCoverage"
},
{
"key": "shift+cmd+i",
"command": "-workbench.panel.chatEditing",
"when": "workbench.panel.chat.view.edits.active"
},
{
"key": "shift+cmd+g",
"command": "-editor.action.previousMatchFindAction",
"when": "activeEditorIsReviewChanges || editorFocus"
},
{
"key": "shift+cmd+g",
"command": "-planEditor.findPrevious",
"when": "markdownPlanEditorActive"
},
{
"key": "shift+cmd+g",
"command": "-workbench.action.terminal.findPrevious",
"when": "terminalFindFocused && terminalHasBeenCreated || terminalFindFocused && terminalProcessSupported || terminalFocusInAny && terminalHasBeenCreated || terminalFocusInAny && terminalProcessSupported"
},
{
"key": "shift+cmd+g",
"command": "workbench.view.scm",
"when": "workbench.scm.active"
},
{
"key": "ctrl+shift+g",
"command": "-workbench.view.scm",
"when": "workbench.scm.active"
} }
] ]

View File

@@ -1,6 +0,0 @@
## Installation
```
cp ./*.el ~/.doom.d/
```

View File

@@ -1,93 +0,0 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
(setq user-full-name "John Doe"
user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-monokai-spectrum)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
;; treemacs extension
(setq treemacs-text-scale 0.7)
(setq treemacs-git-mode 'deferred)
(with-eval-after-load 'treemacs
(treemacs-display-current-project-exclusively)
(setq treemacs-project-follow-mode :true)
(define-key treemacs-mode-map [mouse-1] #'treemacs-single-click-expand-action)) ;; single click to open tree nodes
;; code minimap
;; (setq minimap-move-overlay-mouse [mouse-1])
;; Rust config
;; https://github.com/doomemacs/doomemacs/blob/develop/modules/lang/rust/README.org#enable-rls-by-default
;; (setq rustic-lsp-server 'rust-analyzer)
(setq rustic-lsp-server 'rls)
(setq rustic-lsp-client 'eglot)

View File

@@ -1,14 +0,0 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("c4063322b5011829f7fdd7509979b5823e8eea2abf1fe5572ec4b7af1dd78519" "6f4421bf31387397f6710b6f6381c448d1a71944d9e9da4e0057b3fe5d6f2fad" "1278c5f263cdb064b5c86ab7aa0a76552082cf0189acf6df17269219ba496053" "e19ac4ef0f028f503b1ccafa7c337021834ce0d1a2bca03fcebc1ef635776bea" "4a5aa2ccb3fa837f322276c060ea8a3d10181fecbd1b74cb97df8e191b214313" "76ed126dd3c3b653601ec8447f28d8e71a59be07d010cd96c55794c3008df4d7" "e8df30cd7fb42e56a4efc585540a2e63b0c6eeb9f4dc053373e05d774332fc13" "4b6b6b0a44a40f3586f0f641c25340718c7c626cbf163a78b5a399fbe0226659" "23c806e34594a583ea5bbf5adf9a964afe4f28b4467d28777bcba0d35aa0872e" "7a7b1d475b42c1a0b61f3b1d1225dd249ffa1abb1b7f726aec59ac7ca3bf4dae" "8146edab0de2007a99a2361041015331af706e7907de9d6a330a3493a541e5a6" "4699e3a86b1863bbc695236036158d175a81f0f3ea504e2b7c71f8f7025e19e3" "1bddd01e6851f5c4336f7d16c56934513d41cc3d0233863760d1798e74809b4b" "a0be7a38e2de974d1598cf247f607d5c1841dbcef1ccd97cded8bea95a7c7639" "028c226411a386abc7f7a0fba1a2ebfae5fe69e2a816f54898df41a6a3412bb5" "6c98bc9f39e8f8fd6da5b9c74a624cbb3782b4be8abae8fd84cbc43053d7c175" "84b14a0a41bb2728568d40c545280dbe7d6891221e7fbe7c2b1c54a3f5959289" "1d44ec8ec6ec6e6be32f2f73edf398620bb721afeed50f75df6b12ccff0fbb15" "1d5e33500bc9548f800f9e248b57d1b2a9ecde79cb40c0b1398dec51ee820daf" "835868dcd17131ba8b9619d14c67c127aa18b90a82438c8613586331129dda63" default))
'(package-selected-packages '(rustic eglot yasnippet)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

View File

@@ -1,193 +0,0 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1
clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens))

View File

@@ -1,50 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)

38
config/ghostty/config Normal file
View File

@@ -0,0 +1,38 @@
# ~/.config/ghostty/config
# look & feel
theme = Brogrammer
font-family = MesloLGS NF
font-size = 13
cursor-style = block
shell-integration-features = no-cursor
window-width = 162
window-height = 50
term = xterm-256color
# reduce dimming for unfocused split panes (1.0 disables dimming)
unfocused-split-opacity = 0.88
# USE PRERELEASE
# > While you can set this setting back to `stable` at any time, this will only take effect when a later stable
# > release is available. If you want to downgrade back to the previous stable release, you must re-download Ghostty.
auto-update-channel = tip
auto-update = off
# window-inherit-working-directory = false
# binds
keybind = cmd+,=open_config
keybind = cmd+b>shift+'=new_split:down
keybind = cmd+b>shift+5=new_split:right
keybind = cmd+b>right=goto_split:right
keybind = cmd+b>left=goto_split:left
keybind = cmd+b>up=goto_split:up
keybind = cmd+b>down=goto_split:down
keybind = cmd+b>l=goto_split:right
keybind = cmd+b>h=goto_split:left
keybind = cmd+b>k=goto_split:up
keybind = cmd+b>j=goto_split:down

View File

@@ -0,0 +1,21 @@
## Info
Using: https://github.com/banga/git-split-diffs/
```bash
# Install
npm install -g git-split-diffs
# Install (with mouse scrolling)
git config --global core.pager "git-split-diffs --color | less -+LFX"
```
## Custom Theme ([info](https://github.com/banga/git-split-diffs/tree/v2.2.0?tab=readme-ov-file#custom-themes))
Copy JSON themes to `~/.git-split-diffs-themes`, then:
```bash
git config --global split-diffs.theme-directory ~/.git-split-diffs-themes
git config --global split-diffs.theme-name transparent
```

View File

@@ -0,0 +1,59 @@
{
"SYNTAX_HIGHLIGHTING_THEME": "dark",
"DEFAULT_COLOR": {
"color": "#768390",
"backgroundColor": "#00000000"
},
"COMMIT_HEADER_COLOR": {
"color": "#adbac7",
"backgroundColor": "#00000000"
},
"COMMIT_HEADER_LABEL_COLOR": {},
"COMMIT_SHA_COLOR": {},
"COMMIT_DATE_COLOR": {},
"COMMIT_AUTHOR_COLOR": {},
"COMMIT_MESSAGE_COLOR": {
"color": "#909dab",
"backgroundColor": "#00000000"
},
"COMMIT_TITLE_COLOR": {
"color": "#c6e6ff",
"modifiers": ["bold"]
},
"BORDER_COLOR": {
"color": "#444c56",
"backgroundColor": "#00000000"
},
"FILE_NAME_COLOR": {
"color": "#adbac7",
"backgroundColor": "#00000000"
},
"HUNK_HEADER_COLOR": {
"backgroundColor": "#00000000"
},
"DELETED_WORD_COLOR": {
"backgroundColor": "#c93c3733"
},
"INSERTED_WORD_COLOR": {
"backgroundColor": "#46954a33"
},
"DELETED_LINE_NO_COLOR": {
"color": "#e5534b",
"backgroundColor": "#c93c371a"
},
"INSERTED_LINE_NO_COLOR": {
"color": "#57ab5a",
"backgroundColor": "#46954a1a"
},
"UNMODIFIED_LINE_NO_COLOR": {},
"DELETED_LINE_COLOR": {
"backgroundColor": "#442d3080"
},
"INSERTED_LINE_COLOR": {
"backgroundColor": "#2a3c3380"
},
"UNMODIFIED_LINE_COLOR": {},
"MISSING_LINE_COLOR": {
"backgroundColor": "#2d333b80"
}
}

View File

@@ -1,81 +1,108 @@
wf=hs.window.filter wf = hs.window.filter
ffBrowser = "Firefox"
chromiumBrowser = "Brave Browser"
-- browser = "Chromium"
--------------------------------------------------------------------
-- Open new / focus existing Finder window in current desktop space -- Open new / focus existing Finder window in current desktop space
--------------------------------------------------------------------
hs.hotkey.bind({"cmd", "ctrl"}, "X", function() hs.hotkey.bind({ "cmd", "ctrl" }, "X", function()
local app = "Finder" local app = "Finder"
wf_app = wf.new(false):setAppFilter(app, {currentSpace=true}) wf_app = wf.new(false):setAppFilter(app, { currentSpace = true })
local wins = wf_app:getWindows() local wins = wf_app:getWindows()
local count = 0 local count = 0
for _ in pairs(wins) do count = count + 1 end for _ in pairs(wins) do
count = count + 1
end
if (count > 0) if count > 0 then
then
wf_app:getWindows()[1]:focus() wf_app:getWindows()[1]:focus()
else else
hs.osascript.applescript(string.format([[ hs.osascript.applescript(string.format(
[[
tell application "System Events" to tell process "%s" tell application "System Events" to tell process "%s"
click menu item "New Finder Window" of menu "File" of menu bar 1 click menu item "New Finder Window" of menu "File" of menu bar 1
set frontmost to true set frontmost to true
end tell end tell
]], app)) ]],
app
))
end end
end) end)
-- Open new / focus existing terminal window in current desktop space -- Open new / focus existing terminal window in current desktop space
-- hs.hotkey.bind({"cmd", "ctrl"}, "T", function() function focusOrOpenGhostty()
-- -- Adjust the app filter to Warp wf_ghostty = wf.new(false):setAppFilter("Ghostty", { currentSpace = true, visible = true })
-- wf_warp = wf.new(false):setAppFilter("Warp", {currentSpace=true, visible=true})
--
-- local wins = wf_warp:getWindows()
-- local count = 0
-- for _ in pairs(wins) do count = count + 1 end
--
-- if (count > 0) then
-- wf_warp:getWindows()[1]:focus()
-- else
-- hs.osascript.applescript([[
-- tell application "System Events" to tell process "Warp"
-- click menu item "New Window" of menu "File" of menu bar 1
-- end tell
-- ]])
-- end
-- end)
-- hs.hotkey.bind({"cmd", "ctrl"}, "T", function() local wins = wf_ghostty:getWindows()
-- wf_kitty = wf.new(false):setAppFilter("kitty", {currentSpace=true, visible=true}) local count = 0
-- local wins = wf_kitty:getWindows() for _ in pairs(wins) do
-- local count = 0 count = count + 1
-- for _ in pairs(wins) do count = count + 1 end end
--
-- if (count > 0)
-- then
-- wf_kitty:getWindows()[1]:focus()
-- else
-- hs.osascript.applescript([[
-- tell application "System Events" to tell process "kitty"
-- click menu item "New OS Window" of menu "Shell" of menu bar 1
-- end tell
-- ]])
-- end
-- end)
hs.hotkey.bind({"cmd", "ctrl"}, "T", function() if count > 0 then
wf_iterm2 = wf.new(false):setAppFilter("iTerm2", {currentSpace=true, visible=true}) wf_ghostty:getWindows()[1]:focus()
else
hs.osascript.applescript([[
tell application "System Events" to tell process "Ghostty"
click menu item "New Window" of menu "File" of menu bar 1
end tell
]])
end
end
function focusOrOpenWarp()
-- Adjust the app filter to Warp
wf_warp = wf.new(false):setAppFilter("Warp", { currentSpace = true, visible = true })
local wins = wf_warp:getWindows()
local count = 0
for _ in pairs(wins) do
count = count + 1
end
if count > 0 then
wf_warp:getWindows()[1]:focus()
else
hs.osascript.applescript([[
tell application "System Events" to tell process "Warp"
click menu item "New Window" of menu "File" of menu bar 1
end tell
]])
end
end
function focusOrOpenKitty()
wf_kitty = wf.new(false):setAppFilter("kitty", { currentSpace = true, visible = true })
local wins = wf_kitty:getWindows()
local count = 0
for _ in pairs(wins) do
count = count + 1
end
if count > 0 then
wf_kitty:getWindows()[1]:focus()
else
hs.osascript.applescript([[
tell application "System Events" to tell process "kitty"
click menu item "New OS Window" of menu "Shell" of menu bar 1
end tell
]])
end
end
function focusOrOpeniTerm()
wf_iterm2 = wf.new(false):setAppFilter("iTerm2", { currentSpace = true, visible = true })
local wins = wf_iterm2:getWindows() local wins = wf_iterm2:getWindows()
local count = 0 local count = 0
for _ in pairs(wins) do count = count + 1 end for _ in pairs(wins) do
count = count + 1
end
if (count > 0) if count > 0 then
then
wf_iterm2:getWindows()[1]:focus() wf_iterm2:getWindows()[1]:focus()
else else
hs.osascript.applescript([[ hs.osascript.applescript([[
@@ -85,65 +112,74 @@ hs.hotkey.bind({"cmd", "ctrl"}, "T", function()
end tell end tell
]]) ]])
end end
end
end) hs.hotkey.bind({ "cmd", "ctrl" }, "T", focusOrOpenGhostty)
--------------------------------------------------------------------
-- Open new / focus existing browser window in current desktop space -- Open new / focus existing browser window in current desktop space
--------------------------------------------------------------------
ffBrowser = "Firefox"
chromiumBrowser = "Brave Browser"
function focusOrOpenFirefox() function focusOrOpenFirefox()
-- assumes wf_browser is the name of a firefox-based browser -- assumes wf_browser is the name of a firefox-based browser
wf_browser = wf.new(false):setAppFilter(ffBrowser, {currentSpace=true, visible=true}) wf_browser = wf.new(false):setAppFilter(ffBrowser, { currentSpace = true, visible = true })
local wins = wf_browser:getWindows() local wins = wf_browser:getWindows()
local count = 0 local count = 0
for _ in pairs(wins) do count = count + 1 end for _ in pairs(wins) do
count = count + 1
end
if (count > 0) if count > 0 then
then
wf_browser:getWindows()[1]:focus() wf_browser:getWindows()[1]:focus()
-- print(count) -- print(count)
else else
-- for firefox: -- for firefox:
hs.osascript.applescript(string.format([[ hs.osascript.applescript(string.format(
[[
tell application "System Events" to tell process "%s" tell application "System Events" to tell process "%s"
click menu item "New Window" of menu "File" of menu bar 1 click menu item "New Window" of menu "File" of menu bar 1
set frontmost to true set frontmost to true
end tell end tell
]], ffBrowser)) ]],
ffBrowser
))
end end
end end
function focusOrOpenChromium() function focusOrOpenChromium()
-- assumes wf_browser is the name of a chromium-based browser -- assumes wf_browser is the name of a chromium-based browser
wf_browser = wf.new(false):setAppFilter(chromiumBrowser, {currentSpace=true, visible=true}) wf_browser = wf.new(false):setAppFilter(chromiumBrowser, { currentSpace = true, visible = true })
local wins = wf_browser:getWindows() local wins = wf_browser:getWindows()
local count = 0 local count = 0
for _ in pairs(wins) do count = count + 1 end for _ in pairs(wins) do
count = count + 1
end
if (count > 0) if count > 0 then
then
wf_browser:getWindows()[1]:focus() wf_browser:getWindows()[1]:focus()
-- print(count) -- print(count)
else else
hs.osascript.applescript(string.format([[ hs.osascript.applescript(string.format(
[[
tell application "%s" tell application "%s"
make new window make new window
activate activate
end tell end tell
]], chromiumBrowser)) ]],
chromiumBrowser
))
end end
end end
hs.hotkey.bind({"cmd", "ctrl"}, "W", focusOrOpenChromium) hs.hotkey.bind({ "cmd", "ctrl" }, "W", focusOrOpenChromium)
-- CHROMIUM-BASED BROWSERS ONLY: Open new tab to right of currently-focused one
-- CHROMIUM-BASED BROWSERS ONLY: Open new tab to right of current browser -- NOTE: This can be replaced with a dedicated keybind in chromium system settings
-- NOTE: currently replaced with binding in chromiumsystem settings
-- hs.hotkey.bind({"cmd", "option"}, "T", function() -- hs.hotkey.bind({"cmd", "option"}, "T", function()
-- --
-- local focusedAppName = hs.window.focusedWindow():application():title() -- local focusedAppName = hs.window.focusedWindow():application():title()
@@ -158,85 +194,88 @@ hs.hotkey.bind({"cmd", "ctrl"}, "W", focusOrOpenChromium)
-- else -- else
-- hs.notify.new({title=string.format("%s not focused.", browser)}):send() -- hs.notify.new({title=string.format("%s not focused.", browser)}):send()
-- end -- end
--
-- end) -- end)
-- Open new / focus existing vscode window in current desktop space -- Open new / focus existing vscode window in current desktop space
-- app = VSCodium, Code, or Cursor -- app = VSCodium, Code, or Cursor
function openVsCode(app) function openVsCode(app)
wf_app = wf.new(false):setAppFilter(app, {currentSpace=true, visible=true}) wf_app = wf.new(false):setAppFilter(app, { currentSpace = true, visible = true })
local wins = wf_app:getWindows() local wins = wf_app:getWindows()
local count = 0 local count = 0
for _ in pairs(wins) do count = count + 1 end for _ in pairs(wins) do
count = count + 1
end
if (count > 0) then if count > 0 then
wf_app:getWindows()[1]:focus() wf_app:getWindows()[1]:focus()
else else
hs.osascript.applescript(string.format([[ hs.osascript.applescript(string.format(
[[
tell application "System Events" to tell process "%s" tell application "System Events" to tell process "%s"
click menu item "New Window" of menu "File" of menu bar 1 click menu item "New Window" of menu "File" of menu bar 1
set frontmost to true set frontmost to true
end tell end tell
]], app)) ]],
app
))
end end
end end
---------------------------------------------------------------------------
-- Focus or open editor of choice in current desktop space
---------------------------------------------------------------------------
-- superbinding to use both cursor and vscode -- superbinding to use multiple editors with a preferred order
-- try to focus cursor (primarily) or vscode (secondarily), then open cursor if neither is open -- e.g. try to focus cursor (primarily) or vscode (secondarily), then open cursor if neither is open
function tryFocusCursorOrVSCodeThenOpenCursor() function tryFocusAnEditorInPreferredOrder()
wf_cursor= wf.new(false):setAppFilter("Cursor", {currentSpace=true, visible=true}) wf_zed = wf.new(false):setAppFilter("Zed", { currentSpace = true, visible = true })
wf_vscode= wf.new(false):setAppFilter("Code", {currentSpace=true, visible=true}) wf_cursor = wf.new(false):setAppFilter("Cursor", { currentSpace = true, visible = true })
wf_vscode = wf.new(false):setAppFilter("Code", { currentSpace = true, visible = true })
local zed_wins = wf_zed:getWindows()
local zed_count = 0
for _ in pairs(zed_wins) do
zed_count = zed_count + 1
end
local cursor_wins = wf_cursor:getWindows() local cursor_wins = wf_cursor:getWindows()
local cursor_count = 0 local cursor_count = 0
for _ in pairs(cursor_wins) do cursor_count = cursor_count + 1 end for _ in pairs(cursor_wins) do
cursor_count = cursor_count + 1
end
local vscode_wins = wf_vscode:getWindows() local vscode_wins = wf_vscode:getWindows()
local vscode_count = 0 local vscode_count = 0
for _ in pairs(vscode_wins) do vscode_count = vscode_count + 1 end for _ in pairs(vscode_wins) do
vscode_count = vscode_count + 1
end
if (cursor_count > 0) then if zed_count > 0 then
wf_zed:getWindows()[1]:focus()
elseif cursor_count > 0 then
wf_cursor:getWindows()[1]:focus() wf_cursor:getWindows()[1]:focus()
elseif (vscode_count > 0) then elseif vscode_count > 0 then
wf_vscode:getWindows()[1]:focus() wf_vscode:getWindows()[1]:focus()
else else
hs.osascript.applescript(string.format([[ hs.osascript.applescript(string.format(
[[
tell application "System Events" to tell process "%s" tell application "System Events" to tell process "%s"
click menu item "New Window" of menu "File" of menu bar 1 click menu item "New Window" of menu "File" of menu bar 1
set frontmost to true set frontmost to true
end tell end tell
]], "Cursor")) ]],
"Zed"
))
end end
end end
hs.hotkey.bind({"cmd", "ctrl"}, "E", function() hs.hotkey.bind({ "cmd", "ctrl" }, "E", function()
-- openVsCode("Cursor") -- openVsCode("Cursor")
-- openVsCode("Code") -- openVsCode("Code")
tryFocusCursorOrVSCodeThenOpenCursor() tryFocusAnEditorInPreferredOrder()
end) end)
hs.hotkey.bind({"cmd", "ctrl"}, "V", function()
openVsCode("Code")
end)
-- hs.hotkey.bind({"cmd", "ctrl"}, "V", function()
-- openVsCode("Code")
-- openVsCode("VSCodium")
-- No neovide function because it doesn't support system events (yet)
-- hs.application.open("Neovide")
-- end)
-- Open new / focus existing g/n/mac/vim(r) window in current desktop space
-- hs.hotkey.bind({"cmd", "ctrl"}, "E", function() -- hs.hotkey.bind({"cmd", "ctrl"}, "E", function()
-- local app = "VimR" -- local app = "VimR"
-- --
@@ -265,36 +304,93 @@ end)
-- common apps -- common apps
-- hs.hotkey.bind({"cmd", "ctrl"}, "R", function() hs.application.open("Obsidian") end) -- hs.hotkey.bind({"cmd", "ctrl"}, "R", function() hs.application.open("Obsidian") end)
hs.hotkey.bind({"cmd", "ctrl"}, "M", function() hs.application.open("Spotify") end) hs.hotkey.bind({ "cmd", "ctrl" }, "M", function()
hs.hotkey.bind({"cmd", "ctrl"}, "G", function() hs.application.open("Google Calendar") end) hs.application.open("Spotify")
hs.hotkey.bind({"cmd", "ctrl"}, "Z", function() hs.application.open("Preview") end) end)
hs.hotkey.bind({"cmd", "ctrl"}, "C", function() hs.application.open("Open WebUI") end) hs.hotkey.bind({ "cmd", "ctrl" }, "G", function()
hs.application.open("Google Calendar")
end)
hs.hotkey.bind({ "cmd", "ctrl" }, "Z", function()
hs.application.open("Preview")
end)
hs.hotkey.bind({ "cmd", "ctrl" }, "C", function()
hs.application.open("Open WebUI")
end)
-- annoying apps (must manually open) -- annoying apps (must manually open)
hs.hotkey.bind({"cmd", "ctrl"}, "A", function() switchToIfApplicationOpen("Telegram") end) hs.hotkey.bind({ "cmd", "ctrl" }, "A", function()
hs.hotkey.bind({"cmd", "ctrl"}, "S", function() switchToIfApplicationOpen("Signal") end) switchToIfApplicationOpen("Telegram")
hs.hotkey.bind({"cmd", "ctrl"}, "N", function() switchToIfApplicationOpen("Numi") end) end)
hs.hotkey.bind({ "cmd", "ctrl" }, "S", function()
switchToIfApplicationOpen("Signal")
end)
hs.hotkey.bind({ "cmd", "ctrl" }, "N", function()
switchToIfApplicationOpen("Numi")
end)
-- hs.hotkey.bind({"cmd", "ctrl"}, "S", function() switchToIfApplicationOpen("Texts") end) -- hs.hotkey.bind({"cmd", "ctrl"}, "S", function() switchToIfApplicationOpen("Texts") end)
-- hs.hotkey.bind({"cmd", "ctrl", "shift"}, "S", function() hs.application.open("Signal") end) -- hs.hotkey.bind({"cmd", "ctrl", "shift"}, "S", function() hs.application.open("Signal") end)
hs.hotkey.bind({"cmd", "ctrl"}, "K", function() switchToIfApplicationOpen("KiCad") end) hs.hotkey.bind({ "cmd", "ctrl" }, "K", function()
switchToIfApplicationOpen("KiCad")
end)
-- hs.hotkey.bind({"cmd", "ctrl"}, "C", function() switchToIfApplicationOpen("CLion") end) -- hs.hotkey.bind({"cmd", "ctrl"}, "C", function() switchToIfApplicationOpen("CLion") end)
hs.hotkey.bind({"cmd", "ctrl"}, "J", function() switchToIfApplicationOpen("IntelliJ IDEA") end) hs.hotkey.bind({ "cmd", "ctrl" }, "J", function()
switchToIfApplicationOpen("IntelliJ IDEA")
end)
-- hs.hotkey.bind({"cmd", "ctrl"}, "L", function() switchToIfApplicationOpen("Linear") end) -- hs.hotkey.bind({"cmd", "ctrl"}, "L", function() switchToIfApplicationOpen("Linear") end)
hs.hotkey.bind({"cmd", "ctrl"}, "L", function() switchToIfApplicationOpen("LTspice") end) hs.hotkey.bind({ "cmd", "ctrl" }, "L", function()
switchToIfApplicationOpen("LTspice")
end)
-- Clear clipboard -- Clear clipboard
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "C", function() hs.hotkey.bind({ "cmd", "shift", "ctrl" }, "C", function()
hs.pasteboard.setContents("") hs.pasteboard.setContents("")
hs.notify.new({title="Cleared clipboard."}):send() hs.notify.new({ title = "Cleared clipboard." }):send()
end) end)
-- open Perplexity in Chromium-based browser
-- 1. if chatgpt is already open in most recent Brave window, switch to it and open
-- chatgpt in new tab to the right
-- 2. if not, switch to most recent Brave window and open chatgpt
hs.hotkey.bind({ "cmd", "ctrl", "shift" }, "space", function()
hs.osascript.applescript(string.format(
[[
tell application "%s"
if (count of windows) = 0 then
make new window
end if
activate
-------------------------------------- set foundTab to false
set tabIndex to 0
repeat with i from 1 to (count of tabs of front window)
if URL of tab i of front window contains "chatgpt.com" then
set foundTab to true
set tabIndex to i
exit repeat
end if
end repeat
if foundTab then
set active tab index of front window to tabIndex
else
tell application "System Events" to tell process "%s"
click menu item "New Tab to the Right" of menu "Tab" of menu bar 1
end tell
set URL of active tab of front window to "https://chatgpt.com"
end if
end tell
]],
chromiumBrowser,
chromiumBrowser
))
end)
---------------------------------------------------------------------------
-- DESKTOP SWITCHING (axed) -- DESKTOP SWITCHING (axed)
-- Retroactive note: it should be harder, not easier, to context-switch :P -- Retroactive note: it should be harder, not easier, to context-switch :P
-------------------------------------- ---------------------------------------------------------------------------
-- function gotoDesktopNumber(desktop) -- function gotoDesktopNumber(desktop)
-- local deskstr = string.format("Desktop %d", desktop) -- local deskstr = string.format("Desktop %d", desktop)
@@ -315,28 +411,29 @@ end)
-- hs.hotkey.bind({"cmd", "ctrl"}, "3", function() gotoDesktopNumber(3) end) -- hs.hotkey.bind({"cmd", "ctrl"}, "3", function() gotoDesktopNumber(3) end)
-- hs.hotkey.bind({"cmd", "ctrl"}, "4", function() gotoDesktopNumber(4) end) -- hs.hotkey.bind({"cmd", "ctrl"}, "4", function() gotoDesktopNumber(4) end)
-------------------------------------- ---------------------------------------------------------------------------
-- SWITCH TO IF OPEN -- SWITCH TO IF OPEN
-- Switches to application if there's an instance of it open -- Switches to application if there's an instance of it open
-------------------------------------- ---------------------------------------------------------------------------
function switchToIfWindowOpen(app) function switchToIfWindowOpen(app)
wf_app = wf.new(false):setAppFilter(app, {currentSpace=true, visible=true}) wf_app = wf.new(false):setAppFilter(app, { currentSpace = true, visible = true })
local wins = wf_app:getWindows() local wins = wf_app:getWindows()
local count = 0 local count = 0
for _ in pairs(wins) do count = count + 1 end for _ in pairs(wins) do
count = count + 1
end
if (count > 0) then if count > 0 then
wf_app:getWindows()[1]:focus() wf_app:getWindows()[1]:focus()
end end
end end
---------------------------------------------------------------------------
--------------------------------------
-- SWITCH TO IF GLOBALLY OPEN -- SWITCH TO IF GLOBALLY OPEN
-- Switches to application if there's an instance of it open -- Switches to application if there's an instance of it open
-------------------------------------- ---------------------------------------------------------------------------
function switchToIfApplicationOpen(appName) function switchToIfApplicationOpen(appName)
local runningApps = hs.application.runningApplications() local runningApps = hs.application.runningApplications()
@@ -348,43 +445,43 @@ function switchToIfApplicationOpen(appName)
end end
end end
if (isOpen) then if isOpen then
hs.application.open(appName) hs.application.open(appName)
end end
end end
---------------------------------------------------------------------------
--------------------------------------
-- KEY COMBO TO APPLICATION -- KEY COMBO TO APPLICATION
-- Sends keystrokes but only if the specified application is focused -- Sends keystrokes but only if the specified application is focused
-------------------------------------- ---------------------------------------------------------------------------
function sendKeyComboToApplication(appComboTable) function sendKeyComboToApplication(appComboTable)
for appComboPair in ipairs(appComboTable) do for appComboPair in ipairs(appComboTable) do
app = appComboPair[1] app = appComboPair[1]
mods = appComboPair[2] mods = appComboPair[2]
key = appComboPair[3] key = appComboPair[3]
wf_app = wf.new(false):setAppFilter(app, {currentSpace=true, visible=true}) wf_app = wf.new(false):setAppFilter(app, { currentSpace = true, visible = true })
local wins = wf_app:getWindows() local wins = wf_app:getWindows()
local count = 0 local count = 0
for _ in pairs(wins) do count = count + 1 end for _ in pairs(wins) do
count = count + 1
end
if (count > 0) if count > 0 then
then
hs.eventtap.keyStroke(mods, key) hs.eventtap.keyStroke(mods, key)
end end
end end
end end
------------------- ---------------------------------------------------------------------------
-- A R C H I V E -- -- ARCHIVE
------------------- --
-- Notes:
-- - Win-tab is now just set in system settings
-- - Desktop / window action hotkeys are now managed with Rectangle.app
---------------------------------------------------------------------------
-- Desktop Action Hotkeys (MOVED TO SYSTEM SETTINGS) -- Desktop Action Hotkeys (MOVED TO SYSTEM SETTINGS)
@@ -411,7 +508,6 @@ end
-- hs.application.open("Mission Control"):activate() -- hs.application.open("Mission Control"):activate()
-- end) -- end)
-- Move windows between displays -- Move windows between displays
-- hs.hotkey.bind({"ctrl", "shift"}, "right", function() -- hs.hotkey.bind({"ctrl", "shift"}, "right", function()
@@ -422,8 +518,7 @@ end
-- hs.window.focusedWindow():moveToScreen(hs.screen:previous()) -- hs.window.focusedWindow():moveToScreen(hs.screen:previous())
-- end) -- end)
-- The ShiftIt Alternative
-- The ShiftIt Alternative (MOVED TO RECTANGLE)
-- units = { -- units = {
-- right50 = { x = 0.50, y = 0.00, w = 0.50, h = 1.00 }, -- right50 = { x = 0.50, y = 0.00, w = 0.50, h = 1.00 },
@@ -448,4 +543,3 @@ end
-- hs.hotkey.bind(mash, '[', function() hs.window.focusedWindow():move(units.upleft50, nil, true) end) -- hs.hotkey.bind(mash, '[', function() hs.window.focusedWindow():move(units.upleft50, nil, true) end)
-- hs.hotkey.bind(mash, ';', function() hs.window.focusedWindow():move(units.botleft50, nil, true) end) -- hs.hotkey.bind(mash, ';', function() hs.window.focusedWindow():move(units.botleft50, nil, true) end)
-- hs.hotkey.bind(mash, "'", function() hs.window.focusedWindow():move(units.botright50, nil, true) end) -- hs.hotkey.bind(mash, "'", function() hs.window.focusedWindow():move(units.botright50, nil, true) end)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

13
config/neovim/README.md Normal file
View File

@@ -0,0 +1,13 @@
# Neovim Config
Backup from live config to this folder:
```bash
cp ~/.config/nvim/{init.lua,lazy-lock.json} config/neovim/
```
Restore from this folder to live config:
```bash
cp config/neovim/{init.lua,lazy-lock.json} ~/.config/nvim/
```

View File

@@ -1,166 +0,0 @@
" Win behavior
" source $VIMRUNTIME/mswin.vim
" behave mswin
" Window height
" set lines=32 columns=110
" Preferences
set mouse=a
set encoding=utf-8
set autochdir
set shiftwidth=4
set tabstop=4
set linebreak
set breakindent
set autoindent
set wrap
set nobinary
set relativenumber
syntax on
" Aliases
cnoreabbrev ge browse confirm e
cnoreabbrev ! aliasrun
" Map leader key to spacebar (like Doom Emacs)
let mapleader = " "
" Vim Plug Plugins
call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'airblade/vim-gitgutter'
Plug 'mangeshrex/everblush.vim'
Plug 'ms-jpq/chadtree', {'branch': 'chad', 'do': 'python3 -m chadtree deps'}
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'akinsho/toggleterm.nvim', {'tag' : 'v1.*'}
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'jiangmiao/auto-pairs'
Plug 'dhruvasagar/vim-table-mode'
" Svelte
" Plug 'othree/html5.vim'
" Plug 'pangloss/vim-javascript'
" Plug 'evanleck/vim-svelte', {'branch': 'main'}
call plug#end()
" Lua Plugins
lua require('plugins')
" Theming
set termguicolors
set t_Co=256
set background=dark
colorscheme everblush
let g:airline_powerline_fonts = 1
let g:airline_theme = 'powerlineish'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
" Neovide theming
if exists("g:neovide")
set guifont=CaskaydiaCove\ Nerd\ Font:h12.5
endif
" Start up plugins
autocmd VimEnter * :TSEnable highlight
" Navigation & Shortcuts
" Open file tree
nnoremap <Leader>op :CHADopen<CR>
nnoremap <C-t> :CHADopen<CR>
" Toggle terminal buffer
nnoremap <Leader>ot :ToggleTerm<CR>
nnoremap <C-`> :ToggleTerm<CR>
tnoremap <C-`> <C-\><C-n>:ToggleTerm<CR>
" Force kill current buffer
nnoremap <Leader>bk :bp<bar>sp<bar>bn<bar>bd!<CR>
nnoremap <C-k> :bp<bar>sp<bar>bn<bar>bd!<CR>
" Close the current window
nnoremap <Leader>wd :close<CR>
nnoremap <Leader>wk :close<CR>
nnoremap <C-x> :close<CR>
nnoremap <C-w>d :close<CR>
" Close the current tab
nnoremap <Leader>td :tabclose<CR>
nnoremap <Leader>tk :tabclose<CR>
" Search for files
nnoremap <Leader><Leader> :Telescope find_files<CR>
nnoremap <Leader>ff :Telescope find_files<CR>
" Git status
nnoremap <Leader>gs :Telescope git_status<CR>
nnoremap <Leader>gc :Telescope git_commits<CR>
" map <Leader>bk :bd!<CR>
" Reload config
nnoremap <silent> <Leader>rr :source $MYVIMRC<cr>
" New buffer
nnoremap <Leader>bn :enew<CR>
nnoremap <Leader>bc :enew<CR>
nnoremap <C-b>n :enew<CR>
" Global file search
" nnoremap <silent> <Leader><Leader>
" Quit editor
nnoremap <silent> <Leader>qq :qa!<CR>
" Buffer switching
nnoremap <Leader>b1 :buffer 1<CR>
nnoremap <Leader>b2 :buffer 2<CR>
nnoremap <Leader>b3 :buffer 3<CR>
nnoremap <Leader>b4 :buffer 4<CR>
nnoremap <Leader>b5 :buffer 5<CR>
nnoremap <Leader>b6 :buffer 6<CR>
nnoremap <Leader>b7 :buffer 7<CR>
nnoremap <Leader>b8 :buffer 8<CR>
nnoremap <Leader>b9 :buffer 9<CR>
nnoremap <A-1> :buffer 1<CR>
nnoremap <A-2> :buffer 2<CR>
nnoremap <A-3> :buffer 3<CR>
nnoremap <A-4> :buffer 4<CR>
nnoremap <A-5> :buffer 5<CR>
nnoremap <A-6> :buffer 6<CR>
nnoremap <A-7> :buffer 7<CR>
nnoremap <A-8> :buffer 8<CR>
nnoremap <A-9> :buffer 9<CR>
nnoremap <C-l> :bnext<CR>
nnoremap <C-h> :bprev<CR>
" Tab switching
nnoremap <Leader>t1 1gt<CR>
nnoremap <Leader>t2 2gt<CR>
nnoremap <Leader>t3 3gt<CR>
nnoremap <Leader>t4 4gt<CR>
nnoremap <Leader>t5 5gt<CR>
nnoremap <Leader>t6 6gt<CR>
nnoremap <Leader>t7 7gt<CR>
nnoremap <Leader>t8 8gt<CR>
nnoremap <Leader>t9 9gt<CR>
nnoremap <C-S-l> :tabnext<CR>
nnoremap <C-S-h> :tabprev<CR>
" Configure coc.nvim
" let g:coc_node_path = trim(system('which node'))
let g:coc_node_path='/opt/homebrew/bin/node'
" Telescope.nvim options
" :Telescope |<tab>
" :Telescope find_files
" Pandoc file commands
" function! PandocCompileMd()
" nnoremap <Leader>pp !pandoc compile <CR>
" endfunction

View File

@@ -1,8 +0,0 @@
local use = require('packer').use
require('packer').startup(function()
use 'wbthomason/packer.nvim' -- Package manager
use 'neovim/nvim-lspconfig' -- Configurations for Nvim LSP
end)
require'lspconfig'.clangd.setup{}

201
config/neovim/init.lua Normal file
View File

@@ -0,0 +1,201 @@
-- INSTALL LAZY.NVIM (if not bootstrapping automatically):
-- git clone --filter=blob:none https://github.com/folke/lazy.nvim.git --branch=stable \
-- ~/.local/share/nvim/lazy/lazy.nvim
if vim.g.vscode then
return
end
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
local opt = vim.opt
opt.termguicolors = true
opt.mouse = 'a'
opt.smartindent = true
opt.wrap = false
opt.relativenumber = true
opt.tabstop = 4
opt.shiftwidth = 4
opt.expandtab = true
vim.hl.priorities.semantic_tokens = 140
vim.hl.priorities.treesitter = 100
vim.filetype.add({ extension = { svelte = 'svelte' } })
vim.api.nvim_create_autocmd('FileType', { pattern = 'markdown', command = 'setlocal wrap' })
local function map(mode, lhs, rhs)
vim.keymap.set(mode, lhs, rhs, { silent = true })
end
for _, m in ipairs({
{ 'n', '<c-b>', '<cmd>NvimTreeToggle<cr>' },
{ 'n', '<c-`>', '<cmd>ToggleTerm direction="float"<cr>' },
{ 't', '<c-`>', '<cmd>ToggleTerm<cr>' },
{ 'n', '<leader>gs', '<cmd>Telescope git_status<cr>' },
{ 'n', '<leader>gc', '<cmd>Telescope git_commits<cr>' },
{ 'n', '<leader>:', '<cmd>Telescope commands<cr>' },
{ 'n', '<leader><leader>', '<cmd>Telescope find_files<cr>' },
{ 'n', '<leader>f', '<cmd>Telescope grep_string<cr>' },
{ 'n', '<leader>b', '<cmd>Telescope buffers<cr>' },
{ 'n', 'B', '<cmd>Telescope buffers<cr>' },
{ 'n', '<leader>e', vim.diagnostic.open_float },
{ 'n', '\\', vim.lsp.buf.hover },
{ 'n', '<a-k>', '<cmd>GitGutterPrevHunk<cr>' },
{ 'n', '<a-j>', '<cmd>GitGutterNextHunk<cr>' },
{ 'n', '<c-h>', '<cmd>bp<cr>' },
{ 'n', '<c-l>', '<cmd>bn<cr>' },
}) do
map(m[1], m[2], m[3])
end
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
{
'Mofiqul/vscode.nvim',
name = 'vscode',
priority = 1000,
lazy = false,
config = function() require('vscode').setup({ transparent = true }) end,
},
{ 'airblade/vim-gitgutter' },
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function() require('lualine').setup({ options = { theme = 'vscode', globalstatus = true } }) end,
},
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function()
local wanted = { 'svelte', 'javascript', 'typescript', 'html', 'css' }
local ts_runtime = vim.fn.stdpath('data') .. '/lazy/nvim-treesitter/runtime'
if vim.loop.fs_stat(ts_runtime) then
vim.opt.rtp:append(ts_runtime)
end
require('nvim-treesitter').setup({ install_dir = vim.fn.stdpath('data') .. '/site' })
vim.api.nvim_create_autocmd('FileType', {
pattern = wanted,
callback = function() pcall(vim.treesitter.start) end,
})
end,
},
{
'neovim/nvim-lspconfig',
config = function()
local capabilities = vim.tbl_deep_extend(
'force',
vim.lsp.protocol.make_client_capabilities(),
require('cmp_nvim_lsp').default_capabilities()
)
local function on_attach(client, bufnr)
if client.server_capabilities.semanticTokensProvider then
vim.lsp.semantic_tokens.start(bufnr, client.id)
end
end
local defaults = {
capabilities = capabilities,
on_attach = on_attach,
}
local servers = {
basedpyright = {},
ts_ls = {},
svelte = {},
rust_analyzer = {},
}
for server, opts in pairs(servers) do
vim.lsp.config(server, vim.tbl_deep_extend('force', defaults, opts))
vim.lsp.enable(server)
end
end,
},
{ 'hrsh7th/cmp-nvim-lsp' },
{
'hrsh7th/nvim-cmp',
dependencies = { 'hrsh7th/cmp-nvim-lsp' },
config = function()
local cmp = require('cmp')
cmp.setup({
mapping = {
['<C-n>'] = cmp.mapping(function()
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
cmp.complete()
end
end, { 'i', 's' }),
['<C-p>'] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
end
end, { 'i', 's' }),
['<CR>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm({ select = true })
else
fallback()
end
end, { 'i', 's' }),
},
sources = { { name = 'nvim_lsp' } },
})
end,
},
{
'nvim-tree/nvim-tree.lua',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function() require('nvim-tree').setup({ view = { width = 42 } }) end,
},
{
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-fzf-native.nvim' },
config = function()
local actions = require('telescope.actions')
require('telescope').setup({
defaults = {
mappings = {
i = {
['<Esc>'] = actions.close,
},
},
},
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = 'smart_case',
},
},
})
require('telescope').load_extension('fzf')
end,
},
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
{
'akinsho/toggleterm.nvim',
version = '*',
config = function() require('toggleterm').setup() end,
},
})
if not pcall(vim.cmd.colorscheme, 'vscode') then
print('Failed to load colorscheme - probably has not been installed')
end

View File

@@ -0,0 +1,16 @@
{
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
"nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
"nvim-tree.lua": { "branch": "master", "commit": "e11ce83ed9a00f065bf676ae4e6c261c766989ba" },
"nvim-treesitter": { "branch": "main", "commit": "3edb01f912867603c2aef9079f208f0244c0885b" },
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"vim-gitgutter": { "branch": "main", "commit": "0acb772e76064cc406664ab595b58b3fac76488a" },
"vscode": { "branch": "main", "commit": "aa1102a7e15195c9cca22730b09224a7f7745ba8" }
}

View File

@@ -1,134 +0,0 @@
-- INSTALL PACKER:
-- git clone --depth 1 https://github.com/wbthomason/packer.nvim\
-- ~/.local/share/nvim/site/pack/packer/start/packer.nvim
-- check for vscode nvim plugin
-- (https://github.com/vscode-neovim/vscode-neovim)
if vim.g.vscode then
do return end
else
if vim.g.neovide then
vim.o.guifont = "CaskaydiaCove Nerd Font:h14"
vim.g.neovide_hide_mouse_when_typing = true
end
end
-- aliases
local o = vim.o
local c = vim.cmd
local map = vim.api.nvim_set_keymap
-- options
o.termguicolors = true
o.mouse = 'a'
-- o.autoindent = true
o.smartindent = true -- replacing autoindent with this
o.wrap = false
o.nobinary = true
o.relativenumber = true
o.tabstop = 4
o.shiftwidth = 4
o.expandtab = true
-- set wrap if markdown file
vim.cmd('autocmd FileType markdown setlocal wrap')
-- NOTE: pcall prevents plugin system from shitting itself on first load
if not pcall(function()
c.colorscheme 'catppuccin'
end) then
print("Failed to load colorscheme - probably has not been installed")
end
-- keybinds
-- file management
-- map('n', '<c-t>', ':CHADopen<cr>', {silent = true})
map('n', '<c-b>', ':NvimTreeToggle<cr>', {silent = true})
map('n', '<c-`>', ':ToggleTerm direction="float"<cr>', {silent = true})
-- exit terminal requires <Cmd> prefix
map('t', '<c-`>', '<Cmd>:ToggleTerm<cr>', {silent = true})
map('n', '<Space>gs', ':Telescope git_status<cr>', {silent = true})
map('n', '<Space>gc', ':Telescope git_commits<cr>', {silent = true})
map('n', '<Space>:', ':Telescope commands<cr>', {silent = true})
map('n', '<Space><Space>', ':Telescope find_files<cr>', {silent = true})
map('n', '<Space>f', ':Telescope grep_string<cr>', {silent = true})
-- buffer management
map('n', '<c-h>', ':bp<cr>', {silent = true})
map('n', '<c-l>', ':bn<cr>', {silent = true})
-- plugin configs
vim.g['airline_powerline_fonts'] = 1
vim.g['airline_theme'] = 'powerlineish'
vim.g['airline#extensions#tabline#enabled'] = 1
vim.g['airline#extensions#tabline#fnamemod'] = ':t'
-- plugin imports
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- Visual
use 'vim-airline/vim-airline'
use 'vim-airline/vim-airline-themes'
use { "catppuccin/nvim", as = "catppuccin" }
use 'airblade/vim-gitgutter'
-- Editor
use {'neovim/nvim-lspconfig', config = function()
local lspc = require('lspconfig')
lspc['pyright'].setup{}
lspc['tsserver'].setup{}
lspc['clojure_lsp'].setup{}
lspc['racket_langserver'].setup{}
lspc['rust_analyzer'].setup{}
lspc['gopls'].setup{}
end}
use 'hrsh7th/cmp-nvim-lsp'
use {'hrsh7th/nvim-cmp', config = function()
local cmp = require 'cmp'
cmp.setup {
sources = {
{ name = 'nvim_lsp' },
}
}
end}
-- use {'ms-jpq/chadtree', branch = 'chad'}
use {"nvim-tree/nvim-tree.lua", config = function()
require("nvim-tree").setup()
end}
use {"nvim-tree/nvim-web-devicons"}
use 'nvim-lua/plenary.nvim'
use 'nvim-telescope/telescope.nvim'
use {"akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup()
end}
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = function()
require'nvim-treesitter.configs'.setup{
highlight = {enable = true}
}
end}
-- use 'martinsione/darkplus.nvim'
-- NOTE: requires Node.js >= 17
-- use {'github/copilot.vim', run = ':Copilot setup'}
--
-- Specify Filetype for .python Files
vim.api.nvim_exec([[
autocmd BufNewFile,BufRead *.sage set filetype=python
]], false)
end)

View File

@@ -1,73 +0,0 @@
" Win behavior
" source $VIMRUNTIME/mswin.vim
" behave mswin
" Window height
" set lines=32 columns=110
" Preferences
set encoding=utf-8
set autochdir
set shiftwidth=4
set tabstop=4
set linebreak
set breakindent
set autoindent
set wrap
set nobinary
set relativenumber
syntax on
set belloff=all
set guifont=CaskaydiaCove\ Nerd\ Font:h12
" Aliases
cnoreabbrev ge browse confirm e
cnoreabbrev ! aliasrun
" Plugins
call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'airblade/vim-gitgutter'
Plug 'flazz/vim-colorschemes'
Plug 'tomlion/vim-solidity'
Plug 'zah/nim.vim'
Plug 'NLKNguyen/papercolortheme'
Plug 'ackyshake/VimCompletesMe'
Plug 'preservim/nerdtree'
call plug#end()
" Theming
set t_Co=256
set background=dark
colorscheme PaperColor
let g:airline_powerline_fonts = 1
let g:airline_theme = 'powerlineish'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
" Navigation & Shortcuts
" NERDTree Stuff
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
" Copy/paste stuff
" inoremap <C-c> "+y
" inoremap <C-v> <C-o>:"+p<CR>
" Tab stuff
nnoremap <A-1> 1gt
nnoremap <A-2> 2gt
nnoremap <A-3> 3gt
nnoremap <A-4> 4gt
nnoremap <A-5> 5gt
nnoremap <A-6> 6gt
nnoremap <A-7> 7gt
nnoremap <A-8> 8gt
nnoremap <A-9> 9gt
nnoremap <A-0> 10gt-

View File

@@ -1,76 +0,0 @@
" Win behavior
" source $VIMRUNTIME/mswin.vim
" behave mswin
" Window height
set lines=32 columns=110
" Preferences
set encoding=utf-8
set autochdir
set shiftwidth=4
set tabstop=4
set linebreak
set breakindent
set autoindent
set wrap
set conceallevel=0
set backspace=2
set backspace=indent,eol,start
set fileformat=unix
set fileformats=unix,dos
set nobinary
set relativenumber
syntax on
set shell=pwsh.exe
" Aliases
cnoreabbrev ge browse confirm e
cnoreabbrev ! aliasrun
" Plugins
call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'airblade/vim-gitgutter'
Plug 'preservim/nerdtree'
Plug 'flazz/vim-colorschemes'
Plug 'tomlion/vim-solidity'
Plug 'zah/nim.vim'
Plug 'ycm-core/YouCompleteMe'
Plug 'NLKNguyen/papercolor-theme'
" Plug 'vim-syntastic/syntastic'
call plug#end()
" Theming
set t_Co=256
set guifont=Cascadia_Code_PL:h9
set background=dark
colorscheme PaperColor
let g:airline_powerline_fonts = 1
let g:airline_theme = 'powerlineish'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
" Hide GVim Elements
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=L
set guioptions-=e
" Navigation & Shortcuts
" inoremap <C-c> "+y
" inoremap <C-v> <C-o>:"+p<CR>
nnoremap <C-n> :NERDTreeToggle<CR>
nnoremap <A-1> 1gt
nnoremap <A-2> 2gt
nnoremap <A-3> 3gt
nnoremap <A-4> 4gt
nnoremap <A-5> 5gt
nnoremap <A-6> 6gt
nnoremap <A-7> 7gt
nnoremap <A-8> 8gt
nnoremap <A-9> 9gt
nnoremap <A-0> 10gt

View File

@@ -1,4 +1,4 @@
// Place your key bindings in this file to override the defaultsauto[] // Place your key bindings in this file to override the defaults
[ [
{ {
"key": "cmd+1", "key": "cmd+1",
@@ -201,816 +201,6 @@
"key": "ctrl+shift+4", "key": "ctrl+shift+4",
"command": "workbench.action.terminal.focusAtIndex4" "command": "workbench.action.terminal.focusAtIndex4"
}, },
{
"key": "ctrl+alt+c i",
"command": "-calva.debug.instrument",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "shift+tab",
"command": "-calva-fmt.tabDedent",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+l",
"command": "-calva-fmt.alignCurrentForm",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "tab",
"command": "-calva-fmt.formatCurrentForm",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !inSnippetMode && !inlineSuggestionVisible && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+i",
"command": "-calva-fmt.tabIndent",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+p i",
"command": "-calva-fmt.inferParens",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+alt+right",
"command": "-paredit.barfSexpBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+left",
"command": "-paredit.barfSexpForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+c",
"command": "-paredit.convolute",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "backspace",
"command": "-paredit.deleteBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "delete",
"command": "-paredit.deleteForward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "ctrl+shift+alt+b",
"command": "-paredit.dragSexprBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+up",
"command": "-paredit.dragSexprBackward",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+j",
"command": "-paredit.dragSexprBackwardDown",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+u",
"command": "-paredit.dragSexprBackwardUp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+f",
"command": "-paredit.dragSexprForward",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+down",
"command": "-paredit.dragSexprForward",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+d",
"command": "-paredit.dragSexprForwardDown",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+k",
"command": "-paredit.dragSexprForwardUp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+w",
"command": "-paredit.sexpRangeExpansion",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+backspace",
"command": "-paredit.forceDeleteBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "alt+delete",
"command": "-paredit.forceDeleteForward",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorHasMultipleSelections && !editorReadOnly && editorLangId == 'clojure' && paredit:keyMap == 'strict'"
},
{
"key": "ctrl+shift+j",
"command": "-paredit.joinSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+backspace",
"command": "-paredit.killListBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+delete",
"command": "-paredit.killListForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+k",
"command": "-paredit.killRight",
"when": "calva:keybindingsEnabled && editorTextFocus && !selectionAnchorSet && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+backspace",
"command": "-paredit.killSexpBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+delete",
"command": "-paredit.killSexpForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+up",
"command": "-paredit.backwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+left",
"command": "-paredit.backwardSexp",
"when": "calva:cursorBeforeComment && editorLangId == 'clojure' || calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !config.calva.paredit.hijackVSCodeDefaults && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+left",
"command": "-paredit.backwardSexp",
"when": "calva:cursorBeforeComment && editorLangId == 'clojure' || calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+up",
"command": "-paredit.backwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+down",
"command": "-paredit.forwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+right",
"command": "-paredit.forwardSexp",
"when": "calva:cursorAfterComment && editorLangId == 'clojure' || calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && !config.calva.paredit.hijackVSCodeDefaults && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+right",
"command": "-paredit.forwardSexp",
"when": "calva:cursorAfterComment && editorLangId == 'clojure' || calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+end",
"command": "-paredit.closeList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+down",
"command": "-paredit.forwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+p ctrl+alt+r",
"command": "-paredit.raiseSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+q",
"command": "-paredit.rewrapQuote",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+p",
"command": "-paredit.rewrapParens",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+s",
"command": "-paredit.rewrapSquare",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+c",
"command": "-paredit.rewrapCurly",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r ctrl+alt+h",
"command": "-paredit.rewrapSet",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+up",
"command": "-paredit.selectBackwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "shift+alt+left",
"command": "-paredit.selectBackwardSexp",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorAfterComment && !calva:cursorBeforeComment && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+home",
"command": "-paredit.selectOpenList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+up",
"command": "-paredit.selectBackwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+w space",
"command": "-paredit.rangeForDefun",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+down",
"command": "-paredit.selectForwardDownSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "shift+alt+right",
"command": "-paredit.selectForwardSexp",
"when": "calva:keybindingsEnabled && config.calva.paredit.hijackVSCodeDefaults && editorTextFocus && !calva:cursorAfterComment && !calva:cursorBeforeComment && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+end",
"command": "-paredit.selectCloseList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+down",
"command": "-paredit.selectForwardUpSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+k",
"command": "-paredit.selectRight",
"when": "calva:keybindingsEnabled && editorTextFocus && !selectionAnchorSet && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+w",
"command": "-paredit.sexpRangeContraction",
"when": "calva:keybindingsEnabled && editorTextFocus && !calva:cursorInComment && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+left",
"command": "-paredit.slurpSexpBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+right",
"command": "-paredit.slurpSexpForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "-paredit.spliceSexpKillBackward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+delete",
"command": "-paredit.spliceSexpKillForward",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+s",
"command": "-paredit.spliceSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+s",
"command": "-paredit.splitSexp",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+p ctrl+alt+m",
"command": "-paredit.togglemode",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+t",
"command": "-paredit.transpose",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+q",
"command": "-paredit.wrapAroundQuote",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+p",
"command": "-paredit.wrapAroundParens",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+s",
"command": "-paredit.wrapAroundSquare",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+alt+c",
"command": "-paredit.wrapAroundCurly",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+r c",
"command": "-paredit.addRichComment",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "escape",
"command": "-calva.clearInlineResults",
"when": "calva:hasInlineResults && calva:keybindingsEnabled && editorTextFocus && !editorHasMultipleSelections && !editorHasSelection && !editorReadOnly && !hasOtherSuggestions && !inlineSuggestionVisible && !parameterHintsVisible && !selectionAnchorSet && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+c",
"command": "-calva.connect",
"when": "calva:keybindingsEnabled && workspaceFolderCount > 0"
},
{
"key": "ctrl+alt+c alt+c",
"command": "-calva.connectNonProjectREPL",
"when": "calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+c ctrl+c",
"command": "-calva.copyLastResults",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+enter",
"command": "-calva.evaluateEnclosingForm",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+enter",
"command": "-calva.evaluateSelection",
"when": "calva:keybindingsEnabled && editorTextFocus && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c r",
"command": "-calva.evaluateSelectionReplace",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c c",
"command": "-calva.evaluateSelectionAsComment",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+f",
"command": "-calva.evaluateFiddleForSourceFile",
"when": "calva:connected && calva:keybindingsEnabled && !calva:activeEditorIsFiddle"
},
{
"key": "ctrl+shift+alt+enter",
"command": "-calva.evaluateStartOfFileToCursor",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+enter",
"command": "-calva.evaluateToCursor",
"when": "calva:keybindingsEnabled && editorTextFocus && !editorHasSelection && editorLangId == 'clojure'"
},
{
"key": "shift+alt+enter",
"command": "-calva.evaluateTopLevelFormToCursor",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+enter",
"command": "-calva.evaluateSelectionToSelectionEnd",
"when": "calva:keybindingsEnabled && editorHasSelection && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "alt+enter",
"command": "-calva.evaluateCurrentTopLevelForm",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+space",
"command": "-calva.evaluateTopLevelFormAsComment",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+d",
"command": "-calva.interruptAllEvaluations",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c enter",
"command": "-calva.loadFile",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c f",
"command": "-calva.openFiddleForSourceFile",
"when": "calva:keybindingsEnabled && !calva:activeEditorIsFiddle"
},
{
"key": "ctrl+alt+c f",
"command": "-calva.openSourceFileForFiddle",
"when": "calva:activeEditorIsFiddle && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+o d",
"command": "-calva.printClojureDocsToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+r d",
"command": "-calva.printClojureDocsToRichComment",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+p",
"command": "-calva.printLastStacktrace",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+u",
"command": "-calva.requireREPLUtilities",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c shift+t",
"command": "-calva.runAllTests",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+t",
"command": "-calva.runTestUnderCursor",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+space enter",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space ,",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space .",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space -",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space backspace",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space left",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space right",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space up",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space down",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space tab",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 0",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 1",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 2",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 3",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 4",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 5",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 6",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 7",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 8",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space 9",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space a",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space b",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space c",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space d",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space e",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space f",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space g",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space h",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space i",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space j",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space k",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space l",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space m",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space n",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space o",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space p",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space q",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space r",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space s",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space t",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space u",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space v",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space w",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space x",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space y",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space z",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+space space",
"command": "-calva.runCustomREPLCommand",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+c ctrl+t",
"command": "-calva.rerunTests",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c t",
"command": "-calva.runNamespaceTests",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+b",
"command": "-calva.switchCljsBuild",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "ctrl+alt+c ctrl+s",
"command": "-calva.selectCurrentForm",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+e",
"command": "-calva.sendCurrentFormToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+space",
"command": "-calva.sendCurrentTopLevelFormToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+o o",
"command": "-calva.showFileForOutputWindowNS",
"when": "calva:connected && calva:keybindingsEnabled && calva:outputWindowActive"
},
{
"key": "alt+down",
"command": "-calva.showNextReplHistoryEntry",
"when": "calva:connected && calva:keybindingsEnabled && calva:outputWindowActive && calva:replHistoryCommandsActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+o o",
"command": "-calva.showOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive"
},
{
"key": "alt+up",
"command": "-calva.showPreviousReplHistoryEntry",
"when": "calva:connected && calva:keybindingsEnabled && calva:outputWindowActive && calva:replHistoryCommandsActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+j",
"command": "-calva.jackIn",
"when": "calva:keybindingsEnabled && workspaceFolderCount > 0"
},
{
"key": "ctrl+alt+c ctrl+alt+r",
"command": "-calva.startOrConnectRepl"
},
{
"key": "ctrl+alt+c n",
"command": "-calva.setOutputWindowNamespace",
"when": "calva:connected && calva:keybindingsEnabled && !calva:outputWindowActive && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+t t",
"command": "-calva.tapSelection",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+shift+t space",
"command": "-calva.tapCurrentTopLevelForm",
"when": "calva:connected && calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+o s",
"command": "-calva.toggleEvaluationSendCodeToOutputWindow",
"when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c p",
"command": "-calva.togglePrettyPrint",
"when": "calva:keybindingsEnabled && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+c ctrl+alt+s",
"command": "-calva.toggleCLJCSession",
"when": "calva:connected && calva:keybindingsEnabled"
},
{
"key": "enter",
"command": "-calva.evaluateOutputWindowForm",
"when": "calva:keybindingsEnabled && calva:outputWindowActive && calva:outputWindowSubmitOnEnter && editorTextFocus && !suggestWidgetVisible"
},
{
"key": "ctrl+home",
"command": "-paredit.openList",
"when": "calva:keybindingsEnabled && editorTextFocus && editorLangId == 'clojure' && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+cmd+e",
"command": "calva.selectCurrentForm"
},
{
"key": "alt+up",
"command": "calva.showPreviousReplHistoryEntry"
},
{
"key": "alt+down",
"command": "calva.showNextReplHistoryEntry"
},
{
"key": "alt+enter",
"command": "calva.evaluateSelectionReplace"
},
{ {
"key": "alt+c", "key": "alt+c",
"command": "workbench.panel.chatSidebar" "command": "workbench.panel.chatSidebar"
@@ -1024,5 +214,47 @@
"key": "shift+cmd+e", "key": "shift+cmd+e",
"command": "-workbench.view.explorer", "command": "-workbench.view.explorer",
"when": "viewContainer.workbench.view.explorer.enabled" "when": "viewContainer.workbench.view.explorer.enabled"
},
{
"key": "shift+cmd+i",
"command": "composerMode.chat"
},
{
"key": "shift+cmd+i",
"command": "-composer.newAgentChat"
},
{
"key": "cmd+; shift+cmd+i",
"command": "-testing.toggleInlineCoverage"
},
{
"key": "shift+cmd+i",
"command": "-workbench.panel.chatEditing",
"when": "workbench.panel.chat.view.edits.active"
},
{
"key": "shift+cmd+g",
"command": "-editor.action.previousMatchFindAction",
"when": "activeEditorIsReviewChanges || editorFocus"
},
{
"key": "shift+cmd+g",
"command": "-planEditor.findPrevious",
"when": "markdownPlanEditorActive"
},
{
"key": "shift+cmd+g",
"command": "-workbench.action.terminal.findPrevious",
"when": "terminalFindFocused && terminalHasBeenCreated || terminalFindFocused && terminalProcessSupported || terminalFocusInAny && terminalHasBeenCreated || terminalFocusInAny && terminalProcessSupported"
},
{
"key": "shift+cmd+g",
"command": "workbench.view.scm",
"when": "workbench.scm.active"
},
{
"key": "ctrl+shift+g",
"command": "-workbench.view.scm",
"when": "workbench.scm.active"
} }
] ]

66
config/zed/keymap.json Normal file
View File

@@ -0,0 +1,66 @@
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
// (All contexts)
"bindings": {
"cmd-shift-g": "git_panel::ToggleFocus",
"cmd->": "project_panel::ToggleHideHidden",
"cmd-1": ["pane::ActivateItem", 0],
"cmd-2": ["pane::ActivateItem", 1],
"cmd-3": ["pane::ActivateItem", 2],
"cmd-4": ["pane::ActivateItem", 3],
"cmd-5": ["pane::ActivateItem", 4],
"cmd-6": ["pane::ActivateItem", 5],
"cmd-7": ["pane::ActivateItem", 6],
"cmd-8": ["pane::ActivateItem", 7],
"cmd-9": ["pane::ActivateItem", 8],
},
},
{
"context": "Editor && vim_mode == insert",
"bindings": {
// "j k": "vim::NormalBefore"
},
},
{
"context": "Editor",
"bindings": {
"cmd-l": null,
},
},
{
"context": "((FileFinder || FileFinder > Picker > Editor) || FileFinder > Picker > menu)",
"bindings": {
"cmd-l": null,
},
},
{
"bindings": {
"cmd-l": "workspace::ToggleRightDock",
},
},
{
"context": "ContextEditor > Editor",
"bindings": {
"cmd-shift-g": null,
},
},
{
"context": "Pane",
"bindings": {
"cmd-shift-g": null,
},
},
{
"context": "Workspace",
"bindings": {
"cmd-w": null
}
}
]

70
config/zed/settings.json Normal file
View File

@@ -0,0 +1,70 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"project_panel": {
"hide_hidden": false,
},
"features": {
"edit_prediction_provider": "copilot",
},
"agent_ui_font_size": 15.0,
"toolbar": {
"breadcrumbs": true,
"code_actions": false,
},
"git_panel": {
"tree_view": true,
},
"ui_font_family": ".SystemUIFont",
"icon_theme": "Material Icon Theme",
"agent_servers": {
"opencode": {
"type": "registry",
},
},
"buffer_font_family": "CaskaydiaCove Nerd Font",
"session": {
"trust_all_worktrees": true,
},
"vim_mode": true,
"terminal": {
"font_family": "MesloLGS NF",
},
"base_keymap": "VSCode",
"ui_font_size": 14.0,
"buffer_font_size": 12.0,
"file_types": {
"Jinja2": ["*.j2"],
"YAML": ["*.yml.template", "*.yaml.template"],
},
"theme": {
"mode": "system",
"light": "Ayu Light",
"dark": "VSCode Dark Modern",
},
"theme_overrides": {
"VSCode Dark Modern": {
"editor.background": "#121212",
"editor.active_line.background": "#1f1f1f",
"tab_bar.background": "#121212",
"tab.active_background": "#262626",
"terminal.background": "#141414",
"panel.background": "#161616",
"text": "#fff",
"text.muted": "#ddd",
"toolbar.background": "#171717",
"editor.gutter.background": "#171717",
"border": "#444",
"version_control.deleted": "#f11",
"version_control.added": "#2e1",
"version_control.conflict": "#e1f",
"version_control.modified": "#08f",
},
},
}

View File

@@ -1,6 +0,0 @@
wget https://dl.google.com/android/repository/commandlinetools-mac-9123335_latest.zip -O ~/Downloads/as-mac-cli-tools.zip
mkdir -p ~/opt

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env bb
(require '[clojure.string :as str :refer [split]])
(require '[babashka.tasks :as tasks :refer [shell]])
(def drive-dest "turtlebasket-gdrive:/macbook-air-m1")
(def paths ["Desktop"
"Documents/Personal Knowledge Base"
"Documents/Berkeley Notes"])
;; currently not used
(def exclude ["*.swp" ".git" "node_modules" "__pycache__" ".DS_Store"])
(for [path paths]
(future
(let [res
(shell "rclone" "sync"
path
(format "%s/%s" drive-dest (-> path (split #"/") last))
"--progress" "--retries" 1 "--delete-excluded")]
(if (= (get res "exit") 0)
(println (format "Backed up %s" path))
(println (get res "error"))))))
;; (for [item exclude] (cons "--exclude" item))))

View File

@@ -1,19 +0,0 @@
#!/usr/bin/env python3
from concurrent.futures import ThreadPoolExecutor
from subprocess import run as srun
DEST="turtlebasket-gdrive:/macbook-air-m1"
paths=[
"Desktop"
"Documents/Personal Knowledge Base"
"Documents/Berkeley Notes"
]
with ThreadPoolExecutor(max_workers=4) as executor:
for path in paths:
fname = path.split("/")[-1]
srun("rclone", "sync",
path,
f'{DEST}/{fname}',
"--progress", "--rertries", 1, "--delete-excluded")

79
scripts/ntfy-cmd Executable file
View File

@@ -0,0 +1,79 @@
#!/usr/bin/env bash
#
# ntfy-cmd — run any command, then send ntfy success/failure notification (via curl)
#
# Usage:
# ntfy-cmd <command> [args...]
#
# Example:
# ntfy-cmd make build
# ntfy-cmd bash -c "sleep 10 && false"
# ntfy-cmd ls /nonexistent
#
# Notes:
# - Requires $NTFY_ME_TOPIC set (e.g., mytopic)
# - Optional $NTFY_HOST (defaults to https://ntfy.sh)
# - Captures exit code and reports SUCCESS/FAILURE via ntfy with duration.
set -uo pipefail # no `-e`, so we can handle nonzero exits ourselves
if [ -z "${NTFY_ME_TOPIC:-}" ]; then
echo "Error: NTFY_ME_TOPIC environment variable not set."
echo "Set it like: export NTFY_ME_TOPIC=mytopic"
exit 1
fi
# Set default ntfy host if not provided
NTFY_HOST="${NTFY_HOST:-https://ntfy.sh}"
if [ $# -lt 1 ]; then
echo "Usage: $0 <command> [args...]"
exit 1
fi
# Reconstruct command with proper quoting for display
original_cmd=""
for arg in "$@"; do
if [[ "$arg" =~ [[:space:]] ]]; then
original_cmd="$original_cmd \"$arg\""
else
original_cmd="$original_cmd $arg"
fi
done
original_cmd="${original_cmd# }" # Remove leading space
start_time=$(date +%s)
hostname=$(hostname)
# Run the command directly, preserving exit code
"$@"
code=$?
end_time=$(date +%s)
elapsed=$((end_time - start_time))
duration="$(printf '%02dh:%02dm:%02ds' $((elapsed/3600)) $((elapsed%3600/60)) $((elapsed%60)))"
if [ $code -eq 0 ]; then
title="✅ Command exited - SUCCESS"
else
title="❌ Command exited - FAILURE"
fi
# Truncate if too long (keep first 100 chars + "..." if truncated)
cmd_str="$original_cmd"
if [ ${#cmd_str} -gt 100 ]; then
cmd_str="${cmd_str:0:100}..."
fi
body="Command: $cmd_str
Host: $hostname
Duration: $duration
Exit code: $code"
curl -fsS -X POST \
-H "Title: $title" \
-d "$body" \
"$NTFY_HOST/$NTFY_ME_TOPIC" >/dev/null 2>&1 || echo "Warning: failed to send ntfy notification" >&2
exit $code

36
scripts/ntfy-msg Executable file
View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
#
# ntfy-msg — send a message to ntfy (via curl)
#
# Usage:
# ntfy-msg <message>
#
# Example:
# ntfy-msg "Build finished"
#
# Notes:
# - Requires $NTFY_ME_TOPIC set (e.g., mytopic)
# - Optional $NTFY_HOST (defaults to https://ntfy.sh)
set -u
if [ -z "${NTFY_ME_TOPIC:-}" ]; then
echo "Error: NTFY_ME_TOPIC environment variable not set."
echo "Set it like: export NTFY_ME_TOPIC=mytopic"
exit 1
fi
# Set default ntfy host if not provided
NTFY_HOST="${NTFY_HOST:-https://ntfy.sh}"
if [ $# -lt 1 ]; then
echo "Usage: $0 <message>"
exit 1
fi
message="$*"
curl -fsS -X POST \
-d "$message" \
"$NTFY_HOST/$NTFY_ME_TOPIC" >/dev/null 2>&1 || echo "Warning: failed to send ntfy message" >&2

13
scripts/tmux2 Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# simple wrapper for tmux that creates a new session for current directory if one doesn't exist
# meant for scoping sessions by /Projects/<project-name>/
session="$(basename "$PWD")"
tmux has-session -t "$session" 2>/dev/null
if [[ $? -eq 0 ]]; then
exec tmux attach -t "$session"
else
exec tmux new -s "$session"
fi

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
envr=~/Projects/env
mkdir -vp ~/.bin ~/Projects
echo 'export PATH="~/.bin:$PATH"' > ~/.bashrc
# nvim install
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
mv nvim.appimage ~/.bin/nvim
# nvim packer install
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
# dotfiles
git clone https://github.com/turtlebasket/env $envr
mkdir -p ~/.config/nvim
cp -v $envr/config/neovim/macos/init.lua ~/.config/nvim/init.lua