Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 95f748f930 | |||
| bb4a3b78a6 | |||
| d13440c809 | |||
| 898315886f |
@@ -10,7 +10,7 @@ dynamic_padding = true
|
||||
padding = { x = 5, y = 5 }
|
||||
decorations = "full"
|
||||
title = "Alacritty@CachyOS"
|
||||
opacity = 0.9
|
||||
opacity = 0.98
|
||||
decorations_theme_variant = "Dark"
|
||||
|
||||
[window.dimensions]
|
||||
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
import subprocess
|
||||
import config
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def sym_link_dir():
|
||||
confirm_link = input("Do you want to link home directories to external storage? (Y/n): ")
|
||||
|
||||
if confirm_link.lower() == "y" or confirm_link.lower() == '':
|
||||
target_dir = input("Specify the full path to the external storage: ")
|
||||
|
||||
def home_dir_item(item):
|
||||
return Path(f"{Path.home()}/{item}")
|
||||
|
||||
for dir in config.DIRECTORIES:
|
||||
HOME_DIR_PATH = home_dir_item(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:
|
||||
HOME_DIR_PATH.rmdir()
|
||||
|
||||
if not IS_SYMLINK:
|
||||
HOME_DIR_PATH.symlink_to(TARGET_SYMLINK_DIR)
|
||||
|
||||
for dir in config.DIRECTORIES_TO_REMOVE:
|
||||
if home_dir_item(dir).is_dir():
|
||||
home_dir_item(dir).rmdir()
|
||||
|
||||
|
||||
def install_apps():
|
||||
for app in config.APPS:
|
||||
subprocess.run(['sudo', 'pacman', '-S', f"{app}", '--noconfirm'])
|
||||
|
||||
subprocess.run([
|
||||
"fish", "-c", "fisher install jorgebucaran/nvm.fish"
|
||||
], check=True)
|
||||
|
||||
subprocess.run([
|
||||
"fish", "-c", "nvm install lts"
|
||||
], check=True)
|
||||
|
||||
|
||||
def install_flatpak_apps():
|
||||
for app in config.FLATPAK_APPS:
|
||||
subprocess.run(['flatpak', 'install', f"{app}"])
|
||||
|
||||
|
||||
def stow_dot_files():
|
||||
for dotfile in config.DOTFILES:
|
||||
subprocess.run(['stow', f"{dotfile}", '--adopt'])
|
||||
|
||||
subprocess.run(['git', 'checkout', '--', '.'])
|
||||
|
||||
|
||||
sym_link_dir()
|
||||
install_apps()
|
||||
install_flatpak_apps()
|
||||
stow_dot_files()
|
||||
@@ -98,6 +98,7 @@ vim.pack.add({
|
||||
"https://github.com/MeanderingProgrammer/render-markdown.nvim",
|
||||
"https://github.com/williamboman/mason.nvim",
|
||||
"https://github.com/williamboman/mason-lspconfig.nvim",
|
||||
"https://github.com/greggh/claude-code.nvim",
|
||||
})
|
||||
|
||||
-- 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.render-markdown')
|
||||
require('plugins.mason')
|
||||
require('plugins.claude')
|
||||
|
||||
@@ -1,71 +1,75 @@
|
||||
{
|
||||
"plugins": {
|
||||
"auto-save.nvim": {
|
||||
"rev": "979b6c8",
|
||||
"rev": "979b6c82f60cfa80f4cf437d77446d0ded0addf0",
|
||||
"src": "https://github.com/Pocco81/auto-save.nvim"
|
||||
},
|
||||
"claude-code.nvim": {
|
||||
"rev": "55c0cb59828fbc3bec744288286a46f5d5750b83",
|
||||
"src": "https://github.com/greggh/claude-code.nvim"
|
||||
},
|
||||
"cmp-buffer": {
|
||||
"rev": "b74fab3",
|
||||
"rev": "b74fab3656eea9de20a9b8116afa3cfc4ec09657",
|
||||
"src": "https://github.com/hrsh7th/cmp-buffer"
|
||||
},
|
||||
"cmp-nvim-lsp": {
|
||||
"rev": "bd5a7d6",
|
||||
"rev": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3",
|
||||
"src": "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
"gitsigns.nvim": {
|
||||
"rev": "20ad441",
|
||||
"rev": "20ad4419564d6e22b189f6738116b38871082332",
|
||||
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
"gruvbox.nvim": {
|
||||
"rev": "5e0a460",
|
||||
"rev": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437",
|
||||
"src": "https://github.com/ellisonleao/gruvbox.nvim"
|
||||
},
|
||||
"indent-blankline.nvim": {
|
||||
"rev": "005b560",
|
||||
"rev": "005b56001b2cb30bfa61b7986bc50657816ba4ba",
|
||||
"src": "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
},
|
||||
"mason-lspconfig.nvim": {
|
||||
"rev": "2304ff6",
|
||||
"rev": "2304ff65ecc8cb2afc2484de3e2ed9a407edf0b9",
|
||||
"src": "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||
},
|
||||
"mason.nvim": {
|
||||
"rev": "ad7146a",
|
||||
"rev": "ad7146aa61dcaeb54fa900144d768f040090bff0",
|
||||
"src": "https://github.com/williamboman/mason.nvim"
|
||||
},
|
||||
"nvim-autopairs": {
|
||||
"rev": "7a2c97c",
|
||||
"rev": "7a2c97cccd60abc559344042fefb1d5a85b3e33b",
|
||||
"src": "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
"nvim-cmp": {
|
||||
"rev": "a7bcf1d",
|
||||
"rev": "a7bcf1d88069fc67c9ace8a62ba480b8fe879025",
|
||||
"src": "https://github.com/hrsh7th/nvim-cmp"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"rev": "ac98db2",
|
||||
"rev": "ac98db2f9f06a56498ec890a96928774eae412c3",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
"nvim-tree.lua": {
|
||||
"rev": "64e2192",
|
||||
"rev": "64e2192f5250796aa4a7f33c6ad888515af50640",
|
||||
"src": "https://github.com/nvim-tree/nvim-tree.lua"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"rev": "42fc28ba",
|
||||
"rev": "42fc28ba918343ebfd5565147a42a26580579482",
|
||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
"nvim-web-devicons": {
|
||||
"rev": "b8221e4",
|
||||
"rev": "b8221e42cf7287c4dcde81f232f58d7b947c210d",
|
||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
"rev": "b9fd522",
|
||||
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
|
||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
"render-markdown.nvim": {
|
||||
"rev": "475d3ad",
|
||||
"rev": "475d3ad8cae486b0df6fc6050cf5b5ea1de42db8",
|
||||
"src": "https://github.com/MeanderingProgrammer/render-markdown.nvim"
|
||||
},
|
||||
"telescope.nvim": {
|
||||
"rev": "b4da76b",
|
||||
"rev": "b4da76be54691e854d3e0e02c36b0245f945c2c7",
|
||||
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,32 +8,27 @@ DIRECTORIES = [
|
||||
]
|
||||
|
||||
DIRECTORIES_TO_REMOVE = [
|
||||
'Public',
|
||||
'Templates',
|
||||
'Public',
|
||||
]
|
||||
|
||||
APPS = [
|
||||
'electrum',
|
||||
'element-desktop',
|
||||
'fisher',
|
||||
'flatpak',
|
||||
'fprintd',
|
||||
'freecad',
|
||||
'libreoffice-fresh',
|
||||
'librewolf-bin',
|
||||
'neovim-git',
|
||||
'neovim',
|
||||
'proton-mail-bin',
|
||||
'proton-vpn-gtk-app',
|
||||
'rtorrent',
|
||||
'steam',
|
||||
'stow',
|
||||
'tmux',
|
||||
'torbrowser-launcher',
|
||||
'vlc',
|
||||
'wl-clipboard',
|
||||
]
|
||||
|
||||
FLATPAK_APPS = [
|
||||
'it.mijorus.gearlever',
|
||||
'me.proton.Mail',
|
||||
'com.protonvpn.www',
|
||||
'gimp',
|
||||
'inkscape',
|
||||
]
|
||||
|
||||
DOTFILES = [
|
||||
@@ -0,0 +1,60 @@
|
||||
import subprocess
|
||||
import config
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def sym_link_dir():
|
||||
confirm_link = input("Do you want to link home directories to external storage? (Y/n): ")
|
||||
|
||||
if confirm_link.lower() in ("y", "yes", ""):
|
||||
target_dir = input("Specify the full path to the external storage: ")
|
||||
|
||||
if Path(target_dir).is_dir():
|
||||
for dir in config.DIRECTORIES:
|
||||
DIR_ITEM = Path(f"{Path.home()}/{dir}")
|
||||
|
||||
if not DIR_ITEM.is_symlink():
|
||||
if DIR_ITEM.is_dir():
|
||||
DIR_ITEM.rmdir()
|
||||
DIR_ITEM.symlink_to(f"{target_dir}/{dir}")
|
||||
|
||||
for dir in config.DIRECTORIES_TO_REMOVE:
|
||||
DIR_ITEM = Path(f"{Path.home()}/{dir}")
|
||||
|
||||
if DIR_ITEM.is_dir() and not DIR_ITEM.is_symlink():
|
||||
DIR_ITEM.rmdir()
|
||||
|
||||
|
||||
def install_apps():
|
||||
for app in config.APPS:
|
||||
subprocess.run([
|
||||
'sudo', 'pacman', '-S', f"{app}", '--noconfirm'
|
||||
], check=True)
|
||||
|
||||
subprocess.run([
|
||||
"fish", "-c", "fisher install jorgebucaran/nvm.fish"
|
||||
], check=True)
|
||||
|
||||
subprocess.run([
|
||||
"fish", "-c", "nvm install lts"
|
||||
], check=True)
|
||||
|
||||
|
||||
def stow_dot_files():
|
||||
dotfiles_root = Path.home()/'.dotfiles'
|
||||
for dotfile in config.DOTFILES:
|
||||
subprocess.run([
|
||||
'stow', '-d', str(dotfiles_root), dotfile, '--adopt'
|
||||
], check=True)
|
||||
|
||||
subprocess.run(
|
||||
['git', 'checkout', '--', *config.DOTFILES],
|
||||
cwd=dotfiles_root,
|
||||
check=True,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sym_link_dir()
|
||||
install_apps()
|
||||
stow_dot_files()
|
||||
Reference in New Issue
Block a user