Compare commits

...

18 Commits

Author SHA1 Message Date
b78b742927 feat(zsh): added brew bundle alias as bb 2025-10-14 02:14:18 +01:00
b07e1552c1 feat(zsh): use starship prompt 2025-10-14 02:13:57 +01:00
404c0ce7ea feat(zsh): make java_home conditional on java being installed 2025-10-14 02:13:41 +01:00
bbbc990eea feat(tmux): remove themes and add tmux-fingers and remove path bug 2025-10-14 02:13:06 +01:00
7b5100c2e8 fix(karabiner): fix new behaviour in macos 26 of fn key 2025-10-14 02:12:45 +01:00
fdcb1a41a1 fix(ghostty): fix theme names 2025-10-14 02:12:20 +01:00
627a27c83a feat(aerospace): add floating to brave and opencloud 2025-10-14 02:12:10 +01:00
5cba2ba22b feat(nvim): housekeeping 2025-10-14 02:11:52 +01:00
3f6eee04e6 fix(tmux): fix order of path exports 2025-06-30 08:28:17 +01:00
454a135b2b feat(nvim): add tinymist and typst-preview.nvim 2025-06-30 08:27:31 +01:00
74fe30229d feat(zsh): add theme.zsh and setup-history.zsh 2025-06-16 11:23:47 +01:00
15eaaf8b17 chore(scripts): cleanup change-theme.sh 2025-06-16 09:24:14 +01:00
ebe7a7effb chore(zsh): cleanup some of the config 2025-06-16 09:24:03 +01:00
dacffcdc35 chore(nvim): remove core.theme 2025-06-16 09:23:10 +01:00
8d6f4190fd feat(tmux): cleanup config and make it portable across terminal themes 2025-06-16 09:22:55 +01:00
13ae0c0e78 chore(nvim): other stuff 2025-06-16 09:22:33 +01:00
48459eb333 chore(nvim): cleanup 2025-06-16 09:22:05 +01:00
5e13848fe3 chore(ghostty): Add dark and light theme 2025-06-16 09:21:26 +01:00
31 changed files with 366 additions and 849 deletions

View File

@@ -1,54 +1,50 @@
tap "homebrew/autoupdate" # Casks
tap "homebrew/bundle" cask "aerospace"
tap "homebrew/services" cask "jordanbaird-ice@beta"
tap "nikitabobko/tap" cask "monitorcontrol"
cask "opencloud"
cask "sioyek"
cask "wireshark-app"
cask "airbuddy"
cask "karabiner-elements"
cask "mos"
cask "prismlauncher"
cask "stremio"
cask "zen"
cask "bettertouchtool"
cask "flameshot"
cask "keyboard-cleaner"
cask "notchnook"
cask "qbittorrent"
cask "stretchly"
cask "brave-browser"
cask "hot"
cask "obs"
cask "qmk-toolbox"
cask "tailscale-app"
cask "zotero"
cask "discord"
cask "iina"
cask "obsidian"
cask "raycast"
# Tools
brew "atuin"
brew "bat"
brew "btop" brew "btop"
brew "htop" brew "htop"
brew "cmake"
brew "coreutils", link: false
brew "dart-sdk", link: false
brew "duf"
brew "eza" brew "eza"
brew "fd" brew "fd"
brew "fzf" brew "fzf"
brew "gcc"
brew "git" brew "git"
brew "git-delta" brew "git-delta"
brew "git-lfs" brew "gnu-tar"
brew "lazygit" brew "lazygit"
brew "llvm" brew "iperf3"
brew "neovim" brew "ncdu"
brew "openjdk@17"
brew "openssh" brew "openssh"
brew "pandoc"
brew "ripgrep" brew "ripgrep"
brew "rustup" brew "starship"
brew "shellcheck"
brew "texlive", link: false
brew "tmux"
brew "watch"
brew "wget" brew "wget"
cask "aerospace" brew "zsh"
cask "bartender"
cask "discord"
cask "element"
cask "firefox"
cask "flameshot"
cask "font-fira-mono-nerd-font"
cask "font-jetbrains-mono-nerd-font"
cask "iina"
cask "karabiner-elements"
cask "mos"
cask "nextcloud"
cask "notchnook"
cask "obs"
cask "obs-ndi"
cask "obsidian"
cask "raycast"
cask "skim"
cask "stremio"
cask "thunderbird"
cask "wezterm"
cask "wireshark"
cask "zotero"
cask "bitwarden"
cask "wireguard-tools"

View File

@@ -42,6 +42,10 @@ if.app-id = 'org.mozilla.firefox'
if.window-title-regex-substring = 'Picture-in-Picture' if.window-title-regex-substring = 'Picture-in-Picture'
run = 'layout floating' run = 'layout floating'
[[on-window-detected]]
if.app-id = 'com.brave.Browser'
run = 'layout floating'
[[on-window-detected]] [[on-window-detected]]
if.app-id = 'app.zen-browser.zen' if.app-id = 'app.zen-browser.zen'
if.window-title-regex-substring = 'Picture-in-Picture' if.window-title-regex-substring = 'Picture-in-Picture'
@@ -64,6 +68,10 @@ run = 'layout floating'
if.app-id = 'org.wireshark.Wireshark' if.app-id = 'org.wireshark.Wireshark'
run = 'layout tiling' run = 'layout tiling'
[[on-window-detected]]
if.app-id = 'eu.opencloud.desktop'
run = 'layout tiling'
[mode.service.binding] [mode.service.binding]
u = ['reload-config', 'mode main'] u = ['reload-config', 'mode main']

View File

@@ -1,5 +1,5 @@
# Theme # Theme
theme = GruvboxDarkHard theme = dark:Gruvbox Dark Hard,light:Atom One Light
# Font # Font
font-family = IosevkaDT Nerd Font font-family = IosevkaDT Nerd Font
@@ -13,6 +13,5 @@ font-feature = -dlig
window-padding-color = background window-padding-color = background
macos-titlebar-style = hidden macos-titlebar-style = hidden
term = "xterm-256color" quit-after-last-window-closed = true
auto-update = download auto-update = download

View File

@@ -967,6 +967,10 @@
{ {
"from": { "key_code": "right_option" }, "from": { "key_code": "right_option" },
"to": [{ "apple_vendor_top_case_key_code": "keyboard_fn" }] "to": [{ "apple_vendor_top_case_key_code": "keyboard_fn" }]
},
{
"from": { "apple_vendor_top_case_key_code": "keyboard_fn" },
"to": [{ "key_code": "left_control" }]
} }
] ]
}, },

View File

@@ -2,5 +2,4 @@ require("core.variables")
require("core.keymaps") require("core.keymaps")
require("core.autocmds") require("core.autocmds")
require('core.package_manager') require('core.package_manager')
require('core.theme')
require('winbar') require('winbar')

View File

@@ -1,6 +0,0 @@
vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background="hard"
vim.g.gruvbox_material_foreground="original"
vim.g.gruvbox_material_transparent_background=2
vim.opt.background="dark"
vim.cmd('colorscheme gruvbox-material')

