├── .github └── workflows │ └── gitguardian.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── TODO.md ├── ansible ├── .nvim.settings.json ├── README.md ├── ansible.cfg ├── hosts ├── install ├── linux.yml └── roles │ ├── dot │ └── tasks │ │ └── main.yml │ ├── fonts │ ├── handlers │ │ └── main.yml │ └── tasks │ │ ├── download.yml │ │ └── main.yml │ ├── node │ └── tasks │ │ └── main.yml │ ├── packages │ └── tasks │ │ ├── main.yml │ │ └── repos.yml │ ├── system │ ├── files │ │ ├── keyd.conf │ │ ├── powersave.rules │ │ ├── touchpad.conf │ │ └── tuned-laptop-performance.conf │ └── tasks │ │ └── main.yml │ └── web │ ├── tasks │ └── main.yml │ └── templates │ └── app.j2 ├── config ├── .gitconfig ├── .ssh.config ├── .ticker.yaml ├── ags │ ├── .gitignore │ ├── app.ts │ ├── env.d.ts │ ├── package.json │ ├── style.scss │ ├── tsconfig.json │ ├── utils │ │ └── cliphist.ts │ └── widget │ │ ├── AppLauncher.scss │ │ └── AppLauncher.tsx ├── alacritty │ ├── alacritty.toml │ └── alacritty.yml ├── aria2 │ └── aria2.conf ├── atuin │ └── config.toml ├── bat │ ├── config │ └── themes │ │ └── tokyonight ├── brave-beta-flags.conf ├── brave-flags.conf ├── environment.d │ └── defaults.conf ├── fastfetch │ └── config.jsonc ├── fish │ ├── completions │ │ ├── bun.fish │ │ ├── docker-compose.fish │ │ ├── docker.fish │ │ ├── fisher.fish │ │ └── fzf_configure_bindings.fish │ ├── conf.d │ │ ├── autopair.fish │ │ ├── done.fish │ │ ├── fnm.fish │ │ ├── fzf.fish │ │ ├── grc.fish │ │ ├── nvim.fish │ │ ├── pve.fish │ │ ├── pwd.fish │ │ ├── tokyonight.fish │ │ ├── ~1.fzf.fish │ │ └── ~2.atuin.fish │ ├── config.fish │ ├── fish_plugins │ ├── functions │ │ ├── __fzf_tldr.fish │ │ ├── _autopair_backspace.fish │ │ ├── _autopair_insert_left.fish │ │ ├── _autopair_insert_right.fish │ │ ├── _autopair_insert_same.fish │ │ ├── _autopair_tab.fish │ │ ├── _fzf_configure_bindings_help.fish │ │ ├── _fzf_extract_var_info.fish │ │ ├── _fzf_preview_changed_file.fish │ │ ├── _fzf_preview_file.fish │ │ ├── _fzf_report_diff_type.fish │ │ ├── _fzf_report_file_type.fish │ │ ├── _fzf_search_directory.fish │ │ ├── _fzf_search_git_log.fish │ │ ├── _fzf_search_git_status.fish │ │ ├── _fzf_search_history.fish │ │ ├── _fzf_search_processes.fish │ │ ├── _fzf_search_variables.fish │ │ ├── _fzf_wrapper.fish │ │ ├── bob.fish │ │ ├── calc.fish │ │ ├── clean.fish │ │ ├── code.fish │ │ ├── color-test.fish │ │ ├── conda.fish │ │ ├── dot.fish │ │ ├── fast.fish │ │ ├── fish_greeting.fish │ │ ├── fish_indent_ansi.fish │ │ ├── fish_prompt.fish │ │ ├── fish_title.fish │ │ ├── fish_user_key_bindings.fish │ │ ├── fisher.fish │ │ ├── fzf_configure_bindings.fish │ │ ├── run.fish │ │ ├── slay.fish │ │ ├── start.fish │ │ ├── tldr.fish │ │ ├── tmux_update.fish │ │ ├── update.fish │ │ ├── z.fish │ │ └── zg.fish │ └── themes │ │ ├── tokyonight_moon.theme │ │ └── tokyonight_night.theme ├── ghostty │ └── config ├── hypr │ ├── hypridle.conf │ ├── hyprland.conf │ ├── hyprlock.conf │ ├── hyprpaper.conf │ ├── hyprshade.toml │ ├── hyprvars.conf │ └── scripts │ │ └── quake ├── hyprpanel │ ├── config.json │ ├── modules.json │ └── modules.scss ├── kitty │ ├── base16-material-palenight-256.conf │ ├── base16-material-palenight.conf │ ├── dracula.conf │ ├── kitty.conf │ ├── nord.conf │ └── palenight.conf ├── lazygit │ └── config.yml ├── microsoft-edge-beta-flags.conf ├── microsoft-edge-dev-flags.conf ├── mise │ └── config.toml ├── paru │ └── paru.conf ├── pipewire │ └── pipewire.conf.d │ │ └── mic.conf.bak ├── powershell.ps1 ├── procs │ └── config.toml ├── rofi │ ├── cliphist │ │ ├── cliphist-img │ │ └── run │ ├── config.rasi │ ├── gradient.png │ └── theme.rasi ├── starship.toml ├── tmux │ └── tmux.conf ├── topgrade.toml ├── wall.png └── wezterm │ ├── keys.lua │ ├── links.lua │ ├── mouse.lua │ ├── tabs.lua │ └── wezterm.lua ├── nvim ├── .neoconf.json ├── CHEAT.md ├── README.md ├── init.lua ├── lazy-lock.json ├── lazyvim.json ├── lua │ ├── config │ │ ├── autocmds.lua │ │ ├── keymaps.lua │ │ ├── lazy.lua │ │ └── options.lua │ ├── plugins │ │ ├── ai.lua │ │ ├── coding.lua │ │ ├── lsp.lua │ │ ├── snacks.lua │ │ ├── specs │ │ │ ├── qmk.lua │ │ │ └── telescope.lua │ │ ├── tmp.lua │ │ ├── treesitter.lua │ │ └── ui.lua │ └── util │ │ ├── debug.lua │ │ ├── init.lua │ │ ├── profiler.lua │ │ └── stuff │ │ ├── class_conceal.lua │ │ └── colors.lua ├── queries │ ├── caddy │ │ └── highlights.scm │ ├── markdown │ │ └── injections.scm │ └── yaml │ │ └── injections.scm ├── snippets │ └── lua.json ├── spell │ ├── en.utf-8.add │ ├── en.utf-8.add.spl │ ├── nl.utf-8.add │ ├── nl.utf-8.add.spl │ ├── nl.utf-8.spl │ └── nl.utf-8.sug ├── stylua.toml └── vim.toml ├── pacman.txt ├── scripts └── powersave └── stylua.toml /.github/workflows/gitguardian.yml: -------------------------------------------------------------------------------- 1 | name: GitGuardian scan 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | scanning: 7 | name: GitGuardian scan 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@v3 12 | with: 13 | fetch-depth: 0 # fetch all history so multiple commits can be scanned 14 | - name: GitGuardian scan 15 | uses: GitGuardian/gg-shield-action@master 16 | env: 17 | GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} 18 | GITHUB_PUSH_BASE_SHA: ${{ github.event.base }} 19 | GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }} 20 | GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} 21 | GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Spoons 2 | .DS_Store 3 | org-roam.db 4 | /config/doom/*.html 5 | secrets.fish 6 | home/.aria2/aria2.session 7 | config/nvim/sessions 8 | foo.* 9 | result 10 | home/.aria2/aria2.session 11 | packer_compiled.vim 12 | packer_compiled.lua 13 | fish_variables 14 | *.session 15 | state.yml 16 | config/lazygit/*/*.patch 17 | *.log 18 | tt.* 19 | nvim/lua/config/env.lua 20 | config/environment.d/secrets.conf 21 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/.gitmodules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dot File 2 | 3 | ![image](../.config/wall.png) 4 | 5 | You can find my Neovim dot files [here](https://github.com/folke/dot/tree/master/nvim) 6 | 7 | ![image](https://github.com/folke/dot/assets/292349/89de8c21-1027-4aa8-8618-f3e1c5c90e1c) 8 | 9 | ![image](https://user-images.githubusercontent.com/292349/209700826-0b0a6a5e-0000-443c-a7cb-dc1504966b4f.png) 10 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | 3 | ## Images 4 | 5 | - [ ] automates tests 6 | - [ ] terminal detection 7 | - [ ] treesitter only parse visible lines 8 | 9 | ## Picker 10 | 11 | - [ ] loading indicator 12 | - [ ] error? 13 | - [ ] mermaid 14 | - [ ] windows terminal size? 15 | - [ ] better scaling? 16 | 17 | - [ ] fix scroll and virtual lines 18 | - [ ] lsp symbol scope support. prev/next/focus 19 | - [ ] edgy support for snacks layouts 20 | 21 | - [ ] slow scroll issue in preview 22 | - [ ] scroll fix in explorer 23 | - [x] cursorline in non focused picker (explorer) should be different 24 | 25 | - [x] cleaning of frecency for sqlite 26 | - [x] optimize matcher when adding to query. No need to go through all items. 27 | - [x] optimize frecency 28 | - [ ] highlights remain bug 29 | - [ ] call hierarchies 30 | - [ ] multiline 31 | - [ ] resume with hide/show? 32 | - [x] frecency for projects 33 | - [x] windows picker 34 | - [x] toggle cwd / root (LazyVim) 35 | - [x] dynamic workspace symbol 36 | - [x] which-key smart shows full paths 37 | - [x] `` vs `` 38 | - [x] path stuff 39 | - [x] sorter filename based on item.file 40 | - [x] frecency 41 | - [x] relaxed matcher for rendering 42 | - [x] combine pickers: files + buffers + recent? 43 | - [x] smart stops working after custom 44 | - [x] edit in empty buffer 45 | - [x] support toggling line nr for preview 46 | - [x] del buffers 47 | - [x] git stage/unstage 48 | - [x] optim max width and fuzzy 49 | - [x] tab situation 50 | - [x] file name first format 51 | - [x] raw git status 52 | - [x] naming: format / formatter / ... 53 | - [x] grep performance 54 | - [x] issue with selected and same text 55 | - [x] lsp symbol indents are wrong for picker.lua 56 | - [x] trouble 57 | - [x] preview in main 58 | - [x] define multiple layouts 59 | - [x] layout predicates 60 | - [x] layouts picker with preview 61 | - [x] delay in close `try_close` 62 | - [x] quickly toggling preview fails. (which-key?) 63 | - [x] disable mini.pairs and nvim_autopairs 64 | - [x] exclude hidden for files by default? 65 | - [x] expose filter / search / pattern on picker 66 | - [x] git status 67 | - [x] grep open buffers 68 | - [x] key help 69 | - [x] pattern history 70 | - [x] resume 71 | - [x] issue with preview loc not always correct when scrolling fast in list 72 | - [x] multi select 73 | - [x] live sort? topk optims? topk 1000? 74 | 75 | - [x] layout border nobottom and notop 76 | - [x] one result / no results 77 | - [x] fix resizd 78 | - [x] quickfix 79 | - [x] loclist 80 | - [x] marks 81 | - [x] jumplist 82 | - [x] keymaps 83 | - [x] autocmds 84 | - [x] highlights 85 | - [x] diagnostics 86 | - [x] colorscheme 87 | - [x] registers 88 | 89 | - [x] list match positions 90 | - [x] move actions to separate file 91 | - [x] separate previewer 92 | - [x] config 93 | - [x] builtin pickers 94 | - [x] result count situation 95 | - [x] separate input win 96 | - [ ] live sort using coroutines? 97 | - [x] refcounts 98 | - [x] `vim.ui.select` 99 | - [x] jump on single 100 | -------------------------------------------------------------------------------- /ansible/.nvim.settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/ansible/.nvim.settings.json -------------------------------------------------------------------------------- /ansible/README.md: -------------------------------------------------------------------------------- 1 | # Ansible Setup 2 | 3 | ## Requirements 4 | 5 | ```shell 6 | # install ansible 7 | sudo dnf install ansible -y 8 | 9 | # install ansible community plugins 10 | ansible-galaxy collection install community.general 11 | 12 | 13 | sudo dnf group install 'Development Tools' 14 | sudo dnf install procps-ng curl file git libxcrypt-compat 15 | ``` 16 | 17 | ## Grub Theme 18 | 19 | https://github.com/vinceliuice/grub2-themes 20 | 21 | ```shell 22 | sudo ./install.sh -b -s 4k -t stylish 23 | ``` 24 | -------------------------------------------------------------------------------- /ansible/ansible.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/ansible/ansible.cfg -------------------------------------------------------------------------------- /ansible/hosts: -------------------------------------------------------------------------------- 1 | [local] 2 | localhost 3 | 4 | [local:vars] 5 | ansible_connection=local 6 | -------------------------------------------------------------------------------- /ansible/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | function have { 6 | command -v "$1" &>/dev/null 7 | } 8 | 9 | # install ansible 10 | have ansible || paru ansible 11 | 12 | # Run Ansible 13 | ansible-playbook -i ./hosts ./linux.yml --ask-become-pass 14 | -------------------------------------------------------------------------------- /ansible/linux.yml: -------------------------------------------------------------------------------- 1 | - name: Setup Linux Workstation 2 | hosts: local 3 | roles: 4 | # - packages 5 | # - fonts 6 | - dot 7 | # - node 8 | - system 9 | - web 10 | -------------------------------------------------------------------------------- /ansible/roles/dot/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Create ~/.config 2 | file: 3 | path: ~/.config 4 | state: directory 5 | 6 | - name: Find .config files 7 | find: 8 | paths: ~/dot/config/ 9 | recurse: no 10 | file_type: any 11 | hidden: yes 12 | register: dot_config 13 | 14 | - name: ~/.config/ 15 | file: 16 | src: "{{item.path}}" 17 | dest: "~/.config/{{item.path | basename}}" 18 | state: link 19 | loop: "{{ dot_config.files }}" 20 | loop_control: 21 | label: "~/.config/{{item.path | basename}}" 22 | 23 | - name: .bashrc 24 | copy: 25 | dest: ~/.bashrc 26 | content: "source <(starship init bash --print-full-init)" 27 | 28 | - name: .zshrc 29 | copy: 30 | dest: ~/.zshrc 31 | content: "source <(starship init zsh --print-full-init)" 32 | 33 | - name: .hushlogin 34 | copy: 35 | dest: ~/.hushlogin 36 | content: "" 37 | 38 | - name: .gitconfig 39 | file: 40 | src: ~/.config/.gitconfig 41 | dest: ~/.gitconfig 42 | state: link 43 | 44 | - name: nvim 45 | file: 46 | src: ~/dot/nvim 47 | dest: ~/.config/nvim 48 | state: link 49 | 50 | - name: scripts 51 | file: 52 | src: ~/dot/scripts 53 | dest: ~/.scripts 54 | state: link 55 | 56 | - name: .ssh/config 57 | copy: 58 | src: ~/.config/.ssh.config 59 | dest: ~/.ssh/config 60 | mode: u=rw,o=,g= 61 | 62 | - name: .ssh/config/control 63 | file: 64 | path: ~/.ssh/control 65 | state: directory 66 | mode: u=rwx,o=,g= 67 | 68 | # - name: .Xresources 69 | # file: 70 | # src: ~/.config/.Xresources 71 | # dest: ~/.Xresources 72 | # state: link 73 | 74 | - name: gpg-agent.conf 75 | copy: 76 | dest: ~/.gnupg/gpg-agent.conf 77 | content: "pinentry-program /bin/pinentry" 78 | -------------------------------------------------------------------------------- /ansible/roles/fonts/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: update font cache 2 | command: 3 | cmd: fc-cache -v 4 | warn: true 5 | -------------------------------------------------------------------------------- /ansible/roles/fonts/tasks/download.yml: -------------------------------------------------------------------------------- 1 | - name: Create {{item}} directory 2 | file: 3 | path: ~/.local/share/fonts/{{item}} 4 | state: directory 5 | 6 | - name: Installing {{item}} 7 | ansible.builtin.unarchive: 8 | src: https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{item}}.zip 9 | dest: ~/.local/share/fonts/{{item}} 10 | creates: ~/.local/share/fonts/{{item}}/done 11 | remote_src: true 12 | notify: update font cache 13 | 14 | - name: Installed {{item}} 15 | copy: 16 | dest: ~/.local/share/fonts/{{item}}/done 17 | content: "" 18 | -------------------------------------------------------------------------------- /ansible/roles/fonts/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Download Nerd Fonts 2 | include_tasks: download.yml 3 | loop: 4 | - FiraCode 5 | - DejaVuSansMono 6 | - JetBrainsMono 7 | - FantasqueSansMono 8 | - VictorMono 9 | - SourceCodePro 10 | - Hack 11 | 12 | - name: install fonts 13 | become: true 14 | dnf: 15 | name: 16 | - google-roboto-fonts 17 | -------------------------------------------------------------------------------- /ansible/roles/node/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: .npmrc 2 | copy: 3 | dest: ~/.npmrc 4 | content: |- 5 | global-dir={{ lookup('env', 'HOME') }}/.pnpm-global 6 | global-bin-dir={{ lookup('env', 'HOME') }}/.local/bin/pnpm-bins 7 | 8 | # 9 | -------------------------------------------------------------------------------- /ansible/roles/packages/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # - import_tasks: repos.yml 2 | 3 | - name: install tools 4 | become: true 5 | dnf: 6 | name: 7 | # LinuxBrew Dependencies 8 | - "@Development Tools" 9 | - "@Multimedia" 10 | - procps-ng 11 | - curl 12 | - file 13 | - libxcrypt-compat 14 | 15 | # gui 16 | - alacritty 17 | - brave-browser-beta 18 | - dconf-editor 19 | - discord 20 | # - element 21 | - gnome-tweaks 22 | - kitty 23 | - foot 24 | - waybar 25 | - sway 26 | - wdisplays 27 | - nwg-launchers 28 | - nwg-panel 29 | - slurp 30 | - grim 31 | - wev 32 | - swaylock-effects 33 | - imv 34 | - blueman 35 | 36 | # Wayland Development 37 | - wayland-devel 38 | - libxkbcommon-devel 39 | 40 | # Gaming 41 | - lutris 42 | - steam 43 | - wine 44 | - mangohud 45 | 46 | # utils 47 | - clipman 48 | - pulseaudio-utils 49 | - playerctl 50 | - brightnessctl 51 | - wob 52 | - fuzzel 53 | - wofi 54 | - bemenu 55 | - rofi-wayland 56 | - rofimoji 57 | - lm_sensors 58 | - gammastep-indicator 59 | 60 | # cli 61 | - aria2 62 | - aspell 63 | - bat 64 | - bandwhich 65 | - bottom 66 | - ctop 67 | - curl 68 | - gh 69 | - git-delta 70 | - exa 71 | - fd-find 72 | - direnv 73 | - fzf 74 | - fzy 75 | - git 76 | - git-lfs 77 | # - glow 78 | - gnupg 79 | - gnuplot 80 | - htop 81 | - httpie 82 | - hub 83 | - hyperfine 84 | - jq 85 | # - languagetool 86 | - lazydocker 87 | - lazygit 88 | - neovim 89 | - nnn 90 | - nodejs 91 | - ncdu 92 | - osmium-tool 93 | - pass 94 | - procs 95 | - qemu 96 | - ranger 97 | - ripgrep 98 | - ShellCheck 99 | - shfmt 100 | - tealdeer 101 | - tmux 102 | # - tmuxinator 103 | - tokei 104 | - weechat 105 | - wget 106 | - wezterm 107 | - zoxide 108 | 109 | - name: install brew tools 110 | community.general.homebrew: 111 | path: /home/linuxbrew/.linuxbrew/bin 112 | name: 113 | # cli 114 | - as-tree 115 | - broot 116 | - duf 117 | - dust 118 | - grc 119 | - markdownlint-cli 120 | - mdcat 121 | - pfetch 122 | - selene 123 | - stylua 124 | - starship 125 | -------------------------------------------------------------------------------- /ansible/roles/packages/tasks/repos.yml: -------------------------------------------------------------------------------- 1 | - name: copr 2 | become: yes 3 | community.general.copr: 4 | name: "{{item}}" 5 | loop: 6 | - agriffis/neovim-nightly 7 | - alebastr/sway-extras 8 | - atim/bandwhich 9 | - atim/bottom 10 | - atim/lazydocker 11 | - atim/lazygit 12 | - fuhrmann/ctop 13 | - lehrenfried/fzy 14 | - eddsalkield/swaylock-effects 15 | 16 | - name: gh repo 17 | become: yes 18 | command: 19 | cmd: dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo 20 | warn: false 21 | args: 22 | creates: /etc/yum.repos.d/gh-cli.repo 23 | -------------------------------------------------------------------------------- /ansible/roles/system/files/keyd.conf: -------------------------------------------------------------------------------- 1 | [ids] 2 | 3 | * 4 | -1d50:615e 5 | 6 | [main] 7 | 8 | # remap capslock to ctrl & escape 9 | capslock = overload(control, esc) 10 | 11 | # remap enter to shift & enter 12 | enter = overload(shift, enter) 13 | 14 | # remap pg up / down keys 15 | pageup = left 16 | pagedown = right 17 | 18 | # swap meta with alt 19 | leftmeta = layer(alt) 20 | leftalt = overload(lmeta, leftmeta) 21 | rightalt = overload(rmeta, rightmeta) 22 | 23 | # esc to backtick 24 | esc = ` 25 | 26 | leftcontrol = layer(meh) 27 | 28 | [lmeta:M] 29 | # Copy 30 | # c = C-insert 31 | # Paste 32 | # v = S-insert 33 | # Cut 34 | # x = S-delete 35 | 36 | [rmeta:M] 37 | # Euro sign 38 | e = macro(compose c =) 39 | 40 | [meh:C-S-A] 41 | 1 = f1 42 | 2 = f2 43 | 3 = f3 44 | 4 = f4 45 | 5 = f5 46 | 6 = f6 47 | 7 = f7 48 | 8 = f8 49 | 9 = f9 50 | 0 = f10 51 | - = f11 52 | = = f12 53 | -------------------------------------------------------------------------------- /ansible/roles/system/files/powersave.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="0", RUN+="/home/folke/.scripts/powersave true" 2 | SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="1", RUN+="/home/folke/.scripts/powersave false" 3 | -------------------------------------------------------------------------------- /ansible/roles/system/files/touchpad.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "Touchpad Settings" 3 | Driver "libinput" 4 | MatchIsTouchpad "on" 5 | 6 | Option "Tapping" "On" 7 | Option "ClickMethod" "clickfinger" 8 | Option "NaturalScrolling" "true" 9 | Option "DisableWhileTyping" "True" 10 | Option "ScrollMethod" "twofinger" 11 | EndSection 12 | -------------------------------------------------------------------------------- /ansible/roles/system/files/tuned-laptop-performance.conf: -------------------------------------------------------------------------------- 1 | # 2 | # tuned configuration 3 | # 4 | 5 | [main] 6 | summary=Optimized profile for laptop performance 7 | include=throughput-performance 8 | 9 | [cpu] 10 | replace=1 11 | governor=performance 12 | energy_perf_bias=performance 13 | -------------------------------------------------------------------------------- /ansible/roles/system/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Keyd 2 | become: true 3 | copy: 4 | dest: /etc/keyd/default.conf 5 | src: ~/dot/ansible/roles/system/files/keyd.conf 6 | owner: root 7 | group: root 8 | mode: "0644" 9 | 10 | - name: Tuned Laptop Performance Profile 11 | become: true 12 | copy: 13 | dest: /etc/tuned/profiles/laptop-performance/tuned.conf 14 | src: ~/dot/ansible/roles/system/files/tuner-laptop-performance.conf 15 | owner: root 16 | group: root 17 | mode: "0644" 18 | 19 | - name: Enable Keyd Daemon 20 | become: true 21 | ansible.builtin.systemd_service: 22 | state: restarted 23 | enabled: true 24 | name: keyd 25 | 26 | - name: Powersave udev rule 27 | become: true 28 | copy: 29 | dest: /etc/udev/rules.d/powersave.rules 30 | src: ~/dot/ansible/roles/system/files/powersave.rules 31 | owner: root 32 | group: root 33 | mode: "0644" 34 | # - name: Touchpad 35 | # become: true 36 | # copy: 37 | # dest: /etc/X11/xorg.conf.d/30-touchpad.conf 38 | # src: ~/dot/ansible/roles/system/files/touchpad.conf 39 | # owner: root 40 | # group: root 41 | # mode: "0644" 42 | # 43 | # - name: prefer libinput over synaptics 44 | # become: true 45 | # file: 46 | # src: /usr/share/X11/xorg.conf.d/40-libinput.conf 47 | # dest: /etc/X11/xorg.conf.d/40-libinput.conf 48 | # state: link 49 | 50 | # - name: Install Sway Autotiling 51 | # pip: 52 | # name: 53 | # - autotiling 54 | # - flashfocus 55 | # 56 | # - name: Disable sudo systemctl disable NetworkManager-wait-online.service 57 | # become: true 58 | # ansible.builtin.systemd: 59 | # name: NetworkManager-wait-online.service 60 | # state: stopped 61 | # enabled: no 62 | -------------------------------------------------------------------------------- /ansible/roles/web/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Create Brave Apps 2 | template: 3 | src: "~/dot/ansible/roles/web/templates/app.j2" 4 | dest: "~/.local/share/applications/brave-{{item.name | lower | regex_replace(' ', '-')}}.desktop" 5 | loop: 6 | - { name: "Gmail", url: "https://mail.google.com/mail/u/0/#inbox" } 7 | - { name: "WhatsApp", url: "https://web.whatsapp.com/" } 8 | - { name: "Notion", url: "https://notion.so/" } 9 | - { name: "Twitter", url: "https://twitter.com/home", icon: "web-twitter" } 10 | - { 11 | name: "Google Keep", 12 | url: "https://keep.google.com/u/0/", 13 | icon: "notes", 14 | } 15 | - { 16 | name: "Google Calendar", 17 | url: "https://calendar.google.com/calendar/u/0/r", 18 | } 19 | - { 20 | name: "YouTube Music", 21 | url: "https://music.youtube.com", 22 | icon: "youtube-music-desktop-app", 23 | } 24 | - { 25 | name: "Messenger", 26 | url: "https://www.messenger.com/", 27 | icon: "messengerfordesktop", 28 | } 29 | -------------------------------------------------------------------------------- /ansible/roles/web/templates/app.j2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Version=1.0 4 | Terminal=false 5 | Type=Application 6 | Name={{item.name}} 7 | Exec=/bin/brave-beta --app="{{item.url}}" 8 | Icon={% if item.icon is defined %}{{item.icon}}{% else %}{{item.name | lower | regex_replace(' ', '-')}}{% endif %} 9 | -------------------------------------------------------------------------------- /config/.gitconfig: -------------------------------------------------------------------------------- 1 | [filter "lfs"] 2 | clean = git-lfs clean -- %f 3 | smudge = git-lfs smudge -- %f 4 | process = git-lfs filter-process 5 | required = true 6 | 7 | [user] 8 | name = Folke Lemaitre 9 | email = folke.lemaitre@gmail.com 10 | 11 | [color] 12 | ui = true 13 | 14 | [alias] 15 | st = status -sb 16 | co = checkout 17 | c = commit --short 18 | ci = commit --short 19 | p = push 20 | l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --decorate --date=short --color --decorate 21 | 22 | [core] 23 | pager = delta 24 | 25 | [interactive] 26 | diffFilter = delta --color-only 27 | 28 | [include] 29 | path = ~/projects/tokyonight.nvim/extras/delta/tokyonight_moon.gitconfig 30 | 31 | [delta] 32 | navigate = true # use n and N to move between diff sections 33 | light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal) 34 | side-by-side = false 35 | line-numbers = true 36 | syntax-theme = tokyonight_moon 37 | 38 | [merge] 39 | conflictstyle = diff3 40 | 41 | [diff] 42 | colorMoved = default 43 | 44 | [pull] 45 | rebase = true 46 | [push] 47 | default = upstream 48 | [github] 49 | user = folke 50 | [init] 51 | defaultBranch = main 52 | [commit] 53 | gpgsign = true 54 | [credential] 55 | helper = cache 56 | [rebase] 57 | autoStash = true 58 | [credential "https://github.com"] 59 | helper = 60 | helper = !/usr/bin/gh auth git-credential 61 | [credential "https://gist.github.com"] 62 | helper = 63 | helper = !/usr/bin/gh auth git-credential 64 | -------------------------------------------------------------------------------- /config/.ssh.config: -------------------------------------------------------------------------------- 1 | Host github.com 2 | ControlMaster auto 3 | ControlPersist 120 4 | 5 | Host * 6 | # Always use SSH2. 7 | Protocol 2 8 | 9 | # Use a shared channel for all sessions to the same host, 10 | # instead of always opening a new one. This leads to much 11 | # quicker connection times. 12 | ControlMaster auto 13 | ControlPath ~/.ssh/control/%r@%h:%p 14 | ControlPersist 1800 15 | 16 | # also this stuff 17 | Compression yes 18 | TCPKeepAlive yes 19 | ServerAliveInterval 20 20 | ServerAliveCountMax 10 21 | -------------------------------------------------------------------------------- /config/.ticker.yaml: -------------------------------------------------------------------------------- 1 | show-summary: true 2 | show-tags: true 3 | show-fundamentals: true 4 | show-separator: true 5 | show-holdings: true 6 | interval: 5 7 | sort: value 8 | currency: USD 9 | currency-summary-only: false 10 | watchlist: 11 | - XM 12 | - VTI 13 | - BTC-USD 14 | - ETH-USD 15 | - SPY 16 | - ARKK 17 | - QQQ 18 | lots: 19 | - symbol: "XM" 20 | quantity: 675481.0 21 | unit_cost: 5 22 | - symbol: "BTC-USD" 23 | quantity: 13.0046 24 | unit_cost: 1 25 | - symbol: "ETH-USD" 26 | quantity: 68.5995 27 | unit_cost: 1 28 | -------------------------------------------------------------------------------- /config/ags/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | @girs/ 3 | -------------------------------------------------------------------------------- /config/ags/app.ts: -------------------------------------------------------------------------------- 1 | import { App } from "astal/gtk3"; 2 | import style from "./style.scss"; 3 | import AppLauncher from "./widget/AppLauncher"; 4 | 5 | App.start({ 6 | instanceName: "main", 7 | css: style, 8 | main() { 9 | AppLauncher().hide(); 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /config/ags/env.d.ts: -------------------------------------------------------------------------------- 1 | declare const SRC: string 2 | 3 | declare module "inline:*" { 4 | const content: string 5 | export default content 6 | } 7 | 8 | declare module "*.scss" { 9 | const content: string 10 | export default content 11 | } 12 | 13 | declare module "*.blp" { 14 | const content: string 15 | export default content 16 | } 17 | 18 | declare module "*.css" { 19 | const content: string 20 | export default content 21 | } 22 | -------------------------------------------------------------------------------- /config/ags/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "astal-shell", 3 | "dependencies": { 4 | "astal": "/usr/share/astal/gjs" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /config/ags/style.scss: -------------------------------------------------------------------------------- 1 | // https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss 2 | $fg-color: #{"@theme_fg_color"}; 3 | $bg-color: #{"@theme_bg_color"}; 4 | 5 | @use "./widget/AppLauncher.scss"; 6 | -------------------------------------------------------------------------------- /config/ags/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "experimentalDecorators": true, 5 | "strict": true, 6 | "target": "ES2022", 7 | "module": "ES2022", 8 | "moduleResolution": "Bundler", 9 | // "checkJs": true, 10 | // "allowJs": true, 11 | "jsx": "react-jsx", 12 | "jsxImportSource": "astal/gtk3", 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /config/ags/utils/cliphist.ts: -------------------------------------------------------------------------------- 1 | import GLib from "gi://GLib?version=2.0"; 2 | import { execAsync } from "astal/process"; 3 | import { GObject, register } from "astal/gobject"; 4 | 5 | const MAX = 12; 6 | 7 | export type CliphistItem = { 8 | id: number; 9 | content: string; 10 | contentType: string; 11 | }; 12 | 13 | function bash(cmd: string) { 14 | return execAsync(["bash", "-c", cmd]); 15 | } 16 | 17 | async function query(filter: string) { 18 | const fzfArgs = filter === "" ? '-f ""' : `-f ${filter}`; 19 | 20 | return bash(`cliphist list | fzf ${fzfArgs} | head -n ${MAX}`) 21 | .then((str) => 22 | Array.from( 23 | new Set( 24 | str 25 | .split("\n") 26 | .filter((i) => i) 27 | .map((x) => { 28 | // [[ binary data 63 Kib png 420x420 ]] 29 | const [id, content] = x.match(/(\d+)\s+(.*)/)!.slice(1); 30 | let contentType = "text"; 31 | if (content.startsWith("[[")) { 32 | contentType = 33 | content.match( 34 | /\[\[\s+binary data.*(jpg|png|webp|jpeg|bmp)/, 35 | )![1] ?? "binary"; 36 | } 37 | return { id: Number(id), content, contentType }; 38 | }), 39 | ).values(), 40 | ), 41 | ) 42 | .catch((err) => { 43 | print(err); 44 | return []; 45 | }); 46 | } 47 | 48 | function run(args: CliphistItem) { 49 | bash(`cliphist decode ${args.id} | wl-copy`).then((out) => { 50 | print(`:cliphist ${args.id}:`); 51 | print(out); 52 | }); 53 | } 54 | 55 | async function getFile(item: CliphistItem) { 56 | const f = `/tmp/cliphist-${item.id}.${item.contentType}`; 57 | if (!GLib.file_test(f, GLib.FileTest.EXISTS)) 58 | await bash(`cliphist decode ${item.id} > ${f}`); 59 | return f; 60 | } 61 | 62 | @register() 63 | class Cliphist extends GObject.Object { 64 | constructor() { 65 | super(); 66 | } 67 | getFile = getFile; 68 | query = query; 69 | run = run; 70 | } 71 | 72 | export default new Cliphist(); 73 | -------------------------------------------------------------------------------- /config/ags/widget/AppLauncher.scss: -------------------------------------------------------------------------------- 1 | @use "sass:string"; 2 | 3 | @function gtkalpha($c, $a) { 4 | @return string.unquote("alpha(#{$c},#{$a})"); 5 | } 6 | 7 | // https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss 8 | $fg-color: #{"@theme_fg_color"}; 9 | $bg-color: #{"@theme_bg_color"}; 10 | 11 | window#launcher { 12 | all: unset; 13 | 14 | box.Applauncher { 15 | background-color: $bg-color; 16 | border-radius: 11px; 17 | margin: 1rem; 18 | padding: 0.8rem; 19 | box-shadow: 2px 3px 8px 0 gtkalpha(black, 0.4); 20 | 21 | entry { 22 | margin-bottom: 0.8rem; 23 | &:focus { 24 | border-color: #65bcff; 25 | } 26 | } 27 | 28 | button { 29 | min-width: 0; 30 | min-height: 0; 31 | padding: 0.5rem; 32 | 33 | &:focus { 34 | outline: none; 35 | border: 3px solid #65bcff; 36 | margin: -2px; 37 | border-radius: 3px; 38 | } 39 | 40 | icon { 41 | font-size: 3em; 42 | margin-right: 0.3rem; 43 | } 44 | 45 | label.name { 46 | font-weight: bold; 47 | font-size: 1.1em; 48 | } 49 | 50 | label.description { 51 | color: gtkalpha($fg-color, 0.8); 52 | } 53 | } 54 | 55 | box.not-found { 56 | padding: 1rem; 57 | 58 | icon { 59 | font-size: 6em; 60 | color: gtkalpha($fg-color, 0.7); 61 | } 62 | 63 | label { 64 | color: gtkalpha($fg-color, 0.9); 65 | font-size: 1.2em; 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /config/ags/widget/AppLauncher.tsx: -------------------------------------------------------------------------------- 1 | import Apps from "gi://AstalApps" 2 | import { App, Astal, Gdk, Gtk } from "astal/gtk3" 3 | import { Variable } from "astal" 4 | 5 | const MAX_ITEMS = 8 6 | 7 | function hide() { 8 | App.get_window("launcher")!.hide() 9 | } 10 | 11 | function AppButton({ app }: { app: Apps.Application }) { 12 | return 33 | } 34 | 35 | export default function Applauncher() { 36 | const { CENTER } = Gtk.Align 37 | const apps = new Apps.Apps() 38 | const width = Variable(1000) 39 | 40 | const text = Variable("") 41 | const list = text(text => apps.fuzzy_query(text).slice(0, MAX_ITEMS)) 42 | const onEnter = () => { 43 | apps.fuzzy_query(text.get())?.[0].launch() 44 | hide() 45 | } 46 | 47 | const search = 48 | text.set(self.text)} 52 | onActivate={onEnter} 53 | /> 54 | 55 | return { 62 | search.grab_focus() 63 | text.set("") 64 | width.set(self.get_current_monitor().workarea.width) 65 | }} 66 | onKeyPressEvent={function (self, event: Gdk.Event) { 67 | if (event.get_keyval()[1] === Gdk.KEY_Escape) 68 | self.hide() 69 | }}> 70 | 71 | w / 2)} expand onClick={hide} /> 72 | 73 | 74 | 75 | {search} 76 | 77 | {list.as(list => list.map(app => ( 78 | 79 | )))} 80 | 81 | l.length === 0)}> 86 | 87 | 89 | 90 | 91 | 92 | w / 2)} expand onClick={hide} /> 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /config/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | decorations = "None" 2 | import = ["/home/folke/projects/tokyonight.nvim/extras/alacritty/tokyonight_storm.yml"] 3 | live_config_reload = true 4 | 5 | [colors] 6 | draw_bold_text_with_bright_colors = true 7 | 8 | [font] 9 | size = 11.0 10 | 11 | [font.bold] 12 | family = "Fira Code Bold Nerd Font Complete" 13 | 14 | [font.bold_italic] 15 | family = "Victor Mono Bold Italic Nerd Font Complete" 16 | 17 | [font.italic] 18 | family = "Victor Mono Medium Italic Nerd Font Complete" 19 | style = "Italic" 20 | 21 | [font.normal] 22 | family = "FiraCode Nerd Font" 23 | 24 | [window.padding] 25 | x = 10 26 | y = 10 27 | -------------------------------------------------------------------------------- /config/aria2/aria2.conf: -------------------------------------------------------------------------------- 1 | ##'#'begins with annotations, and the options are annotated accordingly. Modify as needed## 2 | ## The annotated options are filled in by default values, and it is recommended that the annotation be cancelled when necessary.## 3 | 4 | ## File Preservation Related## 5 | 6 | # File save path (absolute or relative path can be used), default: current boot location 7 | dir=/home/folke/Downloads 8 | #log=/Users/folke/.cache/aria2/rpc.log 9 | # Enable disk caching, 0 disables caching, requires more than 1.16 versions, default: 16M 10 | #disk-cache=32M 11 | # File pre-allocation can effectively reduce disk fragmentation, default: prealloc 12 | # Pre-allocation time: none < falloc? TRUNC < prealloc 13 | # falloc and TRUNC require file system and kernel support 14 | # NTFS recommends falloc, EXT3/4 recommends trunc, and MAC needs to comment on this 15 | # file-allocation=none 16 | # Continuous transmission of breakpoints 17 | continue=true 18 | 19 | ## Download connection related## 20 | 21 | # Maximum number of simultaneous downloads, runtime can be modified, default:5 22 | max-concurrent-downloads=5 23 | # The number of connections to the same server can be specified when added. By default:1 24 | max-connection-per-server=5 25 | # Minimum file fragment size, can be specified when adding, value range 1M - 1024M, default: 20M 26 | # Assuming size = 10M, a 20MiB file is downloaded from two sources; a 15MiB file is downloaded from one source 27 | min-split-size=10M 28 | # Maximum number of threads per task, specified when added, default: 5 29 | split=5 30 | # Overall download speed limit, runtime can be modified, default:0 31 | #max-overall-download-limit=0 32 | # Single task download speed limit, default:0 33 | #max-download-limit=0 34 | # Overall upload speed limit, runtime can be modified, default:0 35 | #max-overall-upload-limit=0 36 | # Single task upload speed limit, default:0 37 | #max-upload-limit=0 38 | # Disable IPv6 by default:false 39 | # disable-ipv6=true 40 | 41 | ## Progress saving related## 42 | 43 | # Read download tasks from session files 44 | # input-file=/tmp/aria2.session 45 | # Save the `Error/Unfinished'download task to the session file when Aria2 exits 46 | # save-session=/tmp/aria2.session 47 | # Save session regularly, 0 is saved only when exiting, need 1.16.1 version or more, default:0 48 | #save-session-interval=60 49 | 50 | ## RPC related settings## 51 | 52 | # Enable RPC by default:false 53 | enable-rpc=true 54 | # Allow all sources by default:false 55 | rpc-allow-origin-all=true 56 | # Allow non-external access by default:false 57 | rpc-listen-all=true 58 | rpc-secret=f0lk3rpc 59 | # Event polling method, value: [epoll, kqueue, port, poll, select], different system default value is different 60 | #event-poll=select 61 | # RPC listens on the port. When the port is occupied, it can be modified. By default: 6800 62 | #rpc-listen-port=6800 63 | # RPC authorization token set, v1.18.4 added function, replacing - rpc-user and - rpc-passwd options 64 | #rpc-secret= 65 | # RPC access user name set. The new version of this option has been discarded. It is suggested to use the - rpc-secret option instead. 66 | #rpc-user= 67 | # RPC access password set. The new version of this option has been discarded. It is suggested to use the - rpc-secret option instead. 68 | #rpc-passwd= 69 | 70 | ## BT/PT Download Related## 71 | 72 | # When a seed is downloaded (ending with. torrent), the BT task is automatically started by default: 73 | #follow-torrent=true 74 | # BT listening port, when the port is shielded, default: 6881-6999 75 | listen-port=51413 76 | # Maximum number of connections per seed, default: 55 77 | #bt-max-peers=55 78 | # To turn on DHT, PT needs to be disabled by default:true 79 | enable-dht=true 80 | # Open IPv6 DHT function, PT needs to be disabled 81 | #enable-dht6=false 82 | # DHT network listening port, default: 6881-6999 83 | #dht-listen-port=6881-6999 84 | # Local node lookup, PT needs to be disabled by default: false 85 | #bt-enable-lpd=false 86 | # Seed Exchange, PT needs to be disabled by default: true 87 | enable-peer-exchange=false 88 | # Speed limit per seed is useful for a few PTs. Default: 50K 89 | #bt-request-peer-speed-limit=50K 90 | # Client camouflage, PT needs 91 | peer-id-prefix=-TR2730- 92 | # When the share rate of seeds reaches this level, seed-making will be stopped automatically. 0 is always seed-making. The default is: 1.0. 93 | seed-ratio=0.2 94 | seed-time=1 95 | # Force the session to be saved, even if the task has been completed, by default: false 96 | # The newer version will remain in the. aria2 file after the task is completed. 97 | #force-save=false 98 | bt-force-encryption=false 99 | bt-require-crypto=false 100 | # BT check-related, default: 101 | #bt-hash-check-seed=true 102 | # When continuing the previous BT task, there is no need to check again. The default is: false. 103 | bt-seed-unverified=true 104 | # Save the metadata of magnetic link as seed file (.torrent file), default:false 105 | bt-save-metadata=true 106 | -------------------------------------------------------------------------------- /config/atuin/config.toml: -------------------------------------------------------------------------------- 1 | ## where to store your database, default is your system data directory 2 | ## linux/mac: ~/.local/share/atuin/history.db 3 | ## windows: %USERPROFILE%/.local/share/atuin/history.db 4 | # db_path = "~/.history.db" 5 | 6 | ## where to store your encryption key, default is your system data directory 7 | ## linux/mac: ~/.local/share/atuin/key 8 | ## windows: %USERPROFILE%/.local/share/atuin/key 9 | # key_path = "~/.key" 10 | 11 | ## where to store your auth session token, default is your system data directory 12 | ## linux/mac: ~/.local/share/atuin/session 13 | ## windows: %USERPROFILE%/.local/share/atuin/session 14 | # session_path = "~/.session" 15 | 16 | ## date format used, either "us" or "uk" 17 | # dialect = "us" 18 | 19 | ## enable or disable automatic sync 20 | # auto_sync = true 21 | 22 | ## enable or disable automatic update checks 23 | update_check = false 24 | 25 | ## address of the sync server 26 | # sync_address = "https://api.atuin.sh" 27 | 28 | ## how often to sync history. note that this is only triggered when a command 29 | ## is ran, so sync intervals may well be longer 30 | ## set it to 0 to sync after every command 31 | # sync_frequency = "10m" 32 | 33 | ## which search mode to use 34 | ## possible values: prefix, fulltext, fuzzy, skim 35 | # search_mode = "fuzzy" 36 | 37 | ## which filter mode to use 38 | ## possible values: global, host, session, directory 39 | # filter_mode = "global" 40 | 41 | ## With workspace filtering enabled, Atuin will filter for commands executed 42 | ## in any directory within a git repositiry tree (default: false) 43 | # workspaces = false 44 | 45 | ## which filter mode to use when atuin is invoked from a shell up-key binding 46 | ## the accepted values are identical to those of "filter_mode" 47 | ## leave unspecified to use same mode set in "filter_mode" 48 | # filter_mode_shell_up_key_binding = "global" 49 | 50 | ## which search mode to use when atuin is invoked from a shell up-key binding 51 | ## the accepted values are identical to those of "search_mode" 52 | ## leave unspecified to use same mode set in "search_mode" 53 | # search_mode_shell_up_key_binding = "fuzzy" 54 | 55 | ## which style to use 56 | ## possible values: auto, full, compact 57 | # style = "auto" 58 | style = "compact" 59 | 60 | ## the maximum number of lines the interface should take up 61 | ## set it to 0 to always go full screen 62 | inline_height = 20 63 | 64 | ## Invert the UI - put the search bar at the top , Default to `false` 65 | # invert = false 66 | 67 | ## enable or disable showing a preview of the selected command 68 | ## useful when the command is longer than the terminal width and is cut off 69 | # show_preview = false 70 | 71 | ## what to do when the escape key is pressed when searching 72 | ## possible values: return-original, return-query 73 | # exit_mode = "return-original" 74 | 75 | ## possible values: emacs, subl 76 | # word_jump_mode = "emacs" 77 | 78 | ## characters that count as a part of a word 79 | # word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 80 | 81 | ## number of context lines to show when scrolling by pages 82 | # scroll_context_lines = 1 83 | 84 | ## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts 85 | ## alt-0 .. alt-9 86 | # ctrl_n_shortcuts = false 87 | 88 | ## prevent commands matching any of these regexes from being written to history. 89 | ## Note that these regular expressions are unanchored, i.e. if they don't start 90 | ## with ^ or end with $, they'll match anywhere in the command. 91 | ## For details on the supported regular expression syntax, see 92 | ## https://docs.rs/regex/latest/regex/#syntax 93 | # history_filter = [ 94 | # "^secret-cmd", 95 | # "^innocuous-cmd .*--secret=.+" 96 | # ] 97 | 98 | ## prevent commands run with cwd matching any of these regexes from being written 99 | ## to history. Note that these regular expressions are unanchored, i.e. if they don't 100 | ## start with ^ or end with $, they'll match anywhere in CWD. 101 | ## For details on the supported regular expression syntax, see 102 | ## https://docs.rs/regex/latest/regex/#syntax 103 | # cwd_filter = [ 104 | # "^/very/secret/area" 105 | # ] 106 | 107 | ## Configure the maximum height of the preview to show. 108 | ## Useful when you have long scripts in your history that you want to distinguish 109 | ## by more than the first few lines. 110 | # max_preview_height = 4 111 | 112 | ## Configure whether or not to show the help row, which includes the current Atuin 113 | ## version (and whether an update is available), a keymap hint, and the total 114 | ## amount of commands in your history. 115 | # show_help = true 116 | 117 | ## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include 118 | ## 1. AWS key id 119 | ## 2. Github pat (old and new) 120 | ## 3. Slack oauth tokens (bot, user) 121 | ## 4. Slack webhooks 122 | ## 5. Stripe live/test keys 123 | # secrets_filter = true 124 | 125 | ## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit. 126 | # This applies for new installs. Old installs will keep the old behaviour unless configured otherwise. 127 | enter_accept = true 128 | -------------------------------------------------------------------------------- /config/bat/config: -------------------------------------------------------------------------------- 1 | # This is `bat`s configuration file. Each line either contains a comment or 2 | # a command-line option that you want to pass to `bat` by default. You can 3 | # run `bat --help` to get a list of all possible configuration options. 4 | 5 | # Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` 6 | # for a list of all available themes 7 | --theme="tokyonight_moon" 8 | 9 | # Enable this to use italic text on the terminal. This is not supported on all 10 | # terminal emulators (like tmux, by default): 11 | #--italic-text=always 12 | 13 | # Uncomment the following line to disable automatic paging: 14 | #--paging=never 15 | 16 | # Uncomment the following line if you are using less version >= 551 and want to 17 | # enable mouse scrolling support in `bat` when running inside tmux. This might 18 | # disable text selection, unless you press shift. 19 | #--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" 20 | 21 | # Syntax mappings: map a certain filename pattern to a language. 22 | # Example 1: use the C++ syntax for Arduino .ino files 23 | # Example 2: Use ".gitignore"-style highlighting for ".ignore" files 24 | #--map-syntax "*.ino:C++" 25 | #--map-syntax ".ignore:Git Ignore" 26 | -------------------------------------------------------------------------------- /config/bat/themes/tokyonight: -------------------------------------------------------------------------------- 1 | /home/folke/projects/tokyonight.nvim/extras/sublime -------------------------------------------------------------------------------- /config/brave-beta-flags.conf: -------------------------------------------------------------------------------- 1 | --password-store=gnome 2 | --disable-features=Vulkan 3 | --disable-gpu-memory-buffer-video-frames 4 | --disable-features=UseChromeOSDirectVideoDecoder 5 | --enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoDecoder,VaapiIgnoreDriverChecks 6 | --enable-gpu-rasterization 7 | --enable-zero-copy 8 | --ignore-gpu-blocklist 9 | --ozone-platform=wayland 10 | 11 | -------------------------------------------------------------------------------- /config/brave-flags.conf: -------------------------------------------------------------------------------- 1 | --password-store=gnome 2 | #--enable-features=UseOzonePlatform 3 | #--ozone-platform=wayland 4 | -------------------------------------------------------------------------------- /config/environment.d/defaults.conf: -------------------------------------------------------------------------------- 1 | #BROWSER=microsoft-edge-dev 2 | EDITOR=nvim 3 | SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh 4 | -------------------------------------------------------------------------------- /config/fastfetch/config.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", 3 | "logo": { 4 | "type": "chafa", 5 | "width": 60, 6 | "printRemaining": false, 7 | "source": "~/.config/wall.png", 8 | // "recache": true, 9 | "chafa": { 10 | "symbols": "-block-border-space+vhalf", 11 | }, 12 | "padding": { 13 | "top": 1, 14 | "left": 2, 15 | "right": 2, 16 | "bottom": 0, 17 | }, 18 | }, 19 | "display": { 20 | "separator": "", 21 | "key": { "width": 15 }, 22 | }, 23 | "modules": [ 24 | { 25 | "key": " ", 26 | "type": "custom", 27 | }, 28 | { 29 | "key": "╭───────────╮", 30 | "type": "custom", 31 | }, 32 | { 33 | // draw borders first to make colors of left and right border consistant 34 | "key": "│ │\u001b[11D{#31} \u001b[{#37}user", 35 | "type": "title", 36 | "format": "{1}", 37 | "outputColor": "31;1", 38 | }, 39 | { 40 | "key": "│ │\u001b[11D{#32}󰇅 \u001b[{#37}hname", 41 | "type": "title", 42 | "format": "{2}", 43 | "outputColor": "32;1", 44 | }, 45 | { 46 | "key": "│ │\u001b[11D{#33}󰅐 \u001b[{#37}uptime", 47 | "type": "uptime", 48 | "outputColor": "33;1", 49 | }, 50 | { 51 | "key": "│ │\u001b[11D{#34}󰟾 \u001b[{#37}distro", 52 | "type": "os", 53 | "outputColor": "34;1", 54 | }, 55 | { 56 | "key": "│ │\u001b[11D{#35} \u001b[{#37}kernel", 57 | "type": "kernel", 58 | "outputColor": "35;1", 59 | }, 60 | { 61 | "key": "│ │\u001b[11D{#36}󰏗 \u001b[{#37}pkgs", 62 | "type": "packages", 63 | "outputColor": "36;1", 64 | }, 65 | { 66 | "key": "│ │\u001b[11D{#36}󰇄 \u001b[{#37}desktop", 67 | "type": "de", 68 | "outputColor": "36;1", 69 | }, 70 | { 71 | "key": "│ │\u001b[11D{#31} \u001b[{#37}term", 72 | "type": "terminal", 73 | "outputColor": "31;1", 74 | }, 75 | { 76 | "key": "│ │\u001b[11D{#32} \u001b[{#37}shell", 77 | "type": "shell", 78 | "outputColor": "32;1", 79 | }, 80 | { 81 | "key": "│ │\u001b[11D{#33}󰍛 \u001b[{#37}cpu", 82 | "type": "cpu", 83 | "showPeCoreCount": true, 84 | "outputColor": "33;1", 85 | }, 86 | { 87 | "key": "│ │\u001b[11D{#34}󰉉 \u001b[{#37}disk", 88 | "type": "disk", 89 | "folders": "/", 90 | "outputColor": "34;1", 91 | }, 92 | { 93 | "key": "│ │\u001b[11D{#35} \u001b[{#37}memory", 94 | "type": "memory", 95 | "outputColor": "35;1", 96 | }, 97 | { 98 | "key": "│ │\u001b[11D{#36}󰩟 \u001b[{#37}network", 99 | "type": "localip", 100 | "format": "{1} ({4})", 101 | "outputColor": "36;1", 102 | }, 103 | { 104 | "key": "├───────────┤", 105 | "type": "custom", 106 | }, 107 | { 108 | "key": "│ │\u001b[11D{#39} colors", 109 | "type": "colors", 110 | "symbol": "circle", 111 | }, 112 | { 113 | "key": "╰───────────╯", 114 | "type": "custom", 115 | }, 116 | ], 117 | } 118 | -------------------------------------------------------------------------------- /config/fish/completions/docker-compose.fish: -------------------------------------------------------------------------------- 1 | /Applications/Docker.app/Contents/Resources/etc/docker-compose.fish-completion -------------------------------------------------------------------------------- /config/fish/completions/docker.fish: -------------------------------------------------------------------------------- 1 | /Applications/Docker.app/Contents/Resources/etc/docker.fish-completion -------------------------------------------------------------------------------- /config/fish/completions/fisher.fish: -------------------------------------------------------------------------------- 1 | complete --command fisher --exclusive --long help --description "Print help" 2 | complete --command fisher --exclusive --long version --description "Print version" 3 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" 4 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" 5 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" 6 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" 7 | complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" 8 | -------------------------------------------------------------------------------- /config/fish/completions/fzf_configure_bindings.fish: -------------------------------------------------------------------------------- 1 | complete fzf_configure_bindings --no-files 2 | complete fzf_configure_bindings --long help --short h --description "Print help" --condition "not __fish_seen_argument --help -h" 3 | complete fzf_configure_bindings --long directory --description "Change the key binding for Search Directory" --condition "not __fish_seen_argument --directory" 4 | complete fzf_configure_bindings --long git_log --description "Change the key binding for Search Git Log" --condition "not __fish_seen_argument --git_log" 5 | complete fzf_configure_bindings --long git_status --description "Change the key binding for Search Git Status" --condition "not __fish_seen_argument --git_status" 6 | complete fzf_configure_bindings --long history --description "Change the key binding for Search History" --condition "not __fish_seen_argument --history" 7 | complete fzf_configure_bindings --long processes --description "Change the key binding for Search Processes" --condition "not __fish_seen_argument --processes" 8 | complete fzf_configure_bindings --long variables --description "Change the key binding for Search Variables" --condition "not __fish_seen_argument --variables" 9 | -------------------------------------------------------------------------------- /config/fish/conf.d/autopair.fish: -------------------------------------------------------------------------------- 1 | status is-interactive || exit 2 | 3 | set --global autopair_left "(" "[" "{" '"' "'" 4 | set --global autopair_right ")" "]" "}" '"' "'" 5 | set --global autopair_pairs "()" "[]" "{}" '""' "''" 6 | 7 | function _autopair_fish_key_bindings --on-variable fish_key_bindings 8 | set --query fish_key_bindings[1] || return 9 | 10 | test $fish_key_bindings = fish_default_key_bindings && 11 | set --local mode default insert || 12 | set --local mode insert default 13 | 14 | bind --mode $mode[-1] --erase \177 \b \t 15 | 16 | bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫ 17 | bind --mode $mode[1] \b _autopair_backspace 18 | bind --mode $mode[1] \t _autopair_tab 19 | 20 | printf "%s\n" $autopair_pairs | while read --local left right --delimiter "" 21 | bind --mode $mode[-1] --erase $left $right 22 | if test $left = $right 23 | bind --mode $mode[1] $left "_autopair_insert_same \\$left" 24 | else 25 | bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right" 26 | bind --mode $mode[1] $right "_autopair_insert_right \\$right" 27 | end 28 | end 29 | end 30 | 31 | _autopair_fish_key_bindings 32 | 33 | function _autopair_uninstall --on-event autopair_uninstall 34 | string collect ( 35 | bind --all | string replace --filter --regex -- "_autopair.*" --erase 36 | set --names | string replace --filter --regex -- "^autopair" "set --erase autopair" 37 | ) | source 38 | functions --erase (functions --all | string match "_autopair_*") 39 | end 40 | -------------------------------------------------------------------------------- /config/fish/conf.d/fnm.fish: -------------------------------------------------------------------------------- 1 | fnm env --use-on-cd --corepack-enabled --shell fish | source 2 | -------------------------------------------------------------------------------- /config/fish/conf.d/fzf.fish: -------------------------------------------------------------------------------- 1 | # fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup 2 | if not status is-interactive && test "$CI" != true 3 | exit 4 | end 5 | 6 | # Because of scoping rules, to capture the shell variables exactly as they are, we must read 7 | # them before even executing _fzf_search_variables. We use psub to store the 8 | # variables' info in temporary files and pass in the filenames as arguments. 9 | # This variable is global so that it can be referenced by fzf_configure_bindings and in tests 10 | set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)' 11 | 12 | 13 | # Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings 14 | fzf_configure_bindings 15 | 16 | # Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased 17 | function _fzf_uninstall --on-event fzf_uninstall 18 | _fzf_uninstall_bindings 19 | 20 | set --erase _fzf_search_vars_command 21 | functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings 22 | complete --erase fzf_configure_bindings 23 | 24 | set_color cyan 25 | echo "fzf.fish uninstalled." 26 | echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings." 27 | set_color normal 28 | end 29 | -------------------------------------------------------------------------------- /config/fish/conf.d/grc.fish: -------------------------------------------------------------------------------- 1 | set -U grc_plugin_execs df dig ifconfig \ 2 | make mount mtr netstat ping ps tail traceroute \ 3 | wdiff blkid du dnf env id ip iostat journalctl kubectl \ 4 | last lsattr lsblk lspci lsmod lsof getfacl getsebool ulimit uptime nmap \ 5 | fdisk findmnt free semanage sar ss sysctl systemctl \ 6 | tcpdump tune2fs vmstat w who sockstat 7 | 8 | for executable in $grc_plugin_execs 9 | if type -q $executable 10 | function $executable --inherit-variable executable --wraps=$executable 11 | if isatty 1 12 | grc $executable $argv 13 | else 14 | eval command $executable $argv 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /config/fish/conf.d/nvim.fish: -------------------------------------------------------------------------------- 1 | set -g nvim_current ~/.local/share/bob/v0.10.4/bin/nvim 2 | set -g nvim_old ~/.local/share/bob/v0.9.5/nvim-linux64/bin/nvim 3 | 4 | 5 | abbr -a nvim_current $nvim_current 6 | abbr -a nvim_old $nvim_old 7 | 8 | function repro -a issue 9 | argparse --min-args=1 n 'v/version=?' s/silent -- $argv 10 | or return $status 11 | 12 | set issue $argv[1] 13 | set file ./debug/$issue.lua 14 | 15 | # Fetch the issue if it doesn't exist 16 | if not test -f $file 17 | echo "Fetching issue #$issue" 18 | gh issue view $issue | sed -n '/```[Ll]ua/,/```/p' | sed '1d;$d' >$file 19 | end 20 | 21 | # Use local lazy and plugins 22 | set -x LAZY_PATH ~/projects/lazy.nvim 23 | set -x LAZY_DEV "folke,LazyVim" 24 | 25 | # Format the file 26 | stylua $file 27 | 28 | if [ "$_flag_v" = stable ] 29 | set _flag_v '' 30 | end 31 | 32 | set nvim nvim 33 | if set -q _flag_v 34 | fd --type=d --maxdepth=1 "^v$_flag_v" ~/.local/share/bob 35 | set nvim_dir (fd --type=d --maxdepth=1 "^v$_flag_v" ~/.local/share/bob | sort -V | tail -1) 36 | set nvim (fd --type=x '^nvim$' $nvim_dir -1) 37 | if test -z "$nvim" 38 | echo "Version v$_flag_v not found" 39 | return 1 40 | end 41 | end 42 | 43 | # Run the repro 44 | if set -q _flag_s 45 | $nvim -u $file 46 | else 47 | $nvim -u $file $file 48 | end 49 | end 50 | 51 | # Function to select or use a given Neovim profile 52 | function nvims --wraps nvim 53 | set -l profile $argv[1] 54 | 55 | # Check if the provided profile exists 56 | if test -n "$profile" -a -d ~/.config/nvim-profiles/"$profile" 57 | set args $argv[2..-1] 58 | else 59 | # Use fzf to allow the user to select a profile 60 | set profile (command ls ~/.config/nvim-profiles/ | fzf --prompt=" Neovim Profile: " --height=~50% --layout=reverse --exit-0) 61 | if test -z "$profile" 62 | return 1 63 | end 64 | end 65 | 66 | set -l appname nvim-profiles/$profile 67 | if not test -d ~/.config/"$appname" 68 | echo "Profile $profile does not exist." 69 | echo "Use nvims_install to install a new profile." 70 | return 1 71 | end 72 | 73 | set -x NVIM_APPNAME $appname 74 | nvim $args 75 | end 76 | 77 | function nvims_tmp --description 'switch to the Neovim config in this directory' 78 | [ -L ~/.config/nvim-profiles/tmp ] 79 | and rm ~/.config/nvim-profiles/tmp 80 | ln -s (realpath .) ~/.config/nvim-profiles/tmp 81 | and nvims tmp 82 | end 83 | 84 | # Autocomplete profiles for the nvims function 85 | complete -f -c nvims -a '(command ls ~/.config/nvim-profiles/)' 86 | 87 | # Function to install a new Neovim profile from a given Git URL 88 | function nvims_install -a url -a profile 89 | if test -z "$profile" -o -z "$url" 90 | echo "Usage: nvim_profile_install " 91 | return 1 92 | end 93 | 94 | set -l dest ~/.config/nvim-profiles/$profile 95 | if test -d $dest 96 | echo "Profile $profile already exists" 97 | return 1 98 | end 99 | 100 | git clone $url.git $dest 101 | nvims $profile 102 | end 103 | 104 | function nvims_clean -a profile 105 | if test -z "$profile" 106 | echo "Usage: nvim_clean " 107 | return 1 108 | end 109 | 110 | test -d ~/.local/share/nvim-profiles/$profile 111 | and rm -rf ~/.local/share/nvim-profiles/$profile 112 | 113 | test -d ~/.local/state/nvim-profiles/$profile 114 | and rm -rf ~/.local/state/nvim-profiles/$profile 115 | 116 | test -d ~/.cache/nvim-profiles/$profile 117 | and rm -rf ~/.cache/nvim-profiles/$profile 118 | end 119 | -------------------------------------------------------------------------------- /config/fish/conf.d/pve.fish: -------------------------------------------------------------------------------- 1 | set node "root@10.0.0.10" 2 | 3 | function pve 4 | ssh -t $node $argv 5 | end 6 | 7 | function pct_enter 8 | set name $argv[1] 9 | set id (pve pct list | grep $name | awk '{print $1}' | head -n1) 10 | if test -z $id 11 | echo "VM $name not found" 12 | return 1 13 | end 14 | pve pct enter $id 15 | end 16 | 17 | function pve-ssh-copy-id -d "Copy the SSH public key to a Proxmox VM/LXC" -a name 18 | set cid $argv[1] 19 | echo "Copying SSH public key to $cid" 20 | 21 | cat ~/.ssh/id_ed25519.pub | 22 | ssh $node bash -c "pct exec $cid -- bash -c \"mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys\"" 23 | end 24 | 25 | 26 | function win 27 | cv4pve-pepper --api-token $PVE_API_KEY --host 10.0.0.10 --viewer (which remote-viewer) --vmid 106 --start-or-resume 28 | end 29 | -------------------------------------------------------------------------------- /config/fish/conf.d/pwd.fish: -------------------------------------------------------------------------------- 1 | # the following functions are here instead of in the functions directory 2 | # because they utilize event handlers which autoloading does not support 3 | 4 | # auto run onefetch if inside git repo 5 | # --on-variable is a fish builtin that changes whenever the directory changes 6 | # so this function will run whenever the directory changes 7 | function auto_pwd --on-variable PWD 8 | set -x GUM_FORMAT_THEME dark 9 | 10 | # check if .git/ exists and is a git repo and if onefetch is installed 11 | if test -d .git && git rev-parse --git-dir >/dev/null 2>&1 12 | # readme file 13 | if test -f README.md 14 | awk '/^##/{exit} 1' README.md | string trim \ 15 | | gum format | grep -v 'Image: image' 2>&1 | head -20 16 | end 17 | 18 | # recent commits 19 | echo -e "## Recent Activity\n" | gum format 20 | hub l -10 \ 21 | --since='1 week ago' \ 22 | | devmoji --log --color \ 23 | | sed 's/^/ /' 24 | 25 | # local changes 26 | echo -e "## Status\n" | gum format 27 | hub -c color.ui=always st | sed 's/^/ /' 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /config/fish/conf.d/tokyonight.fish: -------------------------------------------------------------------------------- 1 | # . ~/projects/tokyonight.nvim/extras/fish/tokyonight_night.fish 2 | 3 | set style moon 4 | set theme tokyonight_{$style} 5 | 6 | set src ~/projects/tokyonight.nvim/extras/fish_themes/{$theme}.theme 7 | set dst ~/.config/fish/themes/{$theme}.theme 8 | 9 | [ -L $dst ] 10 | or ln -s $src $dst 11 | 12 | fish_config theme choose $theme 13 | -------------------------------------------------------------------------------- /config/fish/conf.d/~1.fzf.fish: -------------------------------------------------------------------------------- 1 | bind -M insert \ch __fzf_tldr 2 | 3 | source ~/projects/tokyonight.nvim/extras/fzf/tokyonight_moon.sh 4 | 5 | set -x FZF_DEFAULT_OPTS "$FZF_DEFAULT_OPTS 6 | --cycle 7 | --layout=reverse 8 | --height 60% 9 | --ansi 10 | --preview-window=right:70% 11 | --bind=ctrl-u:half-page-up,ctrl-d:half-page-down,ctrl-x:jump 12 | --bind=ctrl-f:preview-page-down,ctrl-b:preview-page-up 13 | --bind=ctrl-a:beginning-of-line,ctrl-e:end-of-line 14 | --bind=ctrl-j:down,ctrl-k:up 15 | " 16 | 17 | set fzf_diff_highlighter delta --paging=never --width=20 18 | fzf_configure_bindings \ 19 | --directory=\ct \ 20 | --git_log=\cg \ 21 | --git_status=\cs \ 22 | --history= \ 23 | --processes=\cp \ 24 | --variables= 25 | -------------------------------------------------------------------------------- /config/fish/conf.d/~2.atuin.fish: -------------------------------------------------------------------------------- 1 | atuin init fish --disable-up-arrow | source 2 | -------------------------------------------------------------------------------- /config/fish/config.fish: -------------------------------------------------------------------------------- 1 | 2 | # Cursor styles 3 | set -gx fish_vi_force_cursor 1 4 | set -gx fish_cursor_default block 5 | set -gx fish_cursor_insert line blink 6 | set -gx fish_cursor_visual block 7 | set -gx fish_cursor_replace_one underscore 8 | 9 | # Path 10 | set -x fish_user_paths 11 | fish_add_path /bin 12 | fish_add_path ~/.cargo/bin 13 | fish_add_path ~/.local/bin 14 | fish_add_path ~/.luarocks/bin 15 | fish_add_path ~/Library/Python/3.{8,9}/bin 16 | fish_add_path /usr/local/opt/sqlite/bin 17 | fish_add_path /usr/local/sbin 18 | fish_add_path ~/.gem/ruby/2.6.0/bin 19 | fish_add_path ~/.local/bin/pnpm-bins 20 | fish_add_path ~/.local/share/bob-nvim/bin 21 | fish_add_path ~/.local/share/bob-nvim/nvim-linux64/bin 22 | fish_add_path /var/lib/flatpak/exports/bin/ 23 | fish_add_path ~/.dotnet/tools 24 | fish_add_path ~/.local/share/mise/shims 25 | 26 | set -gx DENO_INSTALL "~/.deno" 27 | fish_add_path ~/.deno/bin 28 | 29 | set -gx EDITOR (which nvim) 30 | set -gx VISUAL $EDITOR 31 | set -gx SUDO_EDITOR $EDITOR 32 | 33 | # Fish 34 | set fish_emoji_width 2 35 | alias ssh "TERM=xterm-256color command ssh" 36 | alias mosh "TERM=xterm-256color command mosh" 37 | 38 | # Emacs 39 | # set -l emacs_path /Applications/Emacs.app/Contents/MacOS 40 | # set -Ux EMACS $emacs_path/Emacs 41 | fish_add_path ~/.emacs.d/bin 42 | # alias emacs $EMACS 43 | 44 | # Go 45 | set -x GOPATH ~/go 46 | fish_add_path $GOPATH $GOPATH/bin 47 | 48 | 49 | fish_add_path -m /etc/profiles/per-user/folke/bin /run/current-system/sw/bin 50 | # Exports 51 | set -x LESS -rF 52 | set -x COMPOSE_DOCKER_CLI_BUILD 1 53 | set -x HOMEBREW_NO_AUTO_UPDATE 1 54 | set -x DOTDROP_AUTOUPDATE no 55 | set -x MANPAGER "nvim +Man!" 56 | set -x MANROFFOPT -c 57 | set -x OPENCV_LOG_LEVEL ERROR 58 | #set -x MANPAGER "sh -c 'col -bx | bat -l man -p'" # use bat to format man pages 59 | #set -x MANPAGER "most" # use bat to format man pages 60 | # 61 | abbr -a --position anywhere --set-cursor -- -h "-h 2>&1 | bat --plain --language=help" 62 | abbr j just 63 | 64 | # Dnf 65 | abbr dnfi 'sudo dnf install' 66 | abbr dnfs 'sudo dnf search' 67 | abbr dnfr 'sudo dnf remove' 68 | abbr dnfu 'sudo dnf upgrade --refresh' 69 | 70 | # Tmux 71 | abbr t tmux 72 | abbr tc 'tmux attach' 73 | abbr ta 'tmux attach -t' 74 | abbr tad 'tmux attach -d -t' 75 | abbr ts 'tmux new -s' 76 | abbr tl 'tmux ls' 77 | abbr tk 'tmux kill-session -t' 78 | abbr mux tmuxinator 79 | 80 | # Files & Directories 81 | abbr mv "mv -iv" 82 | abbr cp "cp -riv" 83 | abbr mkdir "mkdir -vp" 84 | alias ls="eza --color=always --icons --group-directories-first" 85 | alias la 'eza --color=always --icons --group-directories-first --all' 86 | alias ll 'eza --color=always --icons --group-directories-first --all --long' 87 | abbr l ll 88 | abbr ncdu "ncdu --color dark" 89 | 90 | # Editor 91 | abbr vim nvim 92 | abbr vi nvim 93 | abbr v nvim 94 | alias vimpager 'nvim - -c "lua require(\'util\').colorize()"' 95 | abbr vd "VIM=~/projects/neovim nvim --luamod-dev" 96 | abbr sv sudoedit 97 | abbr vudo sudoedit 98 | alias lazyvim "NVIM_APPNAME=lazyvim nvim" 99 | abbr lv lazyvim 100 | alias bt "coredumpctl -1 gdb -A '-ex \"bt\" -q -batch' 2>/dev/null | awk '/Program terminated with signal/,0' | bat -l cpp --no-pager --style plain" 101 | 102 | # Dev 103 | abbr git hub 104 | abbr topgit topgrade --only git_repos 105 | abbr g hub 106 | abbr windows systemctl reboot --boot-loader-entry=auto-windows 107 | 108 | set -x LG_CONFIG_FILE /home/folke/.config/lazygit/config.yml,/home/folke/.cache/nvim/lazygit-theme.yml 109 | 110 | alias lazygit "TERM=xterm-256color command lazygit" 111 | abbr gg lazygit 112 | abbr gl 'hub l --color | devmoji --log --color | less -rXF' 113 | abbr gs "hub st" 114 | abbr gb "hub checkout -b" 115 | abbr gc "hub commit" 116 | abbr gpr "hub pr checkout" 117 | abbr gm "hub branch -l main | rg main > /dev/null 2>&1 && hub checkout main || hub checkout master" 118 | abbr gcp "hub commit -p" 119 | abbr gpp "hub push" 120 | abbr gp "hub pull" 121 | alias tn "npx --no-install ts-node --transpile-only" 122 | abbr tt "tn src/tt.ts" 123 | 124 | # Other 125 | abbr df "grc /bin/df -h" 126 | abbr ntop "ultra --monitor" 127 | abbr ytop btm 128 | abbr gotop btm 129 | abbr fda "fd -IH" 130 | abbr rga "rg -uu" 131 | abbr grep rg 132 | abbr suod sudo 133 | abbr helpme "bat ~/HELP.md" 134 | abbr weather "curl -s wttr.in/Ghent | grep -v Follow" 135 | abbr show-cursor "tput cnorm" 136 | abbr hide-cursor "tput civis" 137 | abbr aria2c-daemon "aria2c -D" 138 | alias gnome-control-center "env XDG_CURRENT_DESKTOP=GNOME gnome-control-center" 139 | 140 | # systemctl 141 | abbr s systemctl 142 | abbr su "systemctl --user" 143 | abbr ss "command systemctl status" 144 | abbr sl "systemctl --type service --state running" 145 | abbr slu "systemctl --user --type service --state running" 146 | abbr se "sudo systemctl enable --now" 147 | abbr sd "sudo systemctl disable --now" 148 | abbr sr "sudo systemctl restart" 149 | abbr so "sudo systemctl stop" 150 | abbr sa "sudo systemctl start" 151 | abbr sf "systemctl --failed --all" 152 | 153 | # journalctl 154 | abbr jb "journalctl -b" 155 | abbr jf "journalctl --follow" 156 | abbr jg "journalctl -b --grep" 157 | abbr ju "journalctl --unit" 158 | 159 | # paru 160 | abbr p paru 161 | abbr pai "paru -S" 162 | abbr par "paru -Rns" 163 | abbr pas "paru -Ss" 164 | abbr pal "paru -Q" 165 | abbr paf "paru -Ql" 166 | abbr pao "paru -Qo" 167 | -------------------------------------------------------------------------------- /config/fish/fish_plugins: -------------------------------------------------------------------------------- 1 | jorgebucaran/fisher 2 | franciscolourenco/done 3 | jorgebucaran/autopair.fish 4 | patrickf1/fzf.fish 5 | -------------------------------------------------------------------------------- /config/fish/functions/__fzf_tldr.fish: -------------------------------------------------------------------------------- 1 | function __fzf_tldr --description "Search tldr using fzf" 2 | fd --print0 --extension md . ~/.cache/tealdeer/tldr-pages/pages/{linux,common} \ 3 | | sed -z 's/.*\///; s/\.md$//' \ 4 | | fzf --read0 --query=(commandline) --preview 'fish -c "tldr {}"' --preview-window right:75% \ 5 | | read -lz cmd 6 | 7 | if test $status -eq 0 8 | # trim any surrounding white space 9 | commandline --replace (echo $cmd | sed -zr "s/^\s+|\s+\$//g") 10 | end 11 | 12 | commandline --function repaint 13 | end 14 | -------------------------------------------------------------------------------- /config/fish/functions/_autopair_backspace.fish: -------------------------------------------------------------------------------- 1 | function _autopair_backspace 2 | set --local index (commandline --cursor) 3 | set --local buffer (commandline) 4 | 5 | test $index -ge 1 && 6 | contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs && 7 | commandline --function delete-char 8 | commandline --function backward-delete-char 9 | end 10 | -------------------------------------------------------------------------------- /config/fish/functions/_autopair_insert_left.fish: -------------------------------------------------------------------------------- 1 | function _autopair_insert_left --argument-names left right 2 | set --local buffer (commandline) 3 | set --local before (commandline --cut-at-cursor) 4 | 5 | commandline --insert -- $left 6 | 7 | switch "$buffer" 8 | case "$before"{," "\*,$autopair_right\*} 9 | set --local index (commandline --cursor) 10 | commandline --insert -- $right 11 | commandline --cursor $index 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /config/fish/functions/_autopair_insert_right.fish: -------------------------------------------------------------------------------- 1 | function _autopair_insert_right --argument-names key 2 | set --local buffer (commandline) 3 | set --local before (commandline --cut-at-cursor) 4 | 5 | switch "$buffer" 6 | case "$before$key"\* 7 | commandline --cursor (math (commandline --cursor) + 1) 8 | case \* 9 | commandline --insert -- $key 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config/fish/functions/_autopair_insert_same.fish: -------------------------------------------------------------------------------- 1 | function _autopair_insert_same --argument-names key 2 | set --local buffer (commandline) 3 | set --local index (commandline --cursor) 4 | set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer") 5 | 6 | if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0 7 | test $key = $next && commandline --cursor (math $index + 1) && return 8 | 9 | commandline --insert -- $key 10 | 11 | if test $index -lt 1 || 12 | contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left && 13 | contains -- $next "" " " $autopair_right 14 | commandline --insert -- $key 15 | commandline --cursor (math $index + 1) 16 | end 17 | else 18 | commandline --insert -- $key 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /config/fish/functions/_autopair_tab.fish: -------------------------------------------------------------------------------- 1 | function _autopair_tab 2 | commandline --paging-mode && down-or-search && return 3 | 4 | string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) && 5 | commandline --function end-of-line --function backward-delete-char 6 | commandline --function complete 7 | end 8 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_configure_bindings_help.fish: -------------------------------------------------------------------------------- 1 | function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings." 2 | echo "\ 3 | USAGE: 4 | fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...] 5 | 6 | DESCRIPTION 7 | fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it 8 | previously installed. It installs bindings for both default and insert modes. fzf.fish executes 9 | it without options on fish startup to install the out-of-the-box key bindings. 10 | 11 | By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding 12 | can be configured using a namesake corresponding option: 13 | COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION 14 | Search Directory | Ctrl+Alt+F (F for file) | --directory 15 | Search Git Log | Ctrl+Alt+L (L for log) | --git_log 16 | Search Git Status | Ctrl+Alt+S (S for status) | --git_status 17 | Search History | Ctrl+R (R for reverse) | --history 18 | Search Processes | Ctrl+Alt+P (P for process) | --processes 19 | Search Variables | Ctrl+V (V for variable) | --variables 20 | Override a command's binding by specifying its corresponding option with the desired key 21 | sequence. Disable a command's binding by specifying its corresponding option with no value. 22 | 23 | Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly 24 | executed multiple times. Once the desired fzf_configure_bindings command has been found, add it 25 | to your config.fish in order to persist the customized bindings. 26 | 27 | In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an 28 | equals sign between an option's name and value. However, it does not validate key sequences. 29 | 30 | Pass -h or --help to print this help message and exit. 31 | 32 | EXAMPLES 33 | Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V 34 | \$ fzf_configure_bindings --directory=\cf --variables=\e\cv 35 | Default bindings but disable Search History 36 | \$ fzf_configure_bindings --history= 37 | An agglomeration of different options 38 | \$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes= 39 | 40 | SEE Also 41 | To learn more about fish key bindings, see bind(1) and fish_key_reader(1). 42 | " 43 | end 44 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_extract_var_info.fish: -------------------------------------------------------------------------------- 1 | # helper function for _fzf_search_variables 2 | function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output." 3 | # Extract only the lines about the variable, all of which begin with either 4 | # $variable_name: ...or... $variable_name[ 5 | string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output | 6 | 7 | # Strip the variable name prefix, including ": " for scope info lines 8 | string replace --regex "^\\\$$variable_name(?:: )?" '' | 9 | 10 | # Distill the lines of values, replacing... 11 | # [1]: |value| 12 | # ...with... 13 | # [1] value 14 | string replace --regex ": \|(.*)\|" ' $1' 15 | end 16 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_preview_changed_file.fish: -------------------------------------------------------------------------------- 1 | # helper for _fzf_search_git_status 2 | # arg should be a line from git status --short, e.g. 3 | # MM functions/_fzf_preview_changed_file.fish 4 | # D README.md 5 | # R LICENSE -> "New License" 6 | function _fzf_preview_changed_file --argument-names path_status --description "Show the git diff of the given file." 7 | # remove quotes because they'll be interpreted literally by git diff 8 | # no need to requote when referencing $path because fish does not perform word splitting 9 | # https://fishshell.com/docs/current/fish_for_bash_users.html 10 | set -f path (string unescape (string sub --start 4 $path_status)) 11 | # first letter of short format shows index, second letter shows working tree 12 | # https://git-scm.com/docs/git-status/2.35.0#_short_format 13 | set -f index_status (string sub --length 1 $path_status) 14 | set -f working_tree_status (string sub --start 2 --length 1 $path_status) 15 | 16 | set -f diff_opts --color=always 17 | 18 | if test $index_status = '?' 19 | _fzf_report_diff_type Untracked 20 | _fzf_preview_file $path 21 | else if contains {$index_status}$working_tree_status DD AU UD UA DU AA UU 22 | # Unmerged statuses taken directly from git status help's short format table 23 | # Unmerged statuses are mutually exclusive with other statuses, so if we see 24 | # these, then safe to assume the path is unmerged 25 | _fzf_report_diff_type Unmerged 26 | git diff $diff_opts -- $path 27 | else 28 | if test $index_status != ' ' 29 | _fzf_report_diff_type Staged 30 | 31 | # renames are only detected in the index, never working tree, so only need to test for it here 32 | # https://stackoverflow.com/questions/73954214 33 | if test $index_status = R 34 | # diff the post-rename path with the original path, otherwise the diff will show the entire file as being added 35 | set -f orig_and_new_path (string split --max 1 -- ' -> ' $path) 36 | git diff --staged $diff_opts -- $orig_and_new_path[1] $orig_and_new_path[2] 37 | # path currently has the form of "original -> current", so we need to correct it before it's used below 38 | set path $orig_and_new_path[2] 39 | else 40 | git diff --staged $diff_opts -- $path 41 | end 42 | end 43 | 44 | if test $working_tree_status != ' ' 45 | _fzf_report_diff_type Unstaged 46 | git diff $diff_opts -- $path 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_preview_file.fish: -------------------------------------------------------------------------------- 1 | # helper function for _fzf_search_directory and _fzf_search_git_status 2 | function _fzf_preview_file --description "Print a preview for the given file based on its file type." 3 | # because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file 4 | # as one argument, we collect all the arguments into one single variable and treat that as the path 5 | set -f file_path $argv 6 | 7 | if test -L "$file_path" # symlink 8 | # notify user and recurse on the target of the symlink, which can be any of these file types 9 | set -l target_path (realpath "$file_path") 10 | 11 | set_color yellow 12 | echo "'$file_path' is a symlink to '$target_path'." 13 | set_color normal 14 | 15 | _fzf_preview_file "$target_path" 16 | else if test -f "$file_path" # regular file 17 | if set --query fzf_preview_file_cmd 18 | # need to escape quotes to make sure eval receives file_path as a single arg 19 | eval "$fzf_preview_file_cmd '$file_path'" 20 | else 21 | bat --style=numbers --color=always "$file_path" 22 | end 23 | else if test -d "$file_path" # directory 24 | if set --query fzf_preview_dir_cmd 25 | # see above 26 | eval "$fzf_preview_dir_cmd '$file_path'" 27 | else 28 | # -A list hidden files as well, except for . and .. 29 | # -F helps classify files by appending symbols after the file name 30 | command ls -A -F "$file_path" 31 | end 32 | else if test -c "$file_path" 33 | _fzf_report_file_type "$file_path" "character device file" 34 | else if test -b "$file_path" 35 | _fzf_report_file_type "$file_path" "block device file" 36 | else if test -S "$file_path" 37 | _fzf_report_file_type "$file_path" socket 38 | else if test -p "$file_path" 39 | _fzf_report_file_type "$file_path" "named pipe" 40 | else 41 | echo "$file_path doesn't exist." >&2 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_report_diff_type.fish: -------------------------------------------------------------------------------- 1 | # helper for _fzf_preview_changed_file 2 | # prints out something like 3 | # ╭────────╮ 4 | # │ Staged │ 5 | # ╰────────╯ 6 | function _fzf_report_diff_type --argument-names diff_type --description "Print a distinct colored header meant to preface a git patch." 7 | # number of "-" to draw is the length of the string to box + 2 for padding 8 | set -f repeat_count (math 2 + (string length $diff_type)) 9 | set -f line (string repeat --count $repeat_count ─) 10 | set -f top_border ╭$line╮ 11 | set -f btm_border ╰$line╯ 12 | 13 | set_color yellow 14 | echo $top_border 15 | echo "│ $diff_type │" 16 | echo $btm_border 17 | set_color normal 18 | end 19 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_report_file_type.fish: -------------------------------------------------------------------------------- 1 | # helper function for _fzf_preview_file 2 | function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file." 3 | set_color red 4 | echo "Cannot preview '$file_path': it is a $file_type." 5 | set_color normal 6 | end 7 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_search_directory.fish: -------------------------------------------------------------------------------- 1 | function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths." 2 | # Directly use fd binary to avoid output buffering delay caused by a fd alias, if any. 3 | # Debian-based distros install fd as fdfind and the fd package is something else, so 4 | # check for fdfind first. Fall back to "fd" for a clear error message. 5 | set -f fd_cmd (command -v fdfind || command -v fd || echo "fd") 6 | set -f --append fd_cmd --color=always $fzf_fd_opts 7 | 8 | set -f fzf_arguments --multi --ansi $fzf_directory_opts 9 | set -f token (commandline --current-token) 10 | # expand any variables or leading tilde (~) in the token 11 | set -f expanded_token (eval echo -- $token) 12 | # unescape token because it's already quoted so backslashes will mess up the path 13 | set -f unescaped_exp_token (string unescape -- $expanded_token) 14 | 15 | # If the current token is a directory and has a trailing slash, 16 | # then use it as fd's base directory. 17 | if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token" 18 | set --append fd_cmd --base-directory=$unescaped_exp_token 19 | # use the directory name as fzf's prompt to indicate the search is limited to that directory 20 | set --prepend fzf_arguments --prompt="Directory $unescaped_exp_token> " --preview="_fzf_preview_file $expanded_token{}" 21 | set -f file_paths_selected $unescaped_exp_token($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) 22 | else 23 | set --prepend fzf_arguments --prompt="Directory> " --query="$unescaped_exp_token" --preview='_fzf_preview_file {}' 24 | set -f file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) 25 | end 26 | 27 | 28 | if test $status -eq 0 29 | commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ') 30 | end 31 | 32 | commandline --function repaint 33 | end 34 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_search_git_log.fish: -------------------------------------------------------------------------------- 1 | function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash." 2 | if not git rev-parse --git-dir >/dev/null 2>&1 3 | echo '_fzf_search_git_log: Not in a git repository.' >&2 4 | else 5 | if not set --query fzf_git_log_format 6 | # %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below 7 | set -f fzf_git_log_format '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)' 8 | end 9 | 10 | set -f preview_cmd 'git show --color=always --stat --patch {1}' 11 | if set --query fzf_diff_highlighter 12 | set preview_cmd "$preview_cmd | $fzf_diff_highlighter" 13 | end 14 | 15 | set -f selected_log_lines ( 16 | git log --no-show-signature --color=always --format=format:$fzf_git_log_format --date=short | \ 17 | _fzf_wrapper --ansi \ 18 | --multi \ 19 | --scheme=history \ 20 | --prompt="Git Log> " \ 21 | --preview=$preview_cmd \ 22 | --query=(commandline --current-token) \ 23 | $fzf_git_log_opts 24 | ) 25 | if test $status -eq 0 26 | for line in $selected_log_lines 27 | set -f abbreviated_commit_hash (string split --field 1 " " $line) 28 | set -f full_commit_hash (git rev-parse $abbreviated_commit_hash) 29 | set -f --append commit_hashes $full_commit_hash 30 | end 31 | commandline --current-token --replace (string join ' ' $commit_hashes) 32 | end 33 | end 34 | 35 | commandline --function repaint 36 | end 37 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_search_git_status.fish: -------------------------------------------------------------------------------- 1 | function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths." 2 | if not git rev-parse --git-dir >/dev/null 2>&1 3 | echo '_fzf_search_git_status: Not in a git repository.' >&2 4 | else 5 | set -f preview_cmd '_fzf_preview_changed_file {}' 6 | if set --query fzf_diff_highlighter 7 | set preview_cmd "$preview_cmd | $fzf_diff_highlighter" 8 | end 9 | 10 | set -f selected_paths ( 11 | # Pass configuration color.status=always to force status to use colors even though output is sent to a pipe 12 | git -c color.status=always status --short | 13 | _fzf_wrapper --ansi \ 14 | --multi \ 15 | --prompt="Git Status> " \ 16 | --query=(commandline --current-token) \ 17 | --preview=$preview_cmd \ 18 | --nth="2.." \ 19 | $fzf_git_status_opts 20 | ) 21 | if test $status -eq 0 22 | # git status --short automatically escapes the paths of most files for us so not going to bother trying to handle 23 | # the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping") 24 | set -f cleaned_paths 25 | 26 | for path in $selected_paths 27 | if test (string sub --length 1 $path) = R 28 | # path has been renamed and looks like "R LICENSE -> LICENSE.md" 29 | # extract the path to use from after the arrow 30 | set --append cleaned_paths (string split -- "-> " $path)[-1] 31 | else 32 | set --append cleaned_paths (string sub --start=4 $path) 33 | end 34 | end 35 | 36 | commandline --current-token --replace -- (string join ' ' $cleaned_paths) 37 | end 38 | end 39 | 40 | commandline --function repaint 41 | end 42 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_search_history.fish: -------------------------------------------------------------------------------- 1 | function _fzf_search_history --description "Search command history. Replace the command line with the selected command." 2 | # history merge incorporates history changes from other fish sessions 3 | # it errors out if called in private mode 4 | if test -z "$fish_private_mode" 5 | builtin history merge 6 | end 7 | 8 | if not set --query fzf_history_time_format 9 | # Reference https://devhints.io/strftime to understand strftime format symbols 10 | set -f fzf_history_time_format "%m-%d %H:%M:%S" 11 | end 12 | 13 | # Delinate time from command in history entries using the vertical box drawing char (U+2502). 14 | # Then, to get raw command from history entries, delete everything up to it. The ? on regex is 15 | # necessary to make regex non-greedy so it won't match into commands containing the char. 16 | set -f time_prefix_regex '^.*? │ ' 17 | # Delinate commands throughout pipeline using null rather than newlines because commands can be multi-line 18 | set -f commands_selected ( 19 | builtin history --null --show-time="$fzf_history_time_format │ " | 20 | _fzf_wrapper --read0 \ 21 | --print0 \ 22 | --multi \ 23 | --scheme=history \ 24 | --prompt="History> " \ 25 | --query=(commandline) \ 26 | --preview="string replace --regex '$time_prefix_regex' '' -- {} | fish_indent --ansi" \ 27 | --preview-window="bottom:3:wrap" \ 28 | $fzf_history_opts | 29 | string split0 | 30 | # remove timestamps from commands selected 31 | string replace --regex $time_prefix_regex '' 32 | ) 33 | 34 | if test $status -eq 0 35 | commandline --replace -- $commands_selected 36 | end 37 | 38 | commandline --function repaint 39 | end 40 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_search_processes.fish: -------------------------------------------------------------------------------- 1 | function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process." 2 | # Directly use ps command because it is often aliased to a different command entirely 3 | # or with options that dirty the search results and preview output 4 | set -f ps_cmd (command -v ps || echo "ps") 5 | # use all caps to be consistent with ps default format 6 | # snake_case because ps doesn't seem to allow spaces in the field names 7 | set -f ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command') 8 | set -f processes_selected ( 9 | $ps_cmd -A -opid,command | \ 10 | _fzf_wrapper --multi \ 11 | --prompt="Processes> " \ 12 | --query (commandline --current-token) \ 13 | --ansi \ 14 | # first line outputted by ps is a header, so we need to mark it as so 15 | --header-lines=1 \ 16 | # ps uses exit code 1 if the process was not found, in which case show an message explaining so 17 | --preview="$ps_cmd -o '$ps_preview_fmt' -p {1} || echo 'Cannot preview {1} because it exited.'" \ 18 | --preview-window="bottom:4:wrap" \ 19 | $fzf_processes_opts 20 | ) 21 | 22 | if test $status -eq 0 23 | for process in $processes_selected 24 | set -f --append pids_selected (string split --no-empty --field=1 -- " " $process) 25 | end 26 | 27 | # string join to replace the newlines outputted by string split with spaces 28 | commandline --current-token --replace -- (string join ' ' $pids_selected) 29 | end 30 | 31 | commandline --function repaint 32 | end 33 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_search_variables.fish: -------------------------------------------------------------------------------- 1 | # This function expects the following two arguments: 2 | # argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables 3 | # argument 2 = output of (set --names | psub), i.e. a file with all variable names 4 | function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable." 5 | if test -z "$set_names_output" 6 | printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2 7 | 8 | commandline --function repaint 9 | return 22 # 22 means invalid argument in POSIX 10 | end 11 | 12 | # Exclude the history variable from being piped into fzf because 13 | # 1. it's not included in $set_names_output 14 | # 2. it tends to be a very large value => increases computation time 15 | # 3._fzf_search_history is a much better way to examine history anyway 16 | set -f all_variable_names (string match --invert history <$set_names_output) 17 | 18 | set -f current_token (commandline --current-token) 19 | # Use the current token to pre-populate fzf's query. If the current token begins 20 | # with a $, remove it from the query so that it will better match the variable names 21 | set -f cleaned_curr_token (string replace -- '$' '' $current_token) 22 | 23 | set -f variable_names_selected ( 24 | printf '%s\n' $all_variable_names | 25 | _fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \ 26 | --prompt="Variables> " \ 27 | --preview-window="wrap" \ 28 | --multi \ 29 | --query=$cleaned_curr_token \ 30 | $fzf_variables_opts 31 | ) 32 | 33 | if test $status -eq 0 34 | # If the current token begins with a $, do not overwrite the $ when 35 | # replacing the current token with the selected variable. 36 | # Uses brace expansion to prepend $ to each variable name. 37 | commandline --current-token --replace ( 38 | if string match --quiet -- '$*' $current_token 39 | string join " " \${$variable_names_selected} 40 | else 41 | string join " " $variable_names_selected 42 | end 43 | ) 44 | end 45 | 46 | commandline --function repaint 47 | end 48 | -------------------------------------------------------------------------------- /config/fish/functions/_fzf_wrapper.fish: -------------------------------------------------------------------------------- 1 | function _fzf_wrapper --description "Prepares some environment variables before executing fzf." 2 | # Make sure fzf uses fish to execute preview commands, some of which 3 | # are autoloaded fish functions so don't exist in other shells. 4 | # Use --function so that it doesn't clobber SHELL outside this function. 5 | set -f --export SHELL (command --search fish) 6 | 7 | # If neither FZF_DEFAULT_OPTS nor FZF_DEFAULT_OPTS_FILE are set, then set some sane defaults. 8 | # See https://github.com/junegunn/fzf#environment-variables 9 | set --query FZF_DEFAULT_OPTS FZF_DEFAULT_OPTS_FILE 10 | if test $status -eq 2 11 | # cycle allows jumping between the first and last results, making scrolling faster 12 | # layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env 13 | # border shows where the fzf window begins and ends 14 | # height=90% leaves space to see the current command and some scrollback, maintaining context of work 15 | # preview-window=wrap wraps long lines in the preview window, making reading easier 16 | # marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >) 17 | set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"' 18 | end 19 | 20 | fzf $argv 21 | end 22 | -------------------------------------------------------------------------------- /config/fish/functions/bob.fish: -------------------------------------------------------------------------------- 1 | 2 | function bob --wraps bob 3 | command bob $argv 4 | set used (cat ~/.local/share/bob/used) 5 | set src ~/.local/share/bob/$used 6 | set dest ~/.local/share/bob-nvim 7 | test -L $dest 8 | and unlink $dest 9 | ln -s $src $dest 10 | end 11 | -------------------------------------------------------------------------------- /config/fish/functions/calc.fish: -------------------------------------------------------------------------------- 1 | function calc --wraps numbat 2 | numbat --pretty-print=always -e $argv 3 | end 4 | -------------------------------------------------------------------------------- /config/fish/functions/clean.fish: -------------------------------------------------------------------------------- 1 | function clean 2 | sudo paccache -rk1 3 | sudo paccache -ruk0 4 | paru -Sccd --noconfirm 5 | cargo cache -a 6 | yarn cache clean 7 | pnpm store prune 8 | pip cache purge 9 | sudo docker system prune -a -f 10 | podman system prune -a -f 11 | start snapper-cleanup.service 12 | sudo systemctl status snapper-cleanup.service 13 | duf 14 | end 15 | -------------------------------------------------------------------------------- /config/fish/functions/code.fish: -------------------------------------------------------------------------------- 1 | # Defined in - @ line 1 2 | function code 3 | codesign --remove-signature '/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Renderer).app' 4 | code-insiders $argv; 5 | end 6 | -------------------------------------------------------------------------------- /config/fish/functions/color-test.fish: -------------------------------------------------------------------------------- 1 | # Defined in /Users/folke/.config/fish/config.fish @ line 144 2 | function color-test 3 | set scripts square crunch alpha spectrum unowns.py ghosts monster tiefighter2 thebat2 4 | colorscript -r 5 | #set script "$HOME/projects/color-scripts/color-scripts/"(random choice $scripts) 6 | # $script 7 | end 8 | -------------------------------------------------------------------------------- /config/fish/functions/conda.fish: -------------------------------------------------------------------------------- 1 | 2 | function conda 3 | functions -e conda 4 | eval command conda "shell.fish" hook | source 5 | 6 | # don't add the conda prompt. This is done by starship 7 | function __conda_add_prompt 8 | end 9 | 10 | conda $argv 11 | end 12 | -------------------------------------------------------------------------------- /config/fish/functions/dot.fish: -------------------------------------------------------------------------------- 1 | 2 | function _dot_add -a name 3 | set -l src ~/dot/config/$name 4 | set -l dest ~/.config/$name 5 | 6 | # src should exist and be a file or a directory 7 | # dest should not exist 8 | if not test -f $dest -o -d $dest 9 | echo "$dest does not exist" 10 | return 1 11 | end 12 | 13 | if test -e $src 14 | echo "$src already exists" 15 | return 1 16 | end 17 | 18 | mv -v $dest $src 19 | ln -sv $src $dest 20 | end 21 | 22 | function _dot_del -a name 23 | # remove the symlink and move the directory back 24 | set -l src ~/dot/config/$name 25 | set -l dest ~/.config/$name 26 | 27 | if not test -e $src 28 | echo "$src does not exist" 29 | return 1 30 | end 31 | 32 | if not test -L $dest 33 | echo "$dest is not a symlink" 34 | return 1 35 | end 36 | 37 | rm -v $dest 38 | mv -v $src $dest 39 | end 40 | 41 | function _dot_help 42 | echo "Usage: dot [add|del] " 43 | return 1 44 | end 45 | 46 | function dot -a cmd 47 | if test (count $argv) -lt 2 48 | _dot_help 49 | return 1 50 | end 51 | switch $cmd 52 | case add 53 | _dot_add $argv[2] 54 | case del 55 | _dot_del $argv[2] 56 | case '*' 57 | _dot_help 58 | return 1 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /config/fish/functions/fast.fish: -------------------------------------------------------------------------------- 1 | function fast 2 | powerprofilesctl launch --profile performance $argv 3 | end 4 | 5 | function __complete_fast 6 | set -l cmd (commandline -o) 7 | set -e cmd[1] 8 | if test -n "$cmd" 9 | complete -C "$cmd" 10 | else 11 | __fish_complete_command 12 | end 13 | end 14 | 15 | complete -c fast -a "(__complete_fast)" 16 | -------------------------------------------------------------------------------- /config/fish/functions/fish_greeting.fish: -------------------------------------------------------------------------------- 1 | function fish_greeting 2 | if not status is-interactive 3 | exit 4 | end 5 | fastfetch 6 | end 7 | -------------------------------------------------------------------------------- /config/fish/functions/fish_indent_ansi.fish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env fish 2 | 3 | function fish_indent_ansi --wraps fish_indent 4 | # Make sure the colors are exported 5 | set | command grep "^fish_color" | sed "s/^/set -Ux /" | source 6 | command fish_indent --ansi $argv 7 | end 8 | -------------------------------------------------------------------------------- /config/fish/functions/fish_prompt.fish: -------------------------------------------------------------------------------- 1 | source (starship init fish --print-full-init | psub) 2 | -------------------------------------------------------------------------------- /config/fish/functions/fish_title.fish: -------------------------------------------------------------------------------- 1 | # nerd-fonts: https://www.nerdfonts.com/cheat-sheet 2 | # function fish_title 3 | # # emacs is basically the only term that can't handle it. 4 | # set -l cmd (status current-command) 5 | # switch $cmd 6 | # case fish 7 | # set cmd " " 8 | # case nvim vim 9 | # set cmd " " 10 | # case gh 11 | # set cmd " " 12 | # case lazygit git 13 | # set cmd " " 14 | # case topgrade 15 | # set cmd " " 16 | # case htop btop 17 | # set cmd "󰄧 " 18 | # case curl wget 19 | # set cmd " " 20 | # case cargo 21 | # set cmd " " 22 | # case docker docker-compose lazydocker 23 | # set cmd " " 24 | # case make 25 | # set cmd " " 26 | # case node 27 | # set cmd " " 28 | # case pacman paru 29 | # set cmd "󰮯 " 30 | # end 31 | # echo "$cmd $(prompt_pwd)" 32 | # end 33 | 34 | # emoji: https://emojicombos.com/ 35 | function fish_title 36 | # emacs is basically the only term that can't handle it. 37 | set -l cmd (status current-command) 38 | switch $cmd 39 | case fish 40 | set cmd "🐟 " 41 | case nvim vim 42 | set cmd "📝 " 43 | case gh 44 | set cmd "🐙 " 45 | case git lazygit 46 | set cmd "🌿 " 47 | case topgrade 48 | set cmd "🔄 " 49 | case htop btop 50 | set cmd "📊 " 51 | case curl wget 52 | set cmd "🌐 " 53 | case cargo 54 | set cmd "📦 " 55 | case docker docker-compose lazydocker 56 | set cmd "🐳 " 57 | case make 58 | set cmd "🛠️ " 59 | case node 60 | set cmd "🌲 " 61 | case pacman paru 62 | set cmd "📦 " 63 | end 64 | echo "$cmd $(prompt_pwd)" 65 | end 66 | -------------------------------------------------------------------------------- /config/fish/functions/fish_user_key_bindings.fish: -------------------------------------------------------------------------------- 1 | 2 | function fish_user_key_bindings 3 | set -g fish_key_bindings fish_vi_key_bindings 4 | fish_default_key_bindings -M insert 5 | fish_vi_key_bindings --no-erase insert 6 | bind -M visual -m default y 'fish_clipboard_copy; commandline -f end-selection repaint-mode' 7 | bind yy fish_clipboard_copy 8 | bind p fish_clipboard_paste 9 | end 10 | -------------------------------------------------------------------------------- /config/fish/functions/fzf_configure_bindings.fish: -------------------------------------------------------------------------------- 1 | # Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect 2 | # https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1 3 | function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options." 4 | # no need to install bindings if not in interactive mode or running tests 5 | status is-interactive || test "$CI" = true; or return 6 | 7 | set -f options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'processes=?' 'variables=?' 8 | argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null 9 | if test $status -ne 0 10 | echo "Invalid option or a positional argument was provided." >&2 11 | _fzf_configure_bindings_help 12 | return 22 13 | else if set --query _flag_help 14 | _fzf_configure_bindings_help 15 | return 16 | else 17 | # Initialize with default key sequences and then override or disable them based on flags 18 | # index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = processes, 6 = variables 19 | set -f key_sequences \e\cf \e\cl \e\cs \cr \e\cp \cv # \c = control, \e = escape 20 | set --query _flag_directory && set key_sequences[1] "$_flag_directory" 21 | set --query _flag_git_log && set key_sequences[2] "$_flag_git_log" 22 | set --query _flag_git_status && set key_sequences[3] "$_flag_git_status" 23 | set --query _flag_history && set key_sequences[4] "$_flag_history" 24 | set --query _flag_processes && set key_sequences[5] "$_flag_processes" 25 | set --query _flag_variables && set key_sequences[6] "$_flag_variables" 26 | 27 | # If fzf bindings already exists, uninstall it first for a clean slate 28 | if functions --query _fzf_uninstall_bindings 29 | _fzf_uninstall_bindings 30 | end 31 | 32 | for mode in default insert 33 | test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory 34 | test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log 35 | test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status 36 | test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history 37 | test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] _fzf_search_processes 38 | test -n $key_sequences[6] && bind --mode $mode $key_sequences[6] "$_fzf_search_vars_command" 39 | end 40 | 41 | function _fzf_uninstall_bindings --inherit-variable key_sequences 42 | bind --erase -- $key_sequences 43 | bind --erase --mode insert -- $key_sequences 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /config/fish/functions/run.fish: -------------------------------------------------------------------------------- 1 | function run 2 | nohup $argv >/dev/null 2>&1 7 {if($9 > 90) print $1, $9, $12}' | while read pid cpu command 4 | echo "Killing PID $pid ($command) for high CPU usage: $cpu%" 5 | kill -9 $pid 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /config/fish/functions/start.fish: -------------------------------------------------------------------------------- 1 | function start 2 | set service_name $argv[1] 3 | 4 | # Start the service 5 | sudo systemctl start $service_name 6 | 7 | # Wait for the service to become active 8 | while true 9 | if systemctl is-active --quiet $service_name 10 | break 11 | else 12 | echo "Waiting for service to start..." 13 | sleep 1 14 | end 15 | end 16 | 17 | # Optionally, show some of the recent logs for the service 18 | journalctl -u $service_name --no-pager -n 10 19 | end 20 | -------------------------------------------------------------------------------- /config/fish/functions/tldr.fish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env fish 2 | 3 | function tldr --wraps='tldr' 4 | # make sure env has colors 5 | set -l nl 0 6 | command tldr -r $argv \ 7 | | sed -zr "s/^#[^\n]+\n//" \ 8 | | sed -r 's/^`/..command../; s/`$//; s/\{\{//g; s/}}//g; s/^> (.*)$/_\1_/' | mdcat | while read -l line 9 | if test $line = "" 10 | set nl 1 11 | continue 12 | end 13 | set -l m (string match -r "\.\.command\.\.(.*)" $line) 14 | if test $status -eq 0 15 | echo -n " " 16 | echo $m[2] | fish_indent_ansi 17 | else 18 | [ $nl -eq 1 ] && echo && set nl 0 19 | echo $line 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /config/fish/functions/tmux_update.fish: -------------------------------------------------------------------------------- 1 | function tmux_update 2 | ~/.tmux/plugins/tpm/bin/install_plugins 3 | ~/.tmux/plugins/tpm/bin/clean_plugins 4 | ~/.tmux/plugins/tpm/bin/update_plugins all 5 | end 6 | -------------------------------------------------------------------------------- /config/fish/functions/update.fish: -------------------------------------------------------------------------------- 1 | # Defined in /Users/folke/.config/fish/config.fish @ line 71 2 | function update --description 'Update homebrew, fish, pnpm' 3 | ~ 4 | and echo "[update] Homebrew" 5 | and brew update 6 | and brew upgrade 7 | 8 | # and echo "[update] cleaning brew cache" 9 | # #and rm -rfv (brew --cache) # brew cleanup -s doesn't remove everythin 10 | # and brew cleanup -s 11 | # and brew bundle dump --describe --force 12 | 13 | #and echo "[update] Doom Emacs" 14 | #and doom upgrade 15 | 16 | and echo "[update] nodejs" 17 | and pnpm update -g 18 | 19 | # and echo "[update] python" 20 | # and pip3 list -o --user --format=freeze | sed "s/==.*//" | xargs pip3 install -U --user 21 | 22 | and echo "[update] tldr" 23 | and command tldr -u 24 | 25 | and echo "[update] tmux" 26 | and tmux_update 27 | 28 | and echo "[update] fish" 29 | # and fisher update 30 | and fish_update_completions 31 | end 32 | -------------------------------------------------------------------------------- /config/fish/functions/z.fish: -------------------------------------------------------------------------------- 1 | zoxide init fish | source 2 | -------------------------------------------------------------------------------- /config/fish/functions/zg.fish: -------------------------------------------------------------------------------- 1 | function zg --description 'Jumps to parent git repo' 2 | set -l d (pwd) 3 | if test -d $d/.git 4 | return 5 | end 6 | while test $d != "/" 7 | if test -d $d/.git 8 | cd $d 9 | return 10 | else 11 | set d (dirname $d) 12 | end 13 | end 14 | echo "Not in a Git repository" 15 | return 1 16 | end 17 | -------------------------------------------------------------------------------- /config/fish/themes/tokyonight_moon.theme: -------------------------------------------------------------------------------- 1 | /home/folke/projects/tokyonight.nvim/extras/fish_themes/tokyonight_moon.theme -------------------------------------------------------------------------------- /config/fish/themes/tokyonight_night.theme: -------------------------------------------------------------------------------- 1 | /home/folke/projects/tokyonight.nvim/extras/fish_themes/tokyonight_night.theme -------------------------------------------------------------------------------- /config/ghostty/config: -------------------------------------------------------------------------------- 1 | # Fonts 2 | font-family = "Fira Code" 3 | font-family-bold = "Fira Code" 4 | font-family-italic = "Maple Mono" 5 | font-family-bold-italic = "Maple Mono" 6 | font-family = "Symbols Nerd Font Mono" 7 | font-size = 10 8 | adjust-underline-position = 4 9 | 10 | # Mouse 11 | mouse-hide-while-typing = true 12 | # mouse-scroll-multiplier = 1 13 | 14 | # Theme 15 | theme = /home/folke/projects/tokyonight.nvim/extras/ghostty/tokyonight_night 16 | cursor-invert-fg-bg = true 17 | background-opacity = 0.8 18 | window-theme = ghostty 19 | 20 | # keybindings 21 | keybind = clear 22 | keybind = ctrl+shift+h=goto_split:left 23 | keybind = ctrl+shift+j=goto_split:bottom 24 | keybind = ctrl+shift+k=goto_split:top 25 | keybind = ctrl+shift+l=goto_split:right 26 | keybind = super+shift+t=new_tab 27 | keybind = super+shift+h=previous_tab 28 | keybind = super+shift+l=next_tab 29 | keybind = super+shift+comma=move_tab:-1 30 | keybind = super+shift+period=move_tab:1 31 | keybind = super+shift+c=copy_to_clipboard 32 | keybind = super+shift+v=paste_from_clipboard 33 | keybind = super+shift+enter=new_split:auto 34 | keybind = super+shift+i=inspector:toggle 35 | keybind = super+shift+m=toggle_split_zoom 36 | keybind = super+shift+r=reload_config 37 | keybind = super+shift+s=write_screen_file:open 38 | keybind = super+shift+w=close_surface 39 | 40 | # Window 41 | gtk-single-instance = true 42 | gtk-tabs-location = bottom 43 | gtk-wide-tabs = false 44 | window-padding-y = 2,0 45 | window-padding-balance = true 46 | window-decoration = false 47 | 48 | # Other 49 | copy-on-select = clipboard 50 | shell-integration-features = cursor,sudo,no-title 51 | -------------------------------------------------------------------------------- /config/hypr/hypridle.conf: -------------------------------------------------------------------------------- 1 | general { 2 | lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. 3 | before_sleep_cmd = loginctl lock-session # lock before suspend. 4 | after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. 5 | } 6 | 7 | listener { 8 | timeout = 150 # 2.5min. 9 | on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. 10 | on-resume = brightnessctl -r # monitor backlight restore. 11 | } 12 | 13 | # turn off keyboard backlight, comment out this section if you dont have a keyboard backlight. 14 | listener { 15 | timeout = 150 # 2.5min. 16 | on-timeout = brightnessctl -sd dell::kbd_backlight set 0 # turn off keyboard backlight. 17 | on-resume = brightnessctl -rd dell::kbd_backlight # turn on keyboard backlight. 18 | } 19 | 20 | listener { 21 | timeout = 300 # 5min 22 | on-timeout = loginctl lock-session # lock screen when timeout has passed 23 | } 24 | 25 | listener { 26 | timeout = 330 # 5.5min 27 | on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed 28 | on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. 29 | } 30 | 31 | listener { 32 | timeout = 1800 # 30min 33 | on-timeout = systemctl suspend # suspend pc 34 | } 35 | -------------------------------------------------------------------------------- /config/hypr/hyprlock.conf: -------------------------------------------------------------------------------- 1 | 2 | # BACKGROUND 3 | background { 4 | monitor = 5 | path = ~/Pictures/wall.png 6 | blur_passes = 3 7 | contrast = 0.8916 8 | brightness = 0.8172 9 | vibrancy = 0.1696 10 | vibrancy_darkness = 0.0 11 | } 12 | 13 | # GENERAL 14 | general { 15 | # no_fade_in = false 16 | grace = 5 17 | # disable_loading_bar = true 18 | pam_module = sudo 19 | } 20 | 21 | # INPUT FIELD 22 | input-field { 23 | monitor = 24 | size = 280, 80 25 | outline_thickness = 2 26 | dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 27 | dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 28 | dots_center = true 29 | outer_color = rgba(0, 0, 0, 0) 30 | inner_color = rgba(0, 0, 0, 0.5) 31 | font_color = rgb(200, 200, 200) 32 | fade_on_empty = false 33 | placeholder_text = Password... 34 | hide_input = false 35 | position = 0, -120 36 | halign = center 37 | valign = center 38 | } 39 | 40 | # TIME 41 | label { 42 | monitor = 43 | text = cmd[update:1000] echo "$(date +"%-H:%M")" 44 | font_size = 120 45 | font_family = Maple Mono Bold 46 | position = 0, -300 47 | halign = center 48 | valign = top 49 | } 50 | 51 | # USER 52 | label { 53 | monitor = 54 | text = Hi there, $USER 55 | font_size = 25 56 | font_family = Maple Mono 57 | position = 0, -40 58 | halign = center 59 | valign = center 60 | } 61 | 62 | -------------------------------------------------------------------------------- /config/hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | preload = ~/Pictures/wall.png 2 | wallpaper = ,~/Pictures/wall.png 3 | -------------------------------------------------------------------------------- /config/hypr/hyprshade.toml: -------------------------------------------------------------------------------- 1 | # [[shades]] 2 | # name = "vibrance" 3 | # default = true # shader to use during times when there is no other shader scheduled 4 | 5 | [[shaders]] 6 | name = "blue-light-filter" 7 | start_time = 19:00:00 8 | end_time = 06:00:00 9 | [shaders.config] 10 | temperature = 3600 11 | strength = 1 12 | -------------------------------------------------------------------------------- /config/hypr/hyprvars.conf: -------------------------------------------------------------------------------- 1 | monitor=,highres,auto,2,vrr,1 2 | 3 | input { 4 | kb_layout = us 5 | kb_variant = 6 | kb_model = 7 | kb_options = compose:menu 8 | kb_rules = 9 | 10 | float_switch_override_focus = 0 11 | follow_mouse = 2 12 | repeat_rate = 25 13 | repeat_delay = 200 14 | sensitivity = 0.5 # -1.0 - 1.0, 0 means no modification. 15 | 16 | touchpad { 17 | natural_scroll = yes 18 | scroll_factor = 0.2 19 | drag_lock = no 20 | tap-and-drag = no 21 | clickfinger_behavior = yes 22 | } 23 | } 24 | 25 | general { 26 | allow_tearing = true 27 | gaps_in = 10 28 | gaps_out = 10 29 | border_size = 3 30 | col.active_border = rgba(07b5efff) 31 | col.inactive_border = rgba(ffffff00) 32 | layout = dwindle 33 | } 34 | 35 | misc { 36 | disable_hyprland_logo = true 37 | disable_splash_rendering = true 38 | mouse_move_enables_dpms = true 39 | enable_swallow = false 40 | swallow_regex = ^(org\.wezfurlong\.wezterm)$ 41 | vrr = 1 42 | } 43 | 44 | decoration { 45 | active_opacity = 1 46 | # dim_special = 0.3 47 | fullscreen_opacity = 1.0 48 | # inactive_opacity = 0.8 49 | rounding = 8 50 | blur { 51 | brightness = 2.0 52 | contrast = 1.8 53 | enabled = true 54 | ignore_opacity = false 55 | new_optimizations = true 56 | noise = 0 57 | passes = 3 58 | popups = true 59 | popups_ignorealpha = 0.5 60 | size = 10 61 | special = false 62 | vibrancy = 0.0 63 | vibrancy_darkness = 0 64 | xray = false 65 | } 66 | shadow { 67 | color = 0x66000000 68 | enabled = true 69 | ignore_window = true 70 | offset = 2 2 71 | range = 8 72 | render_power = 2 73 | } 74 | } 75 | 76 | animations { 77 | enabled = no 78 | bezier = overshot, 0.05, 0.9, 0.1, 1.05 79 | bezier = smoothOut, 0.36, 0, 0.66, -0.56 80 | bezier = smoothIn, 0.25, 1, 0.5, 1 81 | 82 | animation = windows, 1, 1, overshot, slide 83 | animation = windowsOut, 1, 1, smoothOut, slide 84 | animation = windowsMove, 1, 1, default 85 | animation = border, 1, 10, default 86 | animation = fade, 1, 2, smoothIn 87 | animation = fadeDim, 1, 2, smoothIn 88 | animation = workspaces, 1, 6, default 89 | animation = specialWorkspace, 1, 4, default, slidevert 90 | } 91 | 92 | dwindle { 93 | pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below 94 | preserve_split = yes # you probably want this 95 | } 96 | 97 | master { 98 | new_status = "master" 99 | } 100 | 101 | gestures { 102 | workspace_swipe = off 103 | } 104 | -------------------------------------------------------------------------------- /config/hypr/scripts/quake: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | WORKSPACE=$(hyprctl clients -j | jq -rec '.[] | select(.class == "folke.quake") | .workspace .name') 4 | # TERM_CMD="kitty -1 --class=\"folke.quake\" -o background_opacity=0.90 -o hide_window_decorations=yes -o remember_window_size=no" 5 | # TERM_CMD="wezterm --config window_background_opacity=0.9 start --class folke.quake" 6 | TERM_CMD="ghostty --class=\"folke.quake\"" 7 | 8 | # hyprctl --batch ' 9 | # keyword windowrulev2 float,class:quake ; 10 | # keyword windowrulev2 center,class:quake ; 11 | # keyword windowrulev2 dimaround,class:quake ; 12 | # keyword windowrulev2 size 1600 1000,class:quake ; 13 | # keyword windowrulev2 pin,class:quake ; 14 | # ' 15 | echo "WORKSPACE: $WORKSPACE" 16 | 17 | if [ -z "$WORKSPACE" ]; then 18 | echo "start" 19 | # hyprctl dispatch -- exec "[float;size 1600 1000;center] $TERM_CMD" 20 | hyprctl dispatch -- exec "$TERM_CMD" 21 | elif [ "$WORKSPACE" == "special:quake" ]; then 22 | echo "show" 23 | 24 | # Store the current active window address 25 | hyprctl activewindow | head -n1 | cut -f2 -d ' ' >/tmp/hypr-quake-address 26 | 27 | # If the current active window is fullscreen, unfullscreen it 28 | hyprctl activewindow | rg "fullscreen: 1" && hyprctl dispatch fullscreenstate 0 0 29 | 30 | # Move the quake window to the current workspace, focus it, and bring it to the top 31 | hyprctl dispatch movetoworkspacesilent "+0,class:^(folke\.quake)\$" 32 | hyprctl dispatch focuswindow "class:^(folke\.quake)\$" 33 | hyprctl dispatch bringactivetotop 34 | else 35 | echo "hide" 36 | 37 | # Move the quake window to the special workspace 38 | hyprctl dispatch movetoworkspacesilent "special:quake,class:^(folke\.quake)\$" 39 | 40 | # Focus the previously active window and bring it to the top 41 | hyprctl dispatch focuswindow "address:0x$(cat /tmp/hypr-quake-address)" 42 | hyprctl dispatch bringactivetotop 43 | fi 44 | -------------------------------------------------------------------------------- /config/hyprpanel/modules.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /config/hyprpanel/modules.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/config/hyprpanel/modules.scss -------------------------------------------------------------------------------- /config/kitty/base16-material-palenight-256.conf: -------------------------------------------------------------------------------- 1 | # Base16 Material Palenight - kitty color config 2 | # Scheme by Nate Peterson 3 | background #292d3e 4 | foreground #959dcb 5 | selection_background #959dcb 6 | selection_foreground #292d3e 7 | url_color #8796b0 8 | cursor #959dcb 9 | active_border_color #676e95 10 | inactive_border_color #444267 11 | active_tab_background #292d3e 12 | active_tab_foreground #959dcb 13 | inactive_tab_background #444267 14 | inactive_tab_foreground #8796b0 15 | tab_bar_background #444267 16 | 17 | # normal 18 | color0 #292d3e 19 | color1 #f07178 20 | color2 #c3e88d 21 | color3 #ffcb6b 22 | color4 #82aaff 23 | color5 #c792ea 24 | color6 #89ddff 25 | color7 #959dcb 26 | 27 | # bright 28 | color8 #676e95 29 | color9 #f07178 30 | color10 #c3e88d 31 | color11 #ffcb6b 32 | color12 #82aaff 33 | color13 #c792ea 34 | color14 #89ddff 35 | color15 #ffffff 36 | 37 | # extended base16 colors 38 | color16 #f78c6c 39 | color17 #ff5370 40 | color18 #444267 41 | color19 #32374d 42 | color20 #8796b0 43 | color21 #959dcb 44 | -------------------------------------------------------------------------------- /config/kitty/base16-material-palenight.conf: -------------------------------------------------------------------------------- 1 | # Base16 Material Palenight - kitty color config 2 | # Scheme by Nate Peterson 3 | background #292d3e 4 | foreground #959dcb 5 | selection_background #959dcb 6 | selection_foreground #292d3e 7 | url_color #8796b0 8 | cursor #959dcb 9 | active_border_color #676e95 10 | inactive_border_color #444267 11 | active_tab_background #292d3e 12 | active_tab_foreground #959dcb 13 | inactive_tab_background #444267 14 | inactive_tab_foreground #8796b0 15 | tab_bar_background #444267 16 | 17 | # normal 18 | color0 #292d3e 19 | color1 #f07178 20 | color2 #c3e88d 21 | color3 #ffcb6b 22 | color4 #82aaff 23 | color5 #c792ea 24 | color6 #89ddff 25 | color7 #959dcb 26 | 27 | # bright 28 | color8 #676e95 29 | color9 #f78c6c 30 | color10 #444267 31 | color11 #32374d 32 | color12 #8796b0 33 | color13 #959dcb 34 | color14 #ff5370 35 | color15 #ffffff 36 | -------------------------------------------------------------------------------- /config/kitty/dracula.conf: -------------------------------------------------------------------------------- 1 | # https://draculatheme.com/kitty 2 | # 3 | # Installation instructions: 4 | # 5 | # cp dracula.conf ~/.config/kitty/ 6 | # echo "include dracula.conf" >> ~/.config/kitty/kitty.conf 7 | # 8 | # Then reload kitty for the config to take affect. 9 | # Alternatively copy paste below directly into kitty.conf 10 | 11 | foreground #f8f8f2 12 | background #282a36 13 | selection_foreground #44475a 14 | selection_background #f8f8f2 15 | 16 | url_color #ffb86c 17 | 18 | # black 19 | color0 #21222c 20 | color8 #6272a4 21 | 22 | # red 23 | color1 #ff5555 24 | color9 #ff6e6e 25 | 26 | # green 27 | color2 #50fa7b 28 | color10 #69ff94 29 | 30 | # yellow 31 | color3 #f1fa8c 32 | color11 #ffffa5 33 | 34 | # blue 35 | color4 #bd93f9 36 | color12 #d6acff 37 | 38 | # magenta 39 | color5 #ff79c6 40 | color13 #ff92df 41 | 42 | # cyan 43 | color6 #8be9fd 44 | color14 #a4ffff 45 | 46 | # white 47 | color7 #f8f8f2 48 | color15 #ffffff 49 | 50 | # Cursor colors 51 | cursor #f8f8f2 52 | cursor_text_color background 53 | 54 | # Tab bar colors 55 | active_tab_foreground #282a36 56 | active_tab_background #bd93f9 57 | inactive_tab_foreground #f8f8f2 58 | inactive_tab_background #44475a 59 | -------------------------------------------------------------------------------- /config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:foldmethod=marker 2 | 3 | # Fonts 4 | font_family Fira Code 5 | bold_font Fira Code Bold 6 | italic_font Maple Mono Italic 7 | bold_italic_font Maple Mono BoldItalic 8 | font_size 10.0 9 | symbol_map U+e000-U+e00a,U+ea60-U+ebeb,U+e0a0-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b1,U+e700-U+e7c5,U+ed00-U+efc1,U+f000-U+f2ff,U+f000-U+f2e0,U+f300-U+f372,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono 10 | disable_ligatures cursor 11 | 12 | # Cursor 13 | cursor_trail 3 14 | cursor none 15 | 16 | # Misc 17 | scrollback_lines 10000 18 | touch_scroll_multiplier 6.0 19 | copy_on_select yes 20 | background_opacity 0.5 21 | dynamic_background_opacity yes 22 | enable_audio_bell no 23 | remember_window_size yes 24 | initial_window_width 1600 25 | initial_window_height 1000 26 | enabled_layouts Splits,Stack 27 | hide_window_decorations yes 28 | tab_bar_style powerline 29 | tab_separator " " 30 | dynamic_background_opacity yes 31 | # scrollback_pager $SHELL -c 'nvim -c "Baleia"' 32 | scrollback_pager ~/.local/share/bob/nvim-bin/nvim -c "lua require('util').colorize()" 33 | 34 | tab_title_template "{title}{fmt.bold}{'  ' if num_windows > 1 and layout_name == 'stack' else ''}" 35 | 36 | # Key Mappings 37 | kitty_mod cmd+shift 38 | map kitty_mod+l next_tab 39 | map kitty_mod+h previous_tab 40 | map kitty_mod+m toggle_layout stack 41 | map kitty_mod+z toggle_layout stack 42 | map kitty_mod+enter launch --location=split --cwd=current 43 | map kitty_mod+\ launch --location=vsplit --cwd=current 44 | map kitty_mod+minus launch --location=hsplit --cwd=currentt 45 | map kitty_mod+left neighboring_window left 46 | map kitty_mod+right neighboring_window right 47 | map kitty_mod+up neighboring_window up 48 | map kitty_mod+down neighboring_window down 49 | map kitty_mod+s show_scrollback 50 | map kitty_mod+r load_config_file 51 | 52 | # Theme 53 | include ~/projects/tokyonight.nvim/extras/kitty/tokyonight_night.conf 54 | -------------------------------------------------------------------------------- /config/kitty/nord.conf: -------------------------------------------------------------------------------- 1 | # Cursor 2 | cursor #d8dee9 3 | 4 | # Colors 5 | foreground #d8dee9 6 | background #2e3440 7 | selection_foreground #2e3440 8 | selection_background #d8dee9 9 | 10 | color0 #3b4252 11 | color1 #bf616a 12 | color2 #a3be8c 13 | color3 #ebcb8b 14 | color4 #81a1c1 15 | color5 #b48ead 16 | color6 #88c0d0 17 | color7 #e5e9f0 18 | color8 #4c566a 19 | color9 #bf616a 20 | color10 #a3be8c 21 | color11 #ebcb8b 22 | color12 #81a1c1 23 | color13 #b48ead 24 | color14 #8fbcbb 25 | color15 #eceff4 26 | -------------------------------------------------------------------------------- /config/kitty/palenight.conf: -------------------------------------------------------------------------------- 1 | # Base16 Material Palenight - kitty color config 2 | # Scheme by Nate Peterson 3 | background #292d3e 4 | foreground #959dcb 5 | selection_background #959dcb 6 | selection_foreground #292d3e 7 | url_color #8796b0 8 | cursor #959dcb 9 | active_border_color #676e95 10 | inactive_border_color #444267 11 | active_tab_background #82aaff 12 | active_tab_foreground #ffffff 13 | inactive_tab_background #444267 14 | inactive_tab_foreground #8796b0 15 | #tab_bar_background #444267 16 | 17 | # normal 18 | color0 #292d3e 19 | color1 #f07178 20 | color2 #c3e88d 21 | color3 #ffcb6b 22 | color4 #82aaff 23 | color5 #c792ea 24 | color6 #89ddff 25 | color7 #959dcb 26 | 27 | # bright 28 | color8 #676e95 29 | color9 #f07178 30 | color10 #c3e88d 31 | color11 #ffcb6b 32 | color12 #82aaff 33 | color13 #c792ea 34 | color14 #89ddff 35 | color15 #ffffff 36 | 37 | # extended base16 colors 38 | color16 #f78c6c 39 | color17 #ff5370 40 | color18 #444267 41 | color19 #32374d 42 | color20 #8796b0 43 | color21 #959dcb 44 | -------------------------------------------------------------------------------- /config/microsoft-edge-beta-flags.conf: -------------------------------------------------------------------------------- 1 | --ozone-platform=wayland 2 | -------------------------------------------------------------------------------- /config/microsoft-edge-dev-flags.conf: -------------------------------------------------------------------------------- 1 | # --enable-features=VaapiVideoDecoder,Vulkan,TouchpadOverscrollHistoryNavigation 2 | # --enable-gpu 3 | # --enable-gpu-rasterization 4 | # --enable-oop-rasterization 5 | # --ignore-gpu-blocklist 6 | --ozone-platform-hint=auto 7 | --gtk-version=4 8 | # --use-vulkan 9 | -------------------------------------------------------------------------------- /config/mise/config.toml: -------------------------------------------------------------------------------- 1 | [settings] 2 | # whether to prompt to install plugins and runtimes if they're not already installed 3 | # missing_runtime_behavior = 'autoinstall' # other options: 'ignore', 'warn', 'prompt', 'autoinstall' 4 | 5 | # plugins can read the versions files used by other version managers (if enabled by the plugin) 6 | # for example, .nvmrc in the case of nodejs's nvm 7 | legacy_version_file = true # enabled by default (different than asdf) 8 | 9 | # configure `rtx install` to always keep the downloaded archive 10 | always_keep_download = false # deleted after install by default 11 | 12 | # configure how frequently (in minutes) to fetch updated plugin repository changes 13 | # this is updated whenever a new runtime is installed 14 | # (note: this isn't currently implemented but there are plans to add it: https://github.com/jdxcode/rtx/issues/128) 15 | plugin_autoupdate_last_check_duration = '1 week' # set to 0 to disable updates 16 | 17 | verbose = false # set to true to see full installation output, see `RTX_VERBOSE` 18 | asdf_compat = false # set to true to ensure .tool-versions will be compatible with asdf, see `RTX_ASDF_COMPAT` 19 | jobs = 4 # number of plugins or runtimes to install in parallel. The default is `4`. 20 | raw = false # set to true to directly pipe plugins to stdin/stdout/stderr 21 | 22 | shorthands_file = '~/.config/rtx/shorthands.toml' # path to the shorthands file, see `RTX_SHORTHANDS_FILE` 23 | disable_default_shorthands = false # disable the default shorthands, see `RTX_DISABLE_DEFAULT_SHORTHANDS` 24 | 25 | experimental = false # enable experimental features such as shims 26 | # shims_dir = '~/.local/share/rtx/shims' # [experimental] directory where shims are stored 27 | 28 | [alias.nodejs.versions] 29 | my_custom_node = '18' # makes `rtx install nodejs@my_custom_node` install node-18.x 30 | 31 | [tools] 32 | usage = "latest" 33 | node = "latest" 34 | # this can also be specified in a plugin (see below in "Aliases") 35 | -------------------------------------------------------------------------------- /config/paru/paru.conf: -------------------------------------------------------------------------------- 1 | [options] 2 | 3 | BottomUp 4 | Devel 5 | Provides 6 | PgpFetch 7 | CombinedUpgrade 8 | NewsOnUpgrade 9 | FailFast 10 | SudoLoop 11 | SkipReview 12 | -------------------------------------------------------------------------------- /config/pipewire/pipewire.conf.d/mic.conf.bak: -------------------------------------------------------------------------------- 1 | context.objects = [ 2 | { factory = adapter 3 | args = { 4 | factory.name = api.alsa.pcm.source 5 | node.name = "microphone" 6 | node.description = "Undetected Microphone" 7 | media.class = "Audio/Source" 8 | api.alsa.path = "hw:0,0" 9 | } 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /config/powershell.ps1: -------------------------------------------------------------------------------- 1 | Invoke-Expression (&starship init powershell) 2 | Invoke-Expression (& { (zoxide init powershell | Out-String) }) 3 | 4 | $prompt = "" 5 | function Invoke-Starship-PreCommand { 6 | $current_location = $executionContext.SessionState.Path.CurrentLocation 7 | if ($current_location.Provider.Name -eq "FileSystem") { 8 | $ansi_escape = [char]27 9 | $provider_path = $current_location.ProviderPath -replace "\\", "/" 10 | $prompt = "$ansi_escape]7;file://${env:COMPUTERNAME}/${provider_path}$ansi_escape\" 11 | } 12 | $host.ui.Write($prompt) 13 | } 14 | 15 | Set-Alias -Name v -Value nvim 16 | Set-PSReadlineKeyHandler -Chord Ctrl+d -Function DeleteCharOrExit 17 | Set-PSReadlineKeyHandler -Chord Ctrl+a -Function BeginningOfLine 18 | Set-PSReadlineKeyHandler -Chord Ctrl+e -Function EndOfLine 19 | -------------------------------------------------------------------------------- /config/procs/config.toml: -------------------------------------------------------------------------------- 1 | [[columns]] 2 | kind = "Pid" 3 | style = "BrightYellow|Yellow" 4 | numeric_search = true 5 | nonnumeric_search = false 6 | align = "Left" 7 | 8 | [[columns]] 9 | kind = "User" 10 | style = "BrightGreen|Green" 11 | numeric_search = false 12 | nonnumeric_search = true 13 | align = "Left" 14 | 15 | [[columns]] 16 | kind = "Separator" 17 | style = "White|BrightBlack" 18 | numeric_search = false 19 | nonnumeric_search = false 20 | align = "Left" 21 | 22 | [[columns]] 23 | kind = "Tty" 24 | style = "BrightWhite|Black" 25 | numeric_search = false 26 | nonnumeric_search = false 27 | align = "Left" 28 | 29 | [[columns]] 30 | kind = "UsageCpu" 31 | style = "ByPercentage" 32 | numeric_search = false 33 | nonnumeric_search = false 34 | align = "Right" 35 | 36 | [[columns]] 37 | kind = "UsageMem" 38 | style = "ByPercentage" 39 | numeric_search = false 40 | nonnumeric_search = false 41 | align = "Right" 42 | 43 | [[columns]] 44 | kind = "CpuTime" 45 | style = "BrightCyan|Cyan" 46 | numeric_search = false 47 | nonnumeric_search = false 48 | align = "Left" 49 | 50 | [[columns]] 51 | kind = "MultiSlot" 52 | style = "ByUnit" 53 | numeric_search = false 54 | nonnumeric_search = false 55 | align = "Right" 56 | 57 | [[columns]] 58 | kind = "Separator" 59 | style = "White|BrightBlack" 60 | numeric_search = false 61 | nonnumeric_search = false 62 | align = "Left" 63 | 64 | [[columns]] 65 | kind = "Command" 66 | style = "BrightWhite|Black" 67 | numeric_search = false 68 | nonnumeric_search = true 69 | align = "Left" 70 | 71 | [style] 72 | header = "BrightWhite|Black" 73 | unit = "BrightWhite|Black" 74 | tree = "BrightWhite|Black" 75 | 76 | [style.by_percentage] 77 | color_000 = "BrightBlue|Blue" 78 | color_025 = "BrightGreen|Green" 79 | color_050 = "BrightYellow|Yellow" 80 | color_075 = "BrightRed|Red" 81 | color_100 = "BrightRed|Red" 82 | 83 | [style.by_state] 84 | color_d = "BrightRed|Red" 85 | color_r = "BrightGreen|Green" 86 | color_s = "BrightBlue|Blue" 87 | color_t = "BrightCyan|Cyan" 88 | color_z = "BrightMagenta|Magenta" 89 | color_x = "BrightMagenta|Magenta" 90 | color_k = "BrightYellow|Yellow" 91 | color_w = "BrightYellow|Yellow" 92 | color_p = "BrightYellow|Yellow" 93 | 94 | [style.by_unit] 95 | color_k = "BrightBlue|Blue" 96 | color_m = "BrightGreen|Green" 97 | color_g = "BrightYellow|Yellow" 98 | color_t = "BrightRed|Red" 99 | color_p = "BrightRed|Red" 100 | color_x = "BrightBlue|Blue" 101 | 102 | [search] 103 | numeric_search = "Exact" 104 | nonnumeric_search = "Partial" 105 | logic = "And" 106 | case = "Smart" 107 | 108 | [display] 109 | show_self = false 110 | show_self_parents = false 111 | show_thread = false 112 | show_thread_in_tree = true 113 | show_parent_in_tree = true 114 | show_children_in_tree = true 115 | show_header = true 116 | show_footer = false 117 | cut_to_terminal = true 118 | cut_to_pager = false 119 | cut_to_pipe = false 120 | color_mode = "Auto" 121 | separator = "│" 122 | ascending = "▲" 123 | descending = "▼" 124 | tree_symbols = ["│", "─", "┬", "├", "└"] 125 | abbr_sid = true 126 | theme = "Auto" 127 | show_kthreads = true 128 | 129 | [sort] 130 | column = 0 131 | order = "Ascending" 132 | 133 | [docker] 134 | path = "unix:///var/run/docker.sock" 135 | 136 | [pager] 137 | mode = "Auto" 138 | detect_width = false 139 | use_builtin = false 140 | 141 | -------------------------------------------------------------------------------- /config/rofi/cliphist/cliphist-img: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | tmp_dir="/tmp/cliphist" 4 | rm -rf "$tmp_dir" 5 | 6 | if [[ -n "$1" ]]; then 7 | cliphist decode <<<"$1" | wl-copy 8 | exit 9 | fi 10 | 11 | mkdir -p "$tmp_dir" 12 | 13 | read -r -d '' prog <$tmp_dir/"grp[1]"."grp[3]) 17 | print \$0"\0icon\x1f$tmp_dir/"grp[1]"."grp[3] 18 | next 19 | } 20 | 1 21 | EOF 22 | cliphist list | gawk "$prog" 23 | -------------------------------------------------------------------------------- /config/rofi/cliphist/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rofi -modi clipboard:~/.config/rofi/cliphist/cliphist-img -show clipboard -show-icons 4 | -------------------------------------------------------------------------------- /config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Author : Aditya Shakya (adi1090x) 4 | * Github : @adi1090x 5 | * 6 | * Rofi Theme File 7 | * Rofi Version: 1.7.3 8 | **/ 9 | 10 | /*****----- Configuration -----*****/ 11 | configuration { 12 | modi : "run,drun,window"; 13 | disable-history : false; 14 | display-run : " "; 15 | display-drun : " "; 16 | display-window : "󰕰 "; 17 | display-clipboard : " "; 18 | drun-display-format: "{icon} {name}"; 19 | clipboard-display-format: "{name}"; 20 | hide-scrollbar : true; 21 | location : 0; 22 | show-icons : true; 23 | sidebar-mode : true; 24 | terminal : "ghostty"; 25 | } 26 | 27 | @theme "theme.rasi" 28 | -------------------------------------------------------------------------------- /config/rofi/gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/config/rofi/gradient.png -------------------------------------------------------------------------------- /config/starship.toml: -------------------------------------------------------------------------------- 1 | # Replace the "❯" symbol in the prompt with "➜" 2 | [character] # The name of the module we are configuring is "character" 3 | #symbol = "➜" # The "symbol" segment is being set to "➜" 4 | # use_symbol_for_status = true # Show "✖" when the command failed 5 | 6 | [custom.shell] 7 | command = "echo $STARSHIP_SHELL" # shows output of command 8 | when = """ test "$STARSHIP_SHELL" != "fish" """ 9 | style = "dimmed blue" 10 | format = "[$output]($style)" 11 | shell =["bash"] 12 | 13 | # [custom.neovim] 14 | # command = 'bob ls | rg Used | awk "{print \$2}"' # shows output of command 15 | # detect_folders = ["lua"] 16 | # style = "green" 17 | # format = "[ $output ]($style)" 18 | # shell =["bash"] 19 | 20 | 21 | [git_status] 22 | untracked = '[ $count](bold yellow) ' 23 | staged = '[ $count](bold green) ' 24 | stashed = "[ ](cyan) " 25 | deleted = '[ $count](bold red) ' 26 | modified= '[ $count](bold blue) ' 27 | behind = '[ ](bold purple) ' 28 | ahead = '[ ](bold purple) ' 29 | format = '([$all_status$ahead_behind]($style))' 30 | 31 | [[battery.display]] 32 | threshold = 50 33 | 34 | [lua] 35 | detect_folders = [] 36 | symbol = " " 37 | 38 | [git_metrics] 39 | disabled = false 40 | 41 | [aws] 42 | symbol = " " 43 | 44 | [buf] 45 | symbol = " " 46 | 47 | [c] 48 | symbol = " " 49 | 50 | [conda] 51 | symbol = " " 52 | 53 | [dart] 54 | symbol = " " 55 | 56 | [directory] 57 | read_only = " 󰌾" 58 | 59 | [docker_context] 60 | symbol = " " 61 | 62 | [elixir] 63 | symbol = " " 64 | 65 | [elm] 66 | symbol = " " 67 | 68 | [fossil_branch] 69 | symbol = " " 70 | 71 | [git_branch] 72 | symbol = " " 73 | 74 | [golang] 75 | symbol = " " 76 | 77 | [guix_shell] 78 | symbol = " " 79 | 80 | [haskell] 81 | symbol = " " 82 | 83 | [haxe] 84 | symbol = "⌘ " 85 | 86 | [hg_branch] 87 | symbol = " " 88 | 89 | [hostname] 90 | ssh_symbol = " " 91 | 92 | [java] 93 | symbol = " " 94 | 95 | [julia] 96 | symbol = " " 97 | 98 | [memory_usage] 99 | symbol = "󰍛 " 100 | 101 | [meson] 102 | symbol = "󰔷 " 103 | 104 | [nim] 105 | symbol = "󰆥 " 106 | 107 | [nix_shell] 108 | symbol = " " 109 | 110 | [nodejs] 111 | symbol = " " 112 | 113 | [os.symbols] 114 | Alpaquita = " " 115 | Alpine = " " 116 | Amazon = " " 117 | Android = " " 118 | Arch = " " 119 | Artix = " " 120 | CentOS = " " 121 | Debian = " " 122 | DragonFly = " " 123 | Emscripten = " " 124 | EndeavourOS = " " 125 | Fedora = " " 126 | FreeBSD = " " 127 | Garuda = "󰛓 " 128 | Gentoo = " " 129 | HardenedBSD = "󰞌 " 130 | Illumos = "󰈸 " 131 | Linux = " " 132 | Mabox = " " 133 | Macos = " " 134 | Manjaro = " " 135 | Mariner = " " 136 | MidnightBSD = " " 137 | Mint = " " 138 | NetBSD = " " 139 | NixOS = " " 140 | OpenBSD = "󰈺 " 141 | openSUSE = " " 142 | OracleLinux = "󰌷 " 143 | Pop = " " 144 | Raspbian = " " 145 | Redhat = " " 146 | RedHatEnterprise = " " 147 | Redox = "󰀘 " 148 | Solus = "󰠳 " 149 | SUSE = " " 150 | Ubuntu = " " 151 | Unknown = " " 152 | Windows = "󰍲 " 153 | 154 | [package] 155 | symbol = "󰏗 " 156 | 157 | [pijul_channel] 158 | symbol = "🪺 " 159 | 160 | [python] 161 | symbol = " " 162 | 163 | [rlang] 164 | symbol = "󰟔 " 165 | 166 | [ruby] 167 | symbol = " " 168 | 169 | [rust] 170 | symbol = " " 171 | 172 | [scala] 173 | symbol = " " 174 | 175 | [spack] 176 | symbol = "🅢 " 177 | -------------------------------------------------------------------------------- /config/tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | # set prefix to ctrl+a 2 | set -g prefix C-a 3 | #set -g default-terminal tmux 4 | 5 | set -g mouse on 6 | 7 | # start with window number 1 8 | set -g base-index 1 9 | 10 | # Notifying if other windows has activities 11 | setw -g monitor-activity on 12 | 13 | # Renumber windows on window close 14 | set -g renumber-windows on 15 | 16 | # split panes using | and - 17 | bind | split-window -h 18 | bind - split-window -v 19 | unbind '"' 20 | unbind % 21 | # set -g allow-passthrough on 22 | 23 | # List of plugins 24 | set -g @plugin 'tmux-plugins/tpm' 25 | set -g @plugin 'tmux-plugins/tmux-sensible' 26 | set -g @plugin 'tmux-plugins/tmux-resurrect' 27 | set -g @plugin 'tmux-plugins/tmux-yank' 28 | set -g @plugin 'tmux-plugins/tmux-prefix-highlight' 29 | set -g @plugin 'tmux-plugins/tmux-continuum' 30 | set -g @plugin 'jabirali/tmux-tilish' 31 | 32 | # Tilish 33 | set -g @tilish-default 'tiled' 34 | 35 | source-file ~/projects/tokyonight.nvim/extras/tmux/tokyonight_moon.tmux 36 | 37 | # Undercurl 38 | set -g default-terminal "${TERM}" 39 | set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support 40 | set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0 41 | 42 | # Dracula 43 | #set -g @dracula-show-powerline true 44 | #set -g @dracula-show-left-icon session 45 | #set -g @dracula-show-fahrenheit false 46 | #set -g @dracula-show-flags true 47 | 48 | # tmux-continuum & tmux-resurrecrt 49 | set -g @continuum-restore 'off' 50 | set -g @resurrect-capture-pane-contents 'on' 51 | set -g @resurrect-strategy-nvim 'session' 52 | 53 | setenv -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/" 54 | if "test ! -d ~/.tmux/plugins/tpm" \ 55 | "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" 56 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 57 | run -b '~/.tmux/plugins/tpm/tpm' 58 | -------------------------------------------------------------------------------- /config/topgrade.toml: -------------------------------------------------------------------------------- 1 | [misc] 2 | # Don't ask for confirmations 3 | #assume_yes = true 4 | # display_preamble = false 5 | 6 | # Disable specific steps - same options as the command line flag 7 | #disable = ["system", "emacs"] 8 | disable = ["vim"] 9 | 10 | # Ignore failures for these steps 11 | #ignore_failures = ["powershell"] 12 | 13 | # Run specific steps - same options as the command line flag 14 | #only = ["system", "emacs"] 15 | 16 | # Do not ask to retry failed steps (default: false) 17 | #no_retry = true 18 | 19 | # Run inside tmux 20 | #run_in_tmux = true 21 | 22 | # List of remote machines with Topgrade installed on them 23 | #remote_topgrades = ["toothless", "pi", "parnas"] 24 | 25 | # Arguments to pass SSH when upgrading remote systems 26 | #ssh_arguments = "-o ConnectTimeout=2" 27 | 28 | # Path to Topgrade executable on remote machines 29 | #remote_topgrade_path = ".cargo/bin/topgrade" 30 | 31 | # Arguments to pass tmux when pulling Repositories 32 | #tmux_arguments = "-S /var/tmux.sock" 33 | 34 | # Do not set the terminal title 35 | #set_title = false 36 | 37 | # Display the time in step titles 38 | # display_time = true 39 | 40 | # Cleanup temporary or old files 41 | #cleanup = true 42 | 43 | # Skip sending a notification at the end of a run 44 | #skip_notify = true 45 | 46 | [git] 47 | repos = ["~/projects/*/", "~/dot"] 48 | #max_concurrency = 5 49 | # Git repositories that you want to pull and push 50 | #repos = [ 51 | # "~/src/*/", 52 | # "~/.config/something" 53 | #] 54 | 55 | # Repositories that you only want to pull 56 | #pull_only_repos = [ 57 | # "~/.config/something_else" 58 | #] 59 | 60 | # Repositories that you only want to push 61 | #push_only_repos = [ 62 | # "~/src/*/", 63 | # "~/.config/something_third" 64 | #] 65 | 66 | # Don't pull the predefined git repos 67 | #pull_predefined = false 68 | 69 | # Arguments to pass Git when pulling repositories 70 | #pull_arguments = "--rebase --autostash" 71 | 72 | # Arguments to pass Git when pushing repositories 73 | #push_arguments = "--all" 74 | 75 | [composer] 76 | #self_update = true 77 | 78 | # Commands to run before anything 79 | [pre_commands] 80 | #"Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" 81 | 82 | # Custom commands 83 | [commands] 84 | # "Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter" 85 | # "Bob Neovim" = "/bin/bob install nightly" 86 | "Fish Update Completions" = "fish_update_completions" 87 | 88 | [brew] 89 | #greedy_cask = true 90 | #autoremove = true 91 | 92 | [linux] 93 | # Arch Package Manager to use. Allowed values: autodetect, trizen, aura, paru, yay, pikaur, pacman, pamac. 94 | arch_package_manager = "paru" 95 | # Arguments to pass yay (or paru) when updating packages 96 | #yay_arguments = "--nodevel" 97 | #aura_aur_arguments = "-kx" 98 | #aura_pacman_arguments = "" 99 | #show_arch_news = true 100 | #trizen_arguments = "--devel" 101 | #pikaur_arguments = "" 102 | #pamac_arguments = "--no-devel" 103 | #enable_tlmgr = true 104 | #emerge_sync_flags = "-q" 105 | #emerge_update_flags = "-uDNa --with-bdeps=y world" 106 | #redhat_distro_sync = false 107 | #rpm_ostree = false 108 | 109 | [windows] 110 | # Manually select Windows updates 111 | #accept_all_updates = false 112 | #open_remotes_in_new_terminal = true 113 | 114 | # Causes Topgrade to rename itself during the run to allow package managers 115 | # to upgrade it. Use this only if you installed Topgrade by using a package 116 | # manager such as Scoop or Cargo 117 | #self_rename = true 118 | 119 | [npm] 120 | # Use sudo if the NPM directory isn't owned by the current user 121 | #use_sudo = true 122 | 123 | [firmware] 124 | # Offer to update firmware; if false just check for and display available updates 125 | #upgrade = true 126 | 127 | [flatpak] 128 | # Use sudo for updating the system-wide installation 129 | #use_sudo = true 130 | 131 | [distrobox] 132 | #use_root = false 133 | #containers = ["archlinux-latest"] 134 | -------------------------------------------------------------------------------- /config/wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/config/wall.png -------------------------------------------------------------------------------- /config/wezterm/keys.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") --[[@as Wezterm]] 2 | 3 | local act = wezterm.action 4 | local M = {} 5 | 6 | M.mod = wezterm.target_triple:find("windows") and "SHIFT|CTRL" or "SHIFT|SUPER" 7 | 8 | M.smart_split = wezterm.action_callback(function(window, pane) 9 | local dim = pane:get_dimensions() 10 | if dim.pixel_height > dim.pixel_width then 11 | window:perform_action(act.SplitVertical({ domain = "CurrentPaneDomain" }), pane) 12 | else 13 | window:perform_action(act.SplitHorizontal({ domain = "CurrentPaneDomain" }), pane) 14 | end 15 | end) 16 | 17 | ---@param config Config 18 | function M.setup(config) 19 | config.disable_default_key_bindings = true 20 | config.keys = { 21 | -- Scrollback 22 | { mods = M.mod, key = "k", action = act.ScrollByPage(-0.5) }, 23 | { mods = M.mod, key = "j", action = act.ScrollByPage(0.5) }, 24 | -- New Tab 25 | { mods = M.mod, key = "t", action = act.SpawnTab("CurrentPaneDomain") }, 26 | -- Splits 27 | { mods = M.mod, key = "Enter", action = M.smart_split }, 28 | { mods = M.mod, key = "|", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) }, 29 | { mods = M.mod, key = "_", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) }, 30 | { mods = M.mod, key = "(", action = act.DecreaseFontSize }, 31 | { mods = M.mod, key = ")", action = act.IncreaseFontSize }, 32 | -- Move Tabs 33 | { mods = M.mod, key = ">", action = act.MoveTabRelative(1) }, 34 | { mods = M.mod, key = "<", action = act.MoveTabRelative(-1) }, 35 | -- Acivate Tabs 36 | { mods = M.mod, key = "l", action = act({ ActivateTabRelative = 1 }) }, 37 | { mods = M.mod, key = "h", action = act({ ActivateTabRelative = -1 }) }, 38 | { mods = M.mod, key = "R", action = wezterm.action.RotatePanes("Clockwise") }, 39 | -- show the pane selection mode, but have it swap the active and selected panes 40 | { mods = M.mod, key = "S", action = wezterm.action.PaneSelect({}) }, 41 | -- Clipboard 42 | { mods = M.mod, key = "c", action = act.CopyTo("Clipboard") }, 43 | { mods = M.mod, key = "Space", action = act.QuickSelect }, 44 | { mods = M.mod, key = "X", action = act.ActivateCopyMode }, 45 | { mods = M.mod, key = "f", action = act.Search("CurrentSelectionOrEmptyString") }, 46 | { mods = M.mod, key = "v", action = act.PasteFrom("Clipboard") }, 47 | { 48 | mods = M.mod, 49 | key = "u", 50 | action = act.CharSelect({ copy_on_select = true, copy_to = "ClipboardAndPrimarySelection" }), 51 | }, 52 | -- { mods = M.mod, key = "v", action = act.ShowDebugOverlay }, 53 | { mods = M.mod, key = "m", action = act.TogglePaneZoomState }, 54 | { mods = M.mod, key = "p", action = act.ActivateCommandPalette }, 55 | { mods = M.mod, key = "d", action = act.ShowDebugOverlay }, 56 | M.split_nav("resize", "CTRL", "LeftArrow", "Right"), 57 | M.split_nav("resize", "CTRL", "RightArrow", "Left"), 58 | M.split_nav("resize", "CTRL", "UpArrow", "Up"), 59 | M.split_nav("resize", "CTRL", "DownArrow", "Down"), 60 | M.split_nav("move", "CTRL", "h", "Left"), 61 | M.split_nav("move", "CTRL", "j", "Down"), 62 | M.split_nav("move", "CTRL", "k", "Up"), 63 | M.split_nav("move", "CTRL", "l", "Right"), 64 | } 65 | end 66 | 67 | ---@param resize_or_move "resize" | "move" 68 | ---@param mods string 69 | ---@param key string 70 | ---@param dir "Right" | "Left" | "Up" | "Down" 71 | function M.split_nav(resize_or_move, mods, key, dir) 72 | local event = "SplitNav_" .. resize_or_move .. "_" .. dir 73 | wezterm.on(event, function(win, pane) 74 | if M.is_nvim(pane) then 75 | -- pass the keys through to vim/nvim 76 | win:perform_action({ SendKey = { key = key, mods = mods } }, pane) 77 | else 78 | if resize_or_move == "resize" then 79 | win:perform_action({ AdjustPaneSize = { dir, 3 } }, pane) 80 | else 81 | local panes = pane:tab():panes_with_info() 82 | local is_zoomed = false 83 | for _, p in ipairs(panes) do 84 | if p.is_zoomed then 85 | is_zoomed = true 86 | end 87 | end 88 | wezterm.log_info("is_zoomed: " .. tostring(is_zoomed)) 89 | if is_zoomed then 90 | dir = dir == "Up" or dir == "Right" and "Next" or "Prev" 91 | wezterm.log_info("dir: " .. dir) 92 | end 93 | win:perform_action({ ActivatePaneDirection = dir }, pane) 94 | win:perform_action({ SetPaneZoomState = is_zoomed }, pane) 95 | end 96 | end 97 | end) 98 | return { 99 | key = key, 100 | mods = mods, 101 | action = wezterm.action.EmitEvent(event), 102 | } 103 | end 104 | 105 | function M.is_nvim(pane) 106 | return pane:get_user_vars().IS_NVIM == "true" or pane:get_foreground_process_name():find("n?vim") 107 | end 108 | 109 | return M 110 | -------------------------------------------------------------------------------- /config/wezterm/links.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | 3 | local M = {} 4 | 5 | ---@param config Config 6 | function M.setup(config) 7 | config.hyperlink_rules = { 8 | -- Linkify things that look like URLs and the host has a TLD name. 9 | -- 10 | -- Compiled-in default. Used if you don't specify any hyperlink_rules. 11 | { 12 | regex = "\\b\\w+://[\\w.-]+\\.[a-z]{2,15}\\S*\\b", 13 | format = "$0", 14 | }, 15 | 16 | -- linkify email addresses 17 | -- Compiled-in default. Used if you don't specify any hyperlink_rules. 18 | { 19 | regex = [[\b\w+@[\w-]+(\.[\w-]+)+\b]], 20 | format = "mailto:$0", 21 | }, 22 | 23 | -- file:// URI 24 | -- Compiled-in default. Used if you don't specify any hyperlink_rules. 25 | { 26 | regex = [[\bfile://\S*\b]], 27 | format = "$0", 28 | }, 29 | 30 | -- Linkify things that look like URLs with numeric addresses as hosts. 31 | -- E.g. http://127.0.0.1:8000 for a local development server, 32 | -- or http://192.168.1.1 for the web interface of many routers. 33 | { 34 | regex = [[\b\w+://(?:[\d]{1,3}\.){3}[\d]{1,3}\S*\b]], 35 | format = "$0", 36 | }, 37 | 38 | -- Make username/project paths clickable. This implies paths like the following are for GitHub. 39 | -- As long as a full URL hyperlink regex exists above this it should not match a full URL to 40 | -- GitHub or GitLab / BitBucket (i.e. https://gitlab.com/user/project.git is still a whole clickable URL) 41 | { 42 | regex = [[["]?([\w\d]{1}[-\w\d]+)(/){1}([-\w\d\.]+)["]?]], 43 | format = "https://www.github.com/$1/$3", 44 | }, 45 | } 46 | end 47 | 48 | return M 49 | -------------------------------------------------------------------------------- /config/wezterm/mouse.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | local keys = require("keys") 3 | 4 | local M = {} 5 | 6 | ---@param config Config 7 | function M.setup(config) 8 | config.alternate_buffer_wheel_scroll_speed = 1 9 | config.bypass_mouse_reporting_modifiers = keys.mod 10 | config.mouse_bindings = { 11 | -- Don't open links without modifier 12 | { 13 | event = { Up = { streak = 1, button = "Left" } }, 14 | action = wezterm.action.CompleteSelection("ClipboardAndPrimarySelection"), 15 | }, 16 | { 17 | event = { Up = { streak = 1, button = "Left" } }, 18 | mods = keys.mod, 19 | action = wezterm.action.CompleteSelectionOrOpenLinkAtMouseCursor("ClipboardAndPrimarySelection"), 20 | }, 21 | } 22 | end 23 | 24 | return M 25 | -------------------------------------------------------------------------------- /config/wezterm/tabs.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") --[[@as Wezterm]] 2 | 3 | local M = {} 4 | M.arrow_solid = "" 5 | M.arrow_thin = "" 6 | M.icons = { 7 | ["C:\\WINDOWS\\system32\\cmd.exe"] = wezterm.nerdfonts.md_console_line, 8 | ["Topgrade"] = wezterm.nerdfonts.md_rocket_launch, 9 | ["bash"] = wezterm.nerdfonts.cod_terminal_bash, 10 | ["btm"] = wezterm.nerdfonts.mdi_chart_donut_variant, 11 | ["cargo"] = wezterm.nerdfonts.dev_rust, 12 | ["curl"] = wezterm.nerdfonts.mdi_flattr, 13 | ["docker"] = wezterm.nerdfonts.linux_docker, 14 | ["docker-compose"] = wezterm.nerdfonts.linux_docker, 15 | ["fish"] = wezterm.nerdfonts.md_fish, 16 | ["gh"] = wezterm.nerdfonts.dev_github_badge, 17 | ["git"] = wezterm.nerdfonts.dev_git, 18 | ["go"] = wezterm.nerdfonts.seti_go, 19 | ["htop"] = wezterm.nerdfonts.md_chart_areaspline, 20 | ["btop"] = wezterm.nerdfonts.md_chart_areaspline, 21 | ["kubectl"] = wezterm.nerdfonts.linux_docker, 22 | ["kuberlr"] = wezterm.nerdfonts.linux_docker, 23 | ["lazydocker"] = wezterm.nerdfonts.linux_docker, 24 | ["lua"] = wezterm.nerdfonts.seti_lua, 25 | ["make"] = wezterm.nerdfonts.seti_makefile, 26 | ["node"] = wezterm.nerdfonts.mdi_hexagon, 27 | ["nvim"] = wezterm.nerdfonts.custom_vim, 28 | ["pacman"] = "󰮯 ", 29 | ["paru"] = "󰮯 ", 30 | ["psql"] = wezterm.nerdfonts.dev_postgresql, 31 | ["pwsh.exe"] = wezterm.nerdfonts.md_console, 32 | ["ruby"] = wezterm.nerdfonts.cod_ruby, 33 | ["sudo"] = wezterm.nerdfonts.fa_hashtag, 34 | ["vim"] = wezterm.nerdfonts.dev_vim, 35 | ["wget"] = wezterm.nerdfonts.mdi_arrow_down_box, 36 | ["zsh"] = wezterm.nerdfonts.dev_terminal, 37 | ["lazygit"] = wezterm.nerdfonts.cod_github, 38 | } 39 | 40 | ---@param tab MuxTabObj 41 | ---@param max_width number 42 | function M.title(tab, max_width) 43 | local title = (tab.tab_title and #tab.tab_title > 0) and tab.tab_title or tab.active_pane.title 44 | local process, other = title:match("^(%S+)%s*%-?%s*%s*(.*)$") 45 | 46 | if M.icons[process] then 47 | title = M.icons[process] .. " " .. (other or "") 48 | end 49 | 50 | local is_zoomed = false 51 | for _, pane in ipairs(tab.panes) do 52 | if pane.is_zoomed then 53 | is_zoomed = true 54 | break 55 | end 56 | end 57 | if is_zoomed then -- or (#tab.panes > 1 and not tab.is_active) then 58 | title = " " .. title 59 | end 60 | 61 | title = wezterm.truncate_right(title, max_width - 3) 62 | return " " .. title .. " " 63 | end 64 | 65 | ---@param config Config 66 | function M.setup(config) 67 | config.use_fancy_tab_bar = false 68 | config.tab_bar_at_bottom = true 69 | config.hide_tab_bar_if_only_one_tab = true 70 | config.tab_max_width = 32 71 | config.unzoom_on_switch_pane = true 72 | 73 | wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width) 74 | local title = M.title(tab, max_width) 75 | local colors = config.resolved_palette 76 | local active_bg = colors.tab_bar.active_tab.bg_color 77 | local inactive_bg = colors.tab_bar.inactive_tab.bg_color 78 | 79 | local tab_idx = 1 80 | for i, t in ipairs(tabs) do 81 | if t.tab_id == tab.tab_id then 82 | tab_idx = i 83 | break 84 | end 85 | end 86 | local is_last = tab_idx == #tabs 87 | local next_tab = tabs[tab_idx + 1] 88 | local next_is_active = next_tab and next_tab.is_active 89 | local arrow = (tab.is_active or is_last or next_is_active) and M.arrow_solid or M.arrow_thin 90 | local arrow_bg = inactive_bg 91 | local arrow_fg = colors.tab_bar.inactive_tab_edge 92 | 93 | if is_last then 94 | arrow_fg = tab.is_active and active_bg or inactive_bg 95 | arrow_bg = colors.tab_bar.background 96 | elseif tab.is_active then 97 | arrow_bg = inactive_bg 98 | arrow_fg = active_bg 99 | elseif next_is_active then 100 | arrow_bg = active_bg 101 | arrow_fg = inactive_bg 102 | end 103 | 104 | local ret = tab.is_active 105 | and { 106 | { Attribute = { Intensity = "Bold" } }, 107 | { Attribute = { Italic = true } }, 108 | } 109 | or {} 110 | ret[#ret + 1] = { Text = title } 111 | ret[#ret + 1] = { Foreground = { Color = arrow_fg } } 112 | ret[#ret + 1] = { Background = { Color = arrow_bg } } 113 | ret[#ret + 1] = { Text = arrow } 114 | return ret 115 | end) 116 | end 117 | 118 | return M 119 | -------------------------------------------------------------------------------- /config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") --[[@as Wezterm]] 2 | local config = wezterm.config_builder() 3 | wezterm.log_info("reloading") 4 | 5 | require("tabs").setup(config) 6 | require("mouse").setup(config) 7 | require("links").setup(config) 8 | require("keys").setup(config) 9 | 10 | -- config.front_end = "WebGpu" 11 | -- config.front_end = "OpenGL" -- current work-around for https://github.com/wez/wezterm/issues/4825 12 | config.enable_wayland = true 13 | config.webgpu_power_preference = "HighPerformance" 14 | -- config.animation_fps = 1 15 | config.cursor_blink_ease_in = "Constant" 16 | config.cursor_blink_ease_out = "Constant" 17 | 18 | -- Colorscheme 19 | config.color_scheme_dirs = { wezterm.home_dir .. "/projects/tokyonight.nvim/extras/wezterm" } 20 | config.color_scheme = "tokyonight_night" 21 | wezterm.add_to_config_reload_watch_list(config.color_scheme_dirs[1] .. config.color_scheme .. ".toml") 22 | 23 | config.colors = { 24 | indexed = { [241] = "#65bcff" }, 25 | } 26 | 27 | config.underline_thickness = 3 28 | config.cursor_thickness = 4 29 | config.underline_position = -6 30 | config.enable_kitty_graphics = true 31 | 32 | if wezterm.target_triple:find("windows") then 33 | config.default_prog = { "pwsh" } 34 | config.window_decorations = "RESIZE|TITLE" 35 | wezterm.on("gui-startup", function(cmd) 36 | local screen = wezterm.gui.screens().active 37 | local tab, pane, window = wezterm.mux.spawn_window(cmd or {}) 38 | local gui = window:gui_window() 39 | local width = 0.7 * screen.width 40 | local height = 0.7 * screen.height 41 | gui:set_inner_size(width, height) 42 | gui:set_position((screen.width - width) / 2, (screen.height - height) / 2) 43 | end) 44 | else 45 | config.term = "wezterm" 46 | config.window_decorations = "NONE" 47 | end 48 | 49 | -- Fonts 50 | config.font_size = 10 51 | config.font = wezterm.font({ family = "Fira Code" }) 52 | config.bold_brightens_ansi_colors = true 53 | config.font_rules = { 54 | { 55 | intensity = "Bold", 56 | italic = true, 57 | font = wezterm.font({ family = "Maple Mono", weight = "Bold", style = "Italic" }), 58 | }, 59 | { 60 | italic = true, 61 | intensity = "Half", 62 | font = wezterm.font({ family = "Maple Mono", weight = "DemiBold", style = "Italic" }), 63 | }, 64 | { 65 | italic = true, 66 | intensity = "Normal", 67 | font = wezterm.font({ family = "Maple Mono", style = "Italic" }), 68 | }, 69 | } 70 | 71 | -- Cursor 72 | config.default_cursor_style = "BlinkingBar" 73 | config.force_reverse_video_cursor = true 74 | config.window_padding = { left = 0, right = 0, top = 0, bottom = 0 } 75 | -- window_background_opacity = 0.9, 76 | -- cell_width = 0.9, 77 | config.scrollback_lines = 10000 78 | 79 | -- Command Palette 80 | config.command_palette_font_size = 13 81 | config.command_palette_bg_color = "#394b70" 82 | config.command_palette_fg_color = "#828bb8" 83 | 84 | return config 85 | -------------------------------------------------------------------------------- /nvim/.neoconf.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /nvim/CHEAT.md: -------------------------------------------------------------------------------- 1 | # Useful Vim Stuff 2 | 3 | - go to first non-white-space on next/prev line `+` `-` 4 | - change list: `g;` `g,` 5 | - macros `@@` 6 | - marks: `'` `\`` 7 | - visual mode: `o`, `O` 8 | - block add at end: `` with `$A` 9 | - complete spelling: `s` 10 | -------------------------------------------------------------------------------- /nvim/README.md: -------------------------------------------------------------------------------- 1 | # Neovim Config 2 | 3 | ![image](https://user-images.githubusercontent.com/292349/209700913-e4761e92-f1ba-497d-8d4c-e41b38cb54a1.png) 4 | 5 | 6 | 7 | ## Plugins 8 | 9 | - [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) 10 | - [cmp-emoji](https://github.com/hrsh7th/cmp-emoji) 11 | - [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) 12 | - [cmp-path](https://github.com/hrsh7th/cmp-path) 13 | - [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) 14 | - [dial.nvim](https://github.com/monaqa/dial.nvim) 15 | - [diffview.nvim](https://github.com/sindrets/diffview.nvim) 16 | - [dressing.nvim](https://github.com/stevearc/dressing.nvim) 17 | - [drop.nvim](https://github.com/folke/drop.nvim) 18 | - [flit.nvim](https://github.com/ggandor/flit.nvim) 19 | - [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) 20 | - [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) 21 | - [gruvbox.nvim](https://github.com/ellisonleao/gruvbox.nvim) 22 | - [inc-rename.nvim](https://github.com/smjonas/inc-rename.nvim) 23 | - [incline.nvim](https://github.com/b0o/incline.nvim) 24 | - [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) 25 | - [lazy.nvim](https://github.com/folke/lazy.nvim) 26 | - [leap.nvim](https://github.com/ggandor/leap.nvim) 27 | - [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) 28 | - [LuaSnip](https://github.com/L3MON4D3/LuaSnip) 29 | - [mason-lspconfig.nvim](https://github.com/williamboman/mason-lspconfig.nvim) 30 | - [mason.nvim](https://github.com/williamboman/mason.nvim) 31 | - [middleclass](https://github.com/anuvyklack/middleclass) 32 | - [mini.nvim](https://github.com/echasnovski/mini.nvim) 33 | - [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) 34 | - [neoconf.nvim](https://github.com/folke/neoconf.nvim) 35 | - [neodev.nvim](https://github.com/folke/neodev.nvim) 36 | - [neogen](https://github.com/danymat/neogen) 37 | - [neogit](https://github.com/TimUntersberger/neogit) 38 | - [neorg](https://github.com/nvim-neorg/neorg) 39 | - [noice.nvim](https://github.com/folke/noice.nvim) 40 | - [nui.nvim](https://github.com/MunifTanjim/nui.nvim) 41 | - [null-ls.nvim](https://github.com/jose-elias-alvarez/null-ls.nvim) 42 | - [nvim-bufferline.lua](https://github.com/akinsho/nvim-bufferline.lua) 43 | - [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) 44 | - [nvim-colorizer.lua](https://github.com/NvChad/nvim-colorizer.lua) 45 | - [nvim-dap](https://github.com/mfussenegger/nvim-dap) 46 | - [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) 47 | - [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) 48 | - [nvim-navic](https://github.com/SmiteshP/nvim-navic) 49 | - [nvim-notify](https://github.com/rcarriga/nvim-notify) 50 | - [nvim-scrollbar](https://github.com/petertriho/nvim-scrollbar) 51 | - [nvim-spectre](https://github.com/windwp/nvim-spectre) 52 | - [nvim-terminal.lua](https://github.com/norcalli/nvim-terminal.lua) 53 | - [nvim-treehopper](https://github.com/mfussenegger/nvim-treehopper) 54 | - [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) 55 | - [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context) 56 | - [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) 57 | - [nvim-ts-context-commentstring](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) 58 | - [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) 59 | - [octo.nvim](https://github.com/pwntester/octo.nvim) 60 | - [one-small-step-for-vimkind](https://github.com/jbyuki/one-small-step-for-vimkind) 61 | - [oxocarbon.nvim](https://github.com/shaunsingh/oxocarbon.nvim) 62 | - [peek.nvim](https://github.com/toppair/peek.nvim) 63 | - [persistence.nvim](https://github.com/folke/persistence.nvim) 64 | - [playground](https://github.com/nvim-treesitter/playground) 65 | - [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) 66 | - [refactoring.nvim](https://github.com/ThePrimeagen/refactoring.nvim) 67 | - [rust-tools.nvim](https://github.com/simrat39/rust-tools.nvim) 68 | - [SchemaStore.nvim](https://github.com/b0o/SchemaStore.nvim) 69 | - [sqlite.lua](https://github.com/kkharji/sqlite.lua) 70 | - [ssr.nvim](https://github.com/cshuaimin/ssr.nvim) 71 | - [styler.nvim](https://github.com/folke/styler.nvim) 72 | - [symbols-outline.nvim](https://github.com/simrat39/symbols-outline.nvim) 73 | - [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) 74 | - [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) 75 | - [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) 76 | - [tokyonight.nvim](https://github.com/folke/tokyonight.nvim) 77 | - [treesj](https://github.com/Wansmer/treesj) 78 | - [trouble.nvim](https://github.com/folke/trouble.nvim) 79 | - [twilight.nvim](https://github.com/folke/twilight.nvim) 80 | - [typescript.nvim](https://github.com/jose-elias-alvarez/typescript.nvim) 81 | - [vim-illuminate](https://github.com/RRethy/vim-illuminate) 82 | - [vim-matchup](https://github.com/andymass/vim-matchup) 83 | - [vim-startuptime](https://github.com/dstein64/vim-startuptime) 84 | - [which-key.nvim](https://github.com/folke/which-key.nvim) 85 | - [windows.nvim](https://github.com/anuvyklack/windows.nvim) 86 | - [yanky.nvim](https://github.com/gbprod/yanky.nvim) 87 | - [zen-mode.nvim](https://github.com/folke/zen-mode.nvim) 88 | 89 | 90 | -------------------------------------------------------------------------------- /nvim/init.lua: -------------------------------------------------------------------------------- 1 | if vim.env.VSCODE then 2 | vim.g.vscode = true 3 | end 4 | 5 | if vim.loader then 6 | vim.loader.enable() 7 | end 8 | 9 | _G.dd = function(...) 10 | require("snacks.debug").inspect(...) 11 | end 12 | _G.bt = function(...) 13 | require("snacks.debug").backtrace() 14 | end 15 | _G.p = function(...) 16 | require("snacks.debug").profile(...) 17 | end 18 | vim.print = _G.dd 19 | 20 | if vim.env.PROF then 21 | vim.opt.rtp:append("/home/folke/projects/snacks.nvim/") 22 | require("snacks.profiler").startup({ 23 | startup = { 24 | -- event = "UIEnter", 25 | -- event = "VeryLazy", 26 | }, 27 | runtime = "~/projects/neovim/runtime", 28 | }) 29 | end 30 | 31 | pcall(require, "config.env") 32 | 33 | require("config.lazy").load({ 34 | -- debug = false, 35 | profiling = { 36 | loader = false, 37 | require = true, 38 | }, 39 | }) 40 | 41 | vim.api.nvim_create_autocmd("User", { 42 | pattern = "VeryLazy", 43 | callback = function() 44 | require("util").version() 45 | end, 46 | }) 47 | -------------------------------------------------------------------------------- /nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "SchemaStore.nvim": { "branch": "main", "commit": "df87d16fc4ea7c2c67cfc00b513861738693fe07" }, 3 | "blink.cmp": { "branch": "main", "commit": "5187cdaa3274c8f9c758e240ef4b0e793f295b47" }, 4 | "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, 5 | "catppuccin": { "branch": "main", "commit": "1bf070129c0b6f77cc23f6a2212dcdc868308c52" }, 6 | "codecompanion.nvim": { "branch": "main", "commit": "6d26211b18ccbf35a7c9925f77878dcd22fe2cb9" }, 7 | "conform.nvim": { "branch": "master", "commit": "374aaf384e2e841607b8e2fe63fa3ad01d111c91" }, 8 | "dial.nvim": { "branch": "master", "commit": "2c7e2750372918f072a20f3cf754d845e143d7c9" }, 9 | "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 10 | "gitsigns.nvim": { "branch": "main", "commit": "f4928ba14eb6c667786ac7d69927f6aee6719f1e" }, 11 | "grug-far.nvim": { "branch": "main", "commit": "78c8d27c6f3300bfa92bb535236732d8e9bcb614" }, 12 | "inc-rename.nvim": { "branch": "main", "commit": "2eaff20526ff6101337b84f4b0d238c11f47d7f4" }, 13 | "log-highlight.nvim": { "branch": "main", "commit": "ad14bf52ef93d83a625ab22a1ed94405bcacbcf7" }, 14 | "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, 15 | "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, 16 | "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, 17 | "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, 18 | "mdmath.nvim": { "branch": "main", "commit": "699acb27fd34bfdf92a43ce0abdd17f0c7a948fe" }, 19 | "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, 20 | "mini.align": { "branch": "main", "commit": "2b42ac0be7d570c2208f9e334ecef13453cd222d" }, 21 | "mini.diff": { "branch": "main", "commit": "ec8a5ae365c5d15920721ea42b1351dbc9e61f2d" }, 22 | "mini.hipatterns": { "branch": "main", "commit": "e5083df391171dc9d8172645606f8496d9443374" }, 23 | "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, 24 | "mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" }, 25 | "mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" }, 26 | "mini.test": { "branch": "main", "commit": "4c70379d07ea44f697d96c7a6f04c79f17b34bb3" }, 27 | "minuet-ai.nvim": { "branch": "main", "commit": "b28e16914cb35ffb9b23c4002a48ca4bca86b752" }, 28 | "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, 29 | "nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" }, 30 | "nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" }, 31 | "nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" }, 32 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "0e3be38005e9673d044e994b1e4b123adb040179" }, 33 | "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, 34 | "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, 35 | "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, 36 | "render-markdown.nvim": { "branch": "main", "commit": "935c2c70c296d87ed1bcce9ce667c239c9c982b5" }, 37 | "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, 38 | "treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" }, 39 | "venv-selector.nvim": { "branch": "regexp", "commit": "c677caa1030808a9f90092e522de7cc20c1390dd" }, 40 | "yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" } 41 | } 42 | -------------------------------------------------------------------------------- /nvim/lazyvim.json: -------------------------------------------------------------------------------- 1 | { 2 | "extras": [ 3 | "lazyvim.plugins.extras.ai.copilot", 4 | "lazyvim.plugins.extras.coding.mini-surround", 5 | "lazyvim.plugins.extras.coding.yanky", 6 | "lazyvim.plugins.extras.editor.dial", 7 | "lazyvim.plugins.extras.editor.inc-rename", 8 | "lazyvim.plugins.extras.editor.mini-diff", 9 | "lazyvim.plugins.extras.formatting.prettier", 10 | "lazyvim.plugins.extras.lang.json", 11 | "lazyvim.plugins.extras.lang.markdown", 12 | "lazyvim.plugins.extras.lang.python", 13 | "lazyvim.plugins.extras.lang.tailwind", 14 | "lazyvim.plugins.extras.lang.typescript", 15 | "lazyvim.plugins.extras.lang.yaml", 16 | "lazyvim.plugins.extras.linting.eslint", 17 | "lazyvim.plugins.extras.util.dot", 18 | "lazyvim.plugins.extras.util.mini-hipatterns" 19 | ], 20 | "install_version": 8, 21 | "news": { 22 | "NEWS.md": "10960", 23 | "doc/news.txt": "5866" 24 | }, 25 | "version": 8 26 | } -------------------------------------------------------------------------------- /nvim/lua/config/autocmds.lua: -------------------------------------------------------------------------------- 1 | -- show cursor line only in active window 2 | vim.api.nvim_create_autocmd({ "InsertLeave", "WinEnter" }, { 3 | callback = function() 4 | if vim.w.auto_cursorline then 5 | vim.wo.cursorline = true 6 | vim.w.auto_cursorline = nil 7 | end 8 | end, 9 | }) 10 | vim.api.nvim_create_autocmd({ "InsertEnter", "WinLeave" }, { 11 | callback = function() 12 | if vim.wo.cursorline then 13 | vim.w.auto_cursorline = true 14 | vim.wo.cursorline = false 15 | end 16 | end, 17 | }) 18 | 19 | -- backups 20 | vim.api.nvim_create_autocmd("BufWritePre", { 21 | group = vim.api.nvim_create_augroup("better_backup", { clear = true }), 22 | callback = function(event) 23 | local file = vim.uv.fs_realpath(event.match) or event.match 24 | local backup = vim.fn.fnamemodify(file, ":p:~:h") 25 | backup = backup:gsub("[/\\]", "%%") 26 | vim.go.backupext = backup 27 | end, 28 | }) 29 | 30 | vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") 31 | 32 | vim.filetype.add({ 33 | extension = { 34 | overlay = "dts", 35 | keymap = "dts", 36 | }, 37 | }) 38 | 39 | -- vim.api.nvim_create_autocmd("QuickFixCmdPost", { 40 | -- callback = function() 41 | -- vim.cmd([[Trouble qflist open]]) 42 | -- end, 43 | -- }) 44 | 45 | -- vim.api.nvim_create_autocmd("BufRead", { 46 | -- callback = function(ev) 47 | -- if vim.bo[ev.buf].buftype == "quickfix" then 48 | -- vim.schedule(function() 49 | -- vim.cmd([[cclose]]) 50 | -- vim.cmd([[Trouble qflist open]]) 51 | -- end) 52 | -- end 53 | -- end, 54 | -- }) 55 | 56 | if vim.fn.has("nvim-0.10") == 1 then 57 | -- vim.api.nvim_create_autocmd({ "TermRequest", "TermResponse" }, { 58 | -- once = true, 59 | -- callback = function(ev) 60 | -- dd(ev.event, ev.data) 61 | -- end, 62 | -- }) 63 | end 64 | -------------------------------------------------------------------------------- /nvim/lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | local util = require("util") 2 | 3 | util.cowboy() 4 | -- util.wezterm() 5 | 6 | vim.keymap.set("n", "", "ciw") 7 | vim.keymap.set("n", "", "k") 8 | vim.keymap.set("n", "", "j") 9 | vim.keymap.set("n", "", "h") 10 | vim.keymap.set("n", "", "l") 11 | -------------------------------------------------------------------------------- /nvim/lua/config/lazy.lua: -------------------------------------------------------------------------------- 1 | local use_dev = true 2 | 3 | if use_dev then 4 | vim.opt.runtimepath:prepend(vim.fn.expand("~/projects/lazy.nvim")) 5 | else 6 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 7 | if not vim.uv.fs_stat(lazypath) then 8 | vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath }) 9 | vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release 10 | end 11 | vim.opt.rtp:prepend(lazypath) 12 | end 13 | 14 | local M = {} 15 | 16 | ---@param opts LazyConfig 17 | function M.load(opts) 18 | opts = vim.tbl_deep_extend("force", { 19 | spec = { 20 | { 21 | "LazyVim/LazyVim", 22 | import = "lazyvim.plugins", 23 | opts = { 24 | -- colorscheme = "rose-pine", 25 | news = { 26 | lazyvim = true, 27 | neovim = true, 28 | }, 29 | }, 30 | }, 31 | { import = "plugins" }, 32 | }, 33 | defaults = { lazy = true }, 34 | dev = { 35 | patterns = { "folke", "LazyVim" }, 36 | fallback = jit.os:find("Windows"), 37 | }, 38 | install = { colorscheme = { "tokyonight", "habamax" } }, 39 | checker = { 40 | enabled = true, 41 | notify = false, 42 | }, 43 | diff = { 44 | cmd = "terminal_git", 45 | }, 46 | rocks = { hererocks = true }, 47 | performance = { 48 | cache = { 49 | enabled = true, 50 | -- disable_events = {}, 51 | }, 52 | rtp = { 53 | disabled_plugins = { 54 | "gzip", 55 | -- "matchit", 56 | -- "matchparen", 57 | -- "netrwPlugin", 58 | "rplugin", 59 | "tarPlugin", 60 | "tohtml", 61 | "tutor", 62 | "zipPlugin", 63 | }, 64 | }, 65 | }, 66 | ui = { 67 | custom_keys = { 68 | ["d"] = function(plugin) 69 | dd(plugin) 70 | end, 71 | }, 72 | }, 73 | debug = false, 74 | }, opts or {}) 75 | require("lazy").setup(opts) 76 | end 77 | 78 | return M 79 | -------------------------------------------------------------------------------- /nvim/lua/config/options.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = " " 2 | 3 | vim.opt.backup = true 4 | vim.opt.cmdheight = 0 5 | vim.opt.backupdir = vim.fn.stdpath("state") .. "/backup" 6 | vim.opt.mousescroll = "ver:1,hor:4" 7 | 8 | if vim.g.neovide then 9 | vim.o.guifont = "Fira Code,Symbols Nerd Font Mono:h34" 10 | vim.g.neovide_scale_factor = 0.3 11 | end 12 | 13 | -- vim.g.node_host_prog = "/Users/folke/.pnpm-global/5/node_modules/neovim/bin/cli.js" 14 | vim.g.loaded_python3_provider = 0 15 | vim.g.loaded_perl_provider = 0 16 | vim.g.loaded_ruby_provider = 0 17 | vim.g.loaded_node_provider = 0 18 | 19 | -- make all keymaps silent by default 20 | local keymap_set = vim.keymap.set 21 | ---@diagnostic disable-next-line: duplicate-set-field 22 | vim.keymap.set = function(mode, lhs, rhs, opts) 23 | opts = opts or {} 24 | opts.silent = opts.silent ~= false 25 | return keymap_set(mode, lhs, rhs, opts) 26 | end 27 | 28 | vim.g.lazyvim_python_lsp = "basedpyright" 29 | vim.g.lazyvim_python_ruff = "ruff" 30 | 31 | if vim.fn.has("win32") == 1 then 32 | LazyVim.terminal.setup("pwsh") 33 | end 34 | 35 | vim.g.deprecation_warnings = true 36 | -- better coop with fzf-lua 37 | vim.env.FZF_DEFAULT_OPTS = "" 38 | vim.g.ai_cmp = false 39 | vim.g.lazyvim_blink_main = not jit.os:find("Windows") 40 | -------------------------------------------------------------------------------- /nvim/lua/plugins/ai.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "zbirenbaum/copilot.lua", dev = true }, 3 | { 4 | "olimorris/codecompanion.nvim", 5 | enabled = false, 6 | cmd = { "CodeCompanion" }, 7 | opts = { 8 | strategies = { 9 | chat = { 10 | adapter = "openai", 11 | }, 12 | inline = { 13 | adapter = "openai", 14 | }, 15 | }, 16 | }, 17 | }, 18 | { 19 | "milanglacier/minuet-ai.nvim", 20 | enabled = false, 21 | event = "BufReadPre", 22 | opts = { 23 | provider = "codestral", 24 | notify = "debug", 25 | n_completions = 1, 26 | add_single_line_entry = false, 27 | virtualtext = { 28 | auto_trigger_ft = { "lua" }, 29 | keymap = { 30 | -- accept whole completion 31 | accept = "", 32 | -- accept one line 33 | accept_line = "", 34 | -- accept n lines (prompts for number) 35 | accept_n_lines = "", 36 | -- Cycle to prev completion item, or manually invoke completion 37 | prev = "", 38 | -- Cycle to next completion item, or manually invoke completion 39 | next = "", 40 | dismiss = "", 41 | }, 42 | }, 43 | provider_options = { 44 | codestral = { 45 | optional = { 46 | max_tokens = 256, 47 | stop = { "\n\n" }, 48 | }, 49 | }, 50 | gemini = { 51 | optional = { 52 | generationConfig = { 53 | maxOutputTokens = 256, 54 | }, 55 | safetySettings = { 56 | { 57 | -- HARM_CATEGORY_HATE_SPEECH, 58 | -- HARM_CATEGORY_HARASSMENT 59 | -- HARM_CATEGORY_SEXUALLY_EXPLICIT 60 | category = "HARM_CATEGORY_DANGEROUS_CONTENT", 61 | -- BLOCK_NONE 62 | threshold = "BLOCK_ONLY_HIGH", 63 | }, 64 | }, 65 | }, 66 | }, 67 | }, 68 | }, 69 | }, 70 | } 71 | -------------------------------------------------------------------------------- /nvim/lua/plugins/coding.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "folke/ts-comments.nvim", 4 | opts = { 5 | langs = { 6 | dts = "// %s", 7 | }, 8 | }, 9 | }, 10 | { 11 | "zbirenbaum/copilot.lua", 12 | optional = true, 13 | opts = { 14 | filetypes = { ["*"] = true }, 15 | }, 16 | }, 17 | 18 | { 19 | "echasnovski/mini.align", 20 | opts = {}, 21 | keys = { 22 | { "ga", mode = { "n", "v" } }, 23 | { "gA", mode = { "n", "v" } }, 24 | }, 25 | }, 26 | 27 | { 28 | "smjonas/inc-rename.nvim", 29 | cmd = "IncRename", 30 | config = true, 31 | }, 32 | 33 | { 34 | "Wansmer/treesj", 35 | keys = { 36 | { "J", "TSJToggle", desc = "Join Toggle" }, 37 | }, 38 | opts = { use_default_keymaps = false, max_join_length = 150 }, 39 | }, 40 | 41 | { "echasnovski/mini.test", cond = vim.fn.isdirectory("tests") == 1 }, 42 | 43 | { 44 | "folke/lazydev.nvim", 45 | opts = function(_, opts) 46 | opts.debug = true 47 | opts.runtime = "~/projects/neovim/runtime" 48 | vim.list_extend(opts.library, { 49 | -- { path = "wezterm-types", mods = { "wezterm" } }, 50 | { path = "${3rd}/luassert/library", words = { "assert" } }, 51 | { path = "${3rd}/busted/library", words = { "describe" } }, 52 | }) 53 | end, 54 | }, 55 | 56 | { "markdown-preview.nvim", enabled = false }, 57 | 58 | { 59 | "toppair/peek.nvim", 60 | build = "deno task --quiet build:fast", 61 | opts = { 62 | theme = "light", 63 | }, 64 | keys = { 65 | { 66 | "cp", 67 | function() 68 | require("peek").open() 69 | end, 70 | }, 71 | }, 72 | }, 73 | } 74 | -------------------------------------------------------------------------------- /nvim/lua/plugins/lsp.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: missing-fields 2 | return { 3 | -- lsp servers 4 | { 5 | "neovim/nvim-lspconfig", 6 | opts = { 7 | diagnostics = { virtual_text = { prefix = "icons" } }, 8 | capabilities = { 9 | workspace = { 10 | didChangeWatchedFiles = { 11 | dynamicRegistration = false, 12 | }, 13 | }, 14 | }, 15 | servers = { 16 | lua_ls = { 17 | -- cmd = { "/home/folke/projects/lua-language-server/bin/lua-language-server" }, 18 | -- single_file_support = true, 19 | settings = { 20 | Lua = { 21 | misc = { 22 | -- parameters = { "--loglevel=trace" }, 23 | }, 24 | hover = { expandAlias = false }, 25 | type = { 26 | castNumberToInteger = true, 27 | inferParamType = true, 28 | }, 29 | diagnostics = { 30 | disable = { "incomplete-signature-doc", "trailing-space" }, 31 | -- enable = false, 32 | groupSeverity = { 33 | strong = "Warning", 34 | strict = "Warning", 35 | }, 36 | groupFileStatus = { 37 | ["ambiguity"] = "Opened", 38 | ["await"] = "Opened", 39 | ["codestyle"] = "None", 40 | ["duplicate"] = "Opened", 41 | ["global"] = "Opened", 42 | ["luadoc"] = "Opened", 43 | ["redefined"] = "Opened", 44 | ["strict"] = "Opened", 45 | ["strong"] = "Opened", 46 | ["type-check"] = "Opened", 47 | ["unbalanced"] = "Opened", 48 | ["unused"] = "Opened", 49 | }, 50 | unusedLocalExclude = { "_*" }, 51 | }, 52 | }, 53 | }, 54 | }, 55 | }, 56 | }, 57 | }, 58 | 59 | { 60 | "stevearc/conform.nvim", 61 | optional = true, 62 | opts = { 63 | formatters_by_ft = { 64 | ["javascript"] = { "dprint", "prettier" }, 65 | ["javascriptreact"] = { "dprint" }, 66 | ["typescript"] = { "dprint", "prettier" }, 67 | ["typescriptreact"] = { "dprint" }, 68 | }, 69 | formatters = { 70 | dprint = { 71 | condition = function(_, ctx) 72 | return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1] 73 | end, 74 | }, 75 | }, 76 | }, 77 | }, 78 | { 79 | "mfussenegger/nvim-lint", 80 | opts = { 81 | linters_by_ft = { 82 | lua = { "selene", "luacheck" }, 83 | }, 84 | linters = { 85 | selene = { 86 | condition = function(ctx) 87 | local root = LazyVim.root.get({ normalize = true }) 88 | if root ~= vim.uv.cwd() then 89 | return false 90 | end 91 | return vim.fs.find({ "selene.toml" }, { path = root, upward = true })[1] 92 | end, 93 | }, 94 | luacheck = { 95 | condition = function(ctx) 96 | local root = LazyVim.root.get({ normalize = true }) 97 | if root ~= vim.uv.cwd() then 98 | return false 99 | end 100 | return vim.fs.find({ ".luacheckrc" }, { path = root, upward = true })[1] 101 | end, 102 | }, 103 | }, 104 | }, 105 | }, 106 | } 107 | -------------------------------------------------------------------------------- /nvim/lua/plugins/snacks.lua: -------------------------------------------------------------------------------- 1 | ---@module 'lazy' 2 | 3 | return { 4 | { 5 | "snacks.nvim", 6 | ---@type snacks.Config 7 | opts = { 8 | statuscolumn = { folds = { open = false } }, 9 | notifier = { sort = { "added" } }, 10 | scroll = { debug = false }, 11 | image = { 12 | force = false, 13 | enabled = true, 14 | debug = { request = false, convert = false, placement = false }, 15 | math = { enabled = true }, 16 | doc = { inline = true, float = true }, 17 | }, 18 | picker = { 19 | previewers = { 20 | diff = { builtin = false }, 21 | git = { builtin = false }, 22 | }, 23 | debug = { scores = false, leaks = false, explorer = false, files = false, proc = true }, 24 | sources = { 25 | explorer = { 26 | layout = { 27 | preset = "sidebar", 28 | preview = { main = true, enabled = false }, 29 | }, 30 | }, 31 | files_with_symbols = { 32 | multi = { "files", "lsp_symbols" }, 33 | filter = { 34 | ---@param p snacks.Picker 35 | ---@param filter snacks.picker.Filter 36 | transform = function(p, filter) 37 | local symbol_pattern = filter.pattern:match("^.-@(.*)$") 38 | -- store the current file buffer 39 | if filter.source_id ~= 2 then 40 | local item = p:current() 41 | if item and item.file then 42 | filter.meta.buf = vim.fn.bufadd(item.file) 43 | end 44 | end 45 | 46 | if symbol_pattern and filter.meta.buf then 47 | filter.pattern = symbol_pattern 48 | filter.current_buf = filter.meta.buf 49 | filter.source_id = 2 50 | else 51 | filter.source_id = 1 52 | end 53 | end, 54 | }, 55 | }, 56 | }, 57 | win = { 58 | list = { 59 | keys = { 60 | [""] = { "toggle_input", mode = { "n", "i" } }, 61 | }, 62 | }, 63 | input = { 64 | keys = { 65 | [""] = { "toggle_lua", mode = { "n", "i" } }, 66 | [""] = { "toggle_input", mode = { "n", "i" } }, 67 | -- [""] = { "edit_tab", mode = { "n", "i" } }, 68 | -- [""] = { "yankit", mode = { "n", "i" } }, 69 | -- [""] = { "close", mode = { "n", "i" } }, 70 | }, 71 | }, 72 | }, 73 | actions = { 74 | yankit = { action = "yank", notify = true }, 75 | toggle_lua = function(p) 76 | local opts = p.opts --[[@as snacks.picker.grep.Config]] 77 | opts.ft = not opts.ft and "lua" or nil 78 | p:find() 79 | end, 80 | }, 81 | }, 82 | profiler = { 83 | runtime = "~/projects/neovim/runtime/", 84 | presets = { 85 | on_stop = function() 86 | Snacks.profiler.scratch() 87 | end, 88 | }, 89 | }, 90 | indent = { 91 | chunk = { enabled = true }, 92 | }, 93 | dashboard = { example = "github" }, 94 | gitbrowse = { 95 | open = function(url) 96 | vim.fn.system(" ~/dot/config/hypr/scripts/quake") 97 | vim.ui.open(url) 98 | end, 99 | }, 100 | }, 101 | -- stylua: ignore 102 | keys = { 103 | { "", function() Snacks.picker.smart() end, desc = "Smart Open" }, 104 | { "dd", function() Snacks.picker.grep({search = "^(?!\\s*--).*\\b(bt|dd)\\(", args = {"-P"}, live = false, ft = "lua"}) end, desc = "Debug Searcher" }, 105 | { "t", function() Snacks.scratch({ icon = " ", name = "Todo", ft = "markdown", file = "~/dot/TODO.md" }) end, desc = "Todo List" }, 106 | { 107 | "dpd", 108 | desc = "Debug profiler", 109 | function() 110 | do return { 111 | a = { 112 | b = { 113 | c = 123, 114 | }, 115 | }, 116 | } end 117 | if not Snacks.profiler.running() then 118 | Snacks.notify("Profiler debug started") 119 | Snacks.profiler.start() 120 | else 121 | Snacks.profiler.debug() 122 | Snacks.notify("Profiler debug stopped") 123 | end 124 | end, 125 | }, 126 | }, 127 | }, 128 | } 129 | -------------------------------------------------------------------------------- /nvim/lua/plugins/specs/qmk.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "codethread/qmk.nvim", 4 | ft = "dts", 5 | ---@type qmk.UserConfig 6 | opts = { 7 | name = "aurora_sofle2", 8 | variant = "zmk", 9 | auto_format_pattern = "*.keymap", 10 | comment_preview = { 11 | keymap_overrides = { 12 | ["&trans"] = "", 13 | ["&sys_reset"] = "🔄", 14 | ["&bootloader"] = "💾", 15 | SEMI = ";", 16 | FSLH = "/", 17 | BSLH = "\\", 18 | LBKT = "[", 19 | RBKT = "]", 20 | LBRC = "{", 21 | RBRC = "}", 22 | SQT = "'", 23 | EXCL = "!", 24 | PRCNT = "%", 25 | CARET = "^", 26 | C_NEXT = "⏭️", 27 | C_PREV = "⏮️", 28 | C_PP = "⏯️", 29 | BT_NXT = "🛜🔼", 30 | BT_PRV = "🛜🔽", 31 | BT_CLR = "🛜❌", 32 | C_MUTE = "🔇", 33 | C_VOL_DN = "🔉", 34 | C_VOL_UP = "🔊", 35 | C_BRI_UP = "🔆", 36 | C_BRI_DN = "🔅", 37 | EP_TOG = "🔌", 38 | AMPS = "&", 39 | STAR = "*", 40 | LPAR = "(", 41 | RPAR = ")", 42 | MEH = "MEH", 43 | K_UNDO = "↩️", 44 | ["COPY"] = "📄", 45 | ["PASTE"] = "📋", 46 | ["CUT"] = "✂️", 47 | ["LG(Q)"] = "⌘Q", 48 | ["LC(W)"] = "⌃W", 49 | ["LC(T)"] = "⌃T", 50 | ["LC(TAB)"] = "⌃⇥", 51 | ["LS(LC(TAB))"] = "⇧⌃⇥", 52 | SPACE = "SPACE", 53 | KP_MULTIPLY = "*", 54 | -- use MENU as compose key 55 | K_CMENU = "🌍", 56 | K_MENU = "🌍", 57 | COMPOSE = "🌍", 58 | LEFT = "←", 59 | RIGHT = "→", 60 | UP = "↑", 61 | DOWN = "↓", 62 | KP_PLUS = "+", 63 | DQT = '"', 64 | PG_UP = "⇞", 65 | PG_DN = "⇟", 66 | HOME = "⇱", 67 | END = "⇲", 68 | _LTX = "", 69 | _LMX = "", 70 | _LBX = "", 71 | _LHX = "", 72 | _RTX = "", 73 | _RMX = "", 74 | _RBX = "", 75 | _RHX = "", 76 | _MTX = "", 77 | _MMX = "", 78 | _MBX = "", 79 | _MHX = "", 80 | }, 81 | symbols = { 82 | tl = "╭", 83 | tr = "╮", 84 | bl = "╰", 85 | br = "╯", 86 | }, 87 | }, 88 | layout = { 89 | "x x x x x x _ _ x x x x x x", 90 | "x x x x x x _ _ x x x x x x", 91 | "x x x x x x x^x x x x x x x", 92 | "_ _ _ x x x x x x x x _ _ _", 93 | }, 94 | }, 95 | config = function(_, opts) 96 | ---@param keymap qmk.KeymapList 97 | package.loaded["qmk.format.get_key_text"] = function(keymap) 98 | ---@type table 99 | local mapped = {} 100 | for _, k in ipairs(keymap) do 101 | mapped[k.key] = k.value 102 | end 103 | for _, v in ipairs({ "GUI", "ALT", "CTRL", "SHIFT" }) do 104 | mapped["R" .. v] = "R" .. v 105 | mapped["L" .. v] = "L" .. v 106 | end 107 | return function(key) 108 | local parts = vim.split(key, " ") 109 | if vim.tbl_contains({ "&kp", "&bt", "&ext_power" }, parts[1]) then 110 | table.remove(parts, 1) 111 | end 112 | for i, part in ipairs(parts) do 113 | part = mapped[part] or mapped["KC_" .. part] or part 114 | part = part:gsub("^N(%d)$", "%1") 115 | if part:find("&") ~= 1 then 116 | part = part:upper() 117 | end 118 | parts[i] = part 119 | end 120 | return table.concat(parts, " ") 121 | end 122 | end 123 | 124 | require("qmk").setup(opts) 125 | end, 126 | }, 127 | } 128 | -------------------------------------------------------------------------------- /nvim/lua/plugins/specs/telescope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "telescope.nvim", 4 | optional = true, 5 | keys = { 6 | { 7 | "fp", 8 | function() 9 | require("telescope.builtin").find_files({ 10 | cwd = require("lazy.core.config").options.root, 11 | }) 12 | end, 13 | desc = "Find Plugin File", 14 | }, 15 | { 16 | "sp", 17 | function() 18 | local files = {} ---@type table 19 | for _, plugin in pairs(require("lazy.core.config").plugins) do 20 | repeat 21 | if plugin._.module then 22 | local info = vim.loader.find(plugin._.module)[1] 23 | if info then 24 | files[info.modpath] = info.modpath 25 | end 26 | end 27 | plugin = plugin._.super 28 | until not plugin 29 | end 30 | require("telescope.builtin").live_grep({ 31 | default_text = "/", 32 | search_dirs = vim.tbl_values(files), 33 | }) 34 | end, 35 | desc = "Search Plugin Spec", 36 | }, 37 | }, 38 | opts = { 39 | defaults = { 40 | layout_strategy = "horizontal", 41 | layout_config = { 42 | horizontal = { 43 | prompt_position = "top", 44 | preview_width = 0.5, 45 | }, 46 | width = 0.8, 47 | height = 0.8, 48 | preview_cutoff = 120, 49 | }, 50 | sorting_strategy = "ascending", 51 | winblend = 0, 52 | }, 53 | }, 54 | }, 55 | { 56 | "tokyonight.nvim", 57 | opts = { 58 | on_highlights = function(hl, c) 59 | local prompt = "#2d3149" 60 | hl.TelescopeNormal = { bg = c.bg_dark, fg = c.fg } 61 | hl.TelescopeBorder = { bg = c.bg_dark, fg = c.bg_dark } 62 | hl.TelescopePromptNormal = { bg = prompt } 63 | hl.TelescopePromptBorder = { bg = prompt, fg = prompt } 64 | hl.TelescopePromptTitle = { bg = c.fg_gutter, fg = c.orange } 65 | hl.TelescopePreviewTitle = { bg = c.bg_dark, fg = c.bg_dark } 66 | hl.TelescopeResultsTitle = { bg = c.bg_dark, fg = c.bg_dark } 67 | end, 68 | }, 69 | }, 70 | } 71 | -------------------------------------------------------------------------------- /nvim/lua/plugins/tmp.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- { 3 | -- "nvim-telescope/telescope.nvim", 4 | -- cmd = "Telescope", 5 | -- opts = {}, 6 | -- }, 7 | -- { 8 | -- "sphamba/smear-cursor.nvim", 9 | -- enabled = true, 10 | -- cond = not (vim.env.KITTY_PID or vim.g.neovide) and vim.fn.has("nvim-0.10") == 1, 11 | -- }, 12 | -- { 13 | -- "nvim-neorg/neorg", 14 | -- lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default 15 | -- version = "*", -- Pin Neorg to the latest stable release 16 | -- opts = { 17 | -- load = { 18 | -- ["core.defaults"] = {}, 19 | -- ["core.concealer"] = {}, 20 | -- ["core.dirman"] = { 21 | -- config = { 22 | -- workspaces = { 23 | -- notes = "~/notes", 24 | -- }, 25 | -- default_workspace = "notes", 26 | -- }, 27 | -- }, 28 | -- }, 29 | -- }, 30 | -- }, 31 | } 32 | -------------------------------------------------------------------------------- /nvim/lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "fei6409/log-highlight.nvim", event = "BufRead *.log", opts = {} }, 3 | { 4 | "nvim-treesitter/nvim-treesitter", 5 | opts = function(_, opts) 6 | -- add caddyfile support 7 | require("nvim-treesitter.parsers").get_parser_configs().caddy = { 8 | install_info = { 9 | url = "https://github.com/Samonitari/tree-sitter-caddy", 10 | files = { "src/parser.c", "src/scanner.c" }, 11 | branch = "master", 12 | }, 13 | filetype = "caddy", 14 | } 15 | vim.filetype.add({ 16 | pattern = { 17 | ["Caddyfile"] = "caddy", 18 | }, 19 | }) 20 | 21 | vim.list_extend(opts.ensure_installed, { 22 | "caddy", 23 | "cmake", 24 | -- "comment", -- comments are slowing down TS bigtime, so disable for now 25 | "css", 26 | "devicetree", 27 | "gitcommit", 28 | "gitignore", 29 | "glsl", 30 | "go", 31 | "graphql", 32 | "http", 33 | "just", 34 | "kconfig", 35 | "meson", 36 | "ninja", 37 | "nix", 38 | "org", 39 | "php", 40 | "scss", 41 | "sql", 42 | "svelte", 43 | "vue", 44 | "wgsl", 45 | }) 46 | end, 47 | }, 48 | } 49 | -------------------------------------------------------------------------------- /nvim/lua/plugins/ui.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "akinsho/bufferline.nvim", opts = { options = { separator_style = "slope" } } }, 3 | 4 | { 5 | "folke/which-key.nvim", 6 | enabled = true, 7 | opts = { 8 | preset = "helix", 9 | debug = vim.uv.cwd():find("which%-key"), 10 | win = {}, 11 | spec = {}, 12 | }, 13 | }, 14 | 15 | { 16 | "folke/noice.nvim", 17 | opts = function(_, opts) 18 | opts.debug = vim.uv.cwd():find("noice%.nvim") 19 | opts.debug = false 20 | opts.routes = opts.routes or {} 21 | table.insert(opts.routes, { 22 | filter = { 23 | event = "notify", 24 | find = "No information available", 25 | }, 26 | opts = { skip = true }, 27 | }) 28 | local focused = true 29 | vim.api.nvim_create_autocmd("FocusGained", { 30 | callback = function() 31 | focused = true 32 | end, 33 | }) 34 | vim.api.nvim_create_autocmd("FocusLost", { 35 | callback = function() 36 | focused = false 37 | end, 38 | }) 39 | 40 | table.insert(opts.routes, 1, { 41 | filter = { 42 | ["not"] = { 43 | event = "lsp", 44 | kind = "progress", 45 | }, 46 | cond = function() 47 | return not focused and false 48 | end, 49 | }, 50 | view = "notify_send", 51 | opts = { stop = false, replace = true }, 52 | }) 53 | 54 | vim.api.nvim_create_autocmd("FileType", { 55 | pattern = "markdown", 56 | callback = function(event) 57 | vim.schedule(function() 58 | require("noice.text.markdown").keys(event.buf) 59 | end) 60 | end, 61 | }) 62 | return opts 63 | end, 64 | }, 65 | 66 | -- lualine 67 | { 68 | "nvim-lualine/lualine.nvim", 69 | opts = function(_, opts) 70 | ---@type table 71 | local mutagen = {} 72 | 73 | local function mutagen_status() 74 | local cwd = vim.uv.cwd() or "." 75 | mutagen[cwd] = mutagen[cwd] 76 | or { 77 | updated = 0, 78 | total = 0, 79 | enabled = vim.fs.find("mutagen.yml", { path = cwd, upward = true })[1] ~= nil, 80 | status = {}, 81 | } 82 | local now = vim.uv.now() -- timestamp in milliseconds 83 | local refresh = mutagen[cwd].updated + 10000 < now 84 | if #mutagen[cwd].status > 0 then 85 | refresh = mutagen[cwd].updated + 1000 < now 86 | end 87 | if mutagen[cwd].enabled and refresh then 88 | ---@type {name:string, status:string, idle:boolean}[] 89 | local sessions = {} 90 | local lines = vim.fn.systemlist("mutagen project list") 91 | local status = {} 92 | local name = nil 93 | for _, line in ipairs(lines) do 94 | local n = line:match("^Name: (.*)") 95 | if n then 96 | name = n 97 | end 98 | local s = line:match("^Status: (.*)") 99 | if s then 100 | table.insert(sessions, { 101 | name = name, 102 | status = s, 103 | idle = s == "Watching for changes", 104 | }) 105 | end 106 | end 107 | for _, session in ipairs(sessions) do 108 | if not session.idle then 109 | table.insert(status, session.name .. ": " .. session.status) 110 | end 111 | end 112 | mutagen[cwd].updated = now 113 | mutagen[cwd].total = #sessions 114 | mutagen[cwd].status = status 115 | if #sessions == 0 then 116 | vim.notify("Mutagen is not running", vim.log.levels.ERROR, { title = "Mutagen" }) 117 | end 118 | end 119 | return mutagen[cwd] 120 | end 121 | 122 | local error_color = { fg = Snacks.util.color("DiagnosticError") } 123 | local ok_color = { fg = Snacks.util.color("DiagnosticInfo") } 124 | table.insert(opts.sections.lualine_x, { 125 | cond = function() 126 | return mutagen_status().enabled 127 | end, 128 | color = function() 129 | return (mutagen_status().total == 0 or mutagen_status().status[1]) and error_color or ok_color 130 | end, 131 | function() 132 | local s = mutagen_status() 133 | local msg = s.total 134 | if #s.status > 0 then 135 | msg = msg .. " | " .. table.concat(s.status, " | ") 136 | end 137 | return (s.total == 0 and "󰋘 " or "󰋙 ") .. msg 138 | end, 139 | }) 140 | end, 141 | }, 142 | 143 | -- "folke/twilight.nvim", 144 | 145 | -- { 146 | -- "folke/zen-mode.nvim", 147 | -- cmd = "ZenMode", 148 | -- opts = { 149 | -- window = { backdrop = 0.7 }, 150 | -- plugins = { 151 | -- gitsigns = true, 152 | -- tmux = true, 153 | -- kitty = { enabled = false, font = "+2" }, 154 | -- }, 155 | -- }, 156 | -- keys = { { "z", "ZenMode", desc = "Zen Mode" } }, 157 | -- }, 158 | } 159 | -------------------------------------------------------------------------------- /nvim/lua/util/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.test(is_file) 4 | local file = is_file and vim.fn.expand("%:p") or "./tests" 5 | local init = vim.fn.glob("tests/*init*") 6 | require("plenary.test_harness").test_directory(file, { minimal_init = init, sequential = true }) 7 | end 8 | 9 | function M.version() 10 | local v = vim.version() 11 | if v and not v.prerelease then 12 | vim.notify( 13 | ("Neovim v%d.%d.%d"):format(v.major, v.minor, v.patch), 14 | vim.log.levels.WARN, 15 | { title = "Neovim: not running nightly!" } 16 | ) 17 | end 18 | end 19 | 20 | function M.cowboy() 21 | ---@type table? 22 | local ok = true 23 | for _, key in ipairs({ "h", "j", "k", "l", "+", "-" }) do 24 | local count = 0 25 | local timer = assert(vim.uv.new_timer()) 26 | local map = key 27 | vim.keymap.set("n", key, function() 28 | if vim.v.count > 0 then 29 | count = 0 30 | end 31 | if count >= 10 and vim.bo.buftype ~= "nofile" then 32 | ok = pcall(vim.notify, "Hold it Cowboy!", vim.log.levels.WARN, { 33 | icon = "🤠", 34 | id = "cowboy", 35 | keep = function() 36 | return count >= 10 37 | end, 38 | }) 39 | if not ok then 40 | return map 41 | end 42 | else 43 | count = count + 1 44 | timer:start(2000, 0, function() 45 | count = 0 46 | end) 47 | return map 48 | end 49 | end, { expr = true, silent = true }) 50 | end 51 | end 52 | 53 | function M.colorize() 54 | vim.wo.number = false 55 | vim.wo.relativenumber = false 56 | vim.wo.statuscolumn = "" 57 | vim.wo.signcolumn = "no" 58 | vim.opt.listchars = { space = " " } 59 | 60 | local buf = vim.api.nvim_get_current_buf() 61 | 62 | local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false) 63 | while #lines > 0 and vim.trim(lines[#lines]) == "" do 64 | lines[#lines] = nil 65 | end 66 | vim.api.nvim_buf_set_lines(buf, 0, -1, false, {}) 67 | 68 | vim.b[buf].minianimate_disable = true 69 | 70 | vim.api.nvim_chan_send(vim.api.nvim_open_term(buf, {}), table.concat(lines, "\r\n")) 71 | vim.keymap.set("n", "q", "qa!", { silent = true, buffer = buf }) 72 | vim.api.nvim_create_autocmd("TextChanged", { buffer = buf, command = "normal! G$" }) 73 | vim.api.nvim_create_autocmd("TermEnter", { buffer = buf, command = "stopinsert" }) 74 | 75 | vim.defer_fn(function() 76 | vim.b[buf].minianimate_disable = false 77 | end, 2000) 78 | end 79 | 80 | ---@param data string 81 | function M.base64(data) 82 | data = tostring(data) 83 | local bit = require("bit") 84 | local b64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" 85 | local b64, len = "", #data 86 | for i = 1, len, 3 do 87 | local a, b, c = data:byte(i, i + 2) 88 | local buffer = bit.bor(bit.lshift(a, 16), bit.lshift(b or 0, 8), c or 0) 89 | for j = 0, 3 do 90 | local index = bit.rshift(buffer, (3 - j) * 6) % 64 91 | b64 = b64 .. b64chars:sub(index + 1, index + 1) 92 | end 93 | end 94 | local padding = (3 - len % 3) % 3 95 | b64 = b64:sub(1, -1 - padding) .. ("="):rep(padding) 96 | return b64 97 | end 98 | 99 | function M.set_user_var(key, value) 100 | io.write(string.format("\027]1337;SetUserVar=%s=%s\a", key, M.base64(value))) 101 | end 102 | 103 | function M.wezterm() 104 | local nav = { 105 | h = "Left", 106 | j = "Down", 107 | k = "Up", 108 | l = "Right", 109 | } 110 | 111 | local function navigate(dir) 112 | return function() 113 | local win = vim.api.nvim_get_current_win() 114 | vim.cmd.wincmd(dir) 115 | local pane = vim.env.WEZTERM_PANE 116 | if vim.system and pane and win == vim.api.nvim_get_current_win() then 117 | local pane_dir = nav[dir] 118 | vim.system({ "wezterm", "cli", "activate-pane-direction", pane_dir }, { text = true }, function(p) 119 | if p.code ~= 0 then 120 | vim.notify( 121 | "Failed to move to pane " .. pane_dir .. "\n" .. p.stderr, 122 | vim.log.levels.ERROR, 123 | { title = "Wezterm" } 124 | ) 125 | end 126 | end) 127 | end 128 | end 129 | end 130 | 131 | M.set_user_var("IS_NVIM", true) 132 | 133 | -- Move to window using the movement keys 134 | for key, dir in pairs(nav) do 135 | vim.keymap.set("n", "<" .. dir .. ">", navigate(key), { desc = "Go to " .. dir .. " window" }) 136 | vim.keymap.set("n", "", navigate(key), { desc = "Go to " .. dir .. " window" }) 137 | end 138 | end 139 | 140 | return M 141 | -------------------------------------------------------------------------------- /nvim/lua/util/stuff/class_conceal.lua: -------------------------------------------------------------------------------- 1 | local conceal_ns = vim.api.nvim_create_namespace("class_conceal") 2 | vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "TextChanged", "InsertLeave" }, { 3 | group = vim.api.nvim_create_augroup("class_conceal", { clear = true }), 4 | pattern = { "*.tsx" }, 5 | callback = function(event) 6 | local bufnr = event.buf or vim.api.nvim_get_current_buf() 7 | 8 | ---Conceal HTML class attributes. Ideal for big TailwindCSS class lists 9 | ---Ref: https://gist.github.com/mactep/430449fd4f6365474bfa15df5c02d27b 10 | local language_tree = vim.treesitter.get_parser(bufnr, "tsx") 11 | local syntax_tree = language_tree:parse() 12 | local root = syntax_tree[1]:root() 13 | 14 | local ok, query = pcall( 15 | vim.treesitter.query.parse, 16 | "tsx", 17 | [[ 18 | ((jsx_attribute 19 | (property_identifier) @att_name (#eq? @att_name "class") 20 | (string (string_fragment) @class_value))) 21 | ]] 22 | ) 23 | if not ok then 24 | dd(query) 25 | end 26 | 27 | for _, captures, metadata in query:iter_matches(root, bufnr, root:start(), root:end_(), {}) do 28 | local start_row, start_col, end_row, end_col = captures[2]:range() 29 | vim.api.nvim_buf_set_extmark(bufnr, conceal_ns, start_row, start_col + 3, { 30 | end_line = end_row, 31 | end_col = end_col, 32 | conceal = "%", -- "…", 33 | }) 34 | end 35 | end, 36 | }) 37 | -------------------------------------------------------------------------------- /nvim/lua/util/stuff/colors.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.ns = vim.api.nvim_create_namespace("lsp.colors") 4 | 5 | ---@type table 6 | M.hl = {} 7 | 8 | ---@param hex string 9 | function M.get_hl(hex) 10 | local hl = "LspColor" .. hex:sub(2) 11 | if not M.hl[hl] then 12 | M.hl[hl] = true 13 | vim.api.nvim_set_hl(0, hl, { bg = hex }) 14 | end 15 | return hl 16 | end 17 | 18 | function M.update(buf) 19 | buf = buf or vim.api.nvim_get_current_buf() 20 | local params = { textDocument = vim.lsp.util.make_text_document_params(buf) } 21 | vim.lsp.buf_request(buf, "textDocument/documentColor", params, function(err, colors) 22 | if err then 23 | return 24 | end 25 | for _, c in ipairs(colors) do 26 | local color = c.color 27 | color.red = math.floor(color.red * 255 + 0.5) 28 | color.green = math.floor(color.green * 255 + 0.5) 29 | color.blue = math.floor(color.blue * 255 + 0.5) 30 | local hex = string.format("#%02x%02x%02x", color.red, color.green, color.blue) 31 | 32 | local offset_encoding = vim.lsp.util._get_offset_encoding(buf) 33 | local start_row = c.range.start.line 34 | local start_col = vim.lsp.util._get_line_byte_from_position(buf, c.range.start, offset_encoding) 35 | local end_row = c.range["end"].line 36 | local end_col = vim.lsp.util._get_line_byte_from_position(buf, c.range["end"], offset_encoding) 37 | 38 | vim.api.nvim_buf_set_extmark(buf, M.ns, start_row, start_col, { 39 | end_row = end_row, 40 | end_col = end_col, 41 | hl_group = M.get_hl(hex), 42 | priority = 5000, 43 | }) 44 | end 45 | end) 46 | end 47 | 48 | return M 49 | -------------------------------------------------------------------------------- /nvim/queries/caddy/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (http_error_code) 3 | (http_status_code) 4 | (size_number) 5 | ] @number 6 | 7 | (snippet_name) @function 8 | 9 | (_ directive_type: _ @keyword) 10 | 11 | 12 | ; (_ respond_or_error_option_message: _ @function.method) 13 | 14 | (_ matcher_type: _ @function.macro) 15 | 16 | ; (_ basicauth_user_name: _ @string) 17 | ; (_ basicauth_user_pass: _ @string) 18 | ; (_ basicauth_user_pass_saltb64: _ @string) 19 | ; (_ respond_or_error_message: _ @string) 20 | 21 | (_ path_regexp_matcher_value: _ @string) 22 | 23 | (_ global_option_type: _ @function.method) 24 | 25 | (_ directive_option_name: _ @function.method) 26 | 27 | (_ directive_option_fixed_value: _ @variable.parameter) 28 | 29 | (_ directive_option_user_string_value: _ @string) 30 | 31 | [ 32 | (matcher_name) 33 | (matcher_token) 34 | ] @tag 35 | 36 | (header_name) @variable.parameter 37 | 38 | [ 39 | (header_value) 40 | (unix_path) 41 | (email_address) 42 | (http_message) 43 | ] @string 44 | 45 | (comment_line) @comment 46 | 47 | (site_address) @constant 48 | 49 | [ 50 | "stdout" 51 | "stderr" 52 | "discard" 53 | "file" 54 | 55 | "console" 56 | "json" 57 | 58 | "info" 59 | "INFO" 60 | "error" 61 | "ERROR" 62 | ] @constant.builtin 63 | 64 | ["{" "}"] @punctuation.bracket 65 | -------------------------------------------------------------------------------- /nvim/queries/markdown/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | (((inline) @_inline (#match? @_inline "^\(import\|export\)")) @injection.content 3 | (#set! injection.language "tsx")) 4 | 5 | -------------------------------------------------------------------------------- /nvim/queries/yaml/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | ; there's no jinja2 grammar, so we use twig instead since it's very similar 3 | (block_mapping_pair 4 | value: [ 5 | (block_node (block_scalar) @injection.content) 6 | (flow_node (double_quote_scalar) @injection.content) 7 | ] 8 | (#set! injection.language "twig") 9 | (#contains? @injection.content "{{") 10 | ) 11 | (block_mapping_pair 12 | value: [ 13 | (block_node (block_scalar) @injection.content) 14 | (flow_node (double_quote_scalar) @injection.content) 15 | ] 16 | (#set! injection.language "twig") 17 | (#contains? @injection.content "{%") 18 | ) 19 | -------------------------------------------------------------------------------- /nvim/snippets/lua.json: -------------------------------------------------------------------------------- 1 | { 2 | "Create Auto Command": { 3 | "prefix": "autocmd", 4 | "body": [ 5 | "vim.api.nvim_create_autocmd(\"${1:event}\", {", 6 | " group = vim.api.nvim_create_augroup(\"${2:group}\", { clear = true }),", 7 | " callback = function(ev)", 8 | " ${0}", 9 | " end", 10 | "})" 11 | ] 12 | }, 13 | "Create Auto Command Group": { 14 | "prefix": "augroup", 15 | "body": [ 16 | "vim.api.nvim_create_augroup(\"${1:group}\", { clear = true })$0" 17 | ] 18 | }, 19 | "Current Win": { 20 | "prefix": "win", 21 | "body": "local win = vim.api.nvim_get_current_win()\n$0" 22 | }, 23 | "Current Buf": { 24 | "prefix": "buf", 25 | "body": "local buf = vim.api.nvim_get_current_buf()\n$0" 26 | }, 27 | "Buf Valid": { 28 | "prefix": "bufvalid", 29 | "body": "vim.api.nvim_buf_is_valid(${1:buf})" 30 | }, 31 | "Win Valid": { 32 | "prefix": "winvalid", 33 | "body": "vim.api.nvim_win_is_valid(${1:win})" 34 | }, 35 | "Win Call": { 36 | "prefix": "wincall", 37 | "body": [ 38 | "vim.api.nvim_win_call(${1:win}, function(win)", 39 | " ${0}", 40 | "end)" 41 | ] 42 | }, 43 | "Buf Call": { 44 | "prefix": "bufcall", 45 | "body": [ 46 | "vim.api.nvim_buf_call(${1:buf}, function(buf)", 47 | " ${0}", 48 | "end)" 49 | ] 50 | }, 51 | "Schedule": { 52 | "prefix": "schedule", 53 | "body": [ 54 | "vim.schedule(function()", 55 | " ${0}", 56 | "end)" 57 | ] 58 | }, 59 | "Table Deep Extend": { 60 | "prefix": "deepextend", 61 | "body": "vim.tbl_deep_extend(\"force\", ${1:table}, ${2:table})$0" 62 | }, 63 | "Table Filter": { 64 | "prefix": "filter", 65 | "body": [ 66 | "vim.tbl_filter(function()", 67 | " $0", 68 | "end, ${1:table})" 69 | ] 70 | }, 71 | "Table Map": { 72 | "prefix": "map", 73 | "body": [ 74 | "vim.tbl_map(function()", 75 | " $0", 76 | "end, ${1:table})" 77 | ] 78 | }, 79 | "Table Values": { 80 | "prefix": "values", 81 | "body": "vim.tbl_values(${1:table})" 82 | }, 83 | "Table Keys": { 84 | "prefix": "keys", 85 | "body": "vim.tbl_keys(${1:table})" 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /nvim/spell/en.utf-8.add: -------------------------------------------------------------------------------- 1 | plugin 2 | keymap 3 | config 4 | plugins 5 | todo 6 | lua 7 | Neovim 8 | vim 9 | quickfix 10 | todos 11 | popup 12 | vim 13 | folke 14 | nvim 15 | WhichKey 16 | TodoQuickFix 17 | TodoTrouble 18 | TodoTelescope 19 | ripgrep 20 | Api 21 | Hammerspoon 22 | Noice 23 | cmdline 24 | statusline 25 | backends 26 | nui 27 | virtualtext 28 | backend 29 | noice 30 | github 31 | hl 32 | foo 33 | edgebar 34 | keymaps 35 | Treesitter 36 | function 37 | -------------------------------------------------------------------------------- /nvim/spell/en.utf-8.add.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/nvim/spell/en.utf-8.add.spl -------------------------------------------------------------------------------- /nvim/spell/nl.utf-8.add: -------------------------------------------------------------------------------- 1 | Meteo 2 | wijzerzin 3 | tegenwijzerzin 4 | ruimende 5 | -------------------------------------------------------------------------------- /nvim/spell/nl.utf-8.add.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/nvim/spell/nl.utf-8.add.spl -------------------------------------------------------------------------------- /nvim/spell/nl.utf-8.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/nvim/spell/nl.utf-8.spl -------------------------------------------------------------------------------- /nvim/spell/nl.utf-8.sug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/41d76238dee73233891dbf603023542ae09a1ee4/nvim/spell/nl.utf-8.sug -------------------------------------------------------------------------------- /nvim/stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 2 3 | column_width = 120 -------------------------------------------------------------------------------- /nvim/vim.toml: -------------------------------------------------------------------------------- 1 | [vim] 2 | any = true 3 | -------------------------------------------------------------------------------- /scripts/powersave: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | USER=folke 4 | 5 | function run() { 6 | DBUS=unix:path=/run/user/$(id -u $USER)/bus 7 | cd /home/$USER || exit 8 | sudo -u $USER DBUS_SESSION_BUS_ADDRESS="$DBUS" /usr/bin/systemd-run --user --property=TimeoutStopSec=1 --property=KillMode=mixed "$@" 9 | } 10 | 11 | # if this runs as root, run it as user 12 | if [ "$EUID" -eq 0 ]; then 13 | run $0 "$@" 14 | exit 0 15 | fi 16 | 17 | # true when on battery 18 | if [ "$1" = "true" ]; then 19 | brightnessctl -s set 40 # save brightness 20 | # tuned-adm profile laptop-battery-powersave 21 | # powerprofilesctl set power-saver 22 | hyprctl keyword decoration:drop_shadow false 23 | hyprctl keyword decoration:blur:enabled false 24 | fi 25 | 26 | if [ "$1" = "false" ]; then 27 | brightnessctl -r # restore brightness 28 | # powerprofilesctl set balanced 29 | # tuned-adm profile laptop-ac-powersave 30 | hyprctl keyword decoration:drop_shadow true 31 | hyprctl keyword decoration:blur:enabled true 32 | fi 33 | 34 | # reload waybar 35 | # pkill waybar 36 | # waybar 37 | -------------------------------------------------------------------------------- /stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 2 3 | column_width = 120 --------------------------------------------------------------------------------