mirror of
https://github.com/turtlebasket/env.git
synced 2026-03-05 12:04:27 -08:00
Compare commits
25 Commits
a695ed26c7
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7df984d8c9 | ||
|
|
c33c7583f1 | ||
|
|
5c5128be85 | ||
| 4d34926921 | |||
| b64a2c9030 | |||
| 8c520df5bd | |||
| cd72f8cffd | |||
| 837111c722 | |||
| fd51ecd814 | |||
| 151cd20a95 | |||
| 6a6cd3bc79 | |||
| 44a04166f4 | |||
| ccb3c506e9 | |||
| 4cf676030c | |||
| a51e8e3676 | |||
| 196c9c767f | |||
| 84a3b1c661 | |||
| 764a757bfd | |||
| 2b18907902 | |||
| 7a2bb306fd | |||
| 3354c1c8f1 | |||
| cf0d26c454 | |||
| b626201d51 | |||
| 28ab0d57b7 | |||
| 2b1f3d7aa8 |
121
.gitignore
vendored
121
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
# other stuff
|
||||
*.swp
|
||||
*.exe
|
||||
|
||||
# General
|
||||
.DS_Store
|
||||
@@ -67,3 +68,123 @@ $RECYCLE.BIN/
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
# visual code
|
||||
/*.vsix
|
||||
# .vscode/settings.json
|
||||
.vscode-test
|
||||
.lh
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules
|
||||
jspm_packages
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
#Macos
|
||||
.DS_Store
|
||||
|
||||
## CLJS
|
||||
.shadow-cljs/
|
||||
lib/
|
||||
cljs-out/
|
||||
test-out/
|
||||
|
||||
# This and that
|
||||
.nrepl-port
|
||||
dist/
|
||||
pom.xml
|
||||
.idea
|
||||
*.iml
|
||||
*.bak
|
||||
|
||||
## TS
|
||||
out/
|
||||
html/main.js
|
||||
tsconfig.tsbuildinfo
|
||||
html/main.js.map
|
||||
|
||||
# Test reporter
|
||||
junit/test-results.xml
|
||||
|
||||
# Don't know what this is
|
||||
report.*
|
||||
|
||||
# clojure-lsp
|
||||
.lsp
|
||||
output.calva-repl
|
||||
.clj-kondo
|
||||
/clojure-lsp*
|
||||
|
||||
# MkDocs
|
||||
/site/
|
||||
|
||||
# Calva dev
|
||||
clojure.tmLanguage.json
|
||||
.cpcache/
|
||||
backup/
|
||||
|
||||
# Calva grammars (running the atom-ci docker image locally)
|
||||
src/calva-fmt/atom-language-clojure/.cache/
|
||||
src/calva-fmt/atom-language-clojure/.bash_history
|
||||
|
||||
# Leiningen
|
||||
.lein-repl-history
|
||||
|
||||
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
14
README.md
14
README.md
@@ -1,14 +1,10 @@
|
||||
# Environment
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Contents
|
||||
|
||||
- [Configs](./config/)
|
||||
- [Old setup stuff](./setup/)
|
||||
- [Misc. scripts](./scripts/)
|
||||
- [Old setup stuff](./setup/)
|
||||
|
||||
## Software List
|
||||
|
||||
@@ -18,12 +14,12 @@
|
||||
- [Rectangle](https://github.com/rxhanson/Rectanglehttps://github.com/rxhanson/Rectangle)
|
||||
- [MiddleClick](https://github.com/artginzburg/MiddleClick-BigSur)
|
||||
- [LinearMouse](https://linearmouse.org/)
|
||||
- [AltTab MacOS](https://github.com/lwouis/alt-tab-macos)
|
||||
- [OpenInTerminal](https://github.com/Ji4n1ng/OpenInTerminal)
|
||||
- [Raycast](https://www.raycast.com/)
|
||||
|
||||
### Windows
|
||||
|
||||
- AutoHotKey
|
||||
- [AutoHotKey v1](https://www.autohotkey.com/download/1.1/)
|
||||
- ShareX
|
||||
- Powershell Core
|
||||
- Windows Terminal
|
||||
- WSL (native feature)
|
||||
|
||||
|
||||
4
config/ahk/AhkStartup.bat
Normal file
4
config/ahk/AhkStartup.bat
Normal file
@@ -0,0 +1,4 @@
|
||||
:: Create a shortcut to this, then move to $shell:startup
|
||||
|
||||
.\BasicUtils.ahk
|
||||
|
||||
@@ -80,9 +80,14 @@ FocusOrOpen(name, launchExec:=-1)
|
||||
Run, %launchExec%
|
||||
}
|
||||
|
||||
^!e::FocusOrOpen("gvim.exe", "gvim.bat")
|
||||
; ^!e::FocusOrOpen("gvim.exe", "gvim.bat")
|
||||
^!e::FocusOrOpen("code.exe", "code.cmd")
|
||||
^!v::FocusOrOpen("code.exe", "code.cmd")
|
||||
^!t::FocusOrOpen("windowsterminal.exe", "wt.exe")
|
||||
^!o::FocusOrOpen("Obsidian.exe", "Obsidian")
|
||||
^!w::FocusOrOpen("brave.exe")
|
||||
^!s::FocusOrOpen("signal.exe", "Signal")
|
||||
^!m::FocusOrOpen("spotify.exe", "Spotify")
|
||||
^!j::FocusOrOpen("idea.exe", "idea.bat")
|
||||
^!n::FocusOrOpen("nvim-qt.exe", "nvim-qt")
|
||||
|
||||
|
||||
260
config/cursor/keybindings.json
Normal file
260
config/cursor/keybindings.json
Normal file
@@ -0,0 +1,260 @@
|
||||
// Place your key bindings in this file to override the defaults
|
||||
[
|
||||
{
|
||||
"key": "cmd+1",
|
||||
"command": "workbench.action.openEditorAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+1",
|
||||
"command": "-workbench.action.openEditorAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "cmd+2",
|
||||
"command": "workbench.action.openEditorAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+2",
|
||||
"command": "-workbench.action.openEditorAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "cmd+3",
|
||||
"command": "workbench.action.openEditorAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+3",
|
||||
"command": "-workbench.action.openEditorAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "cmd+4",
|
||||
"command": "workbench.action.openEditorAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+4",
|
||||
"command": "-workbench.action.openEditorAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "cmd+5",
|
||||
"command": "workbench.action.openEditorAtIndex5"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+5",
|
||||
"command": "-workbench.action.openEditorAtIndex5"
|
||||
},
|
||||
{
|
||||
"key": "cmd+6",
|
||||
"command": "workbench.action.openEditorAtIndex6"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+6",
|
||||
"command": "-workbench.action.openEditorAtIndex6"
|
||||
},
|
||||
{
|
||||
"key": "cmd+7",
|
||||
"command": "workbench.action.openEditorAtIndex7"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+7",
|
||||
"command": "-workbench.action.openEditorAtIndex7"
|
||||
},
|
||||
{
|
||||
"key": "cmd+8",
|
||||
"command": "workbench.action.openEditorAtIndex8"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+8",
|
||||
"command": "-workbench.action.openEditorAtIndex8"
|
||||
},
|
||||
{
|
||||
"key": "cmd+9",
|
||||
"command": "workbench.action.openEditorAtIndex9"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+9",
|
||||
"command": "-workbench.action.openEditorAtIndex9"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+1",
|
||||
"command": "workbench.action.focusFirstEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+1",
|
||||
"command": "-workbench.action.focusFirstEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+3",
|
||||
"command": "workbench.action.focusThirdEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+3",
|
||||
"command": "-workbench.action.focusThirdEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+6",
|
||||
"command": "workbench.action.focusSixthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+6",
|
||||
"command": "-workbench.action.focusSixthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+7",
|
||||
"command": "workbench.action.focusSeventhEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+7",
|
||||
"command": "-workbench.action.focusSeventhEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+2",
|
||||
"command": "workbench.action.focusSecondEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+2",
|
||||
"command": "-workbench.action.focusSecondEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+4",
|
||||
"command": "workbench.action.focusFourthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+4",
|
||||
"command": "-workbench.action.focusFourthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+5",
|
||||
"command": "workbench.action.focusFifthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+5",
|
||||
"command": "-workbench.action.focusFifthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+8",
|
||||
"command": "workbench.action.focusEighthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+8",
|
||||
"command": "-workbench.action.focusEighthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+0",
|
||||
"command": "workbench.action.focusLastEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+h",
|
||||
"command": "workbench.action.toggleAuxiliaryBar"
|
||||
},
|
||||
{
|
||||
"key": "cmd+g",
|
||||
"command": "git-graph.view"
|
||||
},
|
||||
{
|
||||
"key": "cmd+m",
|
||||
"command": "-markdown.extension.editing.toggleMath",
|
||||
"when": "editorTextFocus && !editorReadonly && editorLangId == 'markdown'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+tab",
|
||||
"command": "workbench.action.showPreviousWindowTab"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+tab",
|
||||
"command": "workbench.action.showNextWindowTab"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+tab",
|
||||
"command": "-workbench.action.quickOpenLeastRecentlyUsedEditorInGroup",
|
||||
"when": "!activeEditorGroupEmpty"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+tab",
|
||||
"command": "-workbench.action.quickOpenNavigatePreviousInEditorPicker",
|
||||
"when": "inEditorsPicker && inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+tab",
|
||||
"command": "-workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup",
|
||||
"when": "!activeEditorGroupEmpty"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+tab",
|
||||
"command": "-workbench.action.quickOpenNavigateNextInEditorPicker",
|
||||
"when": "inEditorsPicker && inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "shift+cmd+z",
|
||||
"command": "workbench.action.toggleZenMode"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+1",
|
||||
"command": "workbench.action.terminal.focusAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+2",
|
||||
"command": "workbench.action.terminal.focusAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+3",
|
||||
"command": "workbench.action.terminal.focusAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+4",
|
||||
"command": "workbench.action.terminal.focusAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "alt+c",
|
||||
"command": "workbench.panel.chatSidebar"
|
||||
},
|
||||
{
|
||||
"key": "shift+cmd+e",
|
||||
"command": "workbench.view.explorer",
|
||||
"when": "viewContainer.workbench.view.explorer.enabled"
|
||||
},
|
||||
{
|
||||
"key": "shift+cmd+e",
|
||||
"command": "-workbench.view.explorer",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
170
config/cursor/settings.json
Normal file
170
config/cursor/settings.json
Normal file
@@ -0,0 +1,170 @@
|
||||
{
|
||||
"workbench.iconTheme": "material-icon-theme",
|
||||
"editor.fontFamily": "'CaskaydiaCove Nerd Font', 'PragmataPro Liga', Menlo, Monaco, 'Courier New', monospace",
|
||||
"editor.inlineSuggest.enabled": true,
|
||||
"latex-workshop.view.pdf.viewer": "tab",
|
||||
"svelte.enable-ts-plugin": true,
|
||||
"git.enableSmartCommit": true,
|
||||
"git.confirmSync": false,
|
||||
"terminal.integrated.commandsToSkipShell": [
|
||||
"language-julia.interrupt"
|
||||
],
|
||||
"editor.guides.bracketPairs": true,
|
||||
"editor.bracketPairColorization.enabled": true,
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[svelte]": {
|
||||
"editor.defaultFormatter": "svelte.svelte-vscode",
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"workbench.settings.openDefaultKeybindings": true,
|
||||
"[yaml]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.fontLigatures": true,
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"[rust]": {
|
||||
"editor.defaultFormatter": "rust-lang.rust-analyzer"
|
||||
},
|
||||
"julia.enableTelemetry": true,
|
||||
"vscode-neovim.neovimExecutablePaths.darwin": "/opt/homebrew/bin/nvim",
|
||||
"workbench.editorAssociations": {
|
||||
"*.wasm": "default",
|
||||
"*.stl": "default",
|
||||
"*.png": "imagePreview.previewEditor"
|
||||
},
|
||||
"workbench.productIconTheme": "material-product-icons",
|
||||
"rust-analyzer.inlayHints.typeHints.enable": false,
|
||||
"rust-analyzer.inlayHints.renderColons": false,
|
||||
"rust-analyzer.inlayHints.chainingHints.enable": false,
|
||||
"rust-analyzer.inlayHints.closingBraceHints.enable": false,
|
||||
"rust-analyzer.inlayHints.parameterHints.enable": false,
|
||||
"update.mode": "manual",
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/bower_components": true,
|
||||
"**/env": true,
|
||||
"**/venv": true
|
||||
},
|
||||
"files.watcherExclude": {
|
||||
"**/.git/objects/**": true,
|
||||
"**/.git/subtree-cache/**": true,
|
||||
"**/node_modules/**": true,
|
||||
"**/env/**": true,
|
||||
"**/venv/**": true,
|
||||
"env-*": true,
|
||||
"**/.bloop": true,
|
||||
"**/.metals": true,
|
||||
"**/.ammonite": true
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
"arduino.path": "/opt/homebrew/bin/",
|
||||
"arduino.commandPath": "arduino-cli",
|
||||
"workbench.colorCustomizations": {
|
||||
"[Default Dark+]": {
|
||||
"titleBar.activeBackground": "#202020",
|
||||
"titleBar.border": "#242424",
|
||||
"editor.background": "#141414",
|
||||
"sideBar.background": "#191919",
|
||||
"activityBar.background": "#242424",
|
||||
"tab.inactiveBackground": "#202020",
|
||||
"tab.hoverBackground": "#323232",
|
||||
"statusBar.background": "#191919",
|
||||
"statusBar.noFolderBackground": "#622"
|
||||
}
|
||||
},
|
||||
"go.toolsManagement.autoUpdate": true,
|
||||
"extensions.ignoreRecommendations": true,
|
||||
"svelte.plugin.svelte.note-new-transformation": false,
|
||||
"diffEditor.ignoreTrimWhitespace": false,
|
||||
"window.confirmBeforeClose": "keyboardOnly",
|
||||
"cmake.configureOnOpen": true,
|
||||
"files.associations": {
|
||||
"*.i": "swiglang",
|
||||
"*.hpp": "cpp",
|
||||
"*.qasm": "qasm",
|
||||
"*.css": "tailwindcss"
|
||||
},
|
||||
"C_Cpp.clang_format_fallbackStyle": "LLVM",
|
||||
"[c]": {
|
||||
"editor.wordBasedSuggestions": "off",
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.semanticHighlighting.enabled": true,
|
||||
"editor.quickSuggestions": {
|
||||
"comments": "on",
|
||||
"strings": "on",
|
||||
"other": "on"
|
||||
}
|
||||
},
|
||||
"clangd.path": "/Users/michael/Library/Application Support/Code/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/16.0.2/clangd_16.0.2/bin/clangd",
|
||||
"julia.symbolCacheDownload": true,
|
||||
"calva.paredit.defaultKeyMap": "strict",
|
||||
"jupyter.askForKernelRestart": false,
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"hardhat.telemetry": false,
|
||||
"terminal.integrated.fontFamily": "'MesloLGS NF'",
|
||||
"terminal.integrated.fontSize": 12.7,
|
||||
"arduino.useArduinoCli": true,
|
||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||
"clangd.arguments": [
|
||||
"-I/opt/homebrew/include",
|
||||
"-I/usr/local/include/ompl-1.6/"
|
||||
],
|
||||
"C_Cpp.default.cppStandard": "c++17",
|
||||
"editor.minimap.enabled": false,
|
||||
"C_Cpp.intelliSenseEngine": "disabled",
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "vscode.html-language-features"
|
||||
},
|
||||
"openscad.launchPath": "/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD",
|
||||
"mypy.runUsingActiveInterpreter": true,
|
||||
"solidity.telemetry": false,
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter"
|
||||
},
|
||||
"ccls.launch.command": "/home/cc/cs61c/fa23/class/cs61c-agb/.bin/ccls",
|
||||
"editor.wordWrap": "off",
|
||||
"zenMode.fullScreen": false,
|
||||
"tabnine.experimentalAutoImports": true,
|
||||
"vim.enableNeovim": true,
|
||||
"github.copilot.editor.enableCodeActions": false,
|
||||
"terminal.external.osxExec": "iTerm.app",
|
||||
"workbench.editor.empty.hint": "hidden",
|
||||
"window.commandCenter": false,
|
||||
"chat.editor.fontWeight": "500",
|
||||
"editor.largeFileOptimizations": false,
|
||||
"git.openRepositoryInParentFolders": "never",
|
||||
"calva.keybindingsEnabled": false,
|
||||
"hediet.vscode-drawio.resizeImages": null,
|
||||
"hediet.vscode-drawio.theme": "atlas",
|
||||
"redhat.telemetry.enabled": false,
|
||||
"editor.indentSize": "tabSize",
|
||||
"[qml]": {
|
||||
"editor.defaultFormatter": "seanwu.vscode-qt-for-python"
|
||||
},
|
||||
"github.copilot.editor.enableAutoCompletions": true,
|
||||
"python.defaultInterpreterPath": "/opt/homebrew/bin/python3.11",
|
||||
"workbench.colorTheme": "Default Dark+",
|
||||
"cursor.chat.showSuggestedFiles": true,
|
||||
"git.autofetch": true,
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"workbench.editor.editorActionsLocation": "hidden"
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
## Installation
|
||||
|
||||
```
|
||||
cp ./*.el ~/.doom.d/
|
||||
```
|
||||
|
||||
@@ -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)
|
||||
@@ -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.
|
||||
)
|
||||
@@ -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))
|
||||
@@ -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
38
config/ghostty/config
Normal 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
|
||||
21
config/git-split-diffs/README.md
Normal file
21
config/git-split-diffs/README.md
Normal 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
|
||||
```
|
||||
|
||||
59
config/git-split-diffs/transparent.json
Normal file
59
config/git-split-diffs/transparent.json
Normal 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"
|
||||
}
|
||||
}
|
||||
@@ -1,272 +1,524 @@
|
||||
wf=hs.window.filter
|
||||
browser = "Brave Browser"
|
||||
-- browser = "Chromium"
|
||||
wf = hs.window.filter
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 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"
|
||||
|
||||
wf_app = wf.new(false):setAppFilter(app, {currentSpace=true})
|
||||
wf_app = wf.new(false):setAppFilter(app, { currentSpace = true })
|
||||
|
||||
local wins = wf_app:getWindows()
|
||||
local count = 0
|
||||
for _ in pairs(wins) do count = count + 1 end
|
||||
|
||||
if (count > 0)
|
||||
then
|
||||
wf_app:getWindows()[1]:focus()
|
||||
else
|
||||
hs.osascript.applescript(string.format([[
|
||||
tell application "System Events" to tell process "%s"
|
||||
click menu item "New Finder Window" of menu "File" of menu bar 1
|
||||
set frontmost to true
|
||||
end tell
|
||||
]], app))
|
||||
for _ in pairs(wins) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
if count > 0 then
|
||||
wf_app:getWindows()[1]:focus()
|
||||
else
|
||||
hs.osascript.applescript(string.format(
|
||||
[[
|
||||
tell application "System Events" to tell process "%s"
|
||||
click menu item "New Finder Window" of menu "File" of menu bar 1
|
||||
set frontmost to true
|
||||
end tell
|
||||
]],
|
||||
app
|
||||
))
|
||||
end
|
||||
end)
|
||||
|
||||
-- Open new / focus existing terminal window in current desktop space
|
||||
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "T", function()
|
||||
-- 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 focusOrOpenGhostty()
|
||||
wf_ghostty = wf.new(false):setAppFilter("Ghostty", { currentSpace = true, visible = true })
|
||||
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "T", function()
|
||||
wf_iterm2 = wf.new(false):setAppFilter("iTerm2", {currentSpace=true, visible=true})
|
||||
local wins = wf_ghostty:getWindows()
|
||||
local count = 0
|
||||
for _ in pairs(wins) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
if count > 0 then
|
||||
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 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_iterm2:getWindows()[1]:focus()
|
||||
else
|
||||
hs.osascript.applescript([[
|
||||
tell application "iTerm"
|
||||
create window with default profile
|
||||
activate
|
||||
end tell
|
||||
]])
|
||||
tell application "iTerm"
|
||||
create window with default profile
|
||||
activate
|
||||
end tell
|
||||
]])
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
hs.hotkey.bind({ "cmd", "ctrl" }, "T", focusOrOpenGhostty)
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- Open new / focus existing browser window in current desktop space
|
||||
--------------------------------------------------------------------
|
||||
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "W", function()
|
||||
ffBrowser = "Firefox"
|
||||
chromiumBrowser = "Brave Browser"
|
||||
|
||||
-- wf_browser = wf.new(false):setAppFilter(browser, {currentSpace=true}):setScreens({hs.screen.mainScreen()})
|
||||
wf_browser = wf.new(false):setAppFilter(browser, {currentSpace=true})
|
||||
function focusOrOpenFirefox()
|
||||
-- assumes wf_browser is the name of a firefox-based browser
|
||||
wf_browser = wf.new(false):setAppFilter(ffBrowser, { currentSpace = true, visible = true })
|
||||
|
||||
local wins = wf_browser:getWindows()
|
||||
local count = 0
|
||||
for _ in pairs(wins) do count = count + 1 end
|
||||
|
||||
if (count > 0)
|
||||
then
|
||||
for _ in pairs(wins) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
if count > 0 then
|
||||
wf_browser:getWindows()[1]:focus()
|
||||
-- print(count)
|
||||
else
|
||||
hs.osascript.applescript(string.format([[
|
||||
tell application "%s"
|
||||
make new window
|
||||
activate
|
||||
end tell
|
||||
]], browser))
|
||||
-- for firefox:
|
||||
hs.osascript.applescript(string.format(
|
||||
[[
|
||||
tell application "System Events" to tell process "%s"
|
||||
click menu item "New Window" of menu "File" of menu bar 1
|
||||
set frontmost to true
|
||||
end tell
|
||||
]],
|
||||
ffBrowser
|
||||
))
|
||||
end
|
||||
end
|
||||
|
||||
function focusOrOpenChromium()
|
||||
-- assumes wf_browser is the name of a chromium-based browser
|
||||
wf_browser = wf.new(false):setAppFilter(chromiumBrowser, { currentSpace = true, visible = true })
|
||||
|
||||
local wins = wf_browser:getWindows()
|
||||
local count = 0
|
||||
for _ in pairs(wins) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
-- CHROMIUM-BASED BROWSERS ONLY: Open new tab to right of current browser
|
||||
|
||||
hs.hotkey.bind({"cmd", "option"}, "T", function()
|
||||
|
||||
local focusedAppName = hs.window.focusedWindow():application():title()
|
||||
|
||||
if focusedAppName == browser
|
||||
then
|
||||
hs.osascript.applescript(string.format([[
|
||||
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
|
||||
]], focusedAppName))
|
||||
if count > 0 then
|
||||
wf_browser:getWindows()[1]:focus()
|
||||
-- print(count)
|
||||
else
|
||||
hs.notify.new({title=string.format("%s not focused.", browser)}):send()
|
||||
hs.osascript.applescript(string.format(
|
||||
[[
|
||||
tell application "%s"
|
||||
make new window
|
||||
activate
|
||||
end tell
|
||||
]],
|
||||
chromiumBrowser
|
||||
))
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
hs.hotkey.bind({ "cmd", "ctrl" }, "W", focusOrOpenChromium)
|
||||
|
||||
-- CHROMIUM-BASED BROWSERS ONLY: Open new tab to right of currently-focused one
|
||||
-- NOTE: This can be replaced with a dedicated keybind in chromium system settings
|
||||
-- hs.hotkey.bind({"cmd", "option"}, "T", function()
|
||||
--
|
||||
-- local focusedAppName = hs.window.focusedWindow():application():title()
|
||||
--
|
||||
-- if focusedAppName == chromiumBrowser
|
||||
-- then
|
||||
-- hs.osascript.applescript(string.format([[
|
||||
-- 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
|
||||
-- ]], focusedAppName))
|
||||
-- else
|
||||
-- hs.notify.new({title=string.format("%s not focused.", browser)}):send()
|
||||
-- end
|
||||
-- end)
|
||||
|
||||
-- Open new / focus existing vscode window in current desktop space
|
||||
-- app = VSCodium or Code
|
||||
-- app = VSCodium, Code, or Cursor
|
||||
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 count = 0
|
||||
for _ in pairs(wins) do count = count + 1 end
|
||||
|
||||
if (count > 0)
|
||||
then
|
||||
wf_app:getWindows()[1]:focus()
|
||||
else
|
||||
|
||||
hs.osascript.applescript(string.format([[
|
||||
tell application "System Events" to tell process "%s"
|
||||
click menu item "New Window" of menu "File" of menu bar 1
|
||||
set frontmost to true
|
||||
end tell
|
||||
]], app))
|
||||
|
||||
for _ in pairs(wins) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
if count > 0 then
|
||||
wf_app:getWindows()[1]:focus()
|
||||
else
|
||||
hs.osascript.applescript(string.format(
|
||||
[[
|
||||
tell application "System Events" to tell process "%s"
|
||||
click menu item "New Window" of menu "File" of menu bar 1
|
||||
set frontmost to true
|
||||
end tell
|
||||
]],
|
||||
app
|
||||
))
|
||||
end
|
||||
end
|
||||
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "E", function()
|
||||
-- openVsCode("VSCodium")
|
||||
openVsCode("Code")
|
||||
end)
|
||||
---------------------------------------------------------------------------
|
||||
-- Focus or open editor of choice in current desktop space
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "V", function()
|
||||
-- superbinding to use multiple editors with a preferred order
|
||||
-- e.g. try to focus cursor (primarily) or vscode (secondarily), then open cursor if neither is open
|
||||
function tryFocusAnEditorInPreferredOrder()
|
||||
wf_zed = wf.new(false):setAppFilter("Zed", { 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_count = 0
|
||||
for _ in pairs(cursor_wins) do
|
||||
cursor_count = cursor_count + 1
|
||||
end
|
||||
|
||||
local vscode_wins = wf_vscode:getWindows()
|
||||
local vscode_count = 0
|
||||
for _ in pairs(vscode_wins) do
|
||||
vscode_count = vscode_count + 1
|
||||
end
|
||||
|
||||
if zed_count > 0 then
|
||||
wf_zed:getWindows()[1]:focus()
|
||||
elseif cursor_count > 0 then
|
||||
wf_cursor:getWindows()[1]:focus()
|
||||
elseif vscode_count > 0 then
|
||||
wf_vscode:getWindows()[1]:focus()
|
||||
else
|
||||
hs.osascript.applescript(string.format(
|
||||
[[
|
||||
tell application "System Events" to tell process "%s"
|
||||
click menu item "New Window" of menu "File" of menu bar 1
|
||||
set frontmost to true
|
||||
end tell
|
||||
]],
|
||||
"Zed"
|
||||
))
|
||||
end
|
||||
end
|
||||
|
||||
hs.hotkey.bind({ "cmd", "ctrl" }, "E", function()
|
||||
-- openVsCode("Cursor")
|
||||
-- openVsCode("Code")
|
||||
-- openVsCode("VSCodium")
|
||||
|
||||
-- No neovide function because it doesn't support system events (yet)
|
||||
hs.application.open("Neovide")
|
||||
tryFocusAnEditorInPreferredOrder()
|
||||
end)
|
||||
|
||||
|
||||
|
||||
-- Open new / focus existing g/n/mac/vim(r) window in current desktop space
|
||||
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "E", function()
|
||||
-- local app = "VimR"
|
||||
--
|
||||
-- wf_app = wf.new(false):setAppFilter(app, {currentSpace=true, visible=true})
|
||||
--
|
||||
-- local wins = wf_app:getWindows()
|
||||
-- local count = 0
|
||||
-- for _ in pairs(wins) do count = count + 1 end
|
||||
--
|
||||
-- if (count > 0)
|
||||
-- then
|
||||
-- wf_app:getWindows()[1]:focus()
|
||||
-- else
|
||||
-- hs.osascript.applescript(string.format([[
|
||||
-- tell application "System Events" to tell process "%s"
|
||||
-- click menu item "New Window" of menu "File" of menu bar 1
|
||||
-- set frontmost to true
|
||||
-- end tell
|
||||
-- ]], app))
|
||||
--
|
||||
-- end
|
||||
--
|
||||
-- local app = "VimR"
|
||||
--
|
||||
-- wf_app = wf.new(false):setAppFilter(app, {currentSpace=true, visible=true})
|
||||
--
|
||||
-- local wins = wf_app:getWindows()
|
||||
-- local count = 0
|
||||
-- for _ in pairs(wins) do count = count + 1 end
|
||||
--
|
||||
-- if (count > 0)
|
||||
-- then
|
||||
-- wf_app:getWindows()[1]:focus()
|
||||
-- else
|
||||
-- hs.osascript.applescript(string.format([[
|
||||
-- tell application "System Events" to tell process "%s"
|
||||
-- click menu item "New Window" of menu "File" of menu bar 1
|
||||
-- set frontmost to true
|
||||
-- end tell
|
||||
-- ]], app))
|
||||
--
|
||||
-- end
|
||||
--
|
||||
-- end)
|
||||
|
||||
-- APP-AGNOSTIC GLOBAL OPEN/FOCUS BINDINGS
|
||||
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "E", function() hs.application.open("Emacs") end)
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "O", function() hs.application.open("Obsidian") end)
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "R", function() hs.application.open("Obsidian") end)
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "A", function() hs.application.open("Apebrain") end)
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "N", function() hs.application.open("Obsidian") end)
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "C", function() hs.application.open("Numi") end)
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "S", function() hs.application.open("Signal") end)
|
||||
hs.hotkey.bind({"cmd", "ctrl"}, "G", function() hs.application.open("Godot") end)
|
||||
-- common apps
|
||||
-- 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" }, "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)
|
||||
hs.hotkey.bind({ "cmd", "ctrl" }, "A", function()
|
||||
switchToIfApplicationOpen("Telegram")
|
||||
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", "shift"}, "S", function() hs.application.open("Signal") 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" }, "J", function()
|
||||
switchToIfApplicationOpen("IntelliJ IDEA")
|
||||
end)
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "L", function() switchToIfApplicationOpen("Linear") end)
|
||||
hs.hotkey.bind({ "cmd", "ctrl" }, "L", function()
|
||||
switchToIfApplicationOpen("LTspice")
|
||||
end)
|
||||
|
||||
-- Clear clipboard
|
||||
|
||||
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "C", function()
|
||||
hs.hotkey.bind({ "cmd", "shift", "ctrl" }, "C", function()
|
||||
hs.pasteboard.setContents("")
|
||||
hs.notify.new({title="Cleared clipboard."}):send()
|
||||
hs.notify.new({ title = "Cleared clipboard." }):send()
|
||||
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)
|
||||
-- Retroactive note: it should be harder, not easier, to context-switch :P
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
-- function gotoDesktopNumber(desktop)
|
||||
-- local deskstr = string.format("Desktop %d", desktop)
|
||||
-- local index = 0
|
||||
-- for item in hs.spaces.spacesForScreen("Main") do
|
||||
-- if item == deskstr then
|
||||
-- break
|
||||
-- else
|
||||
-- index = index + 1
|
||||
-- end
|
||||
-- end
|
||||
-- print("INDEX ", index)
|
||||
-- hs.spaces.gotoSpace(index)
|
||||
-- end
|
||||
--
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "1", function() gotoDesktopNumber(1) end)
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "2", function() gotoDesktopNumber(2) end)
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "3", function() gotoDesktopNumber(3) end)
|
||||
-- hs.hotkey.bind({"cmd", "ctrl"}, "4", function() gotoDesktopNumber(4) end)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- SWITCH TO IF OPEN
|
||||
-- Switches to application if there's an instance of it open
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
function switchToIfWindowOpen(app)
|
||||
wf_app = wf.new(false):setAppFilter(app, { currentSpace = true, visible = true })
|
||||
|
||||
local wins = wf_app:getWindows()
|
||||
local count = 0
|
||||
for _ in pairs(wins) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
if count > 0 then
|
||||
wf_app:getWindows()[1]:focus()
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- SWITCH TO IF GLOBALLY OPEN
|
||||
-- Switches to application if there's an instance of it open
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
function switchToIfApplicationOpen(appName)
|
||||
local runningApps = hs.application.runningApplications()
|
||||
local isOpen = false
|
||||
for _, app in pairs(runningApps) do
|
||||
if app:name() == appName then
|
||||
isOpen = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if isOpen then
|
||||
hs.application.open(appName)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- KEY COMBO TO APPLICATION
|
||||
-- Sends keystrokes but only if the specified application is focused
|
||||
--------------------------------------
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
function sendKeyComboToApplication(appComboTable)
|
||||
|
||||
for appComboPair in ipairs(appComboTable) do
|
||||
|
||||
app = appComboPair[1]
|
||||
mods = appComboPair[2]
|
||||
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 count = 0
|
||||
for _ in pairs(wins) do count = count + 1 end
|
||||
|
||||
if (count > 0)
|
||||
then
|
||||
hs.eventtap.keyStroke(mods, key)
|
||||
for _ in pairs(wins) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
if count > 0 then
|
||||
hs.eventtap.keyStroke(mods, key)
|
||||
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)
|
||||
|
||||
-- -- Show Desktop (like windows or KDE)
|
||||
--
|
||||
--
|
||||
-- hs.hotkey.bind({"alt"}, "d", function()
|
||||
-- hs.eventtap.keyStroke({"fn"}, "f11")
|
||||
-- hs.eventtap.keyStroke({"fn"}, "f11")
|
||||
-- end)
|
||||
--
|
||||
--
|
||||
-- -- Switch Desktops (like windows or KDE)
|
||||
--
|
||||
--
|
||||
-- hs.hotkey.bind({"ctrl", "alt"}, "left", function()
|
||||
-- hs.eventtap.keyStroke({"ctrl"}, "left")
|
||||
-- hs.eventtap.keyStroke({"ctrl"}, "left")
|
||||
-- end)
|
||||
--
|
||||
--
|
||||
-- hs.hotkey.bind({"ctrl", "alt"}, "right", function()
|
||||
-- hs.eventtap.keyStroke({"ctrl"}, "right")
|
||||
-- hs.eventtap.keyStroke({"ctrl"}, "right")
|
||||
-- end)
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
-- -- Expose Windows (Mission Control)
|
||||
--
|
||||
-- hs.hotkey.bind({"alt"}, "tab", function()
|
||||
-- hs.application.open("Mission Control"):activate()
|
||||
--
|
||||
-- hs.hotkey.bind({"alt"}, "tab", function()
|
||||
-- hs.application.open("Mission Control"):activate()
|
||||
-- end)
|
||||
|
||||
|
||||
-- Move windows between displays
|
||||
|
||||
-- hs.hotkey.bind({"ctrl", "shift"}, "right", function()
|
||||
-- hs.window.focusedWindow():moveToScreen(hs.screen:next())
|
||||
-- hs.window.focusedWindow():moveToScreen(hs.screen:next())
|
||||
-- end)
|
||||
--
|
||||
--
|
||||
-- hs.hotkey.bind({"ctrl", "shift"}, "left", function()
|
||||
-- hs.window.focusedWindow():moveToScreen(hs.screen:previous())
|
||||
-- hs.window.focusedWindow():moveToScreen(hs.screen:previous())
|
||||
-- end)
|
||||
|
||||
|
||||
-- The ShiftIt Alternative (MOVED TO RECTANGLE)
|
||||
-- The ShiftIt Alternative
|
||||
|
||||
-- units = {
|
||||
-- right50 = { x = 0.50, y = 0.00, w = 0.50, h = 1.00 },
|
||||
@@ -281,7 +533,7 @@ end
|
||||
-- botleft50 = { x = 0.00, y = 0.50, w = 0.50, h = 0.50 },
|
||||
-- maximum = { x = 0.00, y = 0.00, w = 1.00, h = 1.00 }
|
||||
-- }
|
||||
--
|
||||
--
|
||||
-- mash = { 'shift', 'ctrl', 'cmd' }
|
||||
-- hs.hotkey.bind(mash, 'l', function() hs.window.focusedWindow():move(units.right50, nil, true) end)
|
||||
-- hs.hotkey.bind(mash, 'h', function() hs.window.focusedWindow():move(units.left50, nil, true) end)
|
||||
@@ -291,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.botleft50, 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
13
config/neovim/README.md
Normal 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/
|
||||
```
|
||||
201
config/neovim/init.lua
Normal file
201
config/neovim/init.lua
Normal 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
|
||||
@@ -1,168 +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 'ms-jpq/coq_nvim', {'branch': 'coq'}
|
||||
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 * :COQnow
|
||||
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
|
||||
|
||||
16
config/neovim/lazy-lock.json
Normal file
16
config/neovim/lazy-lock.json
Normal 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" }
|
||||
}
|
||||
@@ -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{}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
},
|
||||
"footprintAlpha" : {
|
||||
"float" : 0.30000001192092896
|
||||
"float" : 0.3
|
||||
},
|
||||
"footprintBorderWidth" : {
|
||||
"float" : 2
|
||||
@@ -65,7 +65,7 @@
|
||||
"float" : 0
|
||||
},
|
||||
"hideMenubarIcon" : {
|
||||
"bool" : false
|
||||
"bool" : true
|
||||
},
|
||||
"ignoredSnapAreas" : {
|
||||
"int" : 0
|
||||
@@ -146,7 +146,7 @@
|
||||
"bool" : false
|
||||
},
|
||||
"todo" : {
|
||||
"int" : 0
|
||||
"int" : 2
|
||||
},
|
||||
"todoApplication" : {
|
||||
|
||||
@@ -164,14 +164,22 @@
|
||||
"int" : 0
|
||||
},
|
||||
"windowSnapping" : {
|
||||
"int" : 1
|
||||
"int" : 2
|
||||
}
|
||||
},
|
||||
"shortcuts" : {
|
||||
"almostMaximize" : {
|
||||
"keyCode" : 43,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"bottomHalf" : {
|
||||
"keyCode" : 38,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"center" : {
|
||||
"keyCode" : 25,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"centerThird" : {
|
||||
"keyCode" : 3,
|
||||
"modifierFlags" : 786432
|
||||
@@ -184,6 +192,10 @@
|
||||
"keyCode" : 14,
|
||||
"modifierFlags" : 786432
|
||||
},
|
||||
"larger" : {
|
||||
"keyCode" : 24,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"lastThird" : {
|
||||
"keyCode" : 5,
|
||||
"modifierFlags" : 786432
|
||||
@@ -200,6 +212,10 @@
|
||||
"keyCode" : 46,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"maximizeHeight" : {
|
||||
"keyCode" : 29,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"nextDisplay" : {
|
||||
"keyCode" : 124,
|
||||
"modifierFlags" : 1441792
|
||||
@@ -212,6 +228,10 @@
|
||||
"keyCode" : 37,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"smaller" : {
|
||||
"keyCode" : 27,
|
||||
"modifierFlags" : 1441792
|
||||
},
|
||||
"topHalf" : {
|
||||
"keyCode" : 40,
|
||||
"modifierFlags" : 1441792
|
||||
|
||||
@@ -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
|
||||
@@ -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-
|
||||
@@ -1,84 +1,260 @@
|
||||
// Keybinds in here override the editor defaults
|
||||
|
||||
// Place your key bindings in this file to override the defaults
|
||||
[
|
||||
{
|
||||
"key": "cmd+1",
|
||||
"command": "workbench.action.openEditorAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+1",
|
||||
"command": "-workbench.action.openEditorAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "cmd+2",
|
||||
"command": "workbench.action.openEditorAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+2",
|
||||
"command": "-workbench.action.openEditorAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "cmd+3",
|
||||
"command": "workbench.action.openEditorAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+3",
|
||||
"command": "-workbench.action.openEditorAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "cmd+4",
|
||||
"command": "workbench.action.openEditorAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+4",
|
||||
"command": "-workbench.action.openEditorAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "cmd+5",
|
||||
"command": "workbench.action.openEditorAtIndex5"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+5",
|
||||
"command": "-workbench.action.openEditorAtIndex5"
|
||||
},
|
||||
{
|
||||
"key": "cmd+6",
|
||||
"command": "workbench.action.openEditorAtIndex6"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+6",
|
||||
"command": "-workbench.action.openEditorAtIndex6"
|
||||
},
|
||||
{
|
||||
"key": "cmd+7",
|
||||
"command": "workbench.action.openEditorAtIndex7"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+7",
|
||||
"command": "-workbench.action.openEditorAtIndex7"
|
||||
},
|
||||
{
|
||||
"key": "cmd+8",
|
||||
"command": "workbench.action.openEditorAtIndex8"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+8",
|
||||
"command": "-workbench.action.openEditorAtIndex8"
|
||||
},
|
||||
{
|
||||
"key": "cmd+9",
|
||||
"command": "workbench.action.openEditorAtIndex9"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+9",
|
||||
"command": "-workbench.action.openEditorAtIndex9"
|
||||
},
|
||||
{
|
||||
"key": "cmd",
|
||||
"command": "workbench.action.openEditorAtIndex"
|
||||
},
|
||||
{
|
||||
"key": "cmd+m",
|
||||
"command": "editor.action.toggleMinimap"
|
||||
}
|
||||
{
|
||||
"key": "cmd+1",
|
||||
"command": "workbench.action.openEditorAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+1",
|
||||
"command": "-workbench.action.openEditorAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "cmd+2",
|
||||
"command": "workbench.action.openEditorAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+2",
|
||||
"command": "-workbench.action.openEditorAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "cmd+3",
|
||||
"command": "workbench.action.openEditorAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+3",
|
||||
"command": "-workbench.action.openEditorAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "cmd+4",
|
||||
"command": "workbench.action.openEditorAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+4",
|
||||
"command": "-workbench.action.openEditorAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "cmd+5",
|
||||
"command": "workbench.action.openEditorAtIndex5"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+5",
|
||||
"command": "-workbench.action.openEditorAtIndex5"
|
||||
},
|
||||
{
|
||||
"key": "cmd+6",
|
||||
"command": "workbench.action.openEditorAtIndex6"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+6",
|
||||
"command": "-workbench.action.openEditorAtIndex6"
|
||||
},
|
||||
{
|
||||
"key": "cmd+7",
|
||||
"command": "workbench.action.openEditorAtIndex7"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+7",
|
||||
"command": "-workbench.action.openEditorAtIndex7"
|
||||
},
|
||||
{
|
||||
"key": "cmd+8",
|
||||
"command": "workbench.action.openEditorAtIndex8"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+8",
|
||||
"command": "-workbench.action.openEditorAtIndex8"
|
||||
},
|
||||
{
|
||||
"key": "cmd+9",
|
||||
"command": "workbench.action.openEditorAtIndex9"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+9",
|
||||
"command": "-workbench.action.openEditorAtIndex9"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+1",
|
||||
"command": "workbench.action.focusFirstEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+1",
|
||||
"command": "-workbench.action.focusFirstEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+3",
|
||||
"command": "workbench.action.focusThirdEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+3",
|
||||
"command": "-workbench.action.focusThirdEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+6",
|
||||
"command": "workbench.action.focusSixthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+6",
|
||||
"command": "-workbench.action.focusSixthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+7",
|
||||
"command": "workbench.action.focusSeventhEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+7",
|
||||
"command": "-workbench.action.focusSeventhEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+2",
|
||||
"command": "workbench.action.focusSecondEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+2",
|
||||
"command": "-workbench.action.focusSecondEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+4",
|
||||
"command": "workbench.action.focusFourthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+4",
|
||||
"command": "-workbench.action.focusFourthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+5",
|
||||
"command": "workbench.action.focusFifthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+5",
|
||||
"command": "-workbench.action.focusFifthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+8",
|
||||
"command": "workbench.action.focusEighthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+8",
|
||||
"command": "-workbench.action.focusEighthEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+0",
|
||||
"command": "workbench.action.focusLastEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "cmd+h",
|
||||
"command": "workbench.action.toggleAuxiliaryBar"
|
||||
},
|
||||
{
|
||||
"key": "cmd+g",
|
||||
"command": "git-graph.view"
|
||||
},
|
||||
{
|
||||
"key": "cmd+m",
|
||||
"command": "-markdown.extension.editing.toggleMath",
|
||||
"when": "editorTextFocus && !editorReadonly && editorLangId == 'markdown'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+tab",
|
||||
"command": "workbench.action.showPreviousWindowTab"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+tab",
|
||||
"command": "workbench.action.showNextWindowTab"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+tab",
|
||||
"command": "-workbench.action.quickOpenLeastRecentlyUsedEditorInGroup",
|
||||
"when": "!activeEditorGroupEmpty"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+tab",
|
||||
"command": "-workbench.action.quickOpenNavigatePreviousInEditorPicker",
|
||||
"when": "inEditorsPicker && inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+tab",
|
||||
"command": "-workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup",
|
||||
"when": "!activeEditorGroupEmpty"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+tab",
|
||||
"command": "-workbench.action.quickOpenNavigateNextInEditorPicker",
|
||||
"when": "inEditorsPicker && inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "shift+cmd+z",
|
||||
"command": "workbench.action.toggleZenMode"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+1",
|
||||
"command": "workbench.action.terminal.focusAtIndex1"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+2",
|
||||
"command": "workbench.action.terminal.focusAtIndex2"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+3",
|
||||
"command": "workbench.action.terminal.focusAtIndex3"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+4",
|
||||
"command": "workbench.action.terminal.focusAtIndex4"
|
||||
},
|
||||
{
|
||||
"key": "alt+c",
|
||||
"command": "workbench.panel.chatSidebar"
|
||||
},
|
||||
{
|
||||
"key": "shift+cmd+e",
|
||||
"command": "workbench.view.explorer",
|
||||
"when": "viewContainer.workbench.view.explorer.enabled"
|
||||
},
|
||||
{
|
||||
"key": "shift+cmd+e",
|
||||
"command": "-workbench.view.explorer",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
|
||||
139
config/vscode/settings-macos.json
Normal file
139
config/vscode/settings-macos.json
Normal file
@@ -0,0 +1,139 @@
|
||||
{
|
||||
"workbench.iconTheme": "material-icon-theme",
|
||||
"editor.fontFamily": "'CaskaydiaCove Nerd Font', Menlo, Monaco, 'Courier New', monospace",
|
||||
"editor.inlineSuggest.enabled": true,
|
||||
"latex-workshop.view.pdf.viewer": "tab",
|
||||
"github.copilot.enable": {
|
||||
"*": false,
|
||||
"yaml": false,
|
||||
"plaintext": false,
|
||||
"markdown": false,
|
||||
"go": false,
|
||||
"python": false,
|
||||
"html": true,
|
||||
"rust": false,
|
||||
"javascript": true,
|
||||
"lua": true,
|
||||
"typescript": false
|
||||
},
|
||||
"svelte.enable-ts-plugin": true,
|
||||
"git.enableSmartCommit": true,
|
||||
"git.confirmSync": false,
|
||||
"terminal.integrated.commandsToSkipShell": [
|
||||
"language-julia.interrupt"
|
||||
],
|
||||
"editor.guides.bracketPairs": true,
|
||||
"editor.bracketPairColorization.enabled": true,
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[svelte]": {
|
||||
"editor.defaultFormatter": "svelte.svelte-vscode",
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"workbench.editor.untitled.hint": "hidden",
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"workbench.settings.openDefaultKeybindings": true,
|
||||
"[yaml]": {
|
||||
"editor.defaultFormatter": "SimonSiefke.prettier-vscode"
|
||||
},
|
||||
"editor.fontLigatures": true,
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"[rust]": {
|
||||
"editor.defaultFormatter": "rust-lang.rust-analyzer"
|
||||
},
|
||||
"julia.enableTelemetry": true,
|
||||
"vscode-neovim.neovimExecutablePaths.darwin": "/opt/homebrew/bin/nvim --noplugin",
|
||||
"workbench.editorAssociations": {
|
||||
"*.wasm": "default",
|
||||
"*.stl": "default"
|
||||
},
|
||||
"workbench.productIconTheme": "material-product-icons",
|
||||
"rust-analyzer.inlayHints.typeHints.enable": false,
|
||||
"rust-analyzer.inlayHints.renderColons": false,
|
||||
"rust-analyzer.inlayHints.chainingHints.enable": false,
|
||||
"rust-analyzer.inlayHints.closingBraceHints.enable": false,
|
||||
"rust-analyzer.inlayHints.parameterHints.enable": false,
|
||||
"update.mode": "manual",
|
||||
"calva.keybindingsEnabled": false,
|
||||
//Add following lines of code to exclude the files & folders which aren't important for watchers to look for changes...
|
||||
//exludes files & folders in search indexing
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/bower_components": true,
|
||||
"**/env": true,
|
||||
"**/venv": true
|
||||
},
|
||||
//exludes files & folders for watcher service
|
||||
"files.watcherExclude": {
|
||||
"**/.git/objects/**": true,
|
||||
"**/.git/subtree-cache/**": true,
|
||||
"**/node_modules/**": true,
|
||||
"**/env/**": true,
|
||||
"**/venv/**": true,
|
||||
"env-*": true
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
"arduino.useArduinoCli": true,
|
||||
"arduino.path": "/opt/homebrew/bin/",
|
||||
"arduino.commandPath": "arduino-cli",
|
||||
"workbench.colorCustomizations": {
|
||||
"[Default Dark+]": {
|
||||
// "titleBar.activeBackground": "#883333",
|
||||
// "titleBar.inactiveBackground": "#aa5555"
|
||||
// "titleBar.activeBackground": "#3a6acc",
|
||||
// "titleBar.inactiveBackground": "#4a7add",
|
||||
|
||||
"titleBar.activeBackground": "#202020",
|
||||
"titleBar.border": "#242424",
|
||||
"editor.background": "#141414",
|
||||
"sideBar.background": "#191919",
|
||||
"activityBar.background": "#242424",
|
||||
"tab.inactiveBackground": "#202020",
|
||||
"tab.hoverBackground": "#323232",
|
||||
"statusBar.background": "#191919",
|
||||
"statusBar.noFolderBackground": "#622"
|
||||
}
|
||||
},
|
||||
"go.toolsManagement.autoUpdate": true,
|
||||
"extensions.ignoreRecommendations": true,
|
||||
"svelte.plugin.svelte.note-new-transformation": false,
|
||||
"diffEditor.ignoreTrimWhitespace": false,
|
||||
"window.confirmBeforeClose": "keyboardOnly",
|
||||
"cmake.configureOnOpen": true,
|
||||
"files.associations": {
|
||||
"*.i": "swiglang",
|
||||
"*.hpp": "cpp"
|
||||
},
|
||||
"C_Cpp.clang_format_fallbackStyle": "LLVM",
|
||||
"[c]": {
|
||||
|
||||
"editor.wordBasedSuggestions": false,
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.semanticHighlighting.enabled": true,
|
||||
"editor.quickSuggestions": {
|
||||
"comments": "on",
|
||||
"strings": "on",
|
||||
"other": "on"
|
||||
}
|
||||
},
|
||||
"clangd.path": "/opt/homebrew/opt/llvm/bin/clangd",
|
||||
"julia.symbolCacheDownload": true,
|
||||
"calva.paredit.defaultKeyMap": "strict",
|
||||
"jupyter.askForKernelRestart": false,
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "SimonSiefke.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "SimonSiefke.prettier-vscode"
|
||||
}
|
||||
}
|
||||
66
config/zed/keymap.json
Normal file
66
config/zed/keymap.json
Normal 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
70
config/zed/settings.json
Normal 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",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
export PATH=$HOME/.bin:/usr/local/bin:$HOME/go/bin:$HOME/.cargo/bin:$PATH:$HOME/.yarn/bin:/opt/homebrew/opt/libpq/bin:/Applications/Julia-1.7.app/Contents/Resources/julia/bin/:/Applications/love.app/Contents/MacOS/:~/.emacs.d/bin/:/opt/homebrew/opt/llvm/bin
|
||||
export PATH=$HOME/.bin:$HOME/.scripts:/usr/local/bin:$HOME/go/bin:$HOME/.cargo/bin:/opt/homebrew/opt/llvm/bin:$PATH:$HOME/.yarn/bin:$HOME/.local/bin:/opt/homebrew/opt/libpq/bin:/Applications/Julia-1.7.app/Contents/Resources/julia/bin/:/Applications/love.app/Contents/MacOS/:~/.emacs.d/bin/:/opt/homebrew/opt/llvm/bin:$HOME/opt/android-sdk/cmdline-tools/latest/bin:$HOME/opt/android-sdk/cmdline-tools/latest/platform-tools:$HOME/.nimble/bin:/nix/var/nix/profiles/default/bin:$HOME/opt/android-sdk/platform-tools:~/.nix-profile/bin
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="/Users/michael/.oh-my-zsh"
|
||||
@@ -69,16 +69,19 @@ COMPLETION_WAITING_DOTS="true"
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git)
|
||||
plugins=(git nix-zsh-completions)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
source ~/.secrets
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
# export ANDROID_SDK_ROOT=$HOME/Library/Android
|
||||
export ANDROID_HOME=$HOME/opt/android-sdk
|
||||
export ANDROID_SDK_ROOT=$HOME/opt/android-sdk
|
||||
|
||||
export DOCKER_HOST=ssh://root@147.182.184.116
|
||||
# export DOCKER_HOST=ssh://mlisano@rocktiplex.michaellisano.com
|
||||
# export DOCKER_HOST=ssh://mlisano@172.222.128.221:2202
|
||||
# export DOCKER_HOST="unix://$HOME/.colima/docker.sock"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
@@ -94,13 +97,21 @@ fi
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# ENV VARS
|
||||
export ENV=dev
|
||||
export CHROME_PATH="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
|
||||
export ANDROID_SDK_ROOT="/opt/homebrew/Caskroom/android-sdk/4333796/"
|
||||
export ANDROID=""
|
||||
export VCPKG_ROOT="$HOME/.vcpkg-install"
|
||||
|
||||
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib -I/opt/homebrew/opt/openblas/lib"
|
||||
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include -I/opt/homebrew/opt/openblas/include"
|
||||
export PIPENV_VERBOSITY=-1
|
||||
export DOCKER_BUILDKIT=1
|
||||
|
||||
# For Nim
|
||||
# export CPATH=$CPATH:$LD_LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
|
||||
# export LIBRARY_PATH=$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
|
||||
# export LIBRARY_DIRS=$LIBRARY_DIRS:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
|
||||
# export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/opt/openssl/lib/
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
@@ -114,10 +125,14 @@ alias ls=lsd
|
||||
alias vim=nvim
|
||||
alias qr=qrencode
|
||||
alias youtube-dl=yt-dlp
|
||||
alias yt-dlp-flac='yt-dlp -x --audio-format flac'
|
||||
alias yt-dlp-mp3='yt-dlp -x --audio-format mp3'
|
||||
alias yt-flac='yt-dlp -x --audio-format flac'
|
||||
alias yt-mp3='yt-dlp -x --audio-format mp3'
|
||||
alias yt-720='yt-dlp -f "best[height=720]"'
|
||||
alias http-server='python3 -m http.server'
|
||||
|
||||
# personal pandoc prefs
|
||||
alias ppandoc='pandoc -V geometry:margin=0.65in'
|
||||
|
||||
# use ssh kitten, but only if using kitty terminal
|
||||
if [[ $TERM == 'xterm_kitty' ]]; then
|
||||
alias ssh=kitty +kitten ssh
|
||||
@@ -131,6 +146,12 @@ alias del=mvTrash
|
||||
alias trash=mvTrash
|
||||
alias copy=pbcopy
|
||||
alias rosetta="arch -x86_64"
|
||||
alias notes="cd ~/Documents/Notes/ && nvim -c 'set wrap' && cd"
|
||||
alias todo="cd ~/Documents/Notes/todo && nvim && cd"
|
||||
alias vc="$EDITOR ~/.config/nvim/init.lua"
|
||||
alias zc="$EDITOR ~/.zshrc"
|
||||
alias sc="$EDITOR ~/.ssh/config"
|
||||
alias cb=chatblade
|
||||
|
||||
# Starship
|
||||
eval "$(starship init zsh)"
|
||||
@@ -141,5 +162,32 @@ eval "$(starship init zsh)"
|
||||
|
||||
autoload bashcompinit
|
||||
bashcompinit
|
||||
source /Users/michael/.vcpkg-install/scripts/vcpkg_completion.zsh
|
||||
|
||||
[ -f "/Users/michael/.ghcup/env" ] && source "/Users/michael/.ghcup/env" # ghcup-env
|
||||
|
||||
alias arc='cd ~/.opt/arc3.2/ && racket -f as.scm'
|
||||
alias docker-image-clean="docker image rm $(docker image ls | grep '<none>' | awk '{print $3}' | tr '\n' ' ')"
|
||||
alias docker-container-clean="docker container rm $(docker container ls -a | grep 'Exited (' | awk '{print $1}' | tr '\n' ' ')"
|
||||
alias cowquote='quote=$(curl -m 0.5 -s https://api.quotable.io/random); cowsay "$(echo $quote | jq -M .content) --$(echo $quote | jq -rM .author)"'
|
||||
alias oi='interpreter'
|
||||
|
||||
# remote hosts
|
||||
alias st='ssh thonkpad'
|
||||
alias sr='ssh rocktiplex'
|
||||
alias sso='ssh supernova.ocf'
|
||||
alias sto='ssh tsunami.ocf'
|
||||
alias sho='ssh hurricane.ocf'
|
||||
alias styo='ssh typhoon.ocf'
|
||||
|
||||
# completions
|
||||
source ~/.kube-zsh-completion
|
||||
source ~/.ignite-zsh-completion
|
||||
|
||||
# Codon compiler path (added by install script)
|
||||
export PATH=$PATH:/Users/michael/.codon/bin
|
||||
|
||||
# quote lmao
|
||||
|
||||
|
||||
# opam
|
||||
[[ ! -r /Users/michael/.opam/opam-init/init.zsh ]] || source /Users/michael/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
|
||||
|
||||
23
preamble/latex/global.sty
Normal file
23
preamble/latex/global.sty
Normal file
@@ -0,0 +1,23 @@
|
||||
\newcommand{\pderiv}[1] {\frac{\partial}{\partial #1}}
|
||||
\newcommand{\pderivf}[2] {\frac{\partial #1}{\partial #2}}
|
||||
\newcommand{\pderivs}[1] {\frac{\partial^2}{\partial {#1}^2}}
|
||||
\newcommand{\pderivfs}[2] {\frac{\partial {#1}^2}{\partial {#2}^2}}
|
||||
\newcommand{\pderivho}[2] {\frac{\partial^2}{\partial #1 \partial {#2}}}
|
||||
\newcommand{\pderivfho}[3] {\frac{\partial^2 #1}{\partial #2 \partial #3}}
|
||||
\newcommand{\deriv}[1] {\frac{\mathrm{d}}{\mathrm{d} #1}}
|
||||
\newcommand{\derivs}[1] {\frac{\mathrm{d}^2}{\mathrm{d} {#1}^2}}
|
||||
\newcommand{\derivf}[2] {\frac{\mathrm{d} #1}{\mathrm{d} #2}}
|
||||
\newcommand{\derivfs}[2] {\frac{\mathrm{d} {#1}^2}{\mathrm{d} {#2}^2}}
|
||||
\newcommand{\paren}[1] {\left( #1 \right)}
|
||||
\newcommand{\anglebrack}[1] {\left\langle #1 \right\rangle}
|
||||
\newcommand{\abrack}[1] {\left\langle #1 \right\rangle}
|
||||
\newcommand{\curly}[1] {\left\{ #1 \right\}}
|
||||
\newcommand{\curlybrack}[1] {\left\{ #1 \right\}}
|
||||
\newcommand{\cbrack}[1] {\left\{ #1 \right\}}
|
||||
\newcommand{\squarebrack}[1] {\left[ #1 \right]}
|
||||
\newcommand{\sqbrack}[1] {\left[ #1 \right]}
|
||||
\newcommand{\sbrack}[1] {\left[ #1 \right]}
|
||||
\newcommand{\brackets}[1] {\left[ #1 \right]}
|
||||
\newcommand{\d}[1]{\mathrm{d}#1}
|
||||
\newcommand{\bb}[1] {\mathbb{#1}}
|
||||
|
||||
28
preamble/sagemath/global.sage
Normal file
28
preamble/sagemath/global.sage
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copy to ~/.global.sage
|
||||
|
||||
from subprocess import run
|
||||
|
||||
ht_filename = "/tmp/mathtemp.html"
|
||||
|
||||
|
||||
def wv(expr):
|
||||
"""
|
||||
View an expression as LaTeX -> mathjax+html in a browser tab
|
||||
"""
|
||||
with open(ht_filename, "w") as f:
|
||||
f.write(f"""
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="UTF-8" />
|
||||
<head><title>vis</title></head>
|
||||
<body>
|
||||
<div style="font-size:140%;margin-top:30px;">
|
||||
$${latex(expr)}$$
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
</html>
|
||||
""")
|
||||
run(["open", ht_filename])
|
||||
|
||||
79
scripts/ntfy-cmd
Executable file
79
scripts/ntfy-cmd
Executable 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
36
scripts/ntfy-msg
Executable 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
|
||||
|
||||
20
scripts/projects-prune.sh
Executable file
20
scripts/projects-prune.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# PROJECT DIR PRUNING SCRIPT
|
||||
# Lists projects in current directory with a clean git status,
|
||||
# sorted in reverse by date modified
|
||||
|
||||
printf "%-40s%-20s%s\n" 'Clean git, oldest to newest' 'Date Modified' 'Size'
|
||||
printf "%-40s%-20s%s\n" '===========================' '=============' '===='
|
||||
|
||||
for pdir in $(ls -r1dt */); do
|
||||
cd $pdir
|
||||
git status 2> /dev/null | grep 'nothing to commit, working tree clean' 1> /dev/null
|
||||
if [ "$?" == "0" ]; then
|
||||
dirModDate=$(date -r . +"%m/%d/%Y")
|
||||
dirSize=$(du -sh . | awk '{print $1}')
|
||||
printf "%-40s\e[32m%-20s\e[0m%s\n" $pdir $dirModDate $dirSize
|
||||
fi
|
||||
cd ..
|
||||
done
|
||||
|
||||
13
scripts/tmux2
Executable file
13
scripts/tmux2
Executable 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
|
||||
Reference in New Issue
Block a user