View File

@@ -9,7 +9,7 @@ vim.opt.wrap = false -- Disable line wrapping
vim.opt.conceallevel = 2 -- Hide Org mode links (assuming you use Org mode) vim.opt.conceallevel = 2 -- Hide Org mode links (assuming you use Org mode)
vim.opt.concealcursor = 'nc' -- Conceal text in normal mode only vim.opt.concealcursor = 'nc' -- Conceal text in normal mode only
vim.opt.signcolumn = "yes" -- Always show the sign column vim.opt.signcolumn = "yes" -- Always show the sign column
vim.o.laststatus = 1 -- Always show the status line (Note: original had '1', consider '2' for always visible) vim.o.laststatus = 1 -- Always show the status line
vim.o.winborder = nil -- Use default border for floating windows vim.o.winborder = nil -- Use default border for floating windows
-- Indentation -- Indentation
@@ -38,4 +38,4 @@ vim.opt.autoread = true -- Automatically
vim.opt.swapfile = false -- Disable swap files vim.opt.swapfile = false -- Disable swap files
-- Formatting -- Formatting
vim.opt.formatoptions:remove("ro") -- Remove 'ro' from formatoptions (assuming you don't want auto-wrapping comments) vim.opt.formatoptions:remove("ro") -- Remove 'ro' from formatoptions

View File

@@ -8,9 +8,6 @@ return {
}, },
version = '*', version = '*',
opts = { opts = {
enabled = function()
return not (string.find(vim.bo.filetype, "himalaya") or string.find(vim.bo.filetype, "mail"))
end,
keymap = { keymap = {
preset = 'default', preset = 'default',
['<Up>'] = {}, ['<Up>'] = {},

View File

@@ -10,5 +10,9 @@ return {
priority = 1000 priority = 1000
}, },
{ "blazkowolf/gruber-darker.nvim" }, { "blazkowolf/gruber-darker.nvim" },
{ "sainnhe/everforest" } { "sainnhe/everforest" },
{
"navarasu/onedark.nvim",
priority = 1000,
}
} }

View File

@@ -19,28 +19,6 @@ return {
event = "VeryLazy", event = "VeryLazy",
opts = {} opts = {}
}, },
{
"ray-x/go.nvim",
dependencies = {
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function(lp, opts)
require("go").setup(opts)
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
require('go.format').goimports()
end,
group = format_sync_grp,
})
end,
event = { "CmdlineEnter" },
ft = { "go", 'gomod' },
build = ':lua require("go.install").update_all_sync()'
},
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = { dependencies = {
@@ -115,10 +93,14 @@ return {
assignVariablesTypes = true, assignVariablesTypes = true,
compositeLiteralFields = true, compositeLiteralFields = true,
compositeLiteralTypes = true, compositeLiteralTypes = true,
completeUnimported = true,
constantValues = true, constantValues = true,
functionTypeParameters = true, functionTypeParameters = true,
parameterNames = true, parameterNames = true,
rangeVariableTypes = true rangeVariableTypes = true,
analyses = {
unusedparams = true,
}
}, },
} }
} }
@@ -150,9 +132,9 @@ return {
capabilities = capabilities, capabilities = capabilities,
filetypes = { 'haskell', 'lhaskell', 'cabal' }, filetypes = { 'haskell', 'lhaskell', 'cabal' },
}) })
-- lspconfig["clangd"].setup({ vim.lsp.config['clangd'].capabilities = capabilities
-- capabilities = capabilities, vim.lsp.enable('clangd')
-- })
lspconfig["texlab"].setup({ lspconfig["texlab"].setup({
capabilities = capabilities, capabilities = capabilities,
}) })
@@ -165,34 +147,47 @@ return {
lspconfig["pyright"].setup({ lspconfig["pyright"].setup({
capabilities = capabilities, capabilities = capabilities,
}) })
vim.lsp.config["tinymist"] = {
capabilities = capabilities,
settings = {
-- exportPdf = "onType",
-- outputPath = "$root/$name",
formatterMode = "typstyle",
fontPaths = {
"./fonts"
}
},
on_attach = function(client, bufnr)
vim.keymap.set("n", "<leader>tp", function()
client:exec_cmd({
title = "pin",
command = "tinymist.pinMain",
arguments = { vim.api.nvim_buf_get_name(0) },
}, { bufnr = bufnr })
end, { desc = "[T]inymist [P]in", noremap = true })
vim.keymap.set("n", "<leader>tu", function()
client:exec_cmd({
title = "unpin",
command = "tinymist.pinMain",
arguments = { vim.v.null },
}, { bufnr = bufnr })
end, { desc = "[T]inymist [U]npin", noremap = true })
end,
}
vim.lsp.enable("tinymist")
vim.lsp.config['nil_ls'].capabilities = capabilities
vim.lsp.enable('nil_ls')
end, end,
}, },
{ {
'mrcjkb/rustaceanvim', 'chomosuke/typst-preview.nvim',
version = '^5', ft = 'typst',
lazy = false version = '1.*',
opts = {
extra_args = {"--font-path=fonts"},
invert_colors = '{"rest": "auto","image": "never"}'
}, },
{
"rcarriga/nvim-dap-ui",
event = "VeryLazy",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
local dap = require("dap")
local dapui = require("dapui")
dapui.setup()
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
end
},
{
"mfussenegger/nvim-dap",
}, },
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",

View File

@@ -25,7 +25,14 @@ return {
statuscolumn = { enabled = true }, statuscolumn = { enabled = true },
dashboard = { enabled = true }, dashboard = { enabled = true },
input = { enabled = true }, input = { enabled = true },
image = { enabled = true }, image = {
doc = {
inline = false,
float = true,
max_width = 10,
max_height = 5,
}
},
lazygit = { lazygit = {
vim.keymap.set('n', '<leader>lg', function() vim.keymap.set('n', '<leader>lg', function()
Snacks.lazygit.open() Snacks.lazygit.open()
@@ -58,5 +65,29 @@ return {
switch = "<leader>wts", switch = "<leader>wts",
} }
} }
},
{
"afonsofrancof/osc11.nvim",
dev = false,
dependencies = {
"navarasu/onedark.nvim",
},
opts = {
on_dark = function()
vim.g.gruvbox_material_better_performance = 1
vim.g.gruvbox_material_background = "hard"
vim.g.gruvbox_material_foreground = "original"
vim.g.gruvbox_material_transparent_background = 2
vim.opt.background = "dark"
vim.cmd('colorscheme gruvbox-material')
end,
on_light = function()
require('onedark').setup {
style = 'light'
}
-- Enable theme
require('onedark').load()
end,
}
} }
} }

View File

