master
michael 2022-12-15 16:39:50 -08:00
parent 485c5237dc
commit a695ed26c7
17 changed files with 1483 additions and 70 deletions

44
.gitignore vendored
View File

@ -1,3 +1,6 @@
# other stuff
*.swp
# General
.DS_Store
.AppleDouble
@ -25,5 +28,42 @@ Network Trash Folder
Temporary Items
.apdisk
# other stuff
*.swp
# 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
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

View File

@ -4,25 +4,26 @@
![Fedora](https://img.shields.io/badge/Fedora-294172?style=for-the-badge&logo=fedora&logoColor=white)
![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)
Here, we may observe the turtlebasket in its natural habitat.
## Contents
## MacOS
- [Configs](./config/)
- [Old setup stuff](./setup/)
- [Misc. scripts](./scripts/)
### Software List (All FOSS)
## Software List
### MacOS
- [Hammerspoon](https://www.hammerspoon.org/)
- [Rectangle](https://github.com/rxhanson/Rectanglehttps://github.com/rxhanson/Rectangle)
- [MiddleClick](https://github.com/artginzburg/MiddleClick-BigSur)
- [LinearMouse] (https://linearmouse.org/)
- [LinearMouse](https://linearmouse.org/)
- [AltTab MacOS](https://github.com/lwouis/alt-tab-macos)
## Windows
### Software List
### Windows
- AutoHotKey
- Windows Terminal
- ShareX
- Powershell Core
- Windows Terminal
- WSL (native feature)

View File

@ -72,7 +72,8 @@ end)
hs.hotkey.bind({"cmd", "ctrl"}, "W", function()
wf_browser = wf.new(false):setAppFilter(browser, {currentSpace=true, visible=true})
-- wf_browser = wf.new(false):setAppFilter(browser, {currentSpace=true}):setScreens({hs.screen.mainScreen()})
wf_browser = wf.new(false):setAppFilter(browser, {currentSpace=true})
local wins = wf_browser:getWindows()
local count = 0
@ -112,10 +113,8 @@ hs.hotkey.bind({"cmd", "option"}, "T", function()
end)
-- Open new / focus existing vscode window in current desktop space
hs.hotkey.bind({"cmd", "ctrl"}, "V", function()
local app = "Code"
-- app = VSCodium or Code
function openVsCode(app)
wf_app = wf.new(false):setAppFilter(app, {currentSpace=true, visible=true})
local wins = wf_app:getWindows()
@ -136,39 +135,59 @@ hs.hotkey.bind({"cmd", "ctrl"}, "V", function()
end
end
hs.hotkey.bind({"cmd", "ctrl"}, "E", function()
-- openVsCode("VSCodium")
openVsCode("Code")
end)
hs.hotkey.bind({"cmd", "ctrl"}, "V", function()
-- openVsCode("Code")
-- openVsCode("VSCodium")
-- No neovide function because it doesn't support system events (yet)
hs.application.open("Neovide")
end)
-- Open new / focus existing g/n/mac/vim(r) window in current desktop space
hs.hotkey.bind({"cmd", "ctrl"}, "E", function()
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)
-- 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
--
-- 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)
-- Clear clipboard
@ -178,6 +197,34 @@ hs.hotkey.bind({"cmd", "shift", "ctrl"}, "C", function()
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})
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)
end
end
end
-------------------
-- A R C H I V E --
-------------------
@ -244,4 +291,4 @@ 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)
-- hs.hotkey.bind(mash, 'm', function() hs.window.focusedWindow():move(units.maximum, nil, true) end)

File diff suppressed because it is too large Load Diff

View File

@ -33,18 +33,25 @@ 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 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'akinsho/toggleterm.nvim', {'tag' : 'v1.*'}
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" 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')
lua require('plugins')
" Theming
set termguicolors
@ -61,6 +68,10 @@ 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
@ -81,6 +92,14 @@ 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

View File

@ -0,0 +1,8 @@
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{}

View File

@ -4,7 +4,30 @@
| --- | --- |
| macOS | `/Users/michael/Library/Application Support/VSCodium/User` |
## Theme Customizations
## Pure Dark Theme
Slight, cleaner variation on original Dark+ theme
![](../../img/vscodetheme.png)
```json
"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"
}
},
```
## Code/Codium Differentiator
Red titlebar to distinguish VSCode windows (Codium preferred):
@ -17,3 +40,4 @@ Red titlebar to distinguish VSCode windows (Codium preferred):
}
```

View File

@ -1,5 +1,4 @@
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH:$HOME/Library/Python/3.8/bin:$HOME/go/bin:$HOME/Documents/avalanchego
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
# Path to your oh-my-zsh installation.
export ZSH="/Users/michael/.oh-my-zsh"
@ -23,14 +22,13 @@ export ZSH="/Users/michael/.oh-my-zsh"
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
@ -45,9 +43,10 @@ export ZSH="/Users/michael/.oh-my-zsh"
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
# COMPLETION_WAITING_DOTS="true"
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
@ -77,34 +76,70 @@ source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# export ANDROID_SDK_ROOT=$HOME/Library/Android
export DOCKER_HOST=ssh://root@147.182.184.116
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ENV VARS
export CHROME_PATH="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
export ANDROID_SDK_ROOT="/opt/homebrew/Caskroom/android-sdk/4333796/"
export VCPKG_ROOT="$HOME/.vcpkg-install"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
export PIPENV_VERBOSITY=-1
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias nvide=/Applications/Neovide.app/Contents/MacOS/neovide
alias python3=/opt/homebrew/bin/python3
alias py=ptpython
alias ls=lsd
alias vim=nvim
alias clip=pbcopy
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 http-server='python3 -m http.server'
# Custom variables
export DOTNET_ROOT="/usr/local/opt/dotnet/libexec"
# use ssh kitten, but only if using kitty terminal
if [[ $TERM == 'xterm_kitty' ]]; then
alias ssh=kitty +kitten ssh
fi
# load starship
mvTrash() {
mv "$@" ~/.Trash/
}
alias del=mvTrash
alias trash=mvTrash
alias copy=pbcopy
alias rosetta="arch -x86_64"
# Starship
eval "$(starship init zsh)"
# opam configuration
[[ ! -r /Users/michael/.opam/opam-init/init.zsh ]] || source /Users/michael/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
autoload bashcompinit
bashcompinit
source /Users/michael/.vcpkg-install/scripts/vcpkg_completion.zsh

View File

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

BIN
img/vscodetheme.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB