Compare commits
4 Commits
2f0193f173
...
95f748f930
| Author | SHA1 | Date | |
|---|---|---|---|
| 95f748f930 | |||
| bb4a3b78a6 | |||
| d13440c809 | |||
| 898315886f |
@@ -10,7 +10,7 @@ dynamic_padding = true
|
|||||||
padding = { x = 5, y = 5 }
|
padding = { x = 5, y = 5 }
|
||||||
decorations = "full"
|
decorations = "full"
|
||||||
title = "Alacritty@CachyOS"
|
title = "Alacritty@CachyOS"
|
||||||
opacity = 0.9
|
opacity = 0.98
|
||||||
decorations_theme_variant = "Dark"
|
decorations_theme_variant = "Dark"
|
||||||
|
|
||||||
[window.dimensions]
|
[window.dimensions]
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ vim.pack.add({
|
|||||||
"https://github.com/MeanderingProgrammer/render-markdown.nvim",
|
"https://github.com/MeanderingProgrammer/render-markdown.nvim",
|
||||||
"https://github.com/williamboman/mason.nvim",
|
"https://github.com/williamboman/mason.nvim",
|
||||||
"https://github.com/williamboman/mason-lspconfig.nvim",
|
"https://github.com/williamboman/mason-lspconfig.nvim",
|
||||||
|
"https://github.com/greggh/claude-code.nvim",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Plugin Configs
|
-- Plugin Configs
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
require("claude-code").setup({
|
||||||
|
-- Terminal window settings
|
||||||
|
window = {
|
||||||
|
split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
|
||||||
|
position = "botright", -- Position of the window: "botright", "topleft", "vertical", "float", etc.
|
||||||
|
enter_insert = true, -- Whether to enter insert mode when opening Claude Code
|
||||||
|
hide_numbers = true, -- Hide line numbers in the terminal window
|
||||||
|
hide_signcolumn = true, -- Hide the sign column in the terminal window
|
||||||
|
|
||||||
|
-- Floating window configuration (only applies when position = "float")
|
||||||
|
float = {
|
||||||
|
width = "80%", -- Width: number of columns or percentage string
|
||||||
|
height = "80%", -- Height: number of rows or percentage string
|
||||||
|
row = "center", -- Row position: number, "center", or percentage string
|
||||||
|
col = "center", -- Column position: number, "center", or percentage string
|
||||||
|
relative = "editor", -- Relative to: "editor" or "cursor"
|
||||||
|
border = "rounded", -- Border style: "none", "single", "double", "rounded", "solid", "shadow"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- File refresh settings
|
||||||
|
refresh = {
|
||||||
|
enable = true, -- Enable file change detection
|
||||||
|
updatetime = 100, -- updatetime when Claude Code is active (milliseconds)
|
||||||
|
timer_interval = 1000, -- How often to check for file changes (milliseconds)
|
||||||
|
show_notifications = true, -- Show notification when files are reloaded
|
||||||
|
},
|
||||||
|
-- Git project settings
|
||||||
|
git = {
|
||||||
|
use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project)
|
||||||
|
},
|
||||||
|
-- Shell-specific settings
|
||||||
|
shell = {
|
||||||
|
separator = '&&', -- Command separator used in shell commands
|
||||||
|
pushd_cmd = 'pushd', -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell)
|
||||||
|
popd_cmd = 'popd', -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell)
|
||||||
|
},
|
||||||
|
-- Command settings
|
||||||
|
command = "claude", -- Command used to launch Claude Code
|
||||||
|
-- Command variants
|
||||||
|
command_variants = {
|
||||||
|
-- Conversation management
|
||||||
|
continue = "--continue", -- Resume the most recent conversation
|
||||||
|
resume = "--resume", -- Display an interactive conversation picker
|
||||||
|
|
||||||
|
-- Output options
|
||||||
|
verbose = "--verbose", -- Enable verbose logging with full turn-by-turn output
|
||||||
|
},
|
||||||
|
-- Keymaps
|
||||||
|
keymaps = {
|
||||||
|
toggle = {
|
||||||
|
normal = "<C-,>", -- Normal mode keymap for toggling Claude Code, false to disable
|
||||||
|
terminal = "<C-,>", -- Terminal mode keymap for toggling Claude Code, false to disable
|
||||||
|
variants = {
|
||||||
|
continue = "<leader>cC", -- Normal mode keymap for Claude Code with continue flag
|
||||||
|
verbose = "<leader>cV", -- Normal mode keymap for Claude Code with verbose flag
|
||||||
|
},
|
||||||
|
},
|
||||||
|
window_navigation = true, -- Enable window navigation keymaps (<C-h/j/k/l>)
|
||||||
|
scrolling = true, -- Enable scrolling keymaps (<C-f/b>) for page up/down
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -9,3 +9,4 @@ require('plugins.treesitter')
|
|||||||
require('plugins.cmp')
|
require('plugins.cmp')
|
||||||
require('plugins.render-markdown')
|
require('plugins.render-markdown')
|
||||||
require('plugins.mason')
|
require('plugins.mason')
|
||||||
|
require('plugins.claude')
|
||||||
|
|||||||
@@ -1,71 +1,75 @@
|
|||||||
{
|
{
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"auto-save.nvim": {
|
"auto-save.nvim": {
|
||||||
"rev": "979b6c8",
|
"rev": "979b6c82f60cfa80f4cf437d77446d0ded0addf0",
|
||||||
"src": "https://github.com/Pocco81/auto-save.nvim"
|
"src": "https://github.com/Pocco81/auto-save.nvim"
|
||||||
},
|
},
|
||||||
|
"claude-code.nvim": {
|
||||||
|
"rev": "55c0cb59828fbc3bec744288286a46f5d5750b83",
|
||||||
|
"src": "https://github.com/greggh/claude-code.nvim"
|
||||||
|
},
|
||||||
"cmp-buffer": {
|
"cmp-buffer": {
|
||||||
"rev": "b74fab3",
|
"rev": "b74fab3656eea9de20a9b8116afa3cfc4ec09657",
|
||||||
"src": "https://github.com/hrsh7th/cmp-buffer"
|
"src": "https://github.com/hrsh7th/cmp-buffer"
|
||||||
},
|
},
|
||||||
"cmp-nvim-lsp": {
|
"cmp-nvim-lsp": {
|
||||||
"rev": "bd5a7d6",
|
"rev": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3",
|
||||||
"src": "https://github.com/hrsh7th/cmp-nvim-lsp"
|
"src": "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
},
|
},
|
||||||
"gitsigns.nvim": {
|
"gitsigns.nvim": {
|
||||||
"rev": "20ad441",
|
"rev": "20ad4419564d6e22b189f6738116b38871082332",
|
||||||
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
},
|
},
|
||||||
"gruvbox.nvim": {
|
"gruvbox.nvim": {
|
||||||
"rev": "5e0a460",
|
"rev": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437",
|
||||||
"src": "https://github.com/ellisonleao/gruvbox.nvim"
|
"src": "https://github.com/ellisonleao/gruvbox.nvim"
|
||||||
},
|
},
|
||||||
"indent-blankline.nvim": {
|
"indent-blankline.nvim": {
|
||||||
"rev": "005b560",
|
"rev": "005b56001b2cb30bfa61b7986bc50657816ba4ba",
|
||||||
"src": "https://github.com/lukas-reineke/indent-blankline.nvim"
|
"src": "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||||
},
|
},
|
||||||
"mason-lspconfig.nvim": {
|
"mason-lspconfig.nvim": {
|
||||||
"rev": "2304ff6",
|
"rev": "2304ff65ecc8cb2afc2484de3e2ed9a407edf0b9",
|
||||||
"src": "https://github.com/williamboman/mason-lspconfig.nvim"
|
"src": "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||||
},
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
"rev": "ad7146a",
|
"rev": "ad7146aa61dcaeb54fa900144d768f040090bff0",
|
||||||
"src": "https://github.com/williamboman/mason.nvim"
|
"src": "https://github.com/williamboman/mason.nvim"
|
||||||
},
|
},
|
||||||
"nvim-autopairs": {
|
"nvim-autopairs": {
|
||||||
"rev": "7a2c97c",
|
"rev": "7a2c97cccd60abc559344042fefb1d5a85b3e33b",
|
||||||
"src": "https://github.com/windwp/nvim-autopairs"
|
"src": "https://github.com/windwp/nvim-autopairs"
|
||||||
},
|
},
|
||||||
"nvim-cmp": {
|
"nvim-cmp": {
|
||||||
"rev": "a7bcf1d",
|
"rev": "a7bcf1d88069fc67c9ace8a62ba480b8fe879025",
|
||||||
"src": "https://github.com/hrsh7th/nvim-cmp"
|
"src": "https://github.com/hrsh7th/nvim-cmp"
|
||||||
},
|
},
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"rev": "ac98db2",
|
"rev": "ac98db2f9f06a56498ec890a96928774eae412c3",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
"nvim-tree.lua": {
|
"nvim-tree.lua": {
|
||||||
"rev": "64e2192",
|
"rev": "64e2192f5250796aa4a7f33c6ad888515af50640",
|
||||||
"src": "https://github.com/nvim-tree/nvim-tree.lua"
|
"src": "https://github.com/nvim-tree/nvim-tree.lua"
|
||||||
},
|
},
|
||||||
"nvim-treesitter": {
|
"nvim-treesitter": {
|
||||||
"rev": "42fc28ba",
|
"rev": "42fc28ba918343ebfd5565147a42a26580579482",
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
"nvim-web-devicons": {
|
"nvim-web-devicons": {
|
||||||
"rev": "b8221e4",
|
"rev": "b8221e42cf7287c4dcde81f232f58d7b947c210d",
|
||||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
"plenary.nvim": {
|
"plenary.nvim": {
|
||||||
"rev": "b9fd522",
|
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
|
||||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||||
},
|
},
|
||||||
"render-markdown.nvim": {
|
"render-markdown.nvim": {
|
||||||
"rev": "475d3ad",
|
"rev": "475d3ad8cae486b0df6fc6050cf5b5ea1de42db8",
|
||||||
"src": "https://github.com/MeanderingProgrammer/render-markdown.nvim"
|
"src": "https://github.com/MeanderingProgrammer/render-markdown.nvim"
|
||||||
},
|
},
|
||||||
"telescope.nvim": {
|
"telescope.nvim": {
|
||||||
"rev": "b4da76b",
|
"rev": "b4da76be54691e854d3e0e02c36b0245f945c2c7",
|
||||||
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,12 @@ DIRECTORIES_TO_REMOVE = [
|
|||||||
|
|
||||||
APPS = [
|
APPS = [
|
||||||
'element-desktop',
|
'element-desktop',
|
||||||
|
'fisher',
|
||||||
'flatpak',
|
'flatpak',
|
||||||
|
'freecad',
|
||||||
'libreoffice-fresh',
|
'libreoffice-fresh',
|
||||||
'librewolf-bin',
|
'librewolf-bin',
|
||||||
'neovim-git',
|
'neovim',
|
||||||
'proton-mail-bin',
|
'proton-mail-bin',
|
||||||
'proton-vpn-gtk-app',
|
'proton-vpn-gtk-app',
|
||||||
'rtorrent',
|
'rtorrent',
|
||||||
@@ -25,6 +27,8 @@ APPS = [
|
|||||||
'stow',
|
'stow',
|
||||||
'tmux',
|
'tmux',
|
||||||
'wl-clipboard',
|
'wl-clipboard',
|
||||||
|
'gimp',
|
||||||
|
'inkscape',
|
||||||
]
|
]
|
||||||
|
|
||||||
DOTFILES = [
|
DOTFILES = [
|
||||||
|
|||||||
+27
-21
@@ -6,32 +6,30 @@ from pathlib import Path
|
|||||||
def sym_link_dir():
|
def sym_link_dir():
|
||||||
confirm_link = input("Do you want to link home directories to external storage? (Y/n): ")
|
confirm_link = input("Do you want to link home directories to external storage? (Y/n): ")
|
||||||
|
|
||||||
if confirm_link.lower() == "y" or confirm_link.lower() == '':
|
if confirm_link.lower() in ("y", "yes", ""):
|
||||||
target_dir = input("Specify the full path to the external storage: ")
|
target_dir = input("Specify the full path to the external storage: ")
|
||||||
|
|
||||||
def home_dir_item(item):
|
if Path(target_dir).is_dir():
|
||||||
return Path(f"{Path.home()}/{item}")
|
|
||||||
|
|
||||||
for dir in config.DIRECTORIES:
|
for dir in config.DIRECTORIES:
|
||||||
HOME_DIR_PATH = home_dir_item(dir)
|
DIR_ITEM = Path(f"{Path.home()}/{dir}")
|
||||||
TARGET_SYMLINK_DIR = f"{target_dir}/{dir}"
|
|
||||||
HAS_HOME_DIR = HOME_DIR_PATH.is_dir()
|
|
||||||
IS_SYMLINK = HOME_DIR_PATH.is_symlink()
|
|
||||||
|
|
||||||
if HAS_HOME_DIR:
|
if not DIR_ITEM.is_symlink():
|
||||||
HOME_DIR_PATH.rmdir()
|
if DIR_ITEM.is_dir():
|
||||||
|
DIR_ITEM.rmdir()
|
||||||
if not IS_SYMLINK:
|
DIR_ITEM.symlink_to(f"{target_dir}/{dir}")
|
||||||
HOME_DIR_PATH.symlink_to(TARGET_SYMLINK_DIR)
|
|
||||||
|
|
||||||
for dir in config.DIRECTORIES_TO_REMOVE:
|
for dir in config.DIRECTORIES_TO_REMOVE:
|
||||||
if home_dir_item(dir).is_dir():
|
DIR_ITEM = Path(f"{Path.home()}/{dir}")
|
||||||
home_dir_item(dir).rmdir()
|
|
||||||
|
if DIR_ITEM.is_dir() and not DIR_ITEM.is_symlink():
|
||||||
|
DIR_ITEM.rmdir()
|
||||||
|
|
||||||
|
|
||||||
def install_apps():
|
def install_apps():
|
||||||
for app in config.APPS:
|
for app in config.APPS:
|
||||||
subprocess.run(['sudo', 'pacman', '-S', f"{app}", '--noconfirm'])
|
subprocess.run([
|
||||||
|
'sudo', 'pacman', '-S', f"{app}", '--noconfirm'
|
||||||
|
], check=True)
|
||||||
|
|
||||||
subprocess.run([
|
subprocess.run([
|
||||||
"fish", "-c", "fisher install jorgebucaran/nvm.fish"
|
"fish", "-c", "fisher install jorgebucaran/nvm.fish"
|
||||||
@@ -43,12 +41,20 @@ def install_apps():
|
|||||||
|
|
||||||
|
|
||||||
def stow_dot_files():
|
def stow_dot_files():
|
||||||
|
dotfiles_root = Path.home()/'.dotfiles'
|
||||||
for dotfile in config.DOTFILES:
|
for dotfile in config.DOTFILES:
|
||||||
subprocess.run(['stow', f"../../{dotfile}", '--adopt'])
|
subprocess.run([
|
||||||
|
'stow', '-d', str(dotfiles_root), dotfile, '--adopt'
|
||||||
|
], check=True)
|
||||||
|
|
||||||
subprocess.run(['git', 'checkout', '--', '.'])
|
subprocess.run(
|
||||||
|
['git', 'checkout', '--', *config.DOTFILES],
|
||||||
|
cwd=dotfiles_root,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
sym_link_dir()
|
if __name__ == "__main__":
|
||||||
install_apps()
|
sym_link_dir()
|
||||||
stow_dot_files()
|
install_apps()
|
||||||
|
stow_dot_files()
|
||||||
|
|||||||
Reference in New Issue
Block a user