@@ -1,14 +1,5 @@
return { return {
-- {
-- "vimpostor/vim-tpipeline",
-- config = function()
-- vim.g.tpipeline_restore = 0
-- vim.g.tpipeline_autoembed = 0
-- vim.o.laststatus = 0
-- vim.g.tpipeline_statusline = '%=%l:%c'
-- end
-- },
{ {
"folke/noice.nvim", "folke/noice.nvim",
event = "VeryLazy", event = "VeryLazy",
@@ -34,19 +25,6 @@ return {
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
} }
}, },
{
'kevinhwang91/nvim-ufo',
event = "VeryLazy",
dependencies = 'kevinhwang91/promise-async',
config = function()
vim.o.foldcolumn = '0'
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
require('ufo').setup()
end
},
{ {
"OXY2DEV/markview.nvim", "OXY2DEV/markview.nvim",
ft = "markdown", ft = "markdown",
@@ -61,9 +39,4 @@ return {
require 'colorizer'.setup() require 'colorizer'.setup()
end end
}, },
{
"echasnovski/mini.diff",
opts = {}
}
} }

View File

@@ -1,14 +0,0 @@
# --> Catppuccin (Frappe)
thm_bg="#303446"
thm_fg="#c6d0f5"
thm_cyan="#99d1db"
thm_black="#292c3c"
thm_gray="#414559"
thm_magenta="#ca9ee6"
thm_pink="#f4b8e4"
thm_red="#e78284"
thm_green="#a6d189"
thm_yellow="#e5c890"
thm_blue="#8caaee"
thm_orange="#ef9f76"
thm_black4="#626880"

View File

@@ -1,14 +0,0 @@
#--> Catppuccin (Latte)
bg="dce0e8"
fg="4c4f69"
cyan="179299"
black="e6e9ef"
gray="bcc0cc"
magenta="ea76cb"
pink="8839ef"
red="d20f39"
green="40a02b"
yellow="df8e1d"
blue="1e66f5"
orange="fe640b"
black4="acb0be"

View File

@@ -2,9 +2,10 @@
# General # General
set -g default-terminal "tmux-256color" set -g default-terminal "tmux-256color"
set -gq allow-passthrough on set -ag terminal-overrides ",$TERM:Tc"
set -g visual-activity off
set -sa terminal-features ",*:RGB" set -sa terminal-features ",*:RGB"
set -g allow-passthrough on
set -g visual-activity off
set -sg escape-time 0 set -sg escape-time 0
set -g mouse on set -g mouse on
set -g base-index 1 set -g base-index 1
@@ -20,29 +21,25 @@ set -g status-right ""
set -g status-left-length 20 set -g status-left-length 20
set -g status-position top set -g status-position top
set -g status-justify left set -g status-justify left
set -g status-style 'bg=#181926 fg=#cad3f5'
set -g status-left '[#S] ' set -g status-left '[#S] '
set -g status-style ' #[bg=#{status-bg},fg=#{@unfocused-fg}]' set -g status-style 'bg=default,fg=default'
set -g window-status-format ' #I:#W ' set -g window-status-format ' #I:#W '
set -g window-status-current-format '#[bg=#{@focused-bg},fg=#{@focused-fg}] #I:#W ' set -g window-status-current-format '#[bg=default,fg=default,reverse] #I:#W '
# Theme
set -g status-bg "#1d2021"
set -g @unfocused-fg "#ebdbb2"
set -g @focused-bg "#ebdbb2"
set -g @focused-fg "#1d2021"
# Plugins # Plugins
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'niqodea/tmux-matryoshka' set -g @plugin 'niqodea/tmux-matryoshka'
set -g @plugin 'laktak/extrakto' set -g @plugin 'laktak/extrakto'
set -g @plugin 'Morantron/tmux-fingers'
# Plugin settings # Plugin settings
set -g @resurrect-strategy-nvim 'session' set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on' set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-save-interval '5' set -g @continuum-save-interval '5'
set -g @open-lazygit 'g' set -g @open-lazygit 'g'
set -g @fingers-key f
# Binds # Binds
bind-key 'x' kill-pane bind-key 'x' kill-pane
@@ -83,5 +80,4 @@ unbind-key -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi MouseDown1Pane select-pane\; send-keys -X clear-selection bind-key -T copy-mode-vi MouseDown1Pane select-pane\; send-keys -X clear-selection
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin"
run '~/.config/tmux/plugins/tpm/tpm' run '~/.config/tmux/plugins/tpm/tpm'

View File

@@ -30,29 +30,31 @@ function append_path() {
eval export $1="$p:$2" eval export $1="$p:$2"
} }
export EDITOR=nvim
export VISUAL=nvim
export READER=mupdf
export XDG_CONFIG_HOME="${HOME}/.config" export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_CACHE_HOME="${HOME}/.cache" export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_DATA_HOME="${HOME}/.local/share" export XDG_DATA_HOME="${HOME}/.local/share"
export XDG_STATE_HOME="${HOME}/.local/state" export XDG_STATE_HOME="${HOME}/.local/state"
export XDG_RUNTIME_DIR=/tmp export XDG_RUNTIME_DIR=/tmp
export EDITOR=nvim
export VISUAL=nvim
export READER=mupdf
export GOPATH="$HOME/go" export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin" export GOBIN="$GOPATH/bin"
# OS-specific exports # OS-specific exports
if [[ $(uname) == "Darwin" ]]; then if [[ $(uname) == "Darwin" ]]; then
export JAVA_HOME=$(/usr/libexec/java_home)
export GEM_HOME=$HOME/.gem
prepend_path PATH "/opt/homebrew/bin" prepend_path PATH "/opt/homebrew/bin"
if [ -n "$(/usr/libexec/java_home 2>/dev/null)" ]; then
export JAVA_HOME=$(/usr/libexec/java_home)
fi
export GEM_HOME=$HOME/.gem
prepend_path PATH "/opt/homebrew/opt/texlive/bin" prepend_path PATH "/opt/homebrew/opt/texlive/bin"
append_path PATH $GEM_HOME/bin append_path PATH $GEM_HOME/bin
fi fi
#BOTH # Common Paths
append_path PATH "/usr/sbin:/sbin" append_path PATH "/usr/sbin:/sbin"
append_path PATH "$HOME/.local/share/nvim/mason/bin" append_path PATH "$HOME/.local/share/nvim/mason/bin"
append_path PATH "$HOME/.local/bin" append_path PATH "$HOME/.local/bin"

View File

@@ -1,12 +1,19 @@
if [[ -o interactive ]]; then
if [[ -z "$TMUX" ]]; then if [[ -z "$TMUX" ]]; then
tmux new-session -A -s 0 tmux new-session -A -s 0
fi fi
fi
source $ZDOTDIR/setup-history.zsh source $ZDOTDIR/setup-history.zsh
source $ZDOTDIR/prompts/simple-two-line.zsh source $ZDOTDIR/prompts/simple-two-line.zsh
source $ZDOTDIR/functions.zsh source $ZDOTDIR/functions.zsh
source $ZDOTDIR/plugins.zsh source $ZDOTDIR/plugins.zsh
source $ZDOTDIR/theme.zsh
if [[ $(uname) == "Darwin" ]]; then if [[ $(uname) == "Darwin" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)" eval "$(/opt/homebrew/bin/brew shellenv)"
fi fi
eval "$(atuin init zsh --disable-up-arrow)"
eval "$(starship init zsh)"

View File

@@ -41,6 +41,4 @@ function cd()
builtin cd "$@" && ls; builtin cd "$@" && ls;
} }
alias bb="brew bundle --file=~/Brewfile"

