├── .editorconfig ├── .stowrc ├── Makefile ├── README.md ├── aider ├── .aider.conf.yml └── .aider.model.settings.yml ├── alacritty └── .config │ └── alacritty │ └── alacritty.toml ├── git └── .config │ └── git │ ├── .gitignore │ ├── config │ └── ignore ├── mpv └── .config │ └── mpv │ ├── input.conf │ ├── mpv.conf │ └── script-opts │ └── autoload.conf ├── nvim └── .config │ └── nvim │ └── init.lua ├── ripgrep └── .config │ └── ripgrep │ └── config ├── tmux └── .tmux.conf ├── vim └── .vimrc ├── xfce └── .config │ └── xfce4 │ └── xfconf │ └── xfce-perchannel-xml │ ├── keyboard-layout.xml │ ├── keyboards.xml │ └── xfce4-keyboard-shortcuts.xml └── zsh ├── .config └── zsh │ └── .zshrc ├── .local ├── share │ └── zsh │ │ ├── functions │ │ ├── apt-autorm │ │ ├── apt-up │ │ ├── cdls │ │ ├── cheat │ │ ├── rm-swap │ │ ├── up │ │ └── upr │ │ └── prompt │ │ └── prompt_personal_setup └── state │ └── zsh │ └── .gitkeep └── .zshenv /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.lua] 2 | align_continuous_assign_statement = true 3 | quote_style = single 4 | space_around_table_field_list = false 5 | -------------------------------------------------------------------------------- /.stowrc: -------------------------------------------------------------------------------- 1 | --dotfiles 2 | --no-folding 3 | --target=~ 4 | --verbose 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #################### COMMANDS ################################################## 2 | .PHONY: install-base 3 | install-base: update base 4 | 5 | .PHONY: install-cli 6 | install-cli: install-base cli 7 | 8 | .PHONY: install-gui 9 | install-gui: install-base gui 10 | 11 | .PHONY: install-ls 12 | install-ls: bashls gols pythonls 13 | 14 | .PHONY: update 15 | update: 16 | @echo "Updating packages..." 17 | @apt update 18 | @apt -y upgrade 19 | 20 | .PHONY: clean 21 | clean: 22 | @echo "Cleaning up..." 23 | @apt -y autoremove 24 | 25 | #################### PACKAGES ################################################## 26 | .PHONY: base 27 | base: 28 | @echo "Installing base packages..." 29 | @apt -y install \ 30 | build-essential \ 31 | curl \ 32 | direnv \ 33 | git \ 34 | manpages-posix \ 35 | software-properties-common \ 36 | stow \ 37 | tmux \ 38 | tree \ 39 | unzip \ 40 | vim 41 | 42 | .PHONY: cli 43 | cli: go neovim 44 | @echo "Installing cli packages..." 45 | @apt -y install \ 46 | 7zip \ 47 | bat \ 48 | btop \ 49 | fd-find \ 50 | git-delta \ 51 | keychain \ 52 | nodejs \ 53 | npm \ 54 | ripgrep \ 55 | shellcheck \ 56 | trash-cli \ 57 | zsh \ 58 | zsh-syntax-highlighting 59 | 60 | .PHONY: gui 61 | gui: 62 | @echo "Installing gui packages..." 63 | @apt -y install \ 64 | alacritty \ 65 | arc-theme \ 66 | firefox \ 67 | mpv \ 68 | nomacs \ 69 | papirus-icon-theme \ 70 | xfce4-taskmanager 71 | 72 | .PHONY: go 73 | go: 74 | @echo "Installing go v1.24..." 75 | @curl -fsSL -o go.tar.gz https://go.dev/dl/go1.24.3.linux-amd64.tar.gz 76 | @rm -rf /usr/local/go && tar -C /usr/local -xzf go.tar.gz 77 | @rm -f go.tar.gz 78 | 79 | .PHONY: neovim 80 | neovim: 81 | @echo "Installing neovim nightly..." 82 | @curl -fsSL -O https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.appimage 83 | @install nvim-linux-x86_64.appimage /usr/bin/nvim 84 | @rm -f nvim-linux-x86_64.appimage 85 | 86 | #################### LANGUAGE SERVERS ########################################## 87 | .PHONY: bashls 88 | bashls: 89 | @echo "Installing bash language server..." 90 | @npm install -g bash-language-server 91 | @go install mvdan.cc/sh/v3/cmd/shfmt@latest 92 | 93 | .PHONY: gols 94 | gols: 95 | @echo "Installing go language server..." 96 | @go install golang.org/x/tools/gopls@latest 97 | 98 | .PHONY: pythonls 99 | pythonls: uv 100 | @echo "Installing python language server..." 101 | @uv tool install ty@latest 102 | 103 | #################### APPS ###################################################### 104 | .PHONY: aider 105 | aider: 106 | @echo "Installing aider..." 107 | @uv tool install --with pip aider-chat@latest 108 | 109 | .PHONY: fzf 110 | fzf: 111 | @echo "Installing fzf..." 112 | @rm -rf ~/.fzf ~/.fzf-git 113 | @git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf 114 | @git clone --depth 1 https://github.com/junegunn/fzf-git.sh.git ~/.fzf-git 115 | @~/.fzf/install --xdg --key-bindings --completion --no-update-rc --no-bash --no-fish 116 | 117 | .PHONY: jetbrains-mono 118 | jetbrains-mono: 119 | @echo "Installing jetbrains mono..." 120 | @curl -fsSL -o jetbrains-mono.tar.xz https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz 121 | @mkdir -p ~/.local/share/fonts/JetBrainsMono 122 | @tar -C ~/.local/share/fonts/JetBrainsMono -xJf jetbrains-mono.tar.xz 123 | @rm -f jetbrains-mono.tar.xz 124 | @fc-cache -f 125 | 126 | .PHONY: tree-sitter 127 | tree-sitter: 128 | @echo "Installing tree-sitter..." 129 | @npm install -g tree-sitter-cli 130 | 131 | .PHONY: uv 132 | uv: 133 | @echo "Installing uv..." 134 | @curl -fsSL https://astral.sh/uv/install.sh | sh 135 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | This repository contains my config files for: 4 | - **aider** 5 | - **alacritty** 6 | - **git** 7 | - **mpv** 8 | - **neovim** 9 | - **ripgrep** 10 | - **tmux** 11 | - **vim** 12 | - **xfce keyboard** 13 | - **zsh** 14 | 15 | ## Install 16 | 1. In Ubuntu 24.04+, use the [Makefile](./Makefile) to install packages: 17 | ```bash 18 | sudo make install-base # install base packages 19 | sudo make install-cli # install base + CLI packages 20 | sudo make install-gui # install base + GUI packages 21 | sudo make clean # clean up packages 22 | ``` 23 | 2. Install additional apps: 24 | ```bash 25 | make install-ls # language servers 26 | make aider fzf jetbrains-mono tree-sitter uv # user apps 27 | ``` 28 | 3. Run [stow](https://www.gnu.org/software/stow/) to symlink config files: 29 | ```bash 30 | stow aider git nvim ripgrep tmux vim zsh # CLI configs 31 | stow alacritty mpv xfce # GUI configs 32 | ``` 33 | 34 | ## Post-install 35 | - Change the default shell: `chsh -s /usr/bin/zsh` and reboot 36 | - Create git configs `~/.config/git/personal` and `~/.config/git/work` 37 | - Generate SSH keys if needed: `ssh-keygen -t ed25519 -C "email@example.com"` 38 | - Run keychain if needed: `eval $(keychain --quiet --eval id_ed25519)` 39 | - Configure XFCE if used 40 | - Export environment variables in `~/.config/zsh/.env` 41 | - Add additional commands to run in `~/.config/zsh/.run` 42 | -------------------------------------------------------------------------------- /aider/.aider.conf.yml: -------------------------------------------------------------------------------- 1 | model: anthropic/claude-3-7-sonnet-20250219 2 | dark-mode: true 3 | code-theme: one-dark 4 | gitignore: false 5 | auto-commits: false 6 | dirty-commits: false 7 | analytics-disable: true 8 | disable-playwright: true 9 | -------------------------------------------------------------------------------- /aider/.aider.model.settings.yml: -------------------------------------------------------------------------------- 1 | - name: anthropic/claude-3-7-sonnet-20250219 2 | edit_format: diff 3 | weak_model_name: anthropic/claude-3-5-haiku-20241022 4 | use_repo_map: true 5 | examples_as_sys_msg: true 6 | use_temperature: false 7 | extra_params: 8 | extra_headers: 9 | anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25,output-128k-2025-02-19 10 | max_tokens: 64000 11 | thinking: 12 | type: enabled 13 | budget_tokens: 32000 14 | cache_control: true 15 | editor_model_name: anthropic/claude-3-7-sonnet-20250219 16 | editor_edit_format: editor-diff 17 | -------------------------------------------------------------------------------- /alacritty/.config/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | # Options 2 | [font] 3 | size = 12.0 4 | [font.normal] 5 | family = 'JetBrainsMonoNL Nerd Font' 6 | style = 'Regular' 7 | [font.bold] 8 | family = 'JetBrainsMonoNL Nerd Font' 9 | style = 'Bold' 10 | [font.italic] 11 | family = 'JetBrainsMonoNL Nerd Font' 12 | style = 'Italic' 13 | [font.bold_italic] 14 | family = 'JetBrainsMonoNL Nerd Font' 15 | style = 'Bold Italic' 16 | [window] 17 | startup_mode = 'Maximized' 18 | 19 | # Colors (One Dark) 20 | [colors.primary] 21 | background = '#282c34' 22 | foreground = '#abb2bf' 23 | [colors.normal] 24 | black = '#1e2127' 25 | red = '#e06c75' 26 | green = '#98c379' 27 | yellow = '#d19a66' 28 | blue = '#61afef' 29 | magenta = '#c678dd' 30 | cyan = '#56b6c2' 31 | white = '#abb2bf' 32 | [colors.bright] 33 | black = '#5c6370' 34 | red = '#e06c75' 35 | green = '#98c379' 36 | yellow = '#d19a66' 37 | blue = '#61afef' 38 | magenta = '#c678dd' 39 | cyan = '#56b6c2' 40 | white = '#ffffff' 41 | -------------------------------------------------------------------------------- /git/.config/git/.gitignore: -------------------------------------------------------------------------------- 1 | personal 2 | work 3 | -------------------------------------------------------------------------------- /git/.config/git/config: -------------------------------------------------------------------------------- 1 | [alias] 2 | a = add 3 | cm = commit 4 | cma = commit --amend 5 | co = checkout 6 | d = diff 7 | dc = diff --cached 8 | i = show --abbrev-commit --date=iso 9 | l = log --graph --format='%C(yellow)%h%Cred%d %Creset%s %Cgreen(%ar) %Cblue%an%Creset' 10 | pl = pull 11 | ps = push 12 | rb = rebase 13 | rs = reset 14 | s = status 15 | ua = restore --staged 16 | 17 | [column] 18 | ui = auto 19 | 20 | [core] 21 | pager = delta 22 | 23 | [delta] 24 | line-numbers = true 25 | navigate = true 26 | 27 | [diff] 28 | algorithm = histogram 29 | colorMoved = true 30 | colorMovedWS = allow-indentation-change 31 | mnemonicPrefix = true 32 | 33 | [fetch] 34 | all = true 35 | prune = true 36 | pruneTags = true 37 | 38 | [init] 39 | defaultBranch = main 40 | 41 | [include] 42 | path = personal 43 | 44 | [includeIf "gitdir:~/Work/"] 45 | path = work 46 | 47 | [interactive] 48 | diffFilter = delta --color-only 49 | 50 | [merge] 51 | conflictstyle = zdiff3 52 | tool = nvimdiff3 53 | 54 | [mergetool] 55 | keepBackup = false 56 | 57 | [pull] 58 | rebase = true 59 | 60 | [push] 61 | autosetupremote = true 62 | 63 | [rebase] 64 | updateRefs = true 65 | 66 | [user] 67 | useConfigOnly = true 68 | -------------------------------------------------------------------------------- /git/.config/git/ignore: -------------------------------------------------------------------------------- 1 | .aider* 2 | !.aider.conf.yml 3 | !.aider.model.settings.yml 4 | .envrc 5 | -------------------------------------------------------------------------------- /mpv/.config/mpv/input.conf: -------------------------------------------------------------------------------- 1 | r cycle_values video-rotate 90 180 270 0 2 | s playlist-shuffle 3 | Shift+s playlist-unshuffle 4 | DEL run "trash" "${path}"; playlist-remove current 5 | -------------------------------------------------------------------------------- /mpv/.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | window-maximized=yes 2 | hwdec=auto-safe 3 | script=/usr/share/doc/mpv/examples/lua/autoload.lua 4 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/autoload.conf: -------------------------------------------------------------------------------- 1 | images=no 2 | ignore_hidden=no 3 | directory_mode=ignore 4 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | -------------------- INIT ------------------------------------------------------ 2 | local mini = string.format('%s/site/pack/deps/start/mini.nvim', vim.fn.stdpath('data')) 3 | if not vim.uv.fs_stat(mini) then 4 | vim.notify('Installing mini.nvim', vim.log.levels.INFO) 5 | vim.system({'git', 'clone', '--filter=blob:none', 'https://github.com/echasnovski/mini.nvim', mini}):wait() 6 | vim.cmd('packadd mini.nvim | helptags ALL') 7 | end 8 | 9 | -------------------- PLUGINS --------------------------------------------------- 10 | require('mini.deps').setup() 11 | MiniDeps.add({source = 'navarasu/onedark.nvim', checkout = 'master'}) 12 | MiniDeps.add({source = 'neovim/nvim-lspconfig', checkout = 'master'}) 13 | MiniDeps.add({source = 'nvim-treesitter/nvim-treesitter', checkout = 'main'}) 14 | MiniDeps.add({source = 'nvim-treesitter/nvim-treesitter-context', checkout = 'master'}) 15 | MiniDeps.add({source = 'ojroques/nvim-bookmarks', checkout = 'main'}) 16 | MiniDeps.add({source = 'ojroques/nvim-bufbar', checkout = 'personal'}) 17 | 18 | -------------------- PLUGIN SETUP ---------------------------------------------- 19 | -- mini.extra 20 | require('mini.extra').setup() 21 | -- mini.ai 22 | require('mini.ai').setup({custom_textobjects = {e = MiniExtra.gen_ai_spec.buffer()}}) 23 | -- mini.basics 24 | require('mini.basics').setup({ 25 | options = {basic = false}, 26 | mappings = {option_toggle_prefix = 'yo'}, 27 | }) 28 | -- mini.bracketed 29 | require('mini.bracketed').setup() 30 | -- mini.bufremove 31 | require('mini.bufremove').setup() 32 | vim.keymap.set('n', 'gd', MiniBufremove.delete) 33 | -- mini.completion 34 | require('mini.completion').setup({lsp_completion = {source_func = 'omnifunc', auto_setup = false}}) 35 | -- mini.diff 36 | require('mini.diff').setup() 37 | vim.keymap.set('n', 'ghp', MiniDiff.toggle_overlay) 38 | vim.keymap.set('n', 'ghR', 'gHae', {remap = true}) 39 | vim.keymap.set('n', 'ghS', 'ghae', {remap = true}) 40 | vim.keymap.set('n', 'ghr', 'gHgh', {remap = true}) 41 | vim.keymap.set('n', 'ghs', 'ghgh', {remap = true}) 42 | -- mini.files 43 | require('mini.files').setup() 44 | vim.keymap.set('n', '-', function() MiniFiles.open(vim.api.nvim_buf_get_name(0)) end) 45 | -- mini.icons 46 | require('mini.icons').setup() 47 | MiniDeps.later(MiniIcons.tweak_lsp_kind) 48 | -- mini.indentscope 49 | require('mini.indentscope').setup({draw = {animation = require('mini.indentscope').gen_animation.none()}}) 50 | -- mini.keymap 51 | require('mini.keymap').setup() 52 | MiniKeymap.map_multistep('i', '', {'pmenu_next'}) 53 | MiniKeymap.map_multistep('i', '', {'pmenu_prev'}) 54 | -- mini.misc 55 | require('mini.misc').setup_auto_root({'.git'}) 56 | -- mini.notify 57 | require('mini.notify').setup() 58 | vim.notify = MiniNotify.make_notify() 59 | -- mini.operators 60 | require('mini.operators').setup({ 61 | replace = {prefix = 'cr'}, 62 | exchange = {prefix = ''}, evaluate = {prefix = ''}, multiply = {prefix = ''}, 63 | }) 64 | -- mini.pick 65 | require('mini.pick').setup({mappings = {refine = '', refine_marked = ''}}) 66 | vim.keymap.set('n', 'sb', MiniPick.builtin.buffers) 67 | vim.keymap.set('n', 'sd', MiniExtra.pickers.diagnostic) 68 | vim.keymap.set('n', 'sf', MiniPick.builtin.files) 69 | vim.keymap.set('n', 'sg', MiniPick.builtin.grep) 70 | vim.keymap.set('n', 'sl', MiniPick.builtin.grep_live) 71 | vim.keymap.set('n', 'sr', MiniPick.builtin.resume) 72 | -- mini.statusline 73 | require('mini.statusline').setup() 74 | -- mini.surround 75 | require('mini.surround').setup({mappings = { 76 | add = 'ys', delete = 'ds', replace = 'cs', 77 | find = '', find_left = '', highlight = '', suffix_last = '', suffix_next = '', update_n_lines = '', 78 | }}) 79 | vim.keymap.del('x', 'ys') 80 | -- mini.trailspace 81 | require('mini.trailspace').setup() 82 | -- nvim-bookmarks 83 | local bookmarks = require('bookmarks') 84 | bookmarks.setup() 85 | vim.keymap.set('n', 'mm', bookmarks.add) 86 | vim.keymap.set('n', 'm1', function() bookmarks.open(1) end) 87 | vim.keymap.set('n', 'm2', function() bookmarks.open(2) end) 88 | vim.keymap.set('n', 'm3', function() bookmarks.open(3) end) 89 | vim.keymap.set('n', 'm4', function() bookmarks.open(4) end) 90 | vim.keymap.set('n', 'M', bookmarks.toggle_menu) 91 | -- nvim-bufbar 92 | require('bufbar').setup() 93 | -- nvim-treesitter-context 94 | require('treesitter-context').setup({mode = 'topline', separator = '━'}) 95 | -- onedark.nvim 96 | require('onedark').load() 97 | 98 | -------------------- LSP ------------------------------------------------------- 99 | local on_attach = function(_, buf) 100 | vim.bo[buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp' 101 | vim.keymap.set('n', 'gqae', vim.lsp.buf.format, {buffer = buf}) 102 | vim.keymap.set('n', 'grd', function() MiniExtra.pickers.lsp({scope = 'definition'}) end, {buffer = buf}) 103 | vim.keymap.set('n', 'gri', function() MiniExtra.pickers.lsp({scope = 'implementation'}) end, {buffer = buf}) 104 | vim.keymap.set('n', 'grr', function() MiniExtra.pickers.lsp({scope = 'references'}) end, {buffer = buf}) 105 | vim.keymap.set('n', 'grt', function() MiniExtra.pickers.lsp({scope = 'type_definition'}) end, {buffer = buf}) 106 | end 107 | local capabilities = vim.lsp.protocol.make_client_capabilities() 108 | capabilities.textDocument.completion.completionItem.snippetSupport = false 109 | vim.lsp.config('*', {capabilities = capabilities, on_attach = on_attach}) 110 | vim.lsp.enable({'bashls', 'gopls', 'ty'}) 111 | 112 | -------------------- TREESITTER ------------------------------------------------ 113 | vim.api.nvim_create_autocmd('FileType', { 114 | group = vim.api.nvim_create_augroup('treesitter', {}), 115 | callback = function(a) 116 | lang = vim.treesitter.language.get_lang(a.match) 117 | if vim.treesitter.language.add(lang) then 118 | vim.treesitter.start(a.buf, lang) 119 | end 120 | end, 121 | }) 122 | 123 | -------------------- OPTIONS --------------------------------------------------- 124 | vim.diagnostic.config({severity_sort = true, virtual_text = true}) 125 | vim.opt.colorcolumn = '+1' -- Line length marker 126 | vim.opt.completeopt = {'menuone', 'noselect'} -- Completion options 127 | vim.opt.cursorline = true -- Highlight cursor line 128 | vim.opt.expandtab = true -- Use spaces instead of tabs 129 | vim.opt.ignorecase = true -- Ignore case 130 | vim.opt.inccommand = '' -- Disable substitution preview 131 | vim.opt.list = true -- Show invisible characters 132 | vim.opt.mouse = '' -- Disable mouse 133 | vim.opt.number = true -- Show line numbers 134 | vim.opt.pumheight = 12 -- Max height of pop-up menu 135 | vim.opt.relativenumber = true -- Show relative line numbers 136 | vim.opt.report = 0 -- Always report changed lines 137 | vim.opt.scrolloff = 4 -- Lines of context 138 | vim.opt.shiftround = true -- Round indent 139 | vim.opt.shiftwidth = 0 -- Indent size 140 | vim.opt.shortmess = 'atToOcCF' -- Prompt message options 141 | vim.opt.sidescrolloff = 12 -- Columns of context 142 | vim.opt.signcolumn = 'yes' -- Show sign column 143 | vim.opt.smartcase = true -- Do not ignore capital letters 144 | vim.opt.smartindent = true -- Insert indents automatically 145 | vim.opt.splitbelow = true -- Put new window below current 146 | vim.opt.splitright = true -- Put new window right of current 147 | vim.opt.tabstop = 2 -- Number of spaces tabs count for 148 | vim.opt.textwidth = 99 -- Max width of text 149 | vim.opt.updatetime = 200 -- Delay before swap file is saved 150 | vim.opt.wildmode = {'list:longest'} -- Command completion options 151 | vim.opt.wrap = false -- Disable line wrap 152 | 153 | -------------------- MAPPINGS -------------------------------------------------- 154 | local function substitute() 155 | local cmd = ':%s//gcI' 156 | return vim.fn.mode() == 'n' and string.format(cmd, '%s') or string.format(cmd, 's') 157 | end 158 | vim.keymap.set('', '', '') 159 | vim.keymap.set('', 'S', substitute, {expr = true}) 160 | vim.keymap.set('i', 'jj', '') 161 | vim.keymap.set('n', '', '-') 162 | vim.keymap.set('n', '', '<') 163 | vim.keymap.set('n', '', '>') 164 | vim.keymap.set('n', '', '+') 165 | vim.keymap.set('n', 'H', 'zh') 166 | vim.keymap.set('n', 'L', 'zl') 167 | vim.keymap.set('n', 'U', 'update') 168 | vim.keymap.set('n', 'X', 'conf qa') 169 | -------------------------------------------------------------------------------- /ripgrep/.config/ripgrep/config: -------------------------------------------------------------------------------- 1 | --hidden 2 | --smart-case 3 | --glob=!.git 4 | -------------------------------------------------------------------------------- /tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | #################### OPTIONS ############################### 2 | # Server options 3 | set -s default-terminal "tmux-256color" 4 | set -s escape-time 0 5 | set -s focus-events on 6 | set -s set-clipboard on 7 | set -sa terminal-overrides ",xterm-256color:RGB" 8 | 9 | # Session options 10 | set -g base-index 1 11 | set -g history-limit 10000 12 | set -g prefix C-Space 13 | set -g renumber-windows on 14 | set -g status-interval 1 15 | set -g status-keys vi 16 | 17 | # Window options 18 | set -g main-pane-height 75% 19 | set -g main-pane-width 75% 20 | set -g mode-keys vi 21 | set -g pane-base-index 1 22 | 23 | #################### BINDINGS ############################## 24 | # Unbind all 25 | unbind -a 26 | unbind -a -T copy-mode 27 | 28 | # General 29 | bind C-Space send-prefix 30 | bind d detach-client 31 | 32 | # Windows 33 | bind t new-window -c "#{pane_current_path}" 34 | bind w confirm-before kill-window 35 | bind -r n next-window 36 | bind -r p previous-window 37 | bind 1 select-window -t :=1 38 | bind 2 select-window -t :=2 39 | bind 3 select-window -t :=3 40 | bind 4 select-window -t :=4 41 | bind 5 select-window -t :=5 42 | bind 6 select-window -t :=6 43 | bind 7 select-window -t :=7 44 | bind 8 select-window -t :=8 45 | bind 9 select-window -t :=9 46 | bind N swap-window -d -t +1 47 | bind P swap-window -d -t -1 48 | 49 | # Panes 50 | bind s split-window -c "#{pane_current_path}" -v 51 | bind v split-window -c "#{pane_current_path}" -h 52 | bind c kill-pane 53 | bind q display-panes 54 | bind h if -F "#{pane_at_left}" "" "select-pane -L" 55 | bind j if -F "#{pane_at_bottom}" "" "select-pane -D" 56 | bind k if -F "#{pane_at_top}" "" "select-pane -U" 57 | bind l if -F "#{pane_at_right}" "" "select-pane -R" 58 | bind J swap-pane -U 59 | bind K swap-pane -D 60 | bind z resize-pane -Z 61 | bind -r Down resize-pane -D 62 | bind -r Left resize-pane -L 63 | bind -r Right resize-pane -R 64 | bind -r Up resize-pane -U 65 | bind m select-layout main-horizontal 66 | bind M select-layout main-vertical 67 | bind = select-layout tiled 68 | bind + select-layout -E 69 | bind e select-layout even-horizontal 70 | bind E select-layout even-vertical 71 | 72 | # Copy and paste 73 | bind [ copy-mode 74 | bind ] paste-buffer 75 | bind -T copy-mode-vi Enter send-keys -X copy-selection 76 | 77 | #################### STYLES ################################ 78 | # Panes 79 | set -g pane-border-style "fg=brightblack" 80 | set -g pane-active-border-style "fg=white" 81 | 82 | # Status line 83 | set -g status-style "bg=brightblack,fg=black" 84 | set -g status-left " [#{?client_prefix,PREF,#{?pane_in_mode,COPY,TMUX}}] " 85 | set -g status-left-style "bg=white,fg=black" 86 | set -g window-status-format " #I: #{b:pane_current_path} #F " 87 | set -g window-status-style "fg=white" 88 | set -g window-status-current-format " #I: #{b:pane_current_path} #F " 89 | set -g window-status-current-style "bg=white,fg=black" 90 | set -g window-status-separator "|" 91 | set -g status-right " [#S] " 92 | set -g status-right-style "bg=white,fg=black" 93 | -------------------------------------------------------------------------------- /vim/.vimrc: -------------------------------------------------------------------------------- 1 | " INIT 2 | set nocompatible 3 | filetype plugin indent on 4 | syntax enable 5 | 6 | " OPTIONS 7 | set autoindent 8 | set autoread 9 | set background=dark 10 | set backspace=indent,eol,start 11 | set completeopt=menuone,noselect 12 | set expandtab 13 | set hidden 14 | set hlsearch 15 | set ignorecase 16 | set incsearch 17 | set laststatus=2 18 | set list 19 | set listchars=tab:>\ ,trail:-,nbsp:+ 20 | set nojoinspaces 21 | set nostartofline 22 | set nowrap 23 | set number relativenumber 24 | set pumheight=12 25 | set report=0 26 | set ruler 27 | set scrolloff=4 28 | set shiftround 29 | set shiftwidth=0 30 | set showcmd 31 | set sidescrolloff=12 32 | set smartcase 33 | set smartindent 34 | set splitbelow splitright 35 | set tabstop=2 36 | set termguicolors 37 | set textwidth=99 38 | set updatetime=200 39 | set wildmenu 40 | set wildmode=list:longest 41 | colorscheme desert 42 | 43 | " MAPPINGS 44 | inoremap u 45 | inoremap u 46 | inoremap jj 47 | nnoremap :nohlsearch 48 | nnoremap H zh 49 | nnoremap L zl 50 | nnoremap Q @@ 51 | nnoremap U :update 52 | nnoremap X :conf qa 53 | nnoremap Y y$ 54 | nnoremap [b :bprevious 55 | nnoremap ]b :bnext 56 | noremap 57 | -------------------------------------------------------------------------------- /xfce/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /xfce/.config/xfce4/xfconf/xfce-perchannel-xml/keyboards.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /xfce/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /zsh/.config/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # ZSH OPTIONS 2 | setopt glob_dots 3 | setopt hist_ignore_all_dups 4 | setopt hist_reduce_blanks 5 | setopt no_auto_menu 6 | setopt share_history 7 | 8 | # ZSH PARAMETERS 9 | HISTFILE="$XDG_STATE_HOME/zsh/history" 10 | HISTORY_IGNORE="(cd|dl|doc|e|ll|ls|py|t|tmp|up|upr|wk)" 11 | HISTSIZE=10000 12 | SAVEHIST=10000 13 | 14 | # ZLE 15 | bindkey -v 16 | bindkey -M main '\e.' insert-last-word 17 | bindkey -M main ^N down-history 18 | bindkey -M main ^P up-history 19 | bindkey -M main jj vi-cmd-mode 20 | function zle-line-init zle-keymap-select { 21 | case $KEYMAP in 22 | vicmd) printf "\e[2 q";; # steady block 23 | main) printf "\e[6 q";; # steady bar 24 | esac 25 | } 26 | zle -N zle-line-init 27 | zle -N zle-keymap-select 28 | 29 | # FPATH 30 | typeset -U fpath 31 | fpath=("$XDG_DATA_HOME/zsh/functions" "$XDG_DATA_HOME/zsh/prompt" $fpath) 32 | 33 | # PATH 34 | typeset -U path 35 | path=("$XDG_BIN_HOME" "$HOME/go/bin" "/usr/local/go/bin" "$HOME/.node_modules/bin" $path) 36 | export PATH 37 | 38 | # GIT 39 | autoload -Uz vcs_info 40 | zstyle ':vcs_info:*' enable git 41 | zstyle ':vcs_info:git:*' check-for-changes true 42 | zstyle ':vcs_info:git:*' stagedstr '=' 43 | zstyle ':vcs_info:git:*' unstagedstr '~' 44 | zstyle ':vcs_info:git:*' formats '(%b)%c%u' 45 | zstyle ':vcs_info:git:*' actionformats '(%b)%c%u %a' 46 | 47 | # PROMPT 48 | autoload -Uz promptinit 49 | promptinit 50 | prompt personal 51 | 52 | # COMPLETION 53 | autoload -Uz compinit 54 | compinit 55 | zstyle ':completion:*' completer _expand _complete 56 | zstyle ':completion:*' group-name '' 57 | zstyle ':completion:*' list-dirs-first true 58 | zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} 59 | zstyle ':completion:*:descriptions' format '%F{magenta}-- %d --%f' 60 | zstyle ':completion:*:warnings' format '%F{yellow}-- %d --%f' 61 | 62 | # FUNCTIONS 63 | autoload -Uz "$XDG_DATA_HOME/zsh/functions"/*(:t) 64 | 65 | # CDR 66 | autoload -Uz chpwd_recent_dirs cdr add-zsh-hook 67 | add-zsh-hook chpwd cdls 68 | add-zsh-hook chpwd chpwd_recent_dirs 69 | 70 | # EDITOR 71 | export EDITOR="vim" 72 | export VISUAL="nvim" 73 | export SUDO_EDITOR="vim" 74 | 75 | # ALIASES 76 | alias df='df -Th --total' 77 | alias diff='diff -su --color=auto' 78 | alias dl="cd $HOME/Downloads" 79 | alias doc="cd $HOME/Documents" 80 | alias du='du -ch' 81 | alias e="$VISUAL" 82 | alias g='git' 83 | alias grep='grep --color=auto' 84 | alias ip='ip -c -h' 85 | alias ll='ls -lAh' 86 | alias ls='ls -F --color=auto --group-directories-first' 87 | alias py='python3' 88 | alias t='tmux' 89 | alias tmp="cd $HOME/.tmp" 90 | alias tree='tree -FC --dirsfirst -I .git' 91 | alias wk="cd $HOME/Work" 92 | 93 | # APP PARAMETERS 94 | export BAT_THEME="OneHalfDark" 95 | export MANPAGER='nvim --appimage-extract-and-run +Man!' 96 | export RIPGREP_CONFIG_PATH="$XDG_CONFIG_HOME/ripgrep/config" 97 | export NPM_CONFIG_PREFIX="$HOME/.node_modules" 98 | 99 | # EXTERNAL SOURCES 100 | [[ -x /usr/bin/dircolors ]] && eval "$(dircolors -b)" 101 | [[ -x /usr/bin/direnv ]] && eval "$(direnv hook zsh)" 102 | [[ -r /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] && source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 103 | [[ -r "$XDG_CONFIG_HOME/fzf/fzf.zsh" ]] && source "$XDG_CONFIG_HOME/fzf/fzf.zsh" 104 | [[ -r "$HOME/.fzf-git/fzf-git.sh" ]] && source "$HOME/.fzf-git/fzf-git.sh" 105 | [[ -r "$XDG_CONFIG_HOME/zsh/.env" ]] && source "$XDG_CONFIG_HOME/zsh/.env" 106 | [[ -r "$XDG_CONFIG_HOME/zsh/.run" ]] && source "$XDG_CONFIG_HOME/zsh/.run" 107 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/functions/apt-autorm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Remove packages no longer needed 4 | function apt-autorm { 5 | sudo -E apt -y autoremove 6 | } 7 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/functions/apt-up: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Update and upgrade packages 4 | function apt-up { 5 | sudo -E apt update 6 | sudo -E apt -y upgrade 7 | } 8 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/functions/cdls: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # List files after changing directory 4 | function cdls { 5 | local count=$(ls -1 | wc -l) 6 | 7 | if [[ $count -gt 100 ]]; then 8 | echo "Too many files to display ($count)" 9 | return 10 | fi 11 | 12 | ls -F --color=auto --group-directories-first 13 | } 14 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/functions/cheat: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Cheat sheet 4 | function cheat { 5 | curl "cheat.sh/$1" 6 | } 7 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/functions/rm-swap: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Remove swap files 4 | function rm-swap { 5 | rm -fv $PWD/*.swp 6 | rm -fv $XDG_STATE_HOME/nvim/swap/*.swp 7 | } 8 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/functions/up: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Go to the n-th parent folder 4 | function up { 5 | if [[ $# -eq 0 ]]; then 6 | cd "../" 7 | return 8 | fi 9 | 10 | if [[ $# -gt 1 || $1 -le 0 ]]; then 11 | echo "Usage: up [n > 0]" 12 | fi 13 | 14 | local dir="" 15 | for _ in $(seq 1 "$1"); do 16 | dir+="../" 17 | done 18 | 19 | cd "$dir" || return 20 | } 21 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/functions/upr: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Go to the project root folder 4 | function upr { 5 | local current=$PWD 6 | local root=$PWD 7 | 8 | while true; do 9 | if [[ -e $current/.git ]]; then 10 | root=$current 11 | break 12 | fi 13 | 14 | if [[ $current = "/" ]]; then 15 | break 16 | fi 17 | 18 | current=$(dirname "$current") 19 | done 20 | 21 | cd "$root" || return 22 | } 23 | -------------------------------------------------------------------------------- /zsh/.local/share/zsh/prompt/prompt_personal_setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function prompt_personal_precmd { 4 | vcs_info 5 | prompt_git="" 6 | if [[ -n $vcs_info_msg_0_ ]]; then 7 | prompt_git=" · %F{yellow}${vcs_info_msg_0_}%f" 8 | fi 9 | } 10 | 11 | function prompt_personal_setup { 12 | prompt_opts=(cr sp percent subst) 13 | add-zsh-hook precmd prompt_personal_precmd 14 | PS1='%F{green}%n@%M%f · %B%F{blue}%~%f%b${prompt_git}%(?.. · %B%F{red}%?%f%b)${prompt_newline}%F{magenta}%#%f ' 15 | PS2='%F{magenta}%_ %#%f ' 16 | } 17 | 18 | prompt_personal_setup "@" 19 | -------------------------------------------------------------------------------- /zsh/.local/state/zsh/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ojroques/dotfiles/570071c4d00cff702d4027d664fa3ee514d8b126/zsh/.local/state/zsh/.gitkeep -------------------------------------------------------------------------------- /zsh/.zshenv: -------------------------------------------------------------------------------- 1 | # XDG 2 | export XDG_BIN_HOME="$HOME/.local/bin" 3 | export XDG_CACHE_HOME="$HOME/.cache" 4 | export XDG_CONFIG_HOME="$HOME/.config" 5 | export XDG_DATA_HOME="$HOME/.local/share" 6 | export XDG_STATE_HOME="$HOME/.local/state" 7 | 8 | # ZSH PARAMETERS 9 | ZDOTDIR="$XDG_CONFIG_HOME/zsh" 10 | --------------------------------------------------------------------------------