├── .github └── workflows │ └── gitguardian.yml ├── .gitignore ├── .lazy.lua ├── LICENSE ├── README.md ├── TODO.md ├── ansible ├── ansible.cfg ├── hosts ├── playbook.yml └── roles │ ├── dot │ └── tasks │ │ └── main.yml │ ├── packages │ └── tasks │ │ └── main.yml │ ├── system │ ├── files │ │ ├── hooks │ │ │ ├── 95-efibackup.hook │ │ │ └── 96-paclist.hook │ │ ├── howdy.ini │ │ ├── keyd.conf │ │ ├── network-manager │ │ │ ├── mdns.conf │ │ │ └── wifi-powersave.conf │ │ └── supergfxd.conf │ ├── handlers │ │ └── main.yml │ └── tasks │ │ ├── howdy.yml │ │ └── main.yml │ └── web │ ├── tasks │ └── main.yml │ └── templates │ └── app.j2 ├── config ├── .gitconfig ├── .ssh.config ├── .ticker.yaml ├── DankMaterialShell │ └── settings.json ├── ags │ ├── .gitignore │ ├── app.ts │ ├── env.d.ts │ ├── package.json │ ├── style.scss │ ├── tsconfig.json │ ├── utils │ │ └── cliphist.ts │ └── widget │ │ ├── AppLauncher.scss │ │ └── AppLauncher.tsx ├── alacritty │ └── alacritty.toml ├── 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 │ │ ├── n.fish │ │ ├── pkgdiff.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 ├── gtk-3.0 │ ├── bookmarks │ └── settings.ini ├── gtk-4.0 │ └── settings.ini ├── hypr │ ├── hypridle.conf │ ├── hyprland.conf │ ├── hyprlock.conf │ ├── hyprpaper.conf │ ├── hyprshade.toml │ ├── hyprvars.conf │ └── scripts │ │ ├── bitwarden │ │ └── 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 ├── mimeapps.list ├── mise │ └── config.toml ├── niri │ ├── config.kdl │ └── scripts │ │ ├── dev │ │ └── dynamic-rules ├── 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 ├── wall2.png ├── wall3.png ├── wezterm │ ├── keys.lua │ ├── links.lua │ ├── mouse.lua │ ├── tabs.lua │ └── wezterm.lua └── wireplumber │ └── wireplumber.conf.d │ └── alsa-soft-mixer.conf ├── justfile ├── 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 │ │ │ └── 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 └── 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 | config/ghostty/config-dankcolors 22 | config/gtk-3.0/dank-colors.css 23 | config/gtk-4.0/dank-colors.css 24 | config/kitty/dank-theme.conf 25 | config/niri/dankshell-colors.kdl 26 | config/DankMaterialShell/firefox.css 27 | -------------------------------------------------------------------------------- /.lazy.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- { 3 | -- "stevearc/conform.nvim", 4 | -- optional = true, 5 | -- opts = { 6 | -- formatters_by_ft = { 7 | -- ["kdl"] = { "kdlfmt" }, 8 | -- }, 9 | -- }, 10 | -- }, 11 | { 12 | "nvim-treesitter/nvim-treesitter", 13 | opts = { 14 | ensure_installed = { 15 | "kdl", 16 | "hyprlang", 17 | }, 18 | }, 19 | }, 20 | { 21 | "mfussenegger/nvim-lint", 22 | opts = function(_, opts) 23 | opts.linters_by_ft = opts.linters_by_ft or {} 24 | opts.linters_by_ft.kdl = { "niri" } 25 | require("lint").linters.niri = { 26 | name = "niri", 27 | cmd = "niri", 28 | stdin = false, -- or false if it doesn't support content input via stdin. In that case the filename is automatically added to the arguments. 29 | append_fname = true, -- Automatically append the file name to `args` if `stdin = false` (default: true) 30 | args = { "validate", "-c" }, -- list of arguments. Can contain functions with zero arguments that will be evaluated once the linter is used. 31 | stream = "stderr", -- ('stdout' | 'stderr' | 'both') configure the stream to which the linter outputs the linting result. 32 | ignore_exitcode = true, -- set this to true if the linter exits with a code != 0 and that's considered normal. 33 | env = nil, -- custom environment table to use with the external process. Note that this replaces the *entire* environment, it is not additive. 34 | 35 | ---@type lint.parse 36 | parser = function(out, buf) 37 | local lines = vim.split(out, "\n") 38 | local ret = {} ---@type vim.Diagnostic[] 39 | local e = {} ---@type string[] 40 | local function add() 41 | if #e == 0 then 42 | return 43 | end 44 | local msg = table.concat(e, "\n") 45 | local lnum = msg:match("%[.-:(%d+):(%d+)%]") 46 | ret[#ret + 1] = { 47 | bufnr = buf, 48 | lnum = lnum and tonumber(lnum) or 0, 49 | source = "niri", 50 | message = msg, 51 | severity = vim.diagnostic.severity.ERROR, 52 | } 53 | end 54 | for _, line in ipairs(lines) do 55 | if line:match("^Error:") then 56 | add() 57 | e = { line } 58 | elseif #e > 0 then 59 | e[#e + 1] = line 60 | end 61 | end 62 | add() 63 | return ret 64 | end, 65 | } 66 | end, 67 | }, 68 | } 69 | -------------------------------------------------------------------------------- /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/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = hosts 3 | roles_path = roles 4 | host_key_checking = False 5 | interpreter_python = auto_silent 6 | nocows = 1 7 | pipelining = True 8 | 9 | [privilege_escalation] 10 | become_method = su 11 | -------------------------------------------------------------------------------- /ansible/hosts: -------------------------------------------------------------------------------- 1 | [local] 2 | localhost 3 | 4 | [local:vars] 5 | ansible_connection=local 6 | -------------------------------------------------------------------------------- /ansible/playbook.yml: -------------------------------------------------------------------------------- 1 | - name: Setup Linux Workstation 2 | hosts: local 3 | vars: 4 | dot_repo_root: "{{ playbook_dir | dirname }}" 5 | roles: 6 | - { role: packages, tags: ["packages"] } 7 | - { role: dot, tags: ["dot"] } 8 | - { role: system, tags: ["system"] } 9 | - { role: web, tags: ["web", "never"] } 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_repo_root }}/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_repo_root }}/nvim" 47 | dest: ~/.config/nvim 48 | state: link 49 | 50 | - name: .ssh/config 51 | copy: 52 | src: ~/.config/.ssh.config 53 | dest: ~/.ssh/config 54 | mode: u=rw,o=,g= 55 | 56 | - name: .ssh/config/control 57 | file: 58 | path: ~/.ssh/control 59 | state: directory 60 | mode: u=rwx,o=,g= 61 | 62 | # - name: .Xresources 63 | # file: 64 | # src: ~/.config/.Xresources 65 | # dest: ~/.Xresources 66 | # state: link 67 | 68 | - name: gpg-agent.conf 69 | copy: 70 | dest: ~/.gnupg/gpg-agent.conf 71 | content: "pinentry-program /bin/pinentry" 72 | 73 | # npm/pnpm 74 | - name: .npmrc 75 | copy: 76 | dest: ~/.npmrc 77 | content: |- 78 | global-dir={{ lookup('env', 'HOME') }}/.pnpm-global 79 | global-bin-dir={{ lookup('env', 'HOME') }}/.local/bin/pnpm-bins 80 | -------------------------------------------------------------------------------- /ansible/roles/packages/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # - import_tasks: repos.yml 2 | - name: Create the `aur_builder` user 3 | become: true 4 | ansible.builtin.user: 5 | name: aur_builder 6 | create_home: yes 7 | group: wheel 8 | 9 | - name: Allow the `aur_builder` user to run `sudo pacman` without a password 10 | become: true 11 | ansible.builtin.lineinfile: 12 | path: /etc/sudoers.d/11-install-aur_builder 13 | line: "aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman" 14 | create: yes 15 | mode: 0440 16 | validate: "visudo -cf %s" 17 | 18 | - name: Ensure paru is installed 19 | become: true 20 | ansible.builtin.package: 21 | name: paru 22 | state: present 23 | 24 | - name: Install packages (pacman) 25 | become: true 26 | become_user: aur_builder 27 | become_method: sudo 28 | aur: 29 | state: present 30 | use: paru 31 | name: 32 | # system 33 | - keyd 34 | - cachyos-snapper-support 35 | - cups 36 | - howdy-git 37 | - polkit-gnome 38 | - topgrade 39 | - xdg-desktop-portal-gnome 40 | - xdg-desktop-portal-hyprland 41 | - aria2 42 | 43 | # audio 44 | - easyeffects 45 | - lsp-plugins-lv2 46 | - zam-plugins 47 | - calf 48 | - mda.lv2 49 | - easyeffects-bundy01-presets 50 | # - jamesdsp 51 | 52 | # ui 53 | - brightnessctl 54 | - hyprland 55 | - hypridle 56 | - hyprland 57 | - hyprlock 58 | - hyprpaper 59 | - hyprpicker 60 | - hyprpolkitagent 61 | - hyprsunset 62 | - pavucontrol 63 | - rofi-wayland 64 | 65 | # niri 66 | - niri 67 | - mate-polkit 68 | - dms-shell-git 69 | 70 | # cli 71 | - atuin 72 | - bat 73 | - bob 74 | - btop 75 | - chafa 76 | - cliphist 77 | - duf 78 | - fd 79 | - fzf 80 | - grc 81 | - gum 82 | - htop 83 | - hyperfine 84 | - numbat-bin 85 | - ripgrep 86 | - starship 87 | - tealdeer 88 | - zoxide 89 | - mdcat 90 | - eza 91 | - ncdu 92 | - procs 93 | - dust 94 | - ranger 95 | - tokei 96 | - lazyjournal 97 | 98 | # dev 99 | - fnm-bin 100 | - git 101 | - git-delta 102 | - github-cli 103 | - httpie 104 | - jq 105 | - hub 106 | - just 107 | - lazygit 108 | - lazydocker 109 | - mermaid-cli 110 | - mutagen.io-bin 111 | - neovim 112 | - rustup 113 | - tectonic 114 | - wezterm 115 | - aspell 116 | - pnpm 117 | 118 | # apps 119 | - alacritty 120 | - kitty 121 | - ghostty 122 | - brave-bin 123 | - btrfs-assistant 124 | - rog-control-center 125 | - zen-browser-bin 126 | - discord 127 | - slurp 128 | - grim 129 | - grimblast-git 130 | - wev 131 | - imv 132 | - blueman 133 | 134 | # fonts 135 | - ttf-dejavu 136 | - ttf-fira-code 137 | - ttf-firacode-nerd 138 | - maplemono-ttf 139 | - maplemono-nf 140 | - ttf-ms-fonts 141 | - ttf-nerd-fonts-symbols 142 | - ttf-nerd-fonts-symbols-mono 143 | - ttf-opensans 144 | - ttf-victor-mono 145 | - ttf-victor-mono-nerd 146 | -------------------------------------------------------------------------------- /ansible/roles/system/files/hooks/95-efibackup.hook: -------------------------------------------------------------------------------- 1 | [Trigger] 2 | Operation = Upgrade 3 | Operation = Install 4 | Operation = Remove 5 | Type = Path 6 | Target = usr/lib/modules/*/vmlinuz 7 | 8 | [Action] 9 | Depends = rsync 10 | Description = Backing up /boot... 11 | When = PostTransaction 12 | Exec = /usr/bin/rsync -a --delete /boot /.efi-backup 13 | -------------------------------------------------------------------------------- /ansible/roles/system/files/hooks/96-paclist.hook: -------------------------------------------------------------------------------- 1 | [Trigger] 2 | Operation = Upgrade 3 | Operation = Install 4 | Operation = Remove 5 | Type = Package 6 | Target = * 7 | 8 | [Action] 9 | Description = Generating Package List 10 | When = PostTransaction 11 | Exec = /bin/sh -c 'pacman -Qqe > /home/folke/dot/pacman.txt; chown folke:folke /home/folke/dot/pacman.txt' 12 | -------------------------------------------------------------------------------- /ansible/roles/system/files/howdy.ini: -------------------------------------------------------------------------------- 1 | # Howdy config file 2 | # Press CTRL + X to save in the nano editor 3 | 4 | [core] 5 | # Print that face detection is being attempted 6 | detection_notice = false 7 | 8 | # Print that face detection has timed out 9 | timeout_notice = true 10 | 11 | # Do not print anything when a face verification succeeds 12 | no_confirmation = true 13 | 14 | # When a user without a known face model tries to use this script, don't 15 | # show an error but fail silently 16 | suppress_unknown = false 17 | 18 | # Disable Howdy in remote shells 19 | abort_if_ssh = true 20 | 21 | # Disable Howdy if lid is closed 22 | abort_if_lid_closed = true 23 | 24 | # Disable howdy in the PAM 25 | # The howdy command will still function 26 | disabled = false 27 | 28 | # Use CNN instead of HOG 29 | # CNN model is much more accurate than the HOG based model, but takes much more 30 | # power to run, and is meant to be executed on a GPU to attain reasonable speed. 31 | use_cnn = false 32 | 33 | # Set a workaround to do face and password authentication at the same time 34 | # off user will have to press enter themselves after a Howdy timeout 35 | # input will send an enter keypress to stop the password prompt 36 | # native will stop the prompt at PAM level (can lead to instability!) 37 | workaround = off 38 | 39 | [video] 40 | # The certainty of the detected face belonging to the user of the account 41 | # On a scale from 1 to 10, values above 5 are not recommended 42 | # The lower, the more accurate 43 | certainty = 3.5 44 | 45 | # The number of seconds to search before timing out 46 | timeout = 4 47 | 48 | # The path of the device to capture frames from 49 | # Video devices are usually found in /dev/v4l/by-path/ 50 | device_path = /dev/video2 51 | 52 | # Print a warning if the the video device is not found 53 | warn_no_device = true 54 | 55 | # Scale down the video feed to this maximum height 56 | # Speeds up face recognition but can make it less precise 57 | max_height = 320 58 | 59 | # Set the camera input profile to this width and height 60 | # The largest profile will be used if set to -1 61 | # Automatically ignored if not a valid profile 62 | frame_width = -1 63 | frame_height = -1 64 | 65 | # Because of flashing IR emitters, some frames can be completely unlit 66 | # Skip the frame if the lowest 1/8 of the histogram is above this percentage 67 | # of the total 68 | # The lower this setting is, the more dark frames are ignored 69 | dark_threshold = 60 70 | 71 | # The recorder to use. Can be either opencv (default), ffmpeg or pyv4l2. 72 | # Switching from the default opencv to ffmpeg can help with grayscale issues. 73 | recording_plugin = opencv 74 | 75 | # Video format used by ffmpeg. Options include vfwcap or v4l2. 76 | # FFMPEG only. 77 | device_format = v4l2 78 | 79 | # Force the use of Motion JPEG when decoding frames, fixes issues with YUYV 80 | # raw frame decoding. 81 | # OPENCV only. 82 | force_mjpeg = false 83 | 84 | # Specify exposure value explicitly. This disables autoexposure. 85 | # Use qv4l2 to determine an appropriate value. 86 | # OPENCV only. 87 | exposure = -1 88 | 89 | # Specify frame rate of the capture device. 90 | # Some IR emitters will not function properly at the default framerate. 91 | # Use qv4l2 to determine an appropriate value. 92 | # OPENCV only. 93 | device_fps = -1 94 | 95 | # Rotate captured frames so faces are upright. 96 | # 0 Check landscape orientation only 97 | # 1 Check both landscape and portrait orientation 98 | # 2 Check portrait orientation only 99 | rotate = 0 100 | 101 | [snapshots] 102 | # Capture snapshots of failed login attempts and save them to disk with metadata 103 | # Snapshots are saved to /var/log/howdy/snapshots 104 | save_failed = false 105 | 106 | # Do the same as the option above but for successful attempts 107 | save_successful = false 108 | 109 | [rubberstamps] 110 | # Enable specific extra checks after the user has been recognised 111 | enabled = false 112 | 113 | # What type of stamps to run and with what options. The type, timeout and 114 | # failure mode are required. One line per stamp. Rule syntax: 115 | # stamptype timeout (failsafe | faildeadly) [extra_argument=value] 116 | stamp_rules = 117 | nod 5s failsafe min_distance=12 118 | 119 | [debug] 120 | # Show a short but detailed diagnostic report in console 121 | # Enabling this can cause some UI apps to fail, only enable it to debug 122 | end_report = false 123 | 124 | # More verbose logging from the rubberstamps system 125 | verbose_stamps = false 126 | 127 | # Pass output of the GTK auth window to the terminal 128 | gtk_stdout = false 129 | -------------------------------------------------------------------------------- /ansible/roles/system/files/keyd.conf: -------------------------------------------------------------------------------- 1 | [ids] 2 | * 3 | -1d50:615e # chocofi 4 | 5 | [main] 6 | 7 | # remap capslock to ctrl & escape 8 | capslock = overload(control, esc) 9 | 10 | # remap enter to shift & enter 11 | enter = overload(shift, enter) 12 | 13 | # remap pg up / down keys 14 | pageup = left 15 | pagedown = right 16 | 17 | # swap meta with alt 18 | leftmeta = layer(alt) 19 | leftalt = overload(meta, macro(leftmeta+m)) 20 | rightalt = overload(rmeta, macro(leftmeta+leftalt+enter)) 21 | 22 | # esc to backtick 23 | esc = ` 24 | 25 | leftcontrol = layer(meh) 26 | 27 | [rmeta:M] 28 | # Euro sign 29 | e = macro(compose c =) 30 | 31 | [meh:C-S-A] 32 | 1 = f1 33 | 2 = f2 34 | 3 = f3 35 | 4 = f4 36 | 5 = f5 37 | 6 = f6 38 | 7 = f7 39 | 8 = f8 40 | 9 = f9 41 | 0 = f10 42 | - = f11 43 | = = f12 44 | -------------------------------------------------------------------------------- /ansible/roles/system/files/network-manager/mdns.conf: -------------------------------------------------------------------------------- 1 | [connection] 2 | connection.mdns=1 3 | -------------------------------------------------------------------------------- /ansible/roles/system/files/network-manager/wifi-powersave.conf: -------------------------------------------------------------------------------- 1 | [connection] 2 | wifi.powersave=2 3 | -------------------------------------------------------------------------------- /ansible/roles/system/files/supergfxd.conf: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "Integrated", 3 | "vfio_enable": false, 4 | "vfio_save": false, 5 | "always_reboot": false, 6 | "no_logind": false, 7 | "logout_timeout_s": 180, 8 | "hotplug_type": "Asus" 9 | } 10 | -------------------------------------------------------------------------------- /ansible/roles/system/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: Restart keyd 2 | become: true 3 | ansible.builtin.systemd_service: 4 | name: keyd 5 | state: restarted 6 | 7 | - name: Reload NetworkManager 8 | become: true 9 | ansible.builtin.systemd_service: 10 | name: NetworkManager 11 | state: reloaded 12 | -------------------------------------------------------------------------------- /ansible/roles/system/tasks/howdy.yml: -------------------------------------------------------------------------------- 1 | - name: Howdy Config File 2 | become: true 3 | copy: 4 | dest: /etc/howdy/config.ini 5 | src: "roles/system/files/howdy.ini" 6 | owner: root 7 | group: root 8 | mode: "0744" 9 | 10 | - name: Set list of PAM files for Howdy 11 | ansible.builtin.set_fact: 12 | pam_files: 13 | - sudo 14 | - login 15 | - gdm-password 16 | # - system-local-login 17 | - hyprlock 18 | # - su 19 | 20 | - name: Insert pam_unix line for fallback to password 21 | become: true 22 | ansible.builtin.lineinfile: 23 | path: "/etc/pam.d/{{ item }}" 24 | line: "auth sufficient /lib/security/pam_howdy.so" 25 | insertafter: "^#%PAM-1.0" 26 | state: present 27 | loop: "{{ pam_files }}" 28 | 29 | - name: Create /etc/pam.d/polkit-1 for Howdy 30 | become: true 31 | ansible.builtin.copy: 32 | dest: /etc/pam.d/polkit-1 33 | content: | 34 | #%PAM-1.0 35 | auth sufficient /lib/security/pam_howdy.so 36 | auth include system-auth 37 | password include system-auth 38 | account include system-auth 39 | session include system-auth 40 | owner: root 41 | group: root 42 | mode: "0644" 43 | -------------------------------------------------------------------------------- /ansible/roles/system/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - import_tasks: howdy.yml 2 | 3 | - name: Keyd 4 | become: true 5 | copy: 6 | dest: /etc/keyd/default.conf 7 | src: roles/system/files/keyd.conf 8 | owner: root 9 | group: root 10 | mode: "0644" 11 | 12 | - name: Enable Keyd Daemon 13 | become: true 14 | ansible.builtin.systemd_service: 15 | state: started 16 | enabled: true 17 | name: keyd 18 | notify: Restart keyd 19 | 20 | - name: Deploy NetworkManager configs 21 | become: true 22 | copy: 23 | src: "{{ item }}" 24 | dest: "/etc/NetworkManager/conf.d/{{ item | basename }}" 25 | owner: root 26 | group: root 27 | mode: "0644" 28 | loop: "{{ lookup('fileglob', 'roles/system/files/network-manager/*', wantlist=True) }}" 29 | notify: Reload NetworkManager 30 | 31 | - name: Deploy pacman hooks 32 | become: true 33 | copy: 34 | src: "{{ item }}" 35 | dest: "/etc/pacman.d/hooks/{{ item | basename }}" 36 | owner: root 37 | group: root 38 | mode: "0644" 39 | loop: "{{ lookup('fileglob', 'roles/system/files/hooks/*', wantlist=True) }}" 40 | 41 | - name: Enable Gnome SSH Agent (GCR) 42 | ansible.builtin.systemd_service: 43 | state: started 44 | scope: user 45 | enabled: true 46 | name: gcr-ssh-agent.socket 47 | 48 | - name: Disable sudo systemctl disable NetworkManager-wait-online.service 49 | become: true 50 | ansible.builtin.systemd: 51 | name: NetworkManager-wait-online.service 52 | state: stopped 53 | enabled: no 54 | 55 | - name: /etc/supergfxd.conf 56 | become: true 57 | copy: 58 | dest: /etc/supergfxd.conf 59 | src: roles/system/files/supergfxd.conf 60 | owner: root 61 | group: root 62 | mode: "0644" 63 | -------------------------------------------------------------------------------- /ansible/roles/web/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Create Brave Apps 2 | template: 3 | src: "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/DankMaterialShell/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentThemeName": "blue", 3 | "customThemeFile": "", 4 | "topBarTransparency": 0.84, 5 | "topBarWidgetTransparency": 0.59, 6 | "popupTransparency": 0.92, 7 | "dockTransparency": 1, 8 | "use24HourClock": true, 9 | "useFahrenheit": false, 10 | "nightModeEnabled": false, 11 | "weatherLocation": "40.7128, -74.0060", 12 | "weatherCoordinates": "40.7128,-74.0060", 13 | "useAutoLocation": true, 14 | "weatherEnabled": true, 15 | "showLauncherButton": true, 16 | "showWorkspaceSwitcher": true, 17 | "showFocusedWindow": true, 18 | "showWeather": true, 19 | "showMusic": true, 20 | "showClipboard": true, 21 | "showCpuUsage": true, 22 | "showMemUsage": true, 23 | "showCpuTemp": true, 24 | "showGpuTemp": true, 25 | "selectedGpuIndex": 0, 26 | "enabledGpuPciIds": [], 27 | "showSystemTray": true, 28 | "showClock": true, 29 | "showNotificationButton": true, 30 | "showBattery": true, 31 | "showControlCenterButton": true, 32 | "controlCenterShowNetworkIcon": true, 33 | "controlCenterShowBluetoothIcon": true, 34 | "controlCenterShowAudioIcon": true, 35 | "controlCenterWidgets": [ 36 | { 37 | "id": "volumeSlider", 38 | "enabled": true, 39 | "width": 50 40 | }, 41 | { 42 | "id": "brightnessSlider", 43 | "enabled": true, 44 | "width": 50 45 | }, 46 | { 47 | "id": "wifi", 48 | "enabled": true, 49 | "width": 50 50 | }, 51 | { 52 | "id": "bluetooth", 53 | "enabled": true, 54 | "width": 50 55 | }, 56 | { 57 | "id": "audioOutput", 58 | "enabled": true, 59 | "width": 50 60 | }, 61 | { 62 | "id": "audioInput", 63 | "enabled": true, 64 | "width": 50 65 | }, 66 | { 67 | "id": "nightMode", 68 | "enabled": true, 69 | "width": 50 70 | }, 71 | { 72 | "id": "darkMode", 73 | "enabled": true, 74 | "width": 50 75 | } 76 | ], 77 | "showWorkspaceIndex": false, 78 | "showWorkspacePadding": true, 79 | "showWorkspaceApps": false, 80 | "maxWorkspaceIcons": 3, 81 | "workspacesPerMonitor": true, 82 | "workspaceNameIcons": {}, 83 | "waveProgressEnabled": true, 84 | "clockCompactMode": false, 85 | "focusedWindowCompactMode": false, 86 | "runningAppsCompactMode": true, 87 | "runningAppsCurrentWorkspace": true, 88 | "clockDateFormat": "", 89 | "lockDateFormat": "", 90 | "mediaSize": 1, 91 | "topBarLeftWidgets": [ 92 | { 93 | "id": "launcherButton", 94 | "enabled": true 95 | }, 96 | { 97 | "id": "workspaceSwitcher", 98 | "enabled": true 99 | }, 100 | { 101 | "id": "focusedWindow", 102 | "enabled": true 103 | }, 104 | { 105 | "id": "runningApps", 106 | "enabled": true 107 | } 108 | ], 109 | "topBarCenterWidgets": [ 110 | { 111 | "id": "notificationButton", 112 | "enabled": true 113 | }, 114 | { 115 | "id": "clock", 116 | "enabled": true 117 | }, 118 | { 119 | "id": "weather", 120 | "enabled": true 121 | }, 122 | { 123 | "id": "music", 124 | "enabled": true 125 | } 126 | ], 127 | "topBarRightWidgets": [ 128 | { 129 | "id": "systemTray", 130 | "enabled": true 131 | }, 132 | { 133 | "id": "clipboard", 134 | "enabled": true 135 | }, 136 | { 137 | "id": "cpuUsage", 138 | "enabled": true 139 | }, 140 | { 141 | "id": "battery", 142 | "enabled": true 143 | }, 144 | { 145 | "id": "controlCenterButton", 146 | "enabled": true 147 | } 148 | ], 149 | "appLauncherViewMode": "list", 150 | "spotlightModalViewMode": "list", 151 | "networkPreference": "auto", 152 | "iconTheme": "System Default", 153 | "useOSLogo": false, 154 | "osLogoColorOverride": "#ffffff", 155 | "osLogoBrightness": 0.5, 156 | "osLogoContrast": 1, 157 | "wallpaperDynamicTheming": true, 158 | "fontFamily": "Inter Variable", 159 | "monoFontFamily": "Fira Code", 160 | "fontWeight": 400, 161 | "fontScale": 1.1, 162 | "notepadUseMonospace": true, 163 | "notepadFontFamily": "", 164 | "notepadFontSize": 14, 165 | "notepadShowLineNumbers": false, 166 | "notepadTransparencyOverride": -1, 167 | "notepadLastCustomTransparency": 0.95, 168 | "gtkThemingEnabled": false, 169 | "qtThemingEnabled": false, 170 | "showDock": false, 171 | "dockAutoHide": false, 172 | "cornerRadius": 8, 173 | "notificationOverlayEnabled": true, 174 | "topBarAutoHide": false, 175 | "topBarOpenOnOverview": false, 176 | "topBarVisible": true, 177 | "topBarSpacing": 0, 178 | "topBarBottomGap": 0, 179 | "topBarInnerPadding": 0, 180 | "topBarSquareCorners": true, 181 | "topBarNoBackground": false, 182 | "topBarGothCornersEnabled": false, 183 | "lockScreenShowPowerActions": true, 184 | "hideBrightnessSlider": false, 185 | "widgetBackgroundColor": "sth", 186 | "notificationTimeoutLow": 5000, 187 | "notificationTimeoutNormal": 5000, 188 | "notificationTimeoutCritical": 0, 189 | "screenPreferences": {} 190 | } -------------------------------------------------------------------------------- /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 | [colors] 2 | draw_bold_text_with_bright_colors = true 3 | 4 | [font] 5 | size = 10.0 6 | 7 | [font.bold] 8 | family = "FiraCode Nerd Font" 9 | style = "Bold" 10 | 11 | [font.bold_italic] 12 | family = "Maple Mono NF" 13 | style = "Bold Italic" 14 | 15 | [font.italic] 16 | family = "Maple Mono NF" 17 | style = "Italic" 18 | 19 | [font.normal] 20 | family = "FiraCode Nerd Font" 21 | style = "Regular" 22 | 23 | [window.padding] 24 | x = 5 25 | y = 5 26 | 27 | [general] 28 | live_config_reload = true 29 | import = ["/home/folke/projects/tokyonight.nvim/extras/alacritty/tokyonight_storm.toml"] 30 | -------------------------------------------------------------------------------- /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/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 | function nvim_v -a v --wraps nvim 2 | set dir (command ls -d ~/.local/share/bob/v$v.* | sort -V | tail -1) 3 | echo $dir/bin/nvim 4 | $dir/bin/nvim $argv[2..-1] 5 | end 6 | 7 | alias nvim_10="nvim_v 0.10" 8 | alias nvim_11="nvim_v 0.11" 9 | abbr nvim_stable nvim_11 10 | 11 | function nvim_update 12 | bob install stable 13 | bob use nightly 14 | end 15 | 16 | function repro -a issue 17 | argparse --min-args=1 n 'v/version=?' s/silent -- $argv 18 | or return $status 19 | 20 | set issue $argv[1] 21 | set file ./debug/$issue.lua 22 | 23 | # Fetch the issue if it doesn't exist 24 | if not test -f $file 25 | echo "Fetching issue #$issue" 26 | gh issue view $issue | sed -n '/```[Ll]ua/,/```/p' | sed '1d;$d' >$file 27 | end 28 | 29 | # Use local lazy and plugins 30 | set -x LAZY_PATH ~/projects/lazy.nvim 31 | set -x LAZY_DEV "folke,LazyVim" 32 | 33 | # Format the file 34 | stylua $file 35 | 36 | if [ "$_flag_v" = stable ] 37 | set _flag_v '' 38 | end 39 | 40 | set nvim nvim 41 | if set -q _flag_v 42 | fd --type=d --maxdepth=1 "^v$_flag_v" ~/.local/share/bob 43 | set nvim_dir (fd --type=d --maxdepth=1 "^v$_flag_v" ~/.local/share/bob | sort -V | tail -1) 44 | set nvim (fd --type=x '^nvim$' $nvim_dir -1) 45 | if test -z "$nvim" 46 | echo "Version v$_flag_v not found" 47 | return 1 48 | end 49 | end 50 | 51 | # Run the repro 52 | if set -q _flag_s 53 | $nvim -u $file 54 | else 55 | $nvim -u $file $file 56 | end 57 | end 58 | 59 | # Function to select or use a given Neovim profile 60 | function nvims --wraps nvim 61 | set -l profile $argv[1] 62 | 63 | # Check if the provided profile exists 64 | if test -n "$profile" -a -d ~/.config/nvim-profiles/"$profile" 65 | set args $argv[2..-1] 66 | else 67 | # Use fzf to allow the user to select a profile 68 | set profile (command ls ~/.config/nvim-profiles/ | fzf --prompt=" Neovim Profile: " --height=~50% --layout=reverse --exit-0) 69 | if test -z "$profile" 70 | return 1 71 | end 72 | end 73 | 74 | set -l appname nvim-profiles/$profile 75 | if not test -d ~/.config/"$appname" 76 | echo "Profile $profile does not exist." 77 | echo "Use nvims_install to install a new profile." 78 | return 1 79 | end 80 | 81 | set -x NVIM_APPNAME $appname 82 | nvim $args 83 | end 84 | 85 | function nvims_tmp --description 'switch to the Neovim config in this directory' 86 | [ -L ~/.config/nvim-profiles/tmp ] 87 | and rm ~/.config/nvim-profiles/tmp 88 | ln -s (realpath .) ~/.config/nvim-profiles/tmp 89 | and nvims tmp 90 | end 91 | 92 | # Autocomplete profiles for the nvims function 93 | complete -f -c nvims -a '(command ls ~/.config/nvim-profiles/)' 94 | 95 | # Function to install a new Neovim profile from a given Git URL 96 | function nvims_install -a url -a profile 97 | if test -z "$profile" -o -z "$url" 98 | echo "Usage: nvim_profile_install " 99 | return 1 100 | end 101 | 102 | set -l dest ~/.config/nvim-profiles/$profile 103 | if test -d $dest 104 | echo "Profile $profile already exists" 105 | return 1 106 | end 107 | 108 | git clone $url.git $dest 109 | nvims $profile 110 | end 111 | 112 | function nvims_clean -a profile 113 | if test -z "$profile" 114 | echo "Usage: nvim_clean " 115 | return 1 116 | end 117 | 118 | test -d ~/.local/share/nvim-profiles/$profile 119 | and rm -rf ~/.local/share/nvim-profiles/$profile 120 | 121 | test -d ~/.local/state/nvim-profiles/$profile 122 | and rm -rf ~/.local/state/nvim-profiles/$profile 123 | 124 | test -d ~/.cache/nvim-profiles/$profile 125 | and rm -rf ~/.cache/nvim-profiles/$profile 126 | end 127 | -------------------------------------------------------------------------------- /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 | status is-interactive; or exit 2 | 3 | # the following functions are here instead of in the functions directory 4 | # because they utilize event handlers which autoloading does not support 5 | 6 | # auto run onefetch if inside git repo 7 | # --on-variable is a fish builtin that changes whenever the directory changes 8 | # so this function will run whenever the directory changes 9 | function auto_pwd --on-variable PWD 10 | set -x GUM_FORMAT_THEME dark 11 | 12 | # check if .git/ exists and is a git repo and if onefetch is installed 13 | if test -d .git && git rev-parse --git-dir >/dev/null 2>&1 14 | # readme file 15 | if test -f README.md 16 | awk '/^##/{exit} 1' README.md | string trim \ 17 | | gum format | grep -v 'Image: image' 2>&1 | head -20 18 | end 19 | 20 | # recent commits 21 | echo -e "## Recent Activity\n" | gum format 22 | hub l -10 \ 23 | --since='1 week ago' \ 24 | | devmoji --log --color \ 25 | | sed 's/^/ /' 26 | 27 | # local changes 28 | echo -e "## Status\n" | gum format 29 | hub -c color.ui=always st | sed 's/^/ /' 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /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 | status is-interactive; or exit 2 | 3 | bind -M insert \ch __fzf_tldr 4 | 5 | source ~/projects/tokyonight.nvim/extras/fzf/tokyonight_moon.sh 6 | 7 | set -x FZF_DEFAULT_OPTS "$FZF_DEFAULT_OPTS 8 | --cycle 9 | --layout=reverse 10 | --height 60% 11 | --ansi 12 | --preview-window=right:70% 13 | --bind=ctrl-u:half-page-up,ctrl-d:half-page-down,ctrl-x:jump 14 | --bind=ctrl-f:preview-page-down,ctrl-b:preview-page-up 15 | --bind=ctrl-a:beginning-of-line,ctrl-e:end-of-line 16 | --bind=ctrl-j:down,ctrl-k:up 17 | " 18 | 19 | set fzf_diff_highlighter delta --paging=never --width=20 20 | fzf_configure_bindings \ 21 | --directory=\ct \ 22 | --git_log=\cg \ 23 | --git_status=\cs \ 24 | --history= \ 25 | --processes=\cp \ 26 | --variables= 27 | -------------------------------------------------------------------------------- /config/fish/conf.d/~2.atuin.fish: -------------------------------------------------------------------------------- 1 | status is-interactive; or exit 2 | 3 | atuin init fish --disable-up-arrow | source 4 | -------------------------------------------------------------------------------- /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/n.fish: -------------------------------------------------------------------------------- 1 | function n --wraps "niri msg" 2 | set -l ret (CLICOLOR_FORCE=1 niri msg --json $argv) 3 | set -l code $status 4 | # if output looks like json [{, pretty print it 5 | if string match -qr '^\s*[\[{]' $ret 6 | echo $ret | jq 7 | else 8 | printf '%s\n' $ret 9 | end 10 | return $code 11 | end 12 | -------------------------------------------------------------------------------- /config/fish/functions/pkgdiff.fish: -------------------------------------------------------------------------------- 1 | function pkgdiff -a file 2 | test -f $file; or begin 3 | echo "File not found" 4 | return 1 5 | end 6 | 7 | set pkg (pacman -Qo $file | awk '{print $5}') 8 | test -n "$pkg"; or begin 9 | echo "No owning package" 10 | return 1 11 | end 12 | 13 | # ensure package in cache 14 | sudo pacman -Sw --noconfirm $pkg >/dev/null 15 | 16 | # latest cached pkg archive 17 | set cache (command ls -t /var/cache/pacman/pkg/$pkg-*.pkg.tar.zst | head -1) 18 | set rel (string replace -r '^/' '' -- $file) 19 | echo "Comparing $file with $pkg ($cache)" 20 | 21 | # extract packaged version to a temp file 22 | set pkg_tmp (mktemp /tmp/original.XXX.(basename $file)) 23 | if not bsdtar -xOf "$cache" "$rel" >"$pkg_tmp" 2>/dev/null 24 | echo "Not found in package: $rel" 25 | rm -f "$pkg_tmp" 26 | return 1 27 | end 28 | 29 | SUDO_EDITOR="$(which nvim) -d \"$pkg_tmp\"" sudoedit "$file" 30 | 31 | rm -f "$pkg_tmp" 32 | end 33 | -------------------------------------------------------------------------------- /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 | gtk-toolbar-style = flat 45 | window-padding-y = 2,0 46 | window-padding-balance = true 47 | window-decoration = false 48 | 49 | # Other 50 | copy-on-select = clipboard 51 | shell-integration-features = cursor,sudo,no-title,ssh-env,ssh-terminfo 52 | app-notifications = no-clipboard-copy 53 | -------------------------------------------------------------------------------- /config/gtk-3.0/bookmarks: -------------------------------------------------------------------------------- 1 | file:///home/folke/projects projects 2 | file:///home/folke/Documents 3 | file:///home/folke/Music 4 | file:///home/folke/Pictures 5 | file:///home/folke/Videos 6 | file:///home/folke/Downloads 7 | -------------------------------------------------------------------------------- /config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-icon-theme-name=Adwaita 3 | -------------------------------------------------------------------------------- /config/gtk-4.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-icon-theme-name=Adwaita 3 | -------------------------------------------------------------------------------- /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 50% -d "amdgpu*" # set monitor backlight to minimum, avoid 0 on OLED monitor. 10 | on-resume = brightnessctl -d "amdgpu*" -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 asus::kbd_backlight set 0 # turn off keyboard backlight. 17 | on-resume = brightnessctl -rd asus::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 = ~/.config/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 = ~/.config/wall2.png 2 | wallpaper = ,~/.config/wall2.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,1.5,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 = yes 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 | force_split = 2 # 0 = follow mouse, 1 = left/top, 2 = right/bottom 96 | } 97 | 98 | master { 99 | new_status = "master" 100 | } 101 | 102 | -------------------------------------------------------------------------------- /config/hypr/scripts/bitwarden: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # See: https://github.com/hyprwm/Hyprland/issues/3835#issuecomment-2491114463 4 | 5 | handle_windowtitlev2() { 6 | # Description: emitted when a window title changes. 7 | # Format: `WINDOWADDRESS,WINDOWTITLE` 8 | windowaddress=${1%,*} 9 | windowtitle=${1#*,} 10 | 11 | case $windowtitle in 12 | *"(Bitwarden"*"Password Manager) - Bitwarden"*) 13 | hyprctl --batch \ 14 | "dispatch setfloating address:0x$windowaddress;" \ 15 | "dispatch resizewindowpixel exact 30% 60%,address:0x$windowaddress;" \ 16 | "dispatch centerwindow" 17 | ;; 18 | # specificwindowtitle) commands;; 19 | esac 20 | } 21 | 22 | handle() { 23 | # $1 Format: `EVENT>>DATA` 24 | # example: `workspace>>2` 25 | 26 | event=${1%>>*} 27 | data=${1#*>>} 28 | 29 | case $event in 30 | windowtitlev2) handle_windowtitlev2 "$data" ;; 31 | # anyotherevent) handle_otherevent "$data";; 32 | *) echo "unhandled event: $event" ;; 33 | esac 34 | } 35 | 36 | socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done 37 | -------------------------------------------------------------------------------- /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/8ce0b12ce32aeab0f30ba834c416241bec45b447/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/mimeapps.list: -------------------------------------------------------------------------------- 1 | [Default Applications] 2 | x-scheme-handler/http=zen.desktop 3 | x-scheme-handler/https=zen.desktop 4 | x-scheme-handler/chrome=zen.desktop 5 | text/html=zen.desktop 6 | application/x-extension-htm=zen.desktop 7 | application/x-extension-html=zen.desktop 8 | application/x-extension-shtml=zen.desktop 9 | application/xhtml+xml=zen.desktop 10 | application/x-extension-xhtml=zen.desktop 11 | application/x-extension-xht=zen.desktop 12 | image/png=org.gnome.eog.desktop 13 | inode/directory=org.gnome.Nautilus.desktop 14 | application/pdf=org.gnome.Papers.desktop; 15 | image/jpeg=org.gnome.Loupe.desktop 16 | 17 | [Added Associations] 18 | x-scheme-handler/http=zen.desktop; 19 | x-scheme-handler/https=zen.desktop; 20 | x-scheme-handler/chrome=zen.desktop; 21 | text/html=zen.desktop; 22 | application/x-extension-htm=zen.desktop; 23 | application/x-extension-html=zen.desktop; 24 | application/x-extension-shtml=zen.desktop; 25 | application/xhtml+xml=zen.desktop; 26 | application/x-extension-xhtml=zen.desktop; 27 | application/x-extension-xht=zen.desktop; 28 | image/png=org.gnome.Loupe.desktop;org.gnome.eog.desktop; 29 | application/pdf=org.gnome.Papers.desktop 30 | image/jpeg=org.gnome.Loupe.desktop; 31 | -------------------------------------------------------------------------------- /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/niri/scripts/dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env fish 2 | 3 | set -l class "folke.scratchpad" 4 | 5 | # Toggle workspace "dev" 6 | niri msg action focus-workspace dev 7 | 8 | # Get info about the "dev" workspace and the terminal window 9 | niri msg --json workspaces \ 10 | | jq -r '.[] | select(.name=="dev") | "\(.id) \(.is_focused)"' \ 11 | | read -l dev_id dev_is_focused 12 | niri msg --json windows \ 13 | | jq -r --arg class "$class" --argjson dev_id "$dev_id" \ 14 | '.[] | select(.app_id==$class and .workspace_id==$dev_id) | .id' \ 15 | | read -l t_id 16 | 17 | # If the "dev" workspace is focused and the terminal is not present, spawn it 18 | test "$dev_is_focused" = true 19 | and test -z "$t_id" 20 | and niri msg action spawn -- ghostty --class="$class" --working-directory="$HOME/dot" -e fish 21 | -------------------------------------------------------------------------------- /config/niri/scripts/dynamic-rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env fish 2 | 3 | function watch 4 | niri msg --json event-stream \ 5 | | jq -rc --unbuffered 'select(.WindowOpenedOrChanged) 6 | | .WindowOpenedOrChanged.window 7 | | [.id, .app_id, .title] | @sh' \ 8 | | while read -t -a parts 9 | set -l id $parts[1] 10 | set -l app $parts[2] 11 | set -l title (string join "," $parts[3..-1]) 12 | 13 | set -l key "$app:$title" 14 | set -l filters 15 | 16 | set -a filters "zen:Sign in.*" 17 | set -a filters "zen:Extension:.*" 18 | 19 | set -l matches false 20 | for filter in $filters 21 | if string match -rq -- "$filter" "$key" 22 | set matches true 23 | break 24 | end 25 | end 26 | 27 | set -l icon (test "$matches" = true; and echo "✅"; or echo "❌") 28 | echo "$icon [$app:$id] $title " 29 | 30 | if test "$matches" = false 31 | continue 32 | end 33 | niri msg action move-window-to-floating --id $id 34 | niri msg action set-window-width "30%" --id $id 35 | niri msg action set-window-height "60%" --id $id 36 | niri msg action center-window --id $id 37 | 38 | end 39 | end 40 | 41 | watch 42 | -------------------------------------------------------------------------------- /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/8ce0b12ce32aeab0f30ba834c416241bec45b447/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/8ce0b12ce32aeab0f30ba834c416241bec45b447/config/wall.png -------------------------------------------------------------------------------- /config/wall2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/8ce0b12ce32aeab0f30ba834c416241bec45b447/config/wall2.png -------------------------------------------------------------------------------- /config/wall3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/8ce0b12ce32aeab0f30ba834c416241bec45b447/config/wall3.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 | -------------------------------------------------------------------------------- /config/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf: -------------------------------------------------------------------------------- 1 | monitor.alsa.rules = [ 2 | { 3 | matches = [ 4 | { 5 | device.name = "alsa_card.pci-0000_65_00.6" 6 | } 7 | ] 8 | actions = { 9 | update-props = { 10 | # Do not use the hardware mixer for volume control. It 11 | # will only use software volume. The mixer is still used 12 | # to mute unused paths based on the selected port. 13 | api.alsa.soft-mixer = true 14 | } 15 | } 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | set shell := ["bash", "-cu"] 2 | 3 | 4 | ansible tags='': 5 | #!/bin/env bash 6 | set -euo pipefail 7 | cd "./ansible" 8 | if [ -n "{{tags}}" ]; then 9 | ansible-playbook --ask-become-pass playbook.yml --tags "{{tags}}" 10 | else 11 | ansible-playbook --ask-become-pass playbook.yml 12 | fi 13 | 14 | packages: (ansible "packages") 15 | dot: (ansible "dot") 16 | system: (ansible "system") 17 | web: (ansible "web") 18 | 19 | 20 | -------------------------------------------------------------------------------- /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/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 = function(_, ...) 19 | dd(...) 20 | end 21 | 22 | if vim.env.PROF then 23 | vim.opt.rtp:append("/home/folke/projects/snacks.nvim/") 24 | require("snacks.profiler").startup({ 25 | startup = { 26 | -- event = "UIEnter", 27 | -- event = "VeryLazy", 28 | }, 29 | runtime = "~/projects/neovim/runtime", 30 | }) 31 | end 32 | 33 | pcall(require, "config.env") 34 | 35 | require("config.lazy").load({ 36 | -- debug = false, 37 | profiling = { 38 | loader = false, 39 | require = true, 40 | }, 41 | }) 42 | 43 | vim.api.nvim_create_autocmd("User", { 44 | pattern = "VeryLazy", 45 | callback = function() 46 | require("util").version() 47 | end, 48 | }) 49 | -------------------------------------------------------------------------------- /nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "SchemaStore.nvim": { "branch": "main", "commit": "68938d9751f0a0c2d1059d8fc077f50c5bbf3f91" }, 3 | "blink.cmp": { "branch": "main", "commit": "0590187042b60456edef3808cfa3a4f34b2e4027" }, 4 | "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, 5 | "catppuccin": { "branch": "main", "commit": "f19cab18ec4dc86d415512c7a572863b2adbcc18" }, 6 | "codecompanion.nvim": { "branch": "main", "commit": "6d26211b18ccbf35a7c9925f77878dcd22fe2cb9" }, 7 | "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, 8 | "copilot.lua": { "branch": "master", "commit": "304fc5f2dadb5067ed26c60fa69fb7ba8a57eaf3" }, 9 | "dial.nvim": { "branch": "master", "commit": "f0404ec1f83a03f2c3457e60087c6331d1cbb83f" }, 10 | "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 11 | "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, 12 | "grug-far.nvim": { "branch": "main", "commit": "50d9ee2b5a19634670441948e7e4afaa042f1059" }, 13 | "inc-rename.nvim": { "branch": "main", "commit": "8ae25b35ae16ca4bd5de3d3c472eec3b574018d4" }, 14 | "log-highlight.nvim": { "branch": "main", "commit": "cac07cf2d1937038f6627a450bef4664f096b120" }, 15 | "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, 16 | "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, 17 | "mason-lspconfig.nvim": { "branch": "main", "commit": "a1067cf84b4ff81b66d2bf4d01f4cbdb5de40bd0" }, 18 | "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, 19 | "mini.ai": { "branch": "main", "commit": "dcd346a3eda9121e917950680e5eb59f59f78aae" }, 20 | "mini.align": { "branch": "main", "commit": "ab6777ca0fdfe8e4cfe931e3b0b5d98c719c3c1d" }, 21 | "mini.diff": { "branch": "main", "commit": "7077b636d642fcd5cd48554e187a251883239660" }, 22 | "mini.hipatterns": { "branch": "main", "commit": "96d07d32a0db0d8d8a10c83a964ec557cca005e7" }, 23 | "mini.icons": { "branch": "main", "commit": "f9a177c11daa7829389b7b6eaaec8b8a5c47052d" }, 24 | "mini.pairs": { "branch": "main", "commit": "3738ea30ff33e0cbf2983dc67319a5468d25b0a9" }, 25 | "mini.surround": { "branch": "main", "commit": "4b92d30fb5e021cced6cbb68698c73018211fbfa" }, 26 | "mini.test": { "branch": "main", "commit": "75ca9600a9c3ad6317f72ecee39cbaad17a6295d" }, 27 | "minuet-ai.nvim": { "branch": "main", "commit": "b28e16914cb35ffb9b23c4002a48ca4bca86b752" }, 28 | "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, 29 | "nvim-lint": { "branch": "master", "commit": "335a6044be16d7701001059cba9baa36fbeef422" }, 30 | "nvim-lspconfig": { "branch": "master", "commit": "b3cce1419ca67871ae782b3e529652f8a016f0de" }, 31 | "nvim-treesitter": { "branch": "main", "commit": "5a70b1eb8cbdf6c7f0a59dfb7356ad198421b620" }, 32 | "nvim-treesitter-textobjects": { "branch": "main", "commit": "1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931" }, 33 | "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, 34 | "octo.nvim": { "branch": "master", "commit": "76c2a426c0d3d9d1cc340f2989ed9f607b33c7a8" }, 35 | "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, 36 | "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, 37 | "render-markdown.nvim": { "branch": "main", "commit": "9ab9dade85d8c7d411cc89b592028da3d1b7955a" }, 38 | "treesj": { "branch": "main", "commit": "4770492244ccecdc9b01e0e81fa8f2f6b4a23841" }, 39 | "venv-selector.nvim": { "branch": "main", "commit": "2b49d1f8b8fcf5cfbd0913136f48f118225cca5d" }, 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.php", 13 | "lazyvim.plugins.extras.lang.python", 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 | "lazyvim.plugins.extras.util.octo" 20 | ], 21 | "install_version": 8, 22 | "news": { 23 | "NEWS.md": "11866", 24 | "doc/news.txt": "15552" 25 | }, 26 | "version": 8 27 | } -------------------------------------------------------------------------------- /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" }, 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 | "pwntester/octo.nvim", 12 | opts = { 13 | use_local_fs = true, 14 | }, 15 | }, 16 | { 17 | "zbirenbaum/copilot.lua", 18 | optional = true, 19 | opts = { 20 | filetypes = { ["*"] = true }, 21 | }, 22 | }, 23 | 24 | { 25 | "nvim-mini/mini.align", 26 | opts = {}, 27 | keys = { 28 | { "ga", mode = { "n", "v" } }, 29 | { "gA", mode = { "n", "v" } }, 30 | }, 31 | }, 32 | 33 | { 34 | "smjonas/inc-rename.nvim", 35 | cmd = "IncRename", 36 | config = true, 37 | }, 38 | 39 | { 40 | "Wansmer/treesj", 41 | keys = { 42 | { "J", "TSJToggle", desc = "Join Toggle" }, 43 | }, 44 | opts = { use_default_keymaps = false, max_join_length = 150 }, 45 | }, 46 | 47 | { "nvim-mini/mini.test", cond = vim.fn.isdirectory("tests") == 1 }, 48 | 49 | { 50 | "folke/lazydev.nvim", 51 | opts = function(_, opts) 52 | opts.debug = true 53 | opts.runtime = "~/projects/neovim/runtime" 54 | vim.list_extend(opts.library, { 55 | -- { path = "wezterm-types", mods = { "wezterm" } }, 56 | { path = "${3rd}/luassert/library", words = { "assert" } }, 57 | { path = "${3rd}/busted/library", words = { "describe" } }, 58 | }) 59 | end, 60 | }, 61 | 62 | { "markdown-preview.nvim", enabled = false }, 63 | 64 | { 65 | "toppair/peek.nvim", 66 | build = "deno task --quiet build:fast", 67 | opts = { 68 | theme = "light", 69 | }, 70 | keys = { 71 | { 72 | "cp", 73 | function() 74 | require("peek").open() 75 | end, 76 | }, 77 | }, 78 | }, 79 | } 80 | -------------------------------------------------------------------------------- /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/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 = { 6 | ensure_installed = { 7 | "caddy", 8 | "cmake", 9 | -- "comment", -- comments are slowing down TS bigtime, so disable for now 10 | "css", 11 | "devicetree", 12 | "gitcommit", 13 | "gitignore", 14 | "glsl", 15 | "go", 16 | "graphql", 17 | "http", 18 | "just", 19 | "kconfig", 20 | "meson", 21 | "ninja", 22 | "nix", 23 | -- "org", 24 | "php", 25 | "scss", 26 | "sql", 27 | "svelte", 28 | "vue", 29 | "wgsl", 30 | }, 31 | }, 32 | }, 33 | } 34 | -------------------------------------------------------------------------------- /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/8ce0b12ce32aeab0f30ba834c416241bec45b447/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/8ce0b12ce32aeab0f30ba834c416241bec45b447/nvim/spell/nl.utf-8.add.spl -------------------------------------------------------------------------------- /nvim/spell/nl.utf-8.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/8ce0b12ce32aeab0f30ba834c416241bec45b447/nvim/spell/nl.utf-8.spl -------------------------------------------------------------------------------- /nvim/spell/nl.utf-8.sug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folke/dot/8ce0b12ce32aeab0f30ba834c416241bec45b447/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 | -------------------------------------------------------------------------------- /stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 2 3 | column_width = 120 --------------------------------------------------------------------------------