View File

@@ -11,11 +11,8 @@ source $ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source $ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh source $ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
# Fzf-Tab # Fzf-Tab
zvm_after_init_commands+=('source <(fzf --zsh) && enable-fzf-tab')
source $ZDOTDIR/plugins/fzf-tab/fzf-tab.plugin.zsh source $ZDOTDIR/plugins/fzf-tab/fzf-tab.plugin.zsh
enable-fzf-tab
# Vi mode
source $ZDOTDIR/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
# MacOS # MacOS
source $ZDOTDIR/plugins/zsh-macos.plugin.zsh source $ZDOTDIR/plugins/zsh-macos.plugin.zsh

View File

@@ -1,258 +0,0 @@
# Git version checking
autoload -Uz is-at-least
git_version="${${(As: :)$(git version 2>/dev/null)}[3]}"
#
# Functions Current
# (sorted alphabetically by function name)
# (order should follow README)
#
# The name of the current branch
# Back-compatibility wrapper for when this function was defined here in
# the plugin, before being pulled in to core lib/git.zsh as git_current_branch()
# to fix the core -> git plugin dependency.
function current_branch() {
git_current_branch
}
# Check for develop and similarly named branches
function git_develop_branch() {
command git rev-parse --git-dir &>/dev/null || return
local branch
for branch in dev devel develop development; do
if command git show-ref -q --verify refs/heads/$branch; then
echo $branch
return 0
fi
done
echo develop
return 1
}
# Check if main exists and use instead of master
function git_main_branch() {
command git rev-parse --git-dir &>/dev/null || return
local ref
for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default,stable,master}; do
if command git show-ref -q --verify $ref; then
echo ${ref:t}
return 0
fi
done
# If no main branch was found, fall back to master but return error
echo master
return 1
}
function grename() {
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 old_branch new_branch"
return 1
fi
# Rename branch locally
git branch -m "$1" "$2"
# Rename branch in origin remote
if git push origin :"$1"; then
git push --set-upstream origin "$2"
fi
}
#
# Functions Work in Progress (WIP)
# (sorted alphabetically by function name)
# (order should follow README)
#
# Similar to `gunwip` but recursive "Unwips" all recent `--wip--` commits not just the last one
function gunwipall() {
local _commit=$(git log --grep='--wip--' --invert-grep --max-count=1 --format=format:%H)
# Check if a commit without "--wip--" was found and it's not the same as HEAD
if [[ "$_commit" != "$(git rev-parse HEAD)" ]]; then
git reset $_commit || return 1
fi
}
# Warn if the current branch is a WIP
function work_in_progress() {
command git -c log.showSignature=false log -n 1 2>/dev/null | grep -q -- "--wip--" && echo "WIP!!"
}
#
# Aliases
# (sorted alphabetically by command)
# (order should follow README)
# (in some cases force the alisas order to match README, like for example gke and gk)
#
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
function ggpnp() {
if [[ "$#" == 0 ]]; then
ggl && ggp
else
ggl "${*}" && ggp "${*}"
fi
}
compdef _git ggpnp=git-checkout
alias ggpur='ggu'
alias g='git'
alias gaa='git add --all'
alias gb='git branch'
alias gbd='git branch --delete'
function gbda() {
git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null
}
# Copied and modified from James Roeder (jmaroeder) under MIT License
# https://github.com/jmaroeder/plugin-git/blob/216723ef4f9e8dde399661c39c80bdf73f4076c4/functions/gbda.fish
function gbds() {
local default_branch=$(git_main_branch)
(( ! $? )) || default_branch=$(git_develop_branch)
git for-each-ref refs/heads/ "--format=%(refname:short)" | \
while read branch; do
local merge_base=$(git merge-base $default_branch $branch)
if [[ $(git cherry $default_branch $(git commit-tree $(git rev-parse $branch\^{tree}) -p $merge_base -m _)) = -* ]]; then
git branch -D $branch
fi
done
}
alias gcb='git checkout -b'
alias gcm='git checkout $(git_main_branch)'
alias gcl='git clone --recurse-submodules'
function gccd() {
setopt localoptions extendedglob
# get repo URI from args based on valid formats: https://git-scm.com/docs/git-clone#URLS
local repo="${${@[(r)(ssh://*|git://*|ftp(s)#://*|http(s)#://*|*@*)(.git/#)#]}:-$_}"
# clone repository and exit if it fails
command git clone --recurse-submodules "$@" || return
# if last arg passed was a directory, that's where the repo was cloned
# otherwise parse the repo URI and use the last part as the directory
[[ -d "$_" ]] && cd "$_" || cd "${${repo:t}%.git/#}"
}
compdef _git gccd=git-clone
alias gcam='git commit --all --message'
alias gd='git diff'
function gdv() { git diff -w "$@" | view - }
compdef _git gdv=git-diff
alias gdup='git diff @{upstream}'
function gdnolock() {
git diff "$@" ":(exclude)package-lock.json" ":(exclude)*.lock"
}
compdef _git gdnolock=git-diff
alias gf='git fetch'
alias glol='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"'
# Pretty log messages
function _git_log_prettily(){
if ! [ -z $1 ]; then
git log --pretty=$1
fi
}
compdef _git _git_log_prettily=git-log
alias gm='git merge'
alias gma='git merge --abort'
alias gl='git pull'
function ggu() {
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
git pull --rebase origin "${b:=$1}"
}
compdef _git ggu=git-checkout
alias ggpull='git pull origin "$(git_current_branch)"'
function ggl() {
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
git pull origin "${*}"
else
[[ "$#" == 0 ]] && local b="$(git_current_branch)"
git pull origin "${b:=$1}"
fi
}
compdef _git ggl=git-checkout
alias gp='git push'
function ggf() {
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
git push --force origin "${b:=$1}"
}
compdef _git ggf=git-checkout
alias gpf!='git push --force'
is-at-least 2.30 "$git_version" \
&& alias gpf='git push --force-with-lease --force-if-includes' \
|| alias gpf='git push --force-with-lease'
function ggfl() {
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
git push --force-with-lease origin "${b:=$1}"
}
compdef _git ggfl=git-checkout
alias ggpush='git push origin "$(git_current_branch)"'
function ggp() {
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
git push origin "${*}"
else
[[ "$#" == 0 ]] && local b="$(git_current_branch)"
git push origin "${b:=$1}"
fi
}
compdef _git ggp=git-checkout
alias gpu='git push upstream'
alias gra='git remote add'
alias grhh='git reset --hard'
alias gpristine='git reset --hard && git clean --force -dfx'
alias grm='git rm'
alias gsps='git show --pretty=short --show-signature'
alias gst='git status'
alias gsw='git switch'
function gcpr(){
git fetch -fu upstream refs/pull/$1/head:pr/$1
git checkout pr/$1
}
unset git_version
# Logic for adding warnings on deprecated aliases
local old_alias new_alias
for old_alias new_alias (
# TODO(2023-10-19): remove deprecated `git pull --rebase` aliases
gup gpr
gupv gprv
gupa gpra
gupav gprav
gupom gprom
gupomi gpromi
); do
aliases[$old_alias]="
print -Pu2 \"%F{yellow}[oh-my-zsh] '%F{red}${old_alias}%F{yellow}' is a deprecated alias, using '%F{green}${new_alias}%F{yellow}' instead.%f\"
$new_alias"
done
unset old_alias new_alias

Submodule .config/zsh/plugins/zsh-history-substring-search deleted from 87ce96b186

View File

@@ -1,108 +0,0 @@
# ------------------------------------------------------------------------------
# Description
# -----------
#
# sudo or sudo -e (replacement for sudoedit) will be inserted before the command
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Dongweiming <ciici123@gmail.com>
# * Subhaditya Nath <github.com/subnut>
# * Marc Cornellà <github.com/mcornella>
# * Carlo Sala <carlosalag@protonmail.com>
#
# ------------------------------------------------------------------------------
__sudo-replace-buffer() {
local old=$1 new=$2 space=${2:+ }
# if the cursor is positioned in the $old part of the text, make
# the substitution and leave the cursor after the $new text
if [[ $CURSOR -le ${#old} ]]; then
BUFFER="${new}${space}${BUFFER#$old }"
CURSOR=${#new}
# otherwise just replace $old with $new in the text before the cursor
else
LBUFFER="${new}${space}${LBUFFER#$old }"
fi
}
sudo-command-line() {
# If line is empty, get the last run command from history
[[ -z $BUFFER ]] && LBUFFER="$(fc -ln -1)"
# Save beginning space
local WHITESPACE=""
if [[ ${LBUFFER:0:1} = " " ]]; then
WHITESPACE=" "
LBUFFER="${LBUFFER:1}"
fi
{
# If $SUDO_EDITOR or $VISUAL are defined, then use that as $EDITOR
# Else use the default $EDITOR
local EDITOR=${SUDO_EDITOR:-${VISUAL:-$EDITOR}}
# If $EDITOR is not set, just toggle the sudo prefix on and off
if [[ -z "$EDITOR" ]]; then
case "$BUFFER" in
sudo\ -e\ *) __sudo-replace-buffer "sudo -e" "" ;;
sudo\ *) __sudo-replace-buffer "sudo" "" ;;
*) LBUFFER="sudo $LBUFFER" ;;
esac
return
fi
# Check if the typed command is really an alias to $EDITOR
# Get the first part of the typed command
local cmd="${${(Az)BUFFER}[1]}"
# Get the first part of the alias of the same name as $cmd, or $cmd if no alias matches
local realcmd="${${(Az)aliases[$cmd]}[1]:-$cmd}"
# Get the first part of the $EDITOR command ($EDITOR may have arguments after it)
local editorcmd="${${(Az)EDITOR}[1]}"
# Note: ${var:c} makes a $PATH search and expands $var to the full path
# The if condition is met when:
# - $realcmd is '$EDITOR'
# - $realcmd is "cmd" and $EDITOR is "cmd"
# - $realcmd is "cmd" and $EDITOR is "cmd --with --arguments"
# - $realcmd is "/path/to/cmd" and $EDITOR is "cmd"
# - $realcmd is "/path/to/cmd" and $EDITOR is "/path/to/cmd"
# or
# - $realcmd is "cmd" and $EDITOR is "cmd"
# - $realcmd is "cmd" and $EDITOR is "/path/to/cmd"
# or
# - $realcmd is "cmd" and $EDITOR is /alternative/path/to/cmd that appears in $PATH
if [[ "$realcmd" = (\$EDITOR|$editorcmd|${editorcmd:c}) \
|| "${realcmd:c}" = ($editorcmd|${editorcmd:c}) ]] \
|| builtin which -a "$realcmd" | command grep -Fx -q "$editorcmd"; then
__sudo-replace-buffer "$cmd" "sudo -e"
return
fi
# Check for editor commands in the typed command and replace accordingly
case "$BUFFER" in
$editorcmd\ *) __sudo-replace-buffer "$editorcmd" "sudo -e" ;;
\$EDITOR\ *) __sudo-replace-buffer '$EDITOR' "sudo -e" ;;
sudo\ -e\ *) __sudo-replace-buffer "sudo -e" "$EDITOR" ;;
sudo\ *) __sudo-replace-buffer "sudo" "" ;;
*) LBUFFER="sudo $LBUFFER" ;;
esac
} always {
# Preserve beginning space
LBUFFER="${WHITESPACE}${LBUFFER}"
# Redisplay edit buffer (compatibility with zsh-syntax-highlighting)
zle && zle redisplay # only run redisplay if zle is enabled
}
}
zle -N sudo-command-line
# Defined shortcut keys: [Esc] [Esc]
bindkey -M emacs '\e\e' sudo-command-line
bindkey -M vicmd '\e\e' sudo-command-line
bindkey -M viins '\e\e' sudo-command-line

View File

@@ -1,2 +0,0 @@
set -g default-terminal $ZSH_TMUX_TERM
source-file $ZSH_TMUX_CONFIG

View File

@@ -1 +0,0 @@
set -g default-terminal $ZSH_TMUX_TERM

View File

@@ -1,190 +0,0 @@
if ! (( $+commands[tmux] )); then
print "zsh tmux plugin: tmux not found. Please install tmux before using this plugin." >&2
return 1
fi
# CONFIGURATION VARIABLES
# Automatically start tmux
if [[ ! $(tty) =~ ^/dev/tty[0-9]*$ ]]; then
: ${ZSH_TMUX_AUTOSTART:=true}
else
: ${ZSH_TMUX_AUTOSTART:=false}
fi
# Only autostart once. If set to false, tmux will attempt to
# autostart every time your zsh configs are reloaded.
: ${ZSH_TMUX_AUTOSTART_ONCE:=true}
# Automatically connect to a previous session if it exists
: ${ZSH_TMUX_AUTOCONNECT:=true}
# Automatically close the terminal when tmux exits
: ${ZSH_TMUX_AUTOQUIT:=false}
# Automatically name the new session based on the basename of PWD
: ${ZSH_TMUX_AUTONAME_SESSION:=false}
# Set term to screen or screen-256color based on current terminal support
: ${ZSH_TMUX_DETACHED:=false}
# Set detached mode
: ${ZSH_TMUX_FIXTERM:=true}
# Set '-CC' option for iTerm2 tmux integration
: ${ZSH_TMUX_ITERM2:=false}
# The TERM to use for non-256 color terminals.
# Tmux states this should be tmux|screen, but you may need to change it on
# systems without the proper terminfo
if [[ -e /usr/share/terminfo/t/tmux ]]; then
: ${ZSH_TMUX_FIXTERM_WITHOUT_256COLOR:=tmux}
else
: ${ZSH_TMUX_FIXTERM_WITHOUT_256COLOR:=screen}
fi
# The TERM to use for 256 color terminals.
# Tmux states this should be (tmux|screen)-256color, but you may need to change it on
# systems without the proper terminfo
if [[ -e /usr/share/terminfo/t/tmux-256color ]]; then
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=tmux-256color}
else
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
fi
# Set the configuration path
if [[ -e $HOME/.tmux.conf ]]; then
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
elif [[ -e ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf ]]; then
: ${ZSH_TMUX_CONFIG:=${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf}
else
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
fi
# Set -u option to support unicode
: ${ZSH_TMUX_UNICODE:=false}
# ALIASES
function _build_tmux_alias {
setopt localoptions no_rc_expand_param
eval "function $1 {
if [[ -z \$1 ]] || [[ \${1:0:1} == '-' ]]; then
tmux $2 \"\$@\"
else
tmux $2 $3 \"\$@\"
fi
}"
local f s
f="_omz_tmux_alias_${1}"
s=(${(z)2})
eval "function ${f}() {
shift words;
words=(tmux ${@:2} \$words);
((CURRENT+=${#s[@]}+1))
_tmux
}"
compdef "$f" "$1"
}
alias tksv='tmux kill-server'
alias tl='tmux list-sessions'
alias tmuxconf='$EDITOR $ZSH_TMUX_CONFIG'
_build_tmux_alias "ta" "attach" "-t"
_build_tmux_alias "tad" "attach -d" "-t"
_build_tmux_alias "ts" "new-session" "-s"
_build_tmux_alias "tkss" "kill-session" "-t"
unfunction _build_tmux_alias
# Determine if the terminal supports 256 colors
if [[ $terminfo[colors] == 256 ]]; then
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
else
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR
fi
# Handle $0 according to the standard:
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
# Set the correct local config file to use.
if [[ "$ZSH_TMUX_ITERM2" == "false" && -e "$ZSH_TMUX_CONFIG" ]]; then
export ZSH_TMUX_CONFIG
export _ZSH_TMUX_FIXED_CONFIG="${0:h:a}/tmux.extra.conf"
else
export _ZSH_TMUX_FIXED_CONFIG="${0:h:a}/tmux.only.conf"
fi
# Wrapper function for tmux.
function _zsh_tmux_plugin_run() {
if [[ -n "$@" ]]; then
command tmux "$@"
return $?
fi
local -a tmux_cmd
tmux_cmd=(command tmux)
[[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+=(-CC)
[[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
local _detached=""
[[ "$ZSH_TMUX_DETACHED" == "true" ]] && _detached="-d"
local session_name
if [[ "$ZSH_TMUX_AUTONAME_SESSION" == "true" ]]; then
# Name the session after the basename of the current directory
session_name=${PWD##*/}
# If the current directory is the home directory, name it 'HOME'
[[ "$PWD" == "$HOME" ]] && session_name="HOME"
# If the current directory is the root directory, name it 'ROOT'
[[ "$PWD" == "/" ]] && session_name="ROOT"
else
session_name="$ZSH_TMUX_DEFAULT_SESSION_NAME"
fi
# Try to connect to an existing session.
if [[ -n "$session_name" ]]; then
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach $_detached -t "$session_name"
else
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach $_detached
fi
# If failed, just run tmux, fixing the TERM variable if requested.
if [[ $? -ne 0 ]]; then
if [[ "$ZSH_TMUX_FIXTERM" == "true" ]]; then
tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG")
elif [[ -e "$ZSH_TMUX_CONFIG" ]]; then
tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
fi
if [[ -n "$session_name" ]]; then
$tmux_cmd new-session -s "$session_name"
else
$tmux_cmd new-session
fi
fi
if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then
exit
fi
}
# Use the completions for tmux for our function
compdef _tmux _zsh_tmux_plugin_run
# Alias tmux to our wrapper function.
alias tmux=_zsh_tmux_plugin_run
function _tmux_directory_session() {
# current directory without leading path
local dir=${PWD##*/}
# md5 hash for the full working directory path
local md5=$(printf '%s' "$PWD" | md5sum | cut -d ' ' -f 1)
# human friendly unique session name for this directory
local session_name="${dir}-${md5:0:6}"
# create or attach to the session
tmux new -As "$session_name"
}
alias tds=_tmux_directory_session
# Autostart if not already in tmux and enabled.
if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" && -z "$INTELLIJ_ENVIRONMENT_READER" ]]; then
# Actually don't autostart if we already did and multiple autostarts are disabled.
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then
export ZSH_TMUX_AUTOSTARTED=true
_zsh_tmux_plugin_run
fi
fi

View File

@@ -0,0 +1,13 @@
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
HISTSIZE=100000000
SAVEHIST=100000000
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_SAVE_NO_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_VERIFY

67
.config/zsh/theme.zsh Normal file
View File

@@ -0,0 +1,67 @@
# Basic syntax elements
ZSH_HIGHLIGHT_STYLES[default]=none
ZSH_HIGHLIGHT_STYLES[command]=fg=blue
ZSH_HIGHLIGHT_STYLES[builtin]=fg=blue
ZSH_HIGHLIGHT_STYLES[function]=fg=blue
ZSH_HIGHLIGHT_STYLES[alias]=fg=blue
ZSH_HIGHLIGHT_STYLES[precommand]=fg=cyan
# Arguments and quotes
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=fg=yellow
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=cyan
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=cyan
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=cyan
ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=cyan
# Delimiters and operators
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=yellow
ZSH_HIGHLIGHT_STYLES[redirection]=fg=cyan,bold
ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=green
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=cyan,bold
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=cyan,bold
# Options and parameters
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=cyan
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=cyan
# Paths
ZSH_HIGHLIGHT_STYLES[path]=fg=cyan,underline
ZSH_HIGHLIGHT_STYLES[path_pathseparator]=fg=cyan,underline
# Comments and errors
ZSH_HIGHLIGHT_STYLES[comment]=fg=red
ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=red,bold
ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold
# Special elements
ZSH_HIGHLIGHT_STYLES[globbing]=fg=cyan,bold
ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue
ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=yellow
ZSH_HIGHLIGHT_STYLES[assign]=fg=cyan
ZSH_HIGHLIGHT_STYLES[arg0]=fg=green
ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline
ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline
ZSH_HIGHLIGHT_STYLES[global-alias]=fg=cyan
# File descriptors
ZSH_HIGHLIGHT_STYLES[named-fd]=fg=cyan
ZSH_HIGHLIGHT_STYLES[numeric-fd]=fg=cyan
# Brackets
ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold
ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold
ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=yellow,bold
ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=cyan,bold
ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=magenta,bold
# Process and command substitution
ZSH_HIGHLIGHT_STYLES[process-substitution]=none
ZSH_HIGHLIGHT_STYLES[command-substitution]=none
# Cursor
ZSH_HIGHLIGHT_STYLES[cursor]=standout
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
ZSH_HIGHLIGHT_STYLES[root]=standout

View File

@@ -6,56 +6,32 @@ set +e
# Declare theme configurations # Declare theme configurations
typeset -A themes typeset -A themes
themes[catppuccin-latte]=\ themes[catppuccin-latte]=\
'alacritty_theme_name=catppuccin_latte 'ghostty_theme_name=catppuccin-latte
ghostty_theme_name=catppuccin-latte nvim_color_scheme=catppuccin-latte'
nvim_color_scheme=catppuccin-latte
background_color=#eff1f5
tmux_bar_unfocused_fg=#4c4f69
tmux_bar_focused_bg=#4c4f69
tmux_bar_focused_fg=#eff1f5
kitty_theme="Catppuccin-Latte"'
themes[catppuccin-frappe]=\ themes[catppuccin-frappe]=\
'alacritty_theme_name=catppuccin_frappe 'ghostty_theme_name=catppuccin-frappe
ghostty_theme_name=catppuccin-frappe nvim_color_scheme=catppuccin-frappe'
nvim_color_scheme=catppuccin-frappe
background_color=#303446
tmux_bar_unfocused_fg=#c6d0f5
tmux_bar_focused_bg=#c6d0f5
tmux_bar_focused_fg=#303446
kitty_theme="Catppuccin-Frappe"'
themes[gruvbox-original-hard-dark]=\ themes[gruvbox-original-hard-dark]=\
'alacritty_theme_name=gruvbox_dark 'ghostty_theme_name=GruvboxDarkHard
ghostty_theme_name=GruvboxDarkHard
nvim_color_scheme=gruvbox-material nvim_color_scheme=gruvbox-material
background_color=#1d2021
tmux_bar_unfocused_fg=#ebdbb2
tmux_bar_focused_bg=#ebdbb2
tmux_bar_focused_fg=#1d2021
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.gruvbox_material_better_performance=1 vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background=\"hard\" vim.g.gruvbox_material_background=\"hard\"
vim.g.gruvbox_material_foreground=\"original\" vim.g.gruvbox_material_foreground=\"original\"
vim.g.gruvbox_material_transparent_background=2 vim.g.gruvbox_material_transparent_background=2
vim.opt.background=\"dark\"" vim.opt.background=\"dark\""'
kitty_theme="Gruvbox Dark Hard"'
themes[gruvbox-original-medium-light]=\ themes[gruvbox-original-medium-light]=\
'alacritty_theme_name=gruvbox_light 'ghostty_theme_name=GruvboxLight
ghostty_theme_name=GruvboxLight
nvim_color_scheme=gruvbox-material nvim_color_scheme=gruvbox-material
background_color=#fbf1c7
tmux_bar_unfocused_fg=#3c3836
tmux_bar_focused_bg=#3c3836
tmux_bar_focused_fg=#fbf1c7
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.gruvbox_material_better_performance=1 vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background=\"medium\" vim.g.gruvbox_material_background=\"medium\"
vim.g.gruvbox_material_foreground=\"original\" vim.g.gruvbox_material_foreground=\"original\"
vim.g.gruvbox_material_transparent_background=2 vim.g.gruvbox_material_transparent_background=2
vim.opt.background=\"light\"" vim.opt.background=\"light\""'
kitty_theme="Gruvbox Light Medium"'
themes[gruvbox-material-hard-dark]=\ themes[gruvbox-material-hard-dark]=\
'alacritty_theme_name=gruvbox_dark 'alacritty_theme_name=gruvbox_dark
@@ -74,91 +50,57 @@ vim.opt.background=\"dark\""
kitty_theme="Gruvbox Material Dark Hard"' kitty_theme="Gruvbox Material Dark Hard"'
themes[gruvbox-material-medium-dark]=\ themes[gruvbox-material-medium-dark]=\
'alacritty_theme_name=gruvbox_dark 'ghostty_theme_name=gruvbox-material-medium-dark
ghostty_theme_name=gruvbox-material-medium-dark
nvim_color_scheme=gruvbox-material nvim_color_scheme=gruvbox-material
background_color=#282828
tmux_bar_unfocused_fg=#d4be98
tmux_bar_focused_bg=#d4be98
tmux_bar_focused_fg=#282828
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.gruvbox_material_better_performance=1 vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background=\"medium\" vim.g.gruvbox_material_background=\"medium\"
vim.g.gruvbox_material_foreground=\"material\" vim.g.gruvbox_material_foreground=\"material\"
vim.g.gruvbox_material_transparent_background=2 vim.g.gruvbox_material_transparent_background=2
vim.opt.background=\"dark\"" vim.opt.background=\"dark\""'
kitty_theme="Gruvbox Material Dark Medium"'
themes[gruvbox-material-soft-dark]=\ themes[gruvbox-material-soft-dark]=\
'alacritty_theme_name=gruvbox_dark 'ghostty_theme_name=gruvbox-material-soft-dark
ghostty_theme_name=gruvbox-material-soft-dark
nvim_color_scheme=gruvbox-material nvim_color_scheme=gruvbox-material
background_color=#32302f
tmux_bar_unfocused_fg=#d4be98
tmux_bar_focused_bg=#d4be98
tmux_bar_focused_fg=#32302f
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.gruvbox_material_better_performance=1 vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background=\"soft\" vim.g.gruvbox_material_background=\"soft\"
vim.g.gruvbox_material_foreground=\"material\" vim.g.gruvbox_material_foreground=\"material\"
vim.g.gruvbox_material_transparent_background=2 vim.g.gruvbox_material_transparent_background=2
vim.opt.background=\"dark\"" vim.opt.background=\"dark\""'
kitty_theme="Gruvbox Material Dark Soft"'
themes[gruvbox-material-hard-light]=\ themes[gruvbox-material-hard-light]=\
'alacritty_theme_name=gruvbox_light 'ghostty_theme_name=gruvbox-material-hard-light
ghostty_theme_name=gruvbox-material-hard-light
nvim_color_scheme=gruvbox-material nvim_color_scheme=gruvbox-material
background_color=#f9f5d7
tmux_bar_unfocused_fg=#654735
tmux_bar_focused_bg=#654735
tmux_bar_focused_fg=#f9f5d7
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.gruvbox_material_better_performance=1 vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background=\"hard\" vim.g.gruvbox_material_background=\"hard\"
vim.g.gruvbox_material_foreground=\"material\" vim.g.gruvbox_material_foreground=\"material\"
vim.g.gruvbox_material_transparent_background=2 vim.g.gruvbox_material_transparent_background=2
vim.opt.background=\"light\"" vim.opt.background=\"light\""'
kitty_theme="Gruvbox Material Light Hard"'
themes[gruvbox-material-medium-light]=\ themes[gruvbox-material-medium-light]=\
'alacritty_theme_name=gruvbox_light 'ghostty_theme_name=gruvbox-material-medium-light
ghostty_theme_name=gruvbox-material-medium-light
background_color=#fbf1c7
tmux_bar_unfocused_fg=#654735
tmux_bar_focused_bg=#654735
tmux_bar_focused_fg=#fbf1c7
nvim_color_scheme=gruvbox-material nvim_color_scheme=gruvbox-material
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.gruvbox_material_better_performance=1 vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background=\"medium\" vim.g.gruvbox_material_background=\"medium\"
vim.g.gruvbox_material_foreground=\"material\" vim.g.gruvbox_material_foreground=\"material\"
vim.g.gruvbox_material_transparent_background=2 vim.g.gruvbox_material_transparent_background=2
vim.opt.background=\"light\"" vim.opt.background=\"light\""'
kitty_theme="Gruvbox Material Light Medium"'
themes[gruvbox-material-soft-light]=\ themes[gruvbox-material-soft-light]=\
'alacritty_theme_name=gruvbox_light 'ghostty_theme_name=gruvbox-material-soft-light
ghostty_theme_name=gruvbox-material-soft-light
background_color=#f2e5bc
tmux_bar_unfocused_fg=#654735
tmux_bar_focused_bg=#654735
tmux_bar_focused_fg=#f2e5bc
nvim_color_scheme=gruvbox-material nvim_color_scheme=gruvbox-material
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.gruvbox_material_better_performance=1 vim.g.gruvbox_material_better_performance=1
vim.g.gruvbox_material_background=\"soft\" vim.g.gruvbox_material_background=\"soft\"
vim.g.gruvbox_material_foreground=\"material\" vim.g.gruvbox_material_foreground=\"material\"
vim.g.gruvbox_material_transparent_background=2 vim.g.gruvbox_material_transparent_background=2
vim.opt.background=\"light\"" vim.opt.background=\"light\""'
kitty_theme="Gruvbox Material Light Soft"'
themes[everforest-hard-dark]=\ themes[everforest-hard-dark]=\
'ghostty_theme_name=everforest-hard-dark 'ghostty_theme_name=everforest-hard-dark
background_color=#272e33
tmux_bar_unfocused_fg=#3c4841
tmux_bar_focused_bg=#3c4841
tmux_bar_focused_fg=#d3c6aa
nvim_color_scheme=everforest nvim_color_scheme=everforest
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.everforest_better_performance=1 vim.g.everforest_better_performance=1
@@ -168,10 +110,6 @@ vim.opt.background=\"dark\""'
themes[everforest-medium-dark]=\ themes[everforest-medium-dark]=\
'ghostty_theme_name=everforest-medium-dark 'ghostty_theme_name=everforest-medium-dark
background_color=#2d353b
tmux_bar_unfocused_fg=#425047
tmux_bar_focused_bg=#425047
tmux_bar_focused_fg=#d3c6aa
nvim_color_scheme=everforest nvim_color_scheme=everforest
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.everforest_better_performance=1 vim.g.everforest_better_performance=1
@@ -181,10 +119,6 @@ vim.opt.background=\"dark\""'
themes[everforest-soft-dark]=\ themes[everforest-soft-dark]=\
'ghostty_theme_name=everforest-soft-dark 'ghostty_theme_name=everforest-soft-dark
background_color=#333c43
tmux_bar_unfocused_fg=#48584e
tmux_bar_focused_bg=#48584e
tmux_bar_focused_fg=#d3c6aa
nvim_color_scheme=everforest nvim_color_scheme=everforest
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.everforest_better_performance=1 vim.g.everforest_better_performance=1
@@ -205,14 +139,7 @@ reload_neovim() {
# Change common settings # Change common settings
change_theme() { change_theme() {
[[ -n "$alacritty_theme_name" ]] && sed -i '' -e "s|import = \[\"~/.config/alacritty/themes/.*\"\]|import = [\"~/.config/alacritty/themes/${alacritty_theme_name}.toml\"]|g" ~/.config/alacritty/alacritty.toml
[[ -n "$ghostty_theme_name" ]] && sed -i '' -E "s/theme =.*$/theme = $ghostty_theme_name/" ~/.config/ghostty/config [[ -n "$ghostty_theme_name" ]] && sed -i '' -E "s/theme =.*$/theme = $ghostty_theme_name/" ~/.config/ghostty/config
[[ -n "$kitty_theme" ]] && kitten themes --reload-in=all "$kitty_theme"
sed -i '' -E "s/set -g status-bg .*$/set -g status-bg \"$background_color\"/" ~/.config/tmux/tmux.conf
sed -i '' -E "s/set -g @unfocused-fg .*$/set -g @unfocused-fg \"$tmux_bar_unfocused_fg\"/" ~/.config/tmux/tmux.conf
sed -i '' -E "s/set -g @focused-bg .*$/set -g @focused-bg \"$tmux_bar_focused_bg\"/" ~/.config/tmux/tmux.conf
sed -i '' -E "s/set -g @focused-fg .*$/set -g @focused-fg \"$tmux_bar_focused_fg\"/" ~/.config/tmux/tmux.conf
tmux source-file ~/.config/tmux/tmux.conf
reload_neovim "$nvim_color_scheme" "$additional_nvim_commands" reload_neovim "$nvim_color_scheme" "$additional_nvim_commands"
} }

37
.local/bin/macos.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
echo "Configuring macOS system defaults..."
# NSGlobalDomain settings
defaults write -g AppleShowAllExtensions -bool true
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write -g KeyRepeat -int 2
defaults write -g InitialKeyRepeat -int 15
defaults write -g com.apple.mouse.tapBehavior -int 1
defaults write -g com.apple.sound.beep.volume -float 0.0
defaults write -g com.apple.sound.beep.feedback -int 0
# Dock settings
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock autohide-delay -float 0.1
defaults write com.apple.dock autohide-time-modifier -float 0.0
defaults write com.apple.dock show-recents -bool false
defaults write com.apple.dock launchanim -bool false
defaults write com.apple.dock orientation -string "bottom"
defaults write com.apple.dock tilesize -int 48
defaults write com.apple.dock mineffect -string "scale"
# Finder settings
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Trackpad settings
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true
echo "Restarting affected services..."
killall Dock
killall Finder
echo "Configuration complete! Some changes may require a logout/login to take effect."

61
Brewfile Normal file
View File

@@ -0,0 +1,61 @@
# Casks
cask "aerospace"
cask "jordanbaird-ice@beta"
cask "monitorcontrol"
cask "opencloud"
cask "sioyek"
cask "wireshark-app"
cask "airbuddy"
cask "karabiner-elements"
cask "mos"
cask "prismlauncher"
cask "stremio"
cask "zen"
cask "bettertouchtool"
cask "flameshot"
cask "keyboard-cleaner"
cask "notchnook"
cask "qbittorrent"
cask "stretchly"
cask "brave-browser"
cask "hot"
cask "obs"
cask "qmk-toolbox"
cask "tailscale-app"
cask "zotero"
cask "discord"
cask "iina"
cask "obsidian"
cask "raycast"
# Tools
brew "atuin"
brew "bat"
brew "btop"
brew "htop"
brew "eza"
brew "fd"
brew "fzf"
brew "git"
brew "git-delta"
brew "gnu-tar"
brew "lazygit"
brew "iperf3"
brew "ncdu"
brew "openssh"
brew "pandoc"
brew "ripgrep"
brew "starship"
brew "zsh"
brew "wget"
brew "ninja"
brew "cmake"
brew "gettext"
brew "curl"
brew "libevent"
brew "ncurses"
brew "utf8proc"
brew "coreutils"
brew "bash"
brew "aria2"
cask "orion"