├── .gitignore ├── editors ├── nvim │ ├── lua │ │ ├── lua │ │ └── configs │ │ │ ├── diagnostics.lua │ │ │ ├── options.lua │ │ │ ├── highlighting.lua │ │ │ ├── formatting.lua │ │ │ ├── completion.lua │ │ │ ├── theming.lua │ │ │ ├── keymaps.lua │ │ │ ├── languages.lua │ │ │ └── plugins.lua │ ├── colors │ │ ├── colors │ │ ├── sobrio.vim │ │ ├── sobrio_ghost.vim │ │ ├── sobrio_light.vim │ │ ├── sobrio_verde.vim │ │ └── sobrio_verde_light.vim │ ├── init.lua │ ├── backup │ │ └── netrw.vim │ ├── coc-settings.json │ ├── init.vim │ └── init.lua.old ├── helix │ ├── languages.toml │ └── config.toml └── vim │ └── .vimrc ├── bin ├── fix_display ├── history ├── wayleds ├── encoder └── themetool ├── others ├── vivaldi │ └── ui-font.css ├── resolve │ ├── DV_Resolve.png │ └── davinci-resolve.desktop └── node │ └── global-packages.sh ├── git └── .gitconfig ├── screenshot.png ├── system ├── .hidden └── nixos │ └── configuration.nix ├── terminal ├── yazi │ └── yazi.toml ├── bash │ ├── .bashrc │ └── .profile ├── ghostty │ └── config ├── xterm-256color-italic.terminfo ├── fish │ └── config.fish ├── alacritty │ ├── alacritty-linux.toml │ ├── alacritty-macOS.yml │ └── alacritty.info ├── tmux │ └── .tmux.conf ├── kitty │ ├── kitty-linux.conf │ └── kitty-macOS.conf ├── nushell │ ├── env.nu │ └── config.nu ├── wezterm │ ├── wezterm-macos.lua │ └── wezterm-linux.lua └── zellij │ └── config.kdl ├── wms ├── sway │ ├── sway │ │ ├── wallpaper.sh │ │ └── config │ └── waybar │ │ ├── style.css │ │ └── config └── i3 │ ├── i3status.conf │ └── config ├── readme.md ├── workspace.kdl └── configure.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | .*.swp 4 | nvim/colors/colors 5 | -------------------------------------------------------------------------------- /editors/nvim/lua/lua: -------------------------------------------------------------------------------- 1 | /home/elvessousa/.dotfiles/editors/nvim/lua/ -------------------------------------------------------------------------------- /editors/nvim/colors/colors: -------------------------------------------------------------------------------- 1 | /home/elvessousa/.dotfiles/editors/nvim/colors/ -------------------------------------------------------------------------------- /bin/fix_display: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | /usr/bin/xrandr -d :0 --output eDP --crtc 1 3 | -------------------------------------------------------------------------------- /others/vivaldi/ui-font.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: 'Fira Sans' !important; 3 | } 4 | -------------------------------------------------------------------------------- /editors/nvim/colors/sobrio.vim: -------------------------------------------------------------------------------- 1 | /home/elvessousa/Documentos/Temas/sobrio/colors/sobrio.vim -------------------------------------------------------------------------------- /git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Elves Sousa 3 | email = elves.sousa@gmail.com 4 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elvessousa/.dotfiles/HEAD/screenshot.png -------------------------------------------------------------------------------- /system/.hidden: -------------------------------------------------------------------------------- 1 | Android 2 | intelephense 3 | go 4 | combined.log 5 | error.log 6 | info.log 7 | -------------------------------------------------------------------------------- /editors/nvim/colors/sobrio_ghost.vim: -------------------------------------------------------------------------------- 1 | /home/elvessousa/Documentos/Temas/sobrio/colors/sobrio_ghost.vim -------------------------------------------------------------------------------- /editors/nvim/colors/sobrio_light.vim: -------------------------------------------------------------------------------- 1 | /home/elvessousa/Documentos/Temas/sobrio/colors/sobrio_light.vim -------------------------------------------------------------------------------- /editors/nvim/colors/sobrio_verde.vim: -------------------------------------------------------------------------------- 1 | /home/elvessousa/Documentos/Temas/sobrio/colors/sobrio_verde.vim -------------------------------------------------------------------------------- /bin/history: -------------------------------------------------------------------------------- 1 | npm set prefix ~/.npm-global 2 | touch ~/.profile 3 | export PATH=$HOME/.npm-global/bin:$PATH 4 | -------------------------------------------------------------------------------- /editors/nvim/colors/sobrio_verde_light.vim: -------------------------------------------------------------------------------- 1 | /home/elvessousa/Documentos/Temas/sobrio/colors/sobrio_verde_light.vim -------------------------------------------------------------------------------- /others/resolve/DV_Resolve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elvessousa/.dotfiles/HEAD/others/resolve/DV_Resolve.png -------------------------------------------------------------------------------- /terminal/yazi/yazi.toml: -------------------------------------------------------------------------------- 1 | [opener] 2 | edit = [{ run='hx "$@"', desc="$EDITOR", block=true }] 3 | 4 | [mgr] 5 | show_hidden = true 6 | -------------------------------------------------------------------------------- /bin/wayleds: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | keyboard_file="$(find /sys/class/leds -name '*scrolllock')/brightness" 4 | echo "Turning on leds on " 5 | echo '1' > $keyboard_file 6 | -------------------------------------------------------------------------------- /bin/encoder: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Encoder for Davinci Resolve 3 | 4 | for i in *.mp4 5 | do 6 | ffmpeg -i "$i" -c:v prores -profile:v 1 -c:a pcm_s24le -f mov "${i%.*}-transcoded.mov" 7 | done 8 | -------------------------------------------------------------------------------- /terminal/bash/.bashrc: -------------------------------------------------------------------------------- 1 | eval "$(starship init bash)" 2 | 3 | export ANDROID_HOME="$HOME/Android/Sdk" 4 | export ANDROID_SDK_ROOT="$ANDROID_HOME" 5 | 6 | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" 7 | . "$HOME/.cargo/env" 8 | -------------------------------------------------------------------------------- /others/node/global-packages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Installing Node libraries for development"; 4 | npm install -g @astrojs/language-server bash-language-server emmet-ls intelephense pnpm prettier prettier-plugin-astro typescript typescript-language-server vscode-langservers-extracted 5 | -------------------------------------------------------------------------------- /editors/nvim/init.lua: -------------------------------------------------------------------------------- 1 | require("configs.options") 2 | require("configs.plugins") 3 | require("configs.highlighting") 4 | require("configs.theming") 5 | require("configs.completion") 6 | require("configs.diagnostics") 7 | require("configs.languages") 8 | require("configs.formatting") 9 | require("configs.keymaps") 10 | -------------------------------------------------------------------------------- /others/resolve/davinci-resolve.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=DaVinci Resolve 3 | GenericName=DaVinci Resolve 4 | Exec=davinci-resolve %u 5 | Type=Application 6 | Terminal=false 7 | Icon=/home/elvessousa/.dotfiles/others/resolve/DV_Resolve.png 8 | StartupNotify=true 9 | StartupWMClass=resolve 10 | MimeType=application/x-resolveproj; 11 | -------------------------------------------------------------------------------- /wms/sway/sway/wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Gets GNOME's desktop background 4 | picture_uri="$(dconf read /org/gnome/desktop/background/picture-uri)" 5 | url_to_path=${picture_uri//file:\/\//} 6 | wallpaper=${url_to_path//%20/\\ } 7 | 8 | # echo $wallpaper 9 | # Changes Sway desktop background 10 | swaymsg output $1 bg $wallpaper fill 11 | -------------------------------------------------------------------------------- /terminal/ghostty/config: -------------------------------------------------------------------------------- 1 | # ========================== 2 | # Ghostty config 3 | # ========================== 4 | background = 121212 5 | background-opacity = 0.95 6 | command = /opt/homebrew/bin/fish 7 | font-family = FiraCode Nerd Font Propo 8 | font-size = 15 9 | link-url = true 10 | shell-integration = detect 11 | theme = Sobrio 12 | window-padding-x = 10 13 | -------------------------------------------------------------------------------- /terminal/bash/.profile: -------------------------------------------------------------------------------- 1 | export ANDROID_HOME=$HOME/Library/Android/sdk 2 | PATH=$HOME/.npm-global/bin:$PATH 3 | PATH=/opt/homebrew/bin:$PATH 4 | PATH=/opt/homebrew/sbin:$PATH 5 | PATH=/opt/homebrew/opt/node@22/bin:$PATH 6 | PATH=/nix/var/nix/profiles/default/bin:$PATH 7 | PATH=$PATH:$ANDROID_HOME/emulator 8 | PATH=$PATH:$ANDROID_HOME/platform-tools 9 | . "$HOME/.cargo/env" 10 | -------------------------------------------------------------------------------- /terminal/xterm-256color-italic.terminfo: -------------------------------------------------------------------------------- 1 | # A xterm-256color based TERMINFO that adds the escape sequences for italic. 2 | # 3 | # Install: 4 | # 5 | # tic xterm-256color-italic.terminfo 6 | # 7 | # Usage: 8 | # 9 | # export TERM=xterm-256color-italic 10 | # 11 | xterm-256color-italic|xterm with 256 colors and italic, 12 | sitm=\E[3m, ritm=\E[23m, 13 | use=xterm-256color, 14 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | ![Screenshot](screenshot.png) 4 | 5 | This repo is where I keep my dotfiles to set up my system the way I like it. 6 | 7 | Configs available for the following programs: 8 | 9 | - Alacritty 10 | - Bash 11 | - Fish Shell 12 | - Git 13 | - Helix 14 | - i3 15 | - Kitty 16 | - NeoVim 17 | - Nu Shell 18 | - Sway 19 | - Tmux 20 | - Vim 21 | - Waybar 22 | - Wezterm 23 | - Zellij 24 | 25 | ## How to use 26 | 27 | - Clone this repo 28 | - Run `sh ./configure.sh` and select an option 29 | - ??? 30 | - Profit! 31 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/diagnostics.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Floating diagnostics message 3 | --------------------------------- 4 | vim.diagnostic.config({ 5 | float = { source = "always", border = border }, 6 | virtual_text = false, 7 | signs = true, 8 | }) 9 | 10 | local util = require("vim.lsp.util") 11 | 12 | local formatting_callback = function(client, bufnr) 13 | vim.keymap.set("n", "f", function() 14 | local params = util.make_formatting_params({}) 15 | client.request("textDocument/formatting", params, nil, bufnr) 16 | end, { buffer = bufnr }) 17 | end 18 | -------------------------------------------------------------------------------- /editors/nvim/backup/netrw.vim: -------------------------------------------------------------------------------- 1 | " File browser 2 | let g:netrw_banner = 0 3 | let g:netrw_liststyle = 0 4 | let g:netrw_browse_split = 4 5 | let g:netrw_altv = 1 6 | let g:netrw_winsize = 25 7 | let g:netrw_keepdir = 0 8 | let g:netrw_localcopydircmd = 'cp -r' 9 | 10 | " Create file without opening buffer 11 | function! CreateInPreview() 12 | let l:filename = input('please enter filename: ') 13 | execute 'silent !touch ' . b:netrw_curdir.'/'.l:filename 14 | redraw! 15 | endfunction 16 | 17 | " Netrw: create file using touch instead of opening a buf 18 | augroup auto_commands 19 | autocmd filetype netrw call Netrw_mappings() 20 | augroup END 21 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/options.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Options 3 | --------------------------------- 4 | local set = vim.opt 5 | 6 | set.background = "dark" 7 | set.clipboard = "unnamedplus" 8 | set.completeopt = "noinsert,menuone,noselect" 9 | set.cursorline = true 10 | set.expandtab = true 11 | set.foldexpr = "nvim_treesitter#foldexpr()" 12 | set.foldmethod = "manual" 13 | set.hidden = true 14 | set.inccommand = "split" 15 | set.mouse = "a" 16 | set.number = true 17 | set.relativenumber = true 18 | set.shiftwidth = 2 19 | set.smarttab = true 20 | set.splitbelow = true 21 | set.splitright = true 22 | set.swapfile = false 23 | set.tabstop = 2 24 | set.termguicolors = true 25 | set.title = true 26 | set.ttimeoutlen = 0 27 | set.updatetime = 250 28 | set.wildmenu = true 29 | set.wrap = true 30 | -------------------------------------------------------------------------------- /workspace.kdl: -------------------------------------------------------------------------------- 1 | layout { 2 | tab name="Dotfiles" split_direction="horizontal" focus=true { 3 | pane size="80%" name="Editor" command="hx" { args "."; focus true; } 4 | pane size="20%" name="Console" 5 | pane size=1 borderless=true { plugin location="zellij:compact-bar"; } 6 | } 7 | tab name="Files" { 8 | pane name="Yazi" command="yazi" start_suspended=true 9 | pane size=1 borderless=true { plugin location="zellij:compact-bar"; } 10 | } 11 | tab name="Git" { 12 | pane name="Git" command="lazygit" start_suspended=true 13 | pane size=1 borderless=true { plugin location="zellij:compact-bar"; } 14 | } 15 | tab name="Tests" { 16 | pane name="Tests" 17 | pane size=1 borderless=true { plugin location="zellij:compact-bar"; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/highlighting.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Syntax highlighting 3 | --------------------------------- 4 | require("nvim-treesitter.configs").setup({ 5 | ensure_installed = { 6 | "bash", 7 | "c", 8 | "cpp", 9 | "css", 10 | "elixir", 11 | "fish", 12 | "graphql", 13 | "html", 14 | "javascript", 15 | "json", 16 | "lua", 17 | "markdown", 18 | "markdown_inline", 19 | "php", 20 | "python", 21 | "regex", 22 | "ruby", 23 | "rust", 24 | "scss", 25 | "sql", 26 | "toml", 27 | "tsx", 28 | "typescript", 29 | "vim", 30 | "yaml", 31 | }, 32 | highlight = { enable = true }, 33 | indent = { enable = true }, 34 | autotag = { 35 | enable = true, 36 | filetypes = { 37 | "html", 38 | "javascript", 39 | "javascriptreact", 40 | "rust", 41 | "svelte", 42 | "typescript", 43 | "typescriptreact", 44 | "vue", 45 | "xml", 46 | }, 47 | }, 48 | }) 49 | -------------------------------------------------------------------------------- /terminal/fish/config.fish: -------------------------------------------------------------------------------- 1 | # Environment variables 2 | export ANDROID_HOME=$HOME/Library/Android/sdk 3 | set PATH $PATH $HOME/.cargo/bin 4 | set PATH $PATH /usr/local/mysql/bin 5 | set PATH $PATH /usr/local/bin 6 | set PATH $PATH $HOME/Applications/bin 7 | set PATH $PATH $HOME/.local/bin 8 | set PATH $PATH $HOME/.npm-global/bin 9 | set PATH $PATH $HOME/.local/share/gem/ruby/3.0.0/bin 10 | set PATH $PATH $HOME/Android/Sdk 11 | set PATH $PATH /opt/homebrew/bin 12 | set PATH $PATH $ANDROID_HOME/emulator 13 | set PATH $PATH $ANDROID_HOME/platform-tools 14 | export PATH 15 | 16 | # Aliases 17 | alias cat='bat' 18 | alias l='eza --icons --group-directories-first' 19 | alias ls='eza --icons --group-directories-first' 20 | alias ll='eza -lah --icons --group-directories-first' 21 | alias lt='eza --tree --level=2 --icons' 22 | alias update='sudo pacman -Syu' 23 | alias n='nvim .' 24 | alias v='vim .' 25 | 26 | # Starship 27 | starship init fish | source 28 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/formatting.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Formatting 3 | --------------------------------- 4 | local diagnostics = require("null-ls").builtins.diagnostics 5 | local formatting = require("null-ls").builtins.formatting 6 | local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) 7 | 8 | require("null-ls").setup({ 9 | sources = { 10 | formatting.black, 11 | formatting.phpcsfixer, 12 | formatting.prettier, 13 | formatting.rustfmt, 14 | formatting.stylua, 15 | }, 16 | on_attach = function(client, bufnr) 17 | if client.name == "tsserver" or client.name == "rust_analyzer" or client.name == "pyright" then 18 | client.resolved_capabilities.document_formatting = false 19 | end 20 | 21 | if client.supports_method("textDocument/formatting") then 22 | vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) 23 | vim.api.nvim_create_autocmd("BufWritePre", { 24 | group = augroup, 25 | buffer = bufnr, 26 | callback = function() 27 | vim.lsp.buf.format() 28 | end, 29 | }) 30 | end 31 | end, 32 | }) 33 | -------------------------------------------------------------------------------- /editors/nvim/coc-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "coc.preferences.formatOnSaveFiletypes": [ 3 | "css", 4 | "html", 5 | "javascript", 6 | "javascriptreact", 7 | "json", 8 | "jsonc", 9 | "markdown", 10 | "php", 11 | "prisma", 12 | "python", 13 | "rust", 14 | "sass", 15 | "scss", 16 | "typescript", 17 | "typescriptreact", 18 | "xml" 19 | ], 20 | "python.formatting.provider": "black", 21 | "python.formatting.blackPath": "~/.local/bin/black", 22 | "coc.preferences.formatOnType": true, 23 | "prettier.singleQuote": true, 24 | "javascript.autoClosingTags": true, 25 | "typescript.autoClosingTags": true, 26 | "emmet.includeLanguages": { 27 | "html": "html", 28 | "rust": "html", 29 | "javascript": "javascriptreact", 30 | "typescript": "typescriptreact" 31 | }, 32 | "elixirLS.dialyzerEnabled": false, 33 | "codeLens.enable": false, 34 | "intelephense.environment.documentRoot": "/srv/http/wordpress", 35 | "intelephense.environment.includePaths": ["/srv/http/wordpress/wp-includes"], 36 | "intelephense.files.associations": ["*.php", "*.phtml", "*.module", "*.inc"] 37 | } 38 | -------------------------------------------------------------------------------- /terminal/alacritty/alacritty-linux.toml: -------------------------------------------------------------------------------- 1 | [general] 2 | live_config_reload = true 3 | 4 | [colors.normal] 5 | black = "#3a3b3f" 6 | blue = "#87afd7" 7 | cyan = "#78DCE8" 8 | green = "#2ec27e" 9 | magenta = "#d7d7ff" 10 | red = "#fd6389" 11 | white = "#eeeeee" 12 | yellow = "#d7af87" 13 | 14 | [colors.primary] 15 | background = "#121212" 16 | foreground = "#eeeeee" 17 | 18 | [cursor.style] 19 | blinking = "On" 20 | shape = "Block" 21 | 22 | [env] 23 | TERM = "xterm-256color" 24 | 25 | [font] 26 | size = 12 27 | 28 | [font.bold] 29 | family = "FiraCode Nerd Font" 30 | style = "Bold" 31 | 32 | [font.glyph_offset] 33 | x = 0 34 | y = 0 35 | 36 | [font.italic] 37 | family = "FiraCode Nerd Font" 38 | style = "Italic" 39 | 40 | [font.normal] 41 | family = "FiraCode Nerd Font" 42 | style = "Medium" 43 | 44 | [font.offset] 45 | x = 0 46 | y = 0 47 | 48 | [selection] 49 | save_to_clipboard = true 50 | semantic_escape_chars = ",│`|:\"' ()[]{}<>" 51 | 52 | [terminal] 53 | shell = "fish" 54 | 55 | [window] 56 | dynamic_padding = false 57 | dynamic_title = false 58 | opacity = 0.99 59 | decorations = "Full" 60 | blur = true 61 | title = "Terminal" 62 | 63 | [window.padding] 64 | x = 3 65 | y = 0 66 | -------------------------------------------------------------------------------- /editors/helix/languages.toml: -------------------------------------------------------------------------------- 1 | [language-server.astro-ls] 2 | command = "astro-ls" 3 | args = ["--stdio"] 4 | config = {typescript = { tsdk = "/home/elvessousa/.npm-global/lib/node_modules/typescript/lib" }, environment = "node"} 5 | 6 | [[language]] 7 | name = "astro" 8 | auto-format = true 9 | language-servers = [ "astro-ls" ] 10 | 11 | [[language]] 12 | name = "go" 13 | auto-format = true 14 | formatter = { command = "goimports-reviser" } 15 | 16 | [[language]] 17 | name = "html" 18 | formatter = { command = 'prettier', args = ["--parser", "html"] } 19 | file-types = ["html", "tpl", "svg"] 20 | auto-format = true 21 | 22 | [[language]] 23 | name = "typescript" 24 | auto-format = true 25 | formatter = { command = 'prettier', args = ["--parser", "typescript"] } 26 | 27 | [[language]] 28 | name = "javascript" 29 | auto-format = true 30 | 31 | [[language]] 32 | name = "tsx" 33 | auto-format = true 34 | formatter = { command = 'prettier', args = ["--parser", "typescript"] } 35 | 36 | [[language]] 37 | name = "jsx" 38 | auto-format = true 39 | 40 | [[language]] 41 | name = "php" 42 | auto-format = true 43 | 44 | [[language]] 45 | name = "python" 46 | formatter = { command = "black", args = ["--quiet", "-"] } 47 | auto-format = true 48 | -------------------------------------------------------------------------------- /wms/i3/i3status.conf: -------------------------------------------------------------------------------- 1 | # i3status configuration file. 2 | # see "man i3status" for documentation. 3 | 4 | # It is important that this file is edited as UTF-8. 5 | # The following line should contain a sharp s: 6 | # ß 7 | # If the above line is not correctly displayed, fix your editor first! 8 | 9 | general { 10 | colors = true 11 | interval = 5 12 | } 13 | 14 | # order += "ipv6" 15 | # order += "wireless _first_" 16 | # order += "ethernet _first_" 17 | # order += "battery all" 18 | order += "disk /" 19 | order += "load" 20 | order += "memory" 21 | order += "tztime local" 22 | 23 | wireless _first_ { 24 | format_up = "W: (%quality at %essid) %ip" 25 | format_down = "W: down" 26 | } 27 | 28 | ethernet _first_ { 29 | format_up = "E: %ip (%speed)" 30 | format_down = "E: down" 31 | } 32 | 33 | battery all { 34 | format = "%status %percentage %remaining" 35 | } 36 | 37 | disk "/" { 38 | format = "%avail" 39 | } 40 | 41 | load { 42 | format = "%1min" 43 | } 44 | 45 | memory { 46 | format = "%used | %available" 47 | threshold_degraded = "1G" 48 | format_degraded = "MEMORY < %available" 49 | } 50 | 51 | tztime local { 52 | format = "%Y-%m-%d %H:%M:%S" 53 | } 54 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/completion.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Completion 3 | --------------------------------- 4 | local cmp = require("cmp") 5 | 6 | cmp.setup({ 7 | snippet = { 8 | expand = function(args) 9 | require("luasnip").lsp_expand(args.body) 10 | end, 11 | }, 12 | mapping = cmp.mapping.preset.insert({ 13 | [""] = cmp.mapping.scroll_docs(-4), 14 | [""] = cmp.mapping.scroll_docs(4), 15 | [""] = cmp.mapping.complete(), 16 | [""] = cmp.mapping.abort(), 17 | [""] = cmp.mapping.confirm({ select = true }), 18 | }), 19 | sources = cmp.config.sources({ 20 | { name = "nvim_lsp" }, 21 | { name = "luasnip" }, 22 | { name = "buffer" }, 23 | { name = "path" }, 24 | }), 25 | }) 26 | 27 | -- Set configuration for specific filetype 28 | cmp.setup.filetype("gitcommit", { 29 | sources = cmp.config.sources({ 30 | { name = "cmp_git" }, 31 | }, { 32 | { name = "buffer" }, 33 | }), 34 | }) 35 | 36 | -- Command line completion 37 | cmp.setup.cmdline("/", { 38 | mapping = cmp.mapping.preset.cmdline(), 39 | sources = { { name = "buffer" } }, 40 | }) 41 | 42 | cmp.setup.cmdline(":", { 43 | mapping = cmp.mapping.preset.cmdline(), 44 | sources = cmp.config.sources({ 45 | { name = "path" }, 46 | }, { 47 | { name = "cmdline" }, 48 | }), 49 | }) 50 | -------------------------------------------------------------------------------- /editors/helix/config.toml: -------------------------------------------------------------------------------- 1 | theme = "sobrio" 2 | 3 | [editor] 4 | bufferline = "multiple" 5 | color-modes = true 6 | cursorline = true 7 | line-number = "relative" 8 | rulers = [80] 9 | 10 | [editor.cursor-shape] 11 | insert = "bar" 12 | normal = "block" 13 | select = "underline" 14 | 15 | [editor.file-picker] 16 | hidden = false 17 | 18 | [editor.indent-guides] 19 | character = "│" 20 | render = true 21 | 22 | [editor.lsp] 23 | display-messages = true 24 | 25 | [editor.soft-wrap] 26 | enable = true 27 | 28 | [editor.statusline] 29 | left = ["mode", "spinner"] 30 | right = ["diagnostics", "version-control", "position"] 31 | center = ["file-name"] 32 | 33 | [keys.normal] 34 | C-j = ["extend_to_line_bounds", "delete_selection", "paste_after"] 35 | C-k = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"] 36 | F10 = ":config-open" 37 | C-q = ":quit" 38 | C-r = ":config-reload" 39 | del = ["delete_char_forward"] 40 | D = ["extend_to_line_end"] 41 | esc = ["collapse_selection", "normal_mode", "keep_primary_selection"] 42 | F11 = ":tree-sitter-scopes" 43 | F12 = ":tree-sitter-subtree" 44 | F1 = ":toggle-option lsp.display-inlay-hints" 45 | F4 = ":buffer-close" 46 | F5 = ":reload" 47 | ret = ["move_line_down", "goto_first_nonwhitespace"] 48 | S-tab = ":buffer-previous" 49 | tab = ":buffer-next" 50 | 51 | [keys.select] 52 | F9 = ":pipe sort" 53 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/theming.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Indent and syntax 3 | --------------------------------- 4 | vim.cmd([[ 5 | filetype plugin indent on 6 | syntax on 7 | ]]) 8 | 9 | --------------------------------- 10 | -- Color scheme 11 | --------------------------------- 12 | local colorscheme = "sobrio" 13 | local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) 14 | if not status_ok then 15 | print("colorscheme " .. colorscheme .. " not found!") 16 | return 17 | end 18 | 19 | --------------------------------- 20 | -- Treesitter playground 21 | --------------------------------- 22 | require("nvim-treesitter.configs").setup({ 23 | playground = { 24 | disable = {}, 25 | enable = true, 26 | persist_queries = false, 27 | updatetime = 25, 28 | keybindings = { 29 | focus_language = "f", 30 | goto_node = "", 31 | show_help = "?", 32 | toggle_anonymous_nodes = "a", 33 | toggle_hl_groups = "i", 34 | toggle_injected_languages = "t", 35 | toggle_language_display = "I", 36 | toggle_query_editor = "o", 37 | unfocus_language = "F", 38 | update = "R", 39 | }, 40 | }, 41 | }) 42 | 43 | --------------------------------- 44 | -- Theming Utility 45 | --------------------------------- 46 | local fn = vim.fn 47 | local function get_color(group, attr) 48 | return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr) 49 | end 50 | -------------------------------------------------------------------------------- /terminal/tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # set-option -g default-terminal "tmux-256color" 2 | set-option -g focus-events on 3 | 4 | # Easier keybindings 5 | unbind C-b 6 | set-option -g prefix C-a 7 | 8 | # Split panes using - 9 | bind - split-window -v 10 | bind = split-window -h 11 | unbind '"' 12 | unbind % 13 | 14 | # Config reloads 15 | bind r source-file ~/.tmux.conf 16 | 17 | # TMUX theme adjustment 18 | set -g status-style fg=#727072,bg=#3a3b3f 19 | set -g pane-border-style fg=colour8 20 | set -g pane-active-border-style fg=colour8 21 | set -g window-style fg=white 22 | 23 | # NVIM 24 | set-option -sg escape-time 10 25 | set-option -sa terminal-overrides ',alacritty:RGB' 26 | 27 | 28 | # Status 29 | set -g status-position bottom 30 | set -g status-justify left 31 | set -g status-style 'bg=#101010 fg=#727072 dim' 32 | set -g status-left '' 33 | set -g status-right '#[fg=#727072,bg=#181818] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S ' 34 | set -g status-right-length 50 35 | set -g status-left-length 20 36 | 37 | # Window 38 | setw -g window-status-current-style 'fg=#000000 bg=#d7af87 bold' 39 | setw -g window-status-current-format ' #I#[fg=#3a3b3f]:#[fg=#000000]#W#[fg=#3a3b3f]#F ' 40 | 41 | setw -g window-status-style 'fg=#3a3b3f bg=#101010' 42 | setw -g window-status-format ' #I#[fg=#727072]:#[fg=#727072]#W#[fg=#3a3b3f]#F ' 43 | 44 | setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' 45 | 46 | # Mouse 47 | set -g mouse on 48 | 49 | -------------------------------------------------------------------------------- /terminal/kitty/kitty-linux.conf: -------------------------------------------------------------------------------- 1 | # --------------------------------- 2 | # Fonts 3 | # --------------------------------- 4 | font_family Hasklug Medium Nerd Font Complete 5 | bold_font Hasklug Black Nerd Font Complete 6 | italic_font Hasklug Medium Italic Nerd Font Complete 7 | bold_italic_font Hasklug Bold Italic Nerd Font Complete 8 | 9 | # --------------------------------- 10 | # Font settings ==> 11 | # --------------------------------- 12 | font_size 11.0 13 | disable_ligatures never 14 | adjust_line_height 1 15 | 16 | # --------------------------------- 17 | # Theming - Sobrio colors 18 | # --------------------------------- 19 | background #080808 20 | background_opacity 0.97 21 | tab_bar_style powerline 22 | tab_powerline_style angled 23 | active_tab_foreground #000 24 | active_tab_background #87afd7 25 | inactive_tab_background #000 26 | active_tab_font_style bold 27 | 28 | # --------------------------------- 29 | # Selection 30 | # --------------------------------- 31 | selection_foreground #928374 32 | selection_background #181818 33 | 34 | # --------------------------------- 35 | # Colors 36 | # --------------------------------- 37 | color0 #282828 38 | color8 #928374 39 | 40 | # red 41 | color1 #fd6389 42 | color9 #dd4c4f 43 | 44 | # green 45 | color2 #2ec27e 46 | color10 #8ec07c 47 | 48 | # yellow 49 | color3 #d7af87 50 | color11 #af875f 51 | 52 | # blue 53 | color4 #87afd7 54 | color12 #6787af 55 | 56 | # magenta 57 | color5 #d7d7ff 58 | color13 #9787af 59 | 60 | # cyan 61 | color6 #7cdce7 62 | color14 #5fafaf 63 | 64 | # light gray 65 | color7 #5f5f5f 66 | color15 #3a3b3f 67 | -------------------------------------------------------------------------------- /terminal/kitty/kitty-macOS.conf: -------------------------------------------------------------------------------- 1 | # --------------------------------- 2 | # Fonts 3 | # --------------------------------- 4 | font_family Hasklug Medium Nerd Font Complete 5 | bold_font Hasklug Black Nerd Font Complete 6 | italic_font Hasklug Medium Italic Nerd Font Complete 7 | bold_italic_font Hasklug Bold Italic Nerd Font Complete 8 | 9 | # --------------------------------- 10 | # Font settings ==> 11 | # --------------------------------- 12 | font_size 14.0 13 | disable_ligatures never 14 | adjust_line_height 1 15 | 16 | # --------------------------------- 17 | # Mappings 18 | # --------------------------------- 19 | map ctrl+shift+f5 load_config_file 20 | 21 | # --------------------------------- 22 | # Theming - Sobrio colors 23 | # --------------------------------- 24 | background #080808 25 | background_opacity 0.98 26 | tab_bar_style powerline 27 | tab_powerline_style angled 28 | active_tab_foreground #000 29 | active_tab_background #87afd7 30 | inactive_tab_background #000 31 | active_tab_font_style bold 32 | 33 | # --------------------------------- 34 | # Selection 35 | # --------------------------------- 36 | selection_foreground #928374 37 | selection_background #181818 38 | 39 | # --------------------------------- 40 | # Colors 41 | # --------------------------------- 42 | color0 #282828 43 | color8 #928374 44 | 45 | # red 46 | color1 #fd6389 47 | color9 #dd4c4f 48 | 49 | # green 50 | color2 #2ec27e 51 | color10 #8ec07c 52 | 53 | # yellow 54 | color3 #d7af87 55 | color11 #af875f 56 | 57 | # blue 58 | color4 #87afd7 59 | color12 #6787af 60 | 61 | # magenta 62 | color5 #d7d7ff 63 | color13 #9787af 64 | 65 | # cyan 66 | color6 #7cdce7 67 | color14 #5fafaf 68 | 69 | # light gray 70 | color7 #5f5f5f 71 | color15 #3a3b3f 72 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/keymaps.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Key bindings 3 | --------------------------------- 4 | local kmap = vim.keymap.set 5 | local opts = { noremap = true, silent = true } 6 | 7 | -- Leader 8 | vim.g.mapleader = " " 9 | 10 | -- Vim 11 | kmap("n", "", ':lua require("telescope.builtin").find_files()', opts) 12 | kmap("n", "", ":q!", opts) 13 | kmap("n", "", ":TSHighlightCapturesUnderCursor", opts) 14 | kmap("n", "", ":bd", opts) 15 | kmap("n", "", ":Neotree toggle", opts) 16 | kmap("n", "", ":sp:terminal", opts) 17 | kmap("n", "", "gT", opts) 18 | kmap("n", "", "gt", opts) 19 | kmap("n", " ", ":tabnew", opts) 20 | kmap("n", "f", ':lua require("telescope.builtin").find_files()', opts) 21 | 22 | -- Utils 23 | kmap("n", "", vim.lsp.buf.signature_help, opts) 24 | kmap("n", "D", vim.lsp.buf.type_definition, opts) 25 | kmap("n", "ca", vim.lsp.buf.code_action, opts) 26 | kmap("n", "rn", vim.lsp.buf.rename, opts) 27 | kmap("n", "K", vim.lsp.buf.hover, opts) 28 | kmap("n", "gD", vim.lsp.buf.declaration, opts) 29 | kmap("n", "gd", vim.lsp.buf.definition, opts) 30 | kmap("n", "gi", vim.lsp.buf.implementation, opts) 31 | kmap("n", "gr", vim.lsp.buf.references, opts) 32 | 33 | -- Diagnostics 34 | kmap("n", "e", vim.diagnostic.open_float, opts) 35 | kmap("n", "q", vim.diagnostic.setloclist, opts) 36 | kmap("n", "[d", vim.diagnostic.goto_prev, opts) 37 | kmap("n", "]d", vim.diagnostic.goto_next, opts) 38 | 39 | --------------------------------- 40 | -- Auto commands 41 | --------------------------------- 42 | vim.cmd([[ autocmd BufWritePre lua vim.lsp.buf.formatting_sync() ]]) 43 | vim.cmd([[ autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]) 44 | vim.cmd([[ autocmd FileType php setl textwidth=120 softtabstop=4 shiftwidth=4 tabstop=4 colorcolumn=120]]) 45 | -------------------------------------------------------------------------------- /bin/themetool: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Create links for testing syntaxes easily 4 | theme_name=$2 5 | theme_file="$(pwd)/${theme_name}" 6 | target_file="" 7 | 8 | # Colors and formatting 9 | b="$(tput bold)" 10 | d='\033[2m' 11 | y='\033[33;33m' 12 | n='\033[0m' 13 | 14 | # Usage 15 | function showUsage() { 16 | echo -e "\n ${y}Usage:${n} $0 ${d}<${n}install${d}/${n}link${d}/${n}remove${d}> <${n}theme-file${d}> <${n}target-software${d}>$n" 17 | echo -e "$d ----------------------------------------------------------------------------$n" 18 | echo -e " - ${b}install:${n} copy theme file to the target location for the software" 19 | echo -e " - ${b}link:${n} create a symlink instead of copying" 20 | echo -e " - ${b}test:${n} shows create a symlink instead of copying" 21 | echo -e " - ${b}remove:${n} remove installed file" 22 | echo -e "$d ----------------------------------------------------------------------------$n" 23 | echo -e " - $b:$n path/to/theme.file" 24 | echo -e " - $b:$n current only nvim is supported" 25 | echo -e "$d ----------------------------------------------------------------------------$n" 26 | } 27 | 28 | # Software paths 29 | if [ "$3" == 'nvim' ]; then 30 | target_file="$HOME/.config/nvim/colors/${theme_name}" 31 | fi 32 | 33 | if [ "$3" == 'vim' ]; then 34 | target_file="$HOME/.vim/colors/${theme_name}" 35 | fi 36 | 37 | # Actions 38 | case $1 in 39 | install) 40 | echo -e " * Installing ${y}$theme_file${n} in ${b}$target_file${n}" 41 | cp $theme_file $target_file 42 | ;; 43 | link) 44 | echo -e " * Creating symlinks to ${b}$target_file:${n}" 45 | ln -sf $theme_file $target_file 46 | ;; 47 | remove) 48 | echo -e " * Removing ${b}$target_file${n}" 49 | rm $target_file 50 | ;; 51 | test) 52 | echo -e " * ${b}Origin:${n} $theme_file -> ${b}Target:${n} $target_file" 53 | ;; 54 | *) 55 | showUsage 56 | ;; 57 | esac 58 | 59 | echo -e " Done.\n" 60 | -------------------------------------------------------------------------------- /terminal/nushell/env.nu: -------------------------------------------------------------------------------- 1 | # Nushell Environment Config File 2 | 3 | def create_left_prompt [] { 4 | let path_segment = if (is-admin) { 5 | $"(ansi red_bold)($env.PWD)" 6 | } else { 7 | $"(ansi green_bold)($env.PWD)" 8 | } 9 | 10 | $path_segment 11 | } 12 | 13 | # The prompt indicators are environmental variables that represent 14 | # the state of the prompt 15 | $env.PROMPT_INDICATOR = { "> " } 16 | $env.PROMPT_INDICATOR_VI_INSERT = { ": " } 17 | $env.PROMPT_INDICATOR_VI_NORMAL = { "> " } 18 | $env.PROMPT_MULTILINE_INDICATOR = { "::: " } 19 | 20 | # Specifies how environment variables are: 21 | # - converted from a string to a value on Nushell startup (from_string) 22 | # - converted from a value back to a string when running external commands (to_string) 23 | # Note: The conversions happen *after* config.nu is loaded 24 | $env.ENV_CONVERSIONS = { 25 | "PATH": { 26 | from_string: { |s| $s | split row (char esep) | path expand -n } 27 | to_string: { |v| $v | path expand -n | str join (char esep) } 28 | } 29 | "Path": { 30 | from_string: { |s| $s | split row (char esep) | path expand -n } 31 | to_string: { |v| $v | path expand -n | str join (char esep) } 32 | } 33 | } 34 | 35 | # Directories to search for scripts when calling source or use 36 | # 37 | # By default, /scripts is added 38 | $env.NU_LIB_DIRS = [ 39 | ($nu.config-path | path dirname | path join 'scripts') 40 | ] 41 | 42 | # Directories to search for plugin binaries when calling register 43 | # 44 | # By default, /plugins is added 45 | $env.NU_PLUGIN_DIRS = [ 46 | ($nu.config-path | path dirname | path join 'plugins') 47 | ] 48 | 49 | # To add entries to PATH (on Windows you might use Path), you can use the following pattern: 50 | $env.PATH = ($env.PATH | split row (char esep) | append '/home/elvessousa/.local/bin') 51 | $env.PATH = ($env.PATH | split row (char esep) | append '/home/elvessousa/.cargo/bin') 52 | $env.PATH = ($env.PATH | split row (char esep) | append '/home/elvessousa/.npm-global/bin') 53 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/languages.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Language servers 3 | --------------------------------- 4 | local lspconfig = require("lspconfig") 5 | local caps = vim.lsp.protocol.make_client_capabilities() 6 | local no_format = function(client, bufnr) 7 | client.server_capabilities.document_formatting = false 8 | end 9 | 10 | -- Capabilities 11 | caps.textDocument.completion.completionItem.snippetSupport = true 12 | 13 | -- Astro 14 | lspconfig.astro.setup({ capabilities = caps }) 15 | 16 | -- Python 17 | lspconfig.pyright.setup({ capabilities = caps, on_attach = no_format }) 18 | 19 | -- PHP 20 | lspconfig.phpactor.setup({ capabilities = caps }) 21 | 22 | -- JavaScript/Typescript 23 | lspconfig.tsserver.setup({ capabilities = caps, on_attach = no_format }) 24 | 25 | -- Rust 26 | lspconfig.rust_analyzer.setup({ 27 | capabilities = caps, 28 | on_attach = function(client, bufnr) 29 | --formatting_callback(client, bufnr) 30 | common_on_attach(client, bufnr) 31 | end, 32 | }) 33 | 34 | -- Emmet 35 | lspconfig.emmet_ls.setup({ 36 | capabilities = snip_caps, 37 | filetypes = { 38 | "css", 39 | "html", 40 | "javascriptreact", 41 | "less", 42 | "sass", 43 | "scss", 44 | "typescriptreact", 45 | }, 46 | }) 47 | 48 | --------------------------------- 49 | -- Rust tools 50 | --------------------------------- 51 | local rust_tools = require("rust-tools") 52 | 53 | rust_tools.setup({ 54 | server = { 55 | on_attach = function(client, bufnr) 56 | vim.keymap.set("n", "", rust_tools.hover_actions.hover_actions, { buffer = bufnr }) 57 | vim.keymap.set("n", "a", rust_tools.code_action_group.code_action_group, { buffer = bufnr }) 58 | client.server_capabilities.document_formatting = false 59 | client.server_capabilities.document_range_formatting = false 60 | end, 61 | }, 62 | inlay_hints = { 63 | auto = true, 64 | only_current_line = false, 65 | max_len_align = false, 66 | max_len_align_padding = 1, 67 | right_align = false, 68 | right_align_padding = 7, 69 | highlight = "Comment", 70 | }, 71 | }) 72 | -------------------------------------------------------------------------------- /terminal/alacritty/alacritty-macOS.yml: -------------------------------------------------------------------------------- 1 | # Alacritty config 2 | 3 | # Environment 4 | env: 5 | TERM: xterm-256color 6 | 7 | # Fonts 8 | font: 9 | normal: 10 | family: VictorMono Nerd Font 11 | style: Medium 12 | 13 | bold: 14 | family: VictorMono Nerd Font 15 | style: Black 16 | 17 | italic: 18 | family: VictorMono Nerd Font 19 | style: Italic 20 | 21 | size: 16 22 | 23 | offset: 24 | x: 0 25 | y: 0 26 | 27 | glyph_offset: 28 | x: 0 29 | y: 0 30 | 31 | # Window 32 | window: 33 | dynamic_padding: false 34 | padding: 35 | x: 0 36 | y: 0 37 | title: Terminal 38 | dynamic_title: false 39 | opacity: 0.99 40 | 41 | live_config_reload: true 42 | 43 | # Selection 44 | selection: 45 | semantic_escape_chars: ',│`|:"'' ()[]{}<>' 46 | save_to_clipboard: true 47 | 48 | # Cursors 49 | cursor: 50 | style: 51 | shape: Block 52 | blinking: On 53 | 54 | # Default colors 55 | schemes: 56 | sobrio: &sobrio 57 | primary: 58 | background: "#080808" 59 | foreground: "#eeeeee" 60 | 61 | # Normal colors 62 | normal: 63 | black: "#3a3b3f" 64 | blue: "#87afd7" 65 | cyan: "#78DCE8" 66 | green: "#2ec27e" 67 | magenta: "#d7d7ff" 68 | red: "#fd6389" 69 | white: "#eeeeee" 70 | yellow: "#d7af87" 71 | 72 | # Bright colors 73 | bright: 74 | black: "#727072" 75 | blue: "#87afd7" 76 | cyan: "#78DCE8" 77 | green: "#2ec27e" 78 | magenta: "#d7d7ff" 79 | red: "#fd6399" 80 | white: "#ffffff" 81 | yellow: "#af875f" 82 | 83 | sobrio-light: &sobrio-light # Default colors 84 | primary: 85 | background: "#eeeeee" 86 | foreground: "#202020" 87 | 88 | # Normal colors 89 | normal: 90 | black: "#eeeeee" 91 | red: "#dd4c4f" 92 | green: "#2ec27e" 93 | yellow: "#af875f" 94 | blue: "#6787af" 95 | magenta: "#9787af" 96 | cyan: "#5fafaf" 97 | white: "#3a3b3f" 98 | 99 | # Bright colors 100 | bright: 101 | black: "#727072" 102 | red: "#fd6399" 103 | green: "#2ec27e" 104 | yellow: "#d7af87" 105 | blue: "#6787af" 106 | magenta: "#d7d7ff" 107 | cyan: "#7cdce7" 108 | white: "#ffffff" 109 | 110 | colors: *sobrio 111 | -------------------------------------------------------------------------------- /editors/nvim/lua/configs/plugins.lua: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Plugins 3 | --------------------------------- 4 | local packer = require("packer") 5 | vim.cmd([[packadd packer.nvim]]) 6 | 7 | packer.startup(function() 8 | use("hrsh7th/cmp-buffer") 9 | use("hrsh7th/cmp-cmdline") 10 | use("hrsh7th/cmp-nvim-lsp") 11 | use("hrsh7th/cmp-path") 12 | use("hrsh7th/nvim-cmp") 13 | -- Snippet engine 14 | use("L3MON4D3/LuaSnip") 15 | use("saadparwaiz1/cmp_luasnip") 16 | -- Formatting 17 | use("jose-elias-alvarez/null-ls.nvim") 18 | -- Language servers 19 | use("neovim/nvim-lspconfig") 20 | use("williamboman/mason.nvim") 21 | use("williamboman/mason-lspconfig.nvim") 22 | use("simrat39/rust-tools.nvim") 23 | -- Syntax parser 24 | use("nvim-treesitter/nvim-treesitter") 25 | use("nvim-treesitter/playground") 26 | use("wuelnerdotexe/vim-astro") 27 | -- Plugin manager 28 | use("wbthomason/packer.nvim") 29 | -- Utilities 30 | use("windwp/nvim-autopairs") 31 | use("norcalli/nvim-colorizer.lua") 32 | use("lewis6991/gitsigns.nvim") 33 | -- Dependences needed 34 | use("nvim-lua/plenary.nvim") 35 | use("kyazdani42/nvim-web-devicons") 36 | use("MunifTanjim/nui.nvim") 37 | -- Finder 38 | use("nvim-telescope/telescope.nvim") 39 | -- Interface 40 | use("akinsho/bufferline.nvim") 41 | use({ "nvim-neo-tree/neo-tree.nvim", branch = "v2.x" }) 42 | use("nvim-lualine/lualine.nvim") 43 | -- use('elvessousa/sobrio') 44 | end) 45 | 46 | --------------------------------- 47 | -- Misc plugins 48 | --------------------------------- 49 | -- Autopairs 50 | require("nvim-autopairs").setup({ 51 | disable_filetype = { "TelescopePrompt" }, 52 | }) 53 | 54 | -- LSP Installer 55 | require("mason").setup() 56 | 57 | -- Colorizer 58 | require("colorizer").setup() 59 | 60 | -- Git signs 61 | require("gitsigns").setup() 62 | 63 | -- Bufferline 64 | require("bufferline").setup() 65 | 66 | -- Lualine 67 | require("lualine").setup() 68 | 69 | -- Neo tree 70 | require("neo-tree").setup({ 71 | -- Close Neo-tree if it is the last window left in the tab 72 | close_if_last_window = false, 73 | enable_diagnostics = true, 74 | enable_git_status = true, 75 | popup_border_style = "rounded", 76 | sort_case_insensitive = false, 77 | filesystem = { 78 | filtered_items = { 79 | hide_dotfiles = false, 80 | hide_gitignored = false, 81 | }, 82 | }, 83 | window = { width = 30 }, 84 | }) 85 | -------------------------------------------------------------------------------- /terminal/wezterm/wezterm-macos.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | 3 | return { 4 | font = wezterm.font("FiraCode Nerd Font Propo"), 5 | font_size = 15.5, 6 | font_rules = { 7 | { 8 | intensity = "Normal", 9 | italic = true, 10 | font = wezterm.font({ 11 | family = "FiraCode Nerd Font Propo", 12 | italic = false, 13 | }), 14 | }, 15 | { 16 | intensity = "Bold", 17 | italic = false, 18 | font = wezterm.font({ 19 | family = "FiraCode Nerd Font Propo", 20 | weight = "Bold", 21 | }), 22 | }, 23 | { 24 | intensity = "Bold", 25 | italic = true, 26 | font = wezterm.font({ 27 | family = "FiraCode Nerd Font Propo", 28 | weight = "Bold", 29 | }), 30 | }, 31 | }, 32 | default_prog = { "/opt/homebrew/bin/fish" }, 33 | use_fancy_tab_bar = true, 34 | hide_tab_bar_if_only_one_tab = true, 35 | tab_bar_at_bottom = true, 36 | hyperlink_rules = { 37 | -- Localhost links 38 | { 39 | regex = "\\b\\w+://[\\w.-]+\\S*\\b", 40 | format = "$0", 41 | }, 42 | -- Numeric links 43 | { 44 | regex = [[\b\w+://(?:[\d]{1,3}\.){3}[\d]{1,3}\S*\b]], 45 | format = "$0", 46 | }, 47 | }, 48 | colors = { 49 | background = "#080808", 50 | foreground = "#ffffff", 51 | cursor_bg = "#d7af87", 52 | selection_fg = "#928374", 53 | selection_bg = "#181818", 54 | ansi = { 55 | "#3a3b3f", 56 | "#fd6389", 57 | "#2ec27e", 58 | "#d7af87", 59 | "#87afd7", 60 | "#9787af", 61 | "#7cdce7", 62 | "#5f5f5f", 63 | }, 64 | brights = { 65 | "#afafaf", 66 | "#fd6389", 67 | "#2ec27e", 68 | "#d7af87", 69 | "#87afd7", 70 | "#d7d7ff", 71 | "#7cdce7", 72 | "#ffffff", 73 | }, 74 | tab_bar = { 75 | active_tab = { 76 | bg_color = "#343434", 77 | fg_color = "#ffffff", 78 | }, 79 | inactive_tab = { 80 | bg_color = "#343434", 81 | fg_color = "#555", 82 | }, 83 | inactive_tab_hover = { 84 | bg_color = "#343434", 85 | fg_color = "#777", 86 | }, 87 | inactive_tab_edge = "#343434", 88 | new_tab = { 89 | bg_color = "#343434", 90 | fg_color = "#ffffff", 91 | }, 92 | new_tab_hover = { 93 | bg_color = "#343434", 94 | fg_color = "#d7af87", 95 | }, 96 | }, 97 | }, 98 | window_background_opacity = 0.99, 99 | window_frame = { 100 | active_titlebar_bg = "#343434", 101 | font_size = 12.0, 102 | }, 103 | window_padding = { 104 | bottom = 0, 105 | left = 3, 106 | right = 0, 107 | top = 3, 108 | }, 109 | } 110 | -------------------------------------------------------------------------------- /terminal/wezterm/wezterm-linux.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | 3 | local xcursor_size = nil 4 | local xcursor_theme = nil 5 | 6 | local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-theme"}) 7 | if success then 8 | xcursor_theme = stdout:gsub("'(.+)'\n", "%1") 9 | end 10 | 11 | local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-size"}) 12 | if success then 13 | xcursor_size = tonumber(stdout) 14 | end 15 | 16 | return { 17 | xcursor_theme = xcursor_theme, 18 | xcursor_size = xcursor_size, 19 | front_end = "WebGpu", 20 | font = wezterm.font("FiraCode Nerd Font Propo"), 21 | font_size = 12, 22 | font_rules = { 23 | { 24 | intensity = "Normal", 25 | italic = true, 26 | font = wezterm.font({ 27 | family = "FiraCode Nerd Font Propo", 28 | italic = false, 29 | }), 30 | }, 31 | { 32 | intensity = "Bold", 33 | italic = false, 34 | font = wezterm.font({ 35 | family = "FiraCode Nerd Font Propo", 36 | weight = "Bold", 37 | }), 38 | }, 39 | { 40 | intensity = "Bold", 41 | italic = true, 42 | font = wezterm.font({ 43 | family = "FiraCode Nerd Font Propo", 44 | weight = "Bold", 45 | }), 46 | }, 47 | }, 48 | default_prog = { "fish" }, 49 | use_fancy_tab_bar = true, 50 | hide_tab_bar_if_only_one_tab = true, 51 | tab_bar_at_bottom = true, 52 | hyperlink_rules = { 53 | -- Localhost links 54 | { 55 | regex = "\\b\\w+://[\\w.-]+\\S*\\b", 56 | format = "$0", 57 | }, 58 | -- Numeric links 59 | { 60 | regex = [[\b\w+://(?:[\d]{1,3}\.){3}[\d]{1,3}\S*\b]], 61 | format = "$0", 62 | }, 63 | }, 64 | colors = { 65 | background = "#121212", 66 | foreground = "#ffffff", 67 | cursor_bg = "#d7af87", 68 | selection_fg = "#928374", 69 | selection_bg = "#181818", 70 | ansi = { 71 | "#3a3b3f", 72 | "#fd6389", 73 | "#2ec27e", 74 | "#d7af87", 75 | "#87afd7", 76 | "#9787af", 77 | "#7cdce7", 78 | "#5f5f5f", 79 | }, 80 | brights = { 81 | "#afafaf", 82 | "#fd6389", 83 | "#2ec27e", 84 | "#d7af87", 85 | "#87afd7", 86 | "#d7d7ff", 87 | "#7cdce7", 88 | "#ffffff", 89 | }, 90 | tab_bar = { 91 | active_tab = { 92 | bg_color = "#343434", 93 | fg_color = "#ffffff", 94 | }, 95 | inactive_tab = { 96 | bg_color = "#343434", 97 | fg_color = "#555", 98 | }, 99 | inactive_tab_hover = { 100 | bg_color = "#343434", 101 | fg_color = "#777", 102 | }, 103 | inactive_tab_edge = "#343434", 104 | new_tab = { 105 | bg_color = "#343434", 106 | fg_color = "#ffffff", 107 | }, 108 | new_tab_hover = { 109 | bg_color = "#343434", 110 | fg_color = "#d7af87", 111 | }, 112 | }, 113 | }, 114 | window_background_opacity = 0.98, 115 | window_frame = { 116 | active_titlebar_bg = "#343434", 117 | font_size = 10.0, 118 | font = wezterm.font({ family = "Adwaita Sans", weight = "Bold" }), 119 | font_size = 9, 120 | }, 121 | window_padding = { 122 | bottom = 10, 123 | left = 10, 124 | right = 10, 125 | top = 10, 126 | }, 127 | } 128 | -------------------------------------------------------------------------------- /editors/nvim/init.vim: -------------------------------------------------------------------------------- 1 | call plug#begin() 2 | " Appearance 3 | Plug 'vim-airline/vim-airline' 4 | Plug 'ryanoasis/vim-devicons' 5 | 6 | " Utilities 7 | Plug 'sheerun/vim-polyglot' 8 | Plug 'jiangmiao/auto-pairs' 9 | Plug 'ap/vim-css-color' 10 | Plug 'preservim/nerdtree' 11 | Plug 'kien/ctrlp.vim' 12 | 13 | " Completion / linters / formatters 14 | Plug 'neoclide/coc.nvim', {'branch': 'release'} 15 | Plug 'plasticboy/vim-markdown' 16 | Plug 'stephpy/vim-php-cs-fixer' 17 | Plug 'pantharshit00/vim-prisma' 18 | 19 | " Git 20 | Plug 'airblade/vim-gitgutter' 21 | call plug#end() 22 | 23 | " Syntax 24 | filetype plugin indent on 25 | syntax on 26 | 27 | " Options 28 | set background=dark 29 | set clipboard=unnamedplus 30 | set completeopt=noinsert,menuone,noselect 31 | set cursorline 32 | set hidden 33 | set inccommand=split 34 | set mouse=a 35 | set number 36 | set relativenumber 37 | set splitbelow splitright 38 | set title 39 | set ttimeoutlen=0 40 | set wildmenu 41 | 42 | " Tabs size 43 | set expandtab 44 | set shiftwidth=2 45 | set tabstop=2 46 | 47 | " True color if available 48 | let term_program = $TERM_PROGRAM 49 | 50 | " Check for conflicts with Apple Terminal app 51 | if term_program !=? 'Apple_Terminal' 52 | set termguicolors 53 | else 54 | if $TERM !=? 'xterm-256color' 55 | set termguicolors 56 | endif 57 | endif 58 | 59 | " Color scheme and themes 60 | let t_Co = 256 61 | colorscheme sobrio_ghost 62 | 63 | " Airline 64 | let g:airline_theme = 'sobrio' 65 | let g:airline_powerline_fonts = 1 66 | let g:airline#extensions#tabline#enabled = 1 67 | 68 | " Italics 69 | let &t_ZH = "\e[3m" 70 | let &t_ZR = "\e[23m" 71 | 72 | " File browser 73 | let NERDTreeShowHidden = 1 74 | 75 | " CTRLP: Ignore based on gitignore 76 | let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] 77 | 78 | " Markdown 79 | let g:vim_markdown_conceal = 0 80 | let g:vim_markdown_fenced_languages = ['tsx=typescriptreact'] 81 | let g:vim_markdown_folding_disabled = 1 82 | let g:vim_markdown_frontmatter = 1 83 | 84 | " Disable math tex conceal feature 85 | let g:tex_conceal = '' 86 | let g:vim_markdown_math = 1 87 | 88 | " Language server stuff 89 | let g:python3_host_prog = '/usr/bin/python' 90 | command! -nargs=0 Prettier :call CocAction('runCommand', 'prettier.formatFile') 91 | 92 | " Leader 93 | let mapleader = ',' 94 | 95 | " Normal mode remappings 96 | nnoremap :q! 97 | nnoremap :bd 98 | nnoremap :NERDTreeToggle 99 | nnoremap :sp:terminal 100 | nnoremap :CocCommand tsserver.organizeImports 101 | 102 | "" Tabs 103 | nnoremap gT 104 | nnoremap gt 105 | nnoremap :tabnew 106 | 107 | " Show highlight groups 108 | map :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' 109 | \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" 110 | \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" 111 | 112 | " Auto Commands 113 | augroup auto_commands 114 | autocmd BufWrite *.py call CocAction('format') 115 | autocmd FileType scss setlocal iskeyword+=@-@ 116 | autocmd BufWritePost *.php silent! call PhpCsFixerFixFile() 117 | augroup END 118 | 119 | -------------------------------------------------------------------------------- /editors/vim/.vimrc: -------------------------------------------------------------------------------- 1 | call plug#begin() 2 | " Appearance 3 | Plug 'vim-airline/vim-airline' 4 | Plug 'ryanoasis/vim-devicons' 5 | 6 | " Utilities 7 | Plug 'sheerun/vim-polyglot' 8 | Plug 'jiangmiao/auto-pairs' 9 | Plug 'ap/vim-css-color' 10 | Plug 'preservim/nerdtree' 11 | 12 | " Completion / linters / formatters 13 | Plug 'neoclide/coc.nvim' 14 | Plug 'plasticboy/vim-markdown' 15 | 16 | " Git 17 | Plug 'airblade/vim-gitgutter' 18 | call plug#end() 19 | 20 | " Window stuff 21 | filetype plugin indent on 22 | syntax on 23 | 24 | " Options 25 | set background=dark 26 | set clipboard=unnamedplus 27 | set cursorline 28 | set hidden 29 | "set inccommand=split 30 | set ttymouse=xterm2 31 | set mouse=a 32 | set number 33 | set path+=** 34 | set relativenumber 35 | set splitbelow splitright 36 | set title 37 | set ttimeoutlen=0 38 | set ttyfast 39 | set wildmenu 40 | 41 | " Cursors 42 | let &t_SI = "\[6 q" 43 | let &t_SR = "\[4 q" 44 | let &t_EI = "\[2 q" 45 | 46 | " True color if available 47 | let term_program=$TERM_PROGRAM 48 | 49 | " Check for conflicts with Apple Terminal app 50 | if term_program !=? 'Apple_Terminal' 51 | set termguicolors 52 | else 53 | if $TERM !=? 'xterm-256color' 54 | set termguicolors 55 | endif 56 | endif 57 | 58 | " Color scheme and themes 59 | let &t_8f = "\[38;2;%lu;%lu;%lum" 60 | let &t_8b = "\[48;2;%lu;%lu;%lum" 61 | 62 | " let t_Co = 256 63 | colorscheme sobrio_vim 64 | let g:airline_theme='sobrio' 65 | let g:airline_powerline_fonts = 1 66 | 67 | " Italics 68 | let &t_ZH="\e[3m" 69 | let &t_ZR="\e[23m" 70 | highlight Comment cterm=italic 71 | 72 | " File browser 73 | let g:netrw_banner = 0 74 | let g:netrw_liststyle = 0 75 | let g:netrw_browse_split = 4 76 | let g:netrw_altv = 1 77 | let g:netrw_winsize = 25 78 | let g:netrw_keepdir = 0 79 | let g:netrw_localcopydircmd = 'cp -r' 80 | 81 | " Create file without opening buffer 82 | function! CreateInPreview() 83 | let l:filename = input('please enter filename: ') 84 | execute 'silent !touch ' . b:netrw_curdir.'/'.l:filename 85 | redraw! 86 | endfunction 87 | 88 | " Tabs size 89 | set tabstop=2 90 | set shiftwidth=2 91 | set expandtab 92 | 93 | " Markdown 94 | let g:vim_markdown_folding_disabled = 1 95 | let g:vim_markdown_frontmatter = 1 96 | let g:vim_markdown_conceal = 0 97 | let g:vim_markdown_fenced_languages = ['tsx=typescriptreact'] 98 | 99 | " Disable math tex conceal feature 100 | let g:tex_conceal = '' 101 | let g:vim_markdown_math = 1 102 | 103 | " Language server stuff 104 | command! -nargs=0 Prettier :call CocAction('runCommand', 'prettier.formatFile') 105 | set completeopt=noinsert,menuone,noselect 106 | 107 | " Leader 108 | let mapleader=',' 109 | 110 | " Remappings 111 | nnoremap :NERDTreeToggle 112 | nnoremap :bd 113 | nnoremap :q! 114 | nnoremap :sp:terminal 115 | 116 | "" Tabs 117 | let g:airline#extensions#tabline#enabled = 1 118 | nnoremap gt 119 | nnoremap gT 120 | nnoremap :tabnew 121 | 122 | " Netrw: create file using touch instead of opening a buffer 123 | function! Netrw_mappings() 124 | noremap % :call CreateInPreview() 125 | endfunction 126 | 127 | " Show highlight groups 128 | map :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' 129 | \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" 130 | \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" 131 | 132 | " Auto Commands 133 | augroup auto_commands 134 | autocmd FileType scss setl iskeyword+=@-@ 135 | autocmd filetype netrw call Netrw_mappings() 136 | augroup END 137 | -------------------------------------------------------------------------------- /wms/sway/sway/config: -------------------------------------------------------------------------------- 1 | # Default config for sway 2 | 3 | ### Variables 4 | # Logo key. Use Mod1 for Alt. 5 | set $mod Mod4 6 | 7 | # Preferred applications 8 | set $browser vivaldi-stable 9 | set $browser2 librewolf 10 | set $browser3 epiphany 11 | set $email geary 12 | set $filemanager nautilus 13 | set $photo gimp 14 | set $term alacritty 15 | set $vector inkscape 16 | 17 | # Font 18 | font pango:Fira Sans Medium 10 19 | 20 | # Your preferred application launcher 21 | set $menu wofi --show drun 22 | 23 | ### Output configuration 24 | output eDP-1 pos 0 0 25 | output DP-1 disable 26 | 27 | # Wallpapers 28 | exec_always ~/.dotfiles/wms/sway/sway/wallpaper.sh eDP-1 29 | 30 | # Natural scrolling 31 | input type:pointer { 32 | natural_scroll enabled 33 | } 34 | 35 | ### Key bindings 36 | bindsym $mod+d exec $menu 37 | bindsym $mod+Shift+q kill 38 | 39 | # Apps 40 | bindsym $mod+Return exec $term 41 | bindsym $mod+Shift+v exec $browser 42 | bindsym $mod+Shift+i exec $vector 43 | bindsym $mod+Shift+w exec $browser3 44 | bindsym $mod+g exec $email 45 | bindsym $mod+m exec $browser2 46 | bindsym $mod+n exec $filemanager 47 | bindsym $mod+p exec $photo 48 | 49 | # Drag floating windows by holding down $mod and left mouse button. 50 | floating_modifier $mod normal 51 | 52 | # Reload the configuration file 53 | bindsym $mod+Shift+c reload 54 | 55 | # Exit sway (logs you out of your Wayland session) 56 | bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' 57 | 58 | # Move your focus around 59 | bindsym $mod+Left focus left 60 | bindsym $mod+Down focus down 61 | bindsym $mod+Up focus up 62 | bindsym $mod+Right focus right 63 | 64 | # Move the focused window with the same, but add Shift 65 | bindsym $mod+Shift+Left move left 66 | bindsym $mod+Shift+Down move down 67 | bindsym $mod+Shift+Up move up 68 | bindsym $mod+Shift+Right move right 69 | 70 | # Workspaces: 71 | bindsym $mod+1 workspace number 1 72 | bindsym $mod+2 workspace number 2 73 | bindsym $mod+3 workspace number 3 74 | bindsym $mod+4 workspace number 4 75 | bindsym $mod+5 workspace number 5 76 | bindsym $mod+6 workspace number 6 77 | bindsym $mod+7 workspace number 7 78 | bindsym $mod+8 workspace number 8 79 | bindsym $mod+9 workspace number 9 80 | bindsym $mod+0 workspace number 10 81 | 82 | # Move focused container to workspace 83 | bindsym $mod+Shift+1 move container to workspace number 1 84 | bindsym $mod+Shift+2 move container to workspace number 2 85 | bindsym $mod+Shift+3 move container to workspace number 3 86 | bindsym $mod+Shift+4 move container to workspace number 4 87 | bindsym $mod+Shift+5 move container to workspace number 5 88 | bindsym $mod+Shift+6 move container to workspace number 6 89 | bindsym $mod+Shift+7 move container to workspace number 7 90 | bindsym $mod+Shift+8 move container to workspace number 8 91 | bindsym $mod+Shift+9 move container to workspace number 9 92 | bindsym $mod+Shift+0 move container to workspace number 10 93 | 94 | # You can "split" the current object of your focus with 95 | bindsym $mod+b splith 96 | bindsym $mod+v splitv 97 | 98 | # Switch the current container between different layout styles 99 | bindsym $mod+s layout stacking 100 | bindsym $mod+w layout tabbed 101 | bindsym $mod+e layout toggle split 102 | 103 | # Make the current focus fullscreen 104 | bindsym $mod+f fullscreen 105 | 106 | # Toggle the current focus between tiling and floating mode 107 | bindsym $mod+Shift+space floating toggle 108 | 109 | # Swap focus between the tiling area and the floating area 110 | bindsym $mod+space focus mode_toggle 111 | 112 | # Move focus to the parent container 113 | bindsym $mod+a focus parent 114 | 115 | # Resizing containers: 116 | mode "resize" { 117 | bindsym Left resize shrink width 10px 118 | bindsym Down resize grow height 10px 119 | bindsym Up resize shrink height 10px 120 | bindsym Right resize grow width 10px 121 | 122 | # Return to default mode 123 | bindsym Return mode "default" 124 | bindsym Escape mode "default" 125 | } 126 | 127 | bindsym $mod+r mode "resize" 128 | 129 | # Status Bar: 130 | bar { 131 | swaybar_command waybar 132 | } 133 | 134 | # Set keyboard layout 135 | input * { 136 | xkb_layout "br,us" 137 | } 138 | 139 | input "7247:2:SEM_HCT_Keyboard" { 140 | xkb_layout "us" 141 | } 142 | 143 | # Gaps 144 | default_border pixel 2 145 | gaps inner 20 146 | gaps outer 10 147 | 148 | # Colors 149 | # class border backgr. text indicator child_border 150 | client.unfocused #121212 #121212 #3a3b3f #afafaf #181818 151 | client.focused_inactive #181818 #181818 #3a3b3f #484e50 #5f676a 152 | client.focused #202020 #202020 #ffffff #292d2e #222222 153 | client.urgent #d7af87 #000000 #ffffff #900000 #900000 154 | 155 | include /etc/sway/config.d/* 156 | -------------------------------------------------------------------------------- /wms/sway/waybar/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | border: none; 3 | border-radius: 4px; 4 | /* `otf-font-awesome` is required to be installed for icons */ 5 | font-family: 'Fira Sans', Cantarell, Roboto, Helvetica, Arial, sans-serif; 6 | font-size: 13px; 7 | min-height: 0; 8 | } 9 | 10 | window#waybar { 11 | background-color: rgba(0, 0, 0, 0.9); 12 | border-radius: 0; 13 | color: #ffffff; 14 | padding: 2px; 15 | transition-property: background-color; 16 | transition-duration: 0.5s; 17 | } 18 | 19 | window#waybar.hidden { 20 | opacity: 0.2; 21 | } 22 | 23 | /* 24 | window#waybar.empty { 25 | background-color: transparent; 26 | } 27 | window#waybar.solo { 28 | background-color: #FFFFFF; 29 | } 30 | */ 31 | 32 | window#waybar.termite { 33 | background-color: #3f3f3f; 34 | } 35 | 36 | window#waybar.chromium { 37 | background-color: #000000; 38 | border: none; 39 | } 40 | 41 | #workspaces button { 42 | padding: 0 5px; 43 | background-color: transparent; 44 | color: #ffffff; 45 | /* Use box-shadow instead of border so the text isn't offset */ 46 | box-shadow: inset 0 -3px transparent; 47 | } 48 | 49 | /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ 50 | #workspaces button:hover { 51 | background: rgba(0, 0, 0, 0.2); 52 | } 53 | 54 | #workspaces button.focused { 55 | background-color: #d7af87; 56 | color: #000; 57 | font-weight: bold; 58 | } 59 | 60 | #workspaces button.urgent { 61 | background-color: #eb4d4b; 62 | color: #fff; 63 | } 64 | 65 | #mode { 66 | background-color: #64727d; 67 | } 68 | 69 | #clock, 70 | #battery, 71 | #cpu, 72 | #memory, 73 | #disk, 74 | #temperature, 75 | #backlight, 76 | #network, 77 | #pulseaudio, 78 | #custom-media, 79 | #tray, 80 | #mode, 81 | #idle_inhibitor, 82 | #mpd { 83 | padding: 0 10px; 84 | margin: 4px 3px; 85 | color: #ffffff; 86 | background-color: transparent; 87 | font-weight: bold; 88 | } 89 | 90 | #window, 91 | #workspaces { 92 | margin: 4px 3px; 93 | } 94 | 95 | /* If workspaces is the leftmost module, omit left margin */ 96 | .modules-left > widget:first-child > #workspaces { 97 | margin-left: 3px; 98 | } 99 | 100 | .modules-center > widget { 101 | font-weight: bold; 102 | } 103 | 104 | /* If workspaces is the rightmost module, omit right margin */ 105 | .modules-right > widget:last-child > #workspaces { 106 | margin-right: 0; 107 | } 108 | 109 | #battery { 110 | background-color: #ffffff; 111 | color: #000000; 112 | } 113 | 114 | #battery.charging, 115 | #battery.plugged { 116 | color: #ffffff; 117 | background-color: #26a65b; 118 | } 119 | 120 | @keyframes blink { 121 | to { 122 | background-color: #ffffff; 123 | color: #000000; 124 | } 125 | } 126 | 127 | #battery.critical:not(.charging) { 128 | background-color: #f53c3c; 129 | color: #ffffff; 130 | animation-name: blink; 131 | animation-duration: 0.5s; 132 | animation-timing-function: linear; 133 | animation-iteration-count: infinite; 134 | animation-direction: alternate; 135 | } 136 | 137 | label:focus { 138 | background-color: #000000; 139 | } 140 | 141 | #cpu { 142 | background-color: transparent; 143 | color: #2ec27e; 144 | font-weight: bold; 145 | } 146 | 147 | #memory { 148 | background-color: #d7af87; 149 | color: #000000; 150 | } 151 | 152 | #disk { 153 | background-color: #964b00; 154 | } 155 | 156 | #network.disconnected { 157 | color: #f53c3c; 158 | } 159 | 160 | #pulseaudio { 161 | color: #afafaf; 162 | } 163 | 164 | #pulseaudio.muted { 165 | background-color: #90b1b1; 166 | color: #2a5c45; 167 | } 168 | 169 | #custom-media { 170 | background-color: #66cc99; 171 | color: #2a5c45; 172 | min-width: 100px; 173 | } 174 | 175 | #custom-media.custom-spotify { 176 | background-color: #66cc99; 177 | } 178 | 179 | #custom-media.custom-vlc { 180 | background-color: #ffa000; 181 | } 182 | 183 | #temperature { 184 | background-color: #f0932b; 185 | } 186 | 187 | #temperature.critical { 188 | background-color: #eb4d4b; 189 | } 190 | 191 | #tray { 192 | background-color: #2980b9; 193 | } 194 | 195 | #tray > .passive { 196 | -gtk-icon-effect: dim; 197 | } 198 | 199 | #tray > .needs-attention { 200 | -gtk-icon-effect: highlight; 201 | background-color: #eb4d4b; 202 | } 203 | 204 | #idle_inhibitor { 205 | background-color: #2d3436; 206 | } 207 | 208 | #idle_inhibitor.activated { 209 | background-color: #ecf0f1; 210 | color: #2d3436; 211 | } 212 | 213 | #mpd { 214 | background-color: #66cc99; 215 | color: #2a5c45; 216 | } 217 | 218 | #mpd.disconnected { 219 | background-color: #f53c3c; 220 | } 221 | 222 | #mpd.stopped { 223 | background-color: #90b1b1; 224 | } 225 | 226 | #mpd.paused { 227 | background-color: #51a37a; 228 | } 229 | 230 | #language { 231 | font-weight: bold; 232 | padding: 0 5px; 233 | margin: 4px 3px; 234 | min-width: 16px; 235 | } 236 | 237 | #keyboard-state { 238 | background: #97e1ad; 239 | color: #000000; 240 | padding: 0 0px; 241 | margin: 0 5px; 242 | min-width: 16px; 243 | } 244 | 245 | #keyboard-state > label { 246 | padding: 0 5px; 247 | } 248 | 249 | #keyboard-state > label.locked { 250 | background: rgba(0, 0, 0, 0.2); 251 | } 252 | -------------------------------------------------------------------------------- /terminal/alacritty/alacritty.info: -------------------------------------------------------------------------------- 1 | alacritty|alacritty terminal emulator, 2 | use=alacritty+common, 3 | rs1=\Ec\E]104\007, 4 | ccc, 5 | colors#0x100, pairs#0x7FFF, 6 | initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%* 7 | %{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, 8 | oc=\E]104\007, 9 | setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48; 10 | 5;%p1%d%;m, 11 | setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5 12 | ;%p1%d%;m, 13 | setb@, setf@, 14 | 15 | alacritty-direct|alacritty with direct color indexing, 16 | use=alacritty+common, 17 | RGB, 18 | colors#0x1000000, pairs#0x7FFF, 19 | initc@, op=\E[39;49m, 20 | setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:\:%p1%{65536}%/%d\:%p1%{256} 21 | %/%{255}%&%d\:%p1%{255}%&%d%;m, 22 | setaf=\E[%?%p1%{8}%<%t3%p1%d%e38\:2\:\:%p1%{65536}%/%d\:%p1%{256} 23 | %/%{255}%&%d\:%p1%{255}%&%d%;m, 24 | setb@, setf@, 25 | 26 | alacritty+common|base fragment for alacritty, 27 | OTbs, am, bce, km, mir, msgr, xenl, AX, XT, 28 | colors#8, cols#80, it#8, lines#24, pairs#64, 29 | acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 30 | bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, 31 | clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=\r, 32 | csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 33 | cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, 34 | cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 35 | cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, 36 | dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, 37 | el1=\E[1K, flash=\E[?5h$<100/>\E[?5l, home=\E[H, 38 | hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, 39 | il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m, 40 | is2=\E[!p\E[?3;4l\E[4l\E>, kmous=\E[M, meml=\El, 41 | memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, 42 | rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, 43 | rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, 44 | rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, setab=\E[4%p1%dm, 45 | setaf=\E[3%p1%dm, 46 | setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} 47 | %=%t3%e%p1%d%;m, 48 | setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} 49 | %=%t3%e%p1%d%;m, 50 | sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%; 51 | %?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, 52 | sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, 53 | smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m, smul=\E[4m, 54 | tbc=\E[3g, vpa=\E[%i%p1%dd, E3=\E[3J, 55 | kbs=^?, 56 | ritm=\E[23m, sitm=\E[3m, 57 | mc5i, 58 | mc0=\E[i, mc4=\E[4i, mc5=\E[5i, 59 | u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c, 60 | u9=\E[c, 61 | rmcup=\E[?1049l\E[23;0;0t, smcup=\E[?1049h\E[22;0;0t, 62 | npc, 63 | indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM, 64 | rin=\E[%p1%dT, 65 | rep=%p1%c\E[%p2%{1}%-%db, 66 | rmxx=\E[29m, smxx=\E[9m, 67 | kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\EOF, 68 | khome=\EOH, 69 | kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, 70 | kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S, 71 | kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, 72 | kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, 73 | kf23=\E[23;2~, kf24=\E[24;2~, kf25=\E[1;5P, kf26=\E[1;5Q, 74 | kf27=\E[1;5R, kf28=\E[1;5S, kf29=\E[15;5~, kf3=\EOR, 75 | kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, 76 | kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~, 77 | kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q, kf39=\E[1;6R, 78 | kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~, kf42=\E[17;6~, 79 | kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~, 80 | kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, 81 | kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q, kf51=\E[1;3R, 82 | kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~, 83 | kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~, 84 | kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~, 85 | kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~, 86 | kf8=\E[19~, kf9=\E[20~, 87 | kLFT=\E[1;2D, kRIT=\E[1;2C, kind=\E[1;2B, kri=\E[1;2A, 88 | kDN=\E[1;2B, kDN3=\E[1;3B, kDN4=\E[1;4B, kDN5=\E[1;5B, 89 | kDN6=\E[1;6B, kDN7=\E[1;7B, kLFT3=\E[1;3D, kLFT4=\E[1;4D, 90 | kLFT5=\E[1;5D, kLFT6=\E[1;6D, kLFT7=\E[1;7D, 91 | kRIT3=\E[1;3C, kRIT4=\E[1;4C, kRIT5=\E[1;5C, 92 | kRIT6=\E[1;6C, kRIT7=\E[1;7C, kUP=\E[1;2A, kUP3=\E[1;3A, 93 | kUP4=\E[1;4A, kUP5=\E[1;5A, kUP6=\E[1;6A, kUP7=\E[1;7A, 94 | kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, 95 | kNXT=\E[6;2~, kPRV=\E[5;2~, kich1=\E[2~, knp=\E[6~, 96 | kpp=\E[5~, kDC3=\E[3;3~, kDC4=\E[3;4~, kDC5=\E[3;5~, 97 | kDC6=\E[3;6~, kDC7=\E[3;7~, kEND3=\E[1;3F, kEND4=\E[1;4F, 98 | kEND5=\E[1;5F, kEND6=\E[1;6F, kEND7=\E[1;7F, 99 | kHOM3=\E[1;3H, kHOM4=\E[1;4H, kHOM5=\E[1;5H, 100 | kHOM6=\E[1;6H, kHOM7=\E[1;7H, kIC3=\E[2;3~, kIC4=\E[2;4~, 101 | kIC5=\E[2;5~, kIC6=\E[2;6~, kIC7=\E[2;7~, kNXT3=\E[6;3~, 102 | kNXT4=\E[6;4~, kNXT5=\E[6;5~, kNXT6=\E[6;6~, 103 | kNXT7=\E[6;7~, kPRV3=\E[5;3~, kPRV4=\E[5;4~, 104 | kPRV5=\E[5;5~, kPRV6=\E[5;6~, kPRV7=\E[5;7~, 105 | kdch1=\E[3~, 106 | Cr=\E]112\007, Cs=\E]12;%p1%s\007, 107 | Ms=\E]52;%p1%s;%p2%s\007, Se=\E[0 q, Ss=\E[%p1%d q, 108 | hs, dsl=\E]2;\007, fsl=^G, tsl=\E]2;, 109 | Smulx=\E[4\:%p1%dm, 110 | -------------------------------------------------------------------------------- /wms/sway/waybar/config: -------------------------------------------------------------------------------- 1 | { 2 | // "layer": "top", // Waybar at top layer 3 | // "position": "bottom", // Waybar position (top|bottom|left|right) 4 | "height": 30, // Waybar height (to be removed for auto height) 5 | // "width": 1280, // Waybar width 6 | // Choose the order of the modules 7 | "modules-left": ["sway/workspaces", "sway/mode", "custom/media"], 8 | "modules-center": ["sway/window"], 9 | "modules-right": ["pulseaudio", "cpu", "memory", "temperature", "keyboard-state", "sway/language", "clock", "tray"], 10 | // Modules configuration 11 | // "sway/workspaces": { 12 | // "disable-scroll": true, 13 | // "all-outputs": true, 14 | // "format": "{name}: {icon}", 15 | // "format-icons": { 16 | // "1": "", 17 | // "2": "", 18 | // "3": "", 19 | // "4": "", 20 | // "5": "", 21 | // "urgent": "", 22 | // "focused": "", 23 | // "default": "" 24 | // } 25 | // }, 26 | "keyboard-state": { 27 | "numlock": true, 28 | "capslock": true, 29 | "format": "{name} {icon}", 30 | "format-icons": { 31 | "locked": "", 32 | "unlocked": "" 33 | } 34 | }, 35 | "sway/mode": { 36 | "format": "{}" 37 | }, 38 | "mpd": { 39 | "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", 40 | "format-disconnected": "Disconnected ", 41 | "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", 42 | "unknown-tag": "N/A", 43 | "interval": 2, 44 | "consume-icons": { 45 | "on": " " 46 | }, 47 | "random-icons": { 48 | "off": " ", 49 | "on": " " 50 | }, 51 | "repeat-icons": { 52 | "on": " " 53 | }, 54 | "single-icons": { 55 | "on": "1 " 56 | }, 57 | "state-icons": { 58 | "paused": "", 59 | "playing": "" 60 | }, 61 | "tooltip-format": "MPD (connected)", 62 | "tooltip-format-disconnected": "MPD (disconnected)" 63 | }, 64 | "idle_inhibitor": { 65 | "format": "{icon}", 66 | "format-icons": { 67 | "activated": "", 68 | "deactivated": "" 69 | } 70 | }, 71 | "tray": { 72 | // "icon-size": 21, 73 | "spacing": 10 74 | }, 75 | "clock": { 76 | // "timezone": "America/New_York", 77 | "tooltip-format": "{:%Y %B}\n{calendar}", 78 | "format-alt": "{:%Y-%m-%d}" 79 | }, 80 | "cpu": { 81 | "format": "{usage}% ", 82 | "tooltip": false 83 | }, 84 | "memory": { 85 | "format": "{}% " 86 | }, 87 | "temperature": { 88 | // "thermal-zone": 2, 89 | // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", 90 | "critical-threshold": 80, 91 | // "format-critical": "{temperatureC}°C {icon}", 92 | "format": "{temperatureC}°C {icon}", 93 | "format-icons": ["", "", ""] 94 | }, 95 | "backlight": { 96 | // "device": "acpi_video1", 97 | "format": "{percent}% {icon}", 98 | "format-icons": ["", ""] 99 | }, 100 | "battery": { 101 | "states": { 102 | // "good": 95, 103 | "warning": 30, 104 | "critical": 15 105 | }, 106 | "format": "{capacity}% {icon}", 107 | "format-charging": "{capacity}% ", 108 | "format-plugged": "{capacity}% ", 109 | "format-alt": "{time} {icon}", 110 | // "format-good": "", // An empty format will hide the module 111 | // "format-full": "", 112 | "format-icons": ["", "", "", "", ""] 113 | }, 114 | "battery#bat2": { 115 | "bat": "BAT2" 116 | }, 117 | "network": { 118 | // "interface": "wlp2*", // (Optional) To force the use of this interface 119 | "format-wifi": "{essid} ({signalStrength}%) ", 120 | "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", 121 | "format-linked": "{ifname} (No IP) ", 122 | "format-disconnected": "Disconnected ⚠", 123 | "format-alt": "{ifname}: {ipaddr}/{cidr}" 124 | }, 125 | "pulseaudio": { 126 | // "scroll-step": 1, // %, can be a float 127 | "format": "{volume}% {icon} {format_source}", 128 | "format-bluetooth": "{volume}% {icon} {format_source}", 129 | "format-bluetooth-muted": " {icon} {format_source}", 130 | "format-muted": " {format_source}", 131 | "format-source": "{volume}% ", 132 | "format-source-muted": "", 133 | "format-icons": { 134 | "headphone": "", 135 | "hands-free": "", 136 | "headset": "", 137 | "phone": "", 138 | "portable": "", 139 | "car": "", 140 | "default": ["", "", ""] 141 | }, 142 | "on-click": "pavucontrol" 143 | }, 144 | "custom/media": { 145 | "format": "{icon} {}", 146 | "return-type": "json", 147 | "max-length": 40, 148 | "format-icons": { 149 | "spotify": "", 150 | "default": "🎜" 151 | }, 152 | "escape": true, 153 | "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder 154 | // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name 155 | } 156 | } 157 | 158 | -------------------------------------------------------------------------------- /wms/i3/config: -------------------------------------------------------------------------------- 1 | # This file has been auto-generated by i3-config-wizard(1). 2 | # It will not be overwritten, so edit it as you like. 3 | # 4 | # Should you change your keyboard layout some time, delete 5 | # this file and re-run i3-config-wizard(1). 6 | # 7 | 8 | # i3 config file (v4) 9 | # 10 | # Please see https://i3wm.org/docs/userguide.html for a complete reference! 11 | 12 | set $mod Mod4 13 | 14 | # Font for window titles. Will also be used by the bar unless a different font 15 | # is used in the bar {} block below. 16 | font pango:VictorMono NF Regular 10 17 | 18 | # This font is widely installed, provides lots of unicode glyphs, right-to-left 19 | # text rendering and scalability on retina/hidpi displays (thanks to pango). 20 | #font pango:DejaVu Sans Mono 8 21 | 22 | # The combination of xss-lock, nm-applet and pactl is a popular choice, so 23 | # they are included here as an example. Modify as you see fit. 24 | 25 | # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the 26 | # screen before suspend. Use loginctl lock-session to lock your screen. 27 | exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork 28 | 29 | # NetworkManager is the most popular way to manage wireless networks on Linux, 30 | # and nm-applet is a desktop environment-independent system tray GUI for it. 31 | exec --no-startup-id nm-applet 32 | 33 | # Use pactl to adjust volume in PulseAudio. 34 | set $refresh_i3status killall -SIGUSR1 i3status 35 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status 36 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status 37 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status 38 | bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status 39 | 40 | # Use Mouse+$mod to drag floating windows to their wanted position 41 | floating_modifier $mod 42 | 43 | # start a terminal 44 | bindsym $mod+Return exec alacritty 45 | 46 | # kill focused window 47 | bindsym $mod+Shift+q kill 48 | 49 | # start dmenu (a program launcher) 50 | bindsym $mod+d exec --no-startup-id dmenu_run 51 | # A more modern dmenu replacement is rofi: 52 | # bindcode $mod+40 exec "rofi -modi drun,run -show drun" 53 | # There also is i3-dmenu-desktop which only displays applications shipping a 54 | # .desktop file. It is a wrapper around dmenu, so you need that installed. 55 | # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop 56 | 57 | # change focus 58 | bindsym $mod+j focus left 59 | bindsym $mod+k focus down 60 | bindsym $mod+l focus up 61 | bindsym $mod+semicolon focus right 62 | 63 | # alternatively, you can use the cursor keys: 64 | bindsym $mod+Left focus left 65 | bindsym $mod+Down focus down 66 | bindsym $mod+Up focus up 67 | bindsym $mod+Right focus right 68 | 69 | # move focused window 70 | bindsym $mod+Shift+j move left 71 | bindsym $mod+Shift+k move down 72 | bindsym $mod+Shift+l move up 73 | bindsym $mod+Shift+semicolon move right 74 | 75 | # alternatively, you can use the cursor keys: 76 | bindsym $mod+Shift+Left move left 77 | bindsym $mod+Shift+Down move down 78 | bindsym $mod+Shift+Up move up 79 | bindsym $mod+Shift+Right move right 80 | 81 | # split in horizontal orientation 82 | bindsym $mod+h split h 83 | 84 | # split in vertical orientation 85 | bindsym $mod+v split v 86 | 87 | # enter fullscreen mode for the focused container 88 | bindsym $mod+f fullscreen toggle 89 | 90 | # change container layout (stacked, tabbed, toggle split) 91 | bindsym $mod+s layout stacking 92 | bindsym $mod+w layout tabbed 93 | bindsym $mod+e layout toggle split 94 | 95 | # toggle tiling / floating 96 | bindsym $mod+Shift+space floating toggle 97 | 98 | # change focus between tiling / floating windows 99 | bindsym $mod+space focus mode_toggle 100 | 101 | # focus the parent container 102 | bindsym $mod+a focus parent 103 | 104 | # focus the child container 105 | #bindsym $mod+d focus child 106 | 107 | # Define names for default workspaces for which we configure key bindings later on. 108 | # We use variables to avoid repeating the names in multiple places. 109 | set $ws1 "1" 110 | set $ws2 "2" 111 | set $ws3 "3" 112 | set $ws4 "4" 113 | set $ws5 "5" 114 | set $ws6 "6" 115 | set $ws7 "7" 116 | set $ws8 "8" 117 | set $ws9 "9" 118 | set $ws10 "10" 119 | 120 | # switch to workspace 121 | bindsym $mod+1 workspace number $ws1 122 | bindsym $mod+2 workspace number $ws2 123 | bindsym $mod+3 workspace number $ws3 124 | bindsym $mod+4 workspace number $ws4 125 | bindsym $mod+5 workspace number $ws5 126 | bindsym $mod+6 workspace number $ws6 127 | bindsym $mod+7 workspace number $ws7 128 | bindsym $mod+8 workspace number $ws8 129 | bindsym $mod+9 workspace number $ws9 130 | bindsym $mod+0 workspace number $ws10 131 | 132 | # move focused container to workspace 133 | bindsym $mod+Shift+1 move container to workspace number $ws1 134 | bindsym $mod+Shift+2 move container to workspace number $ws2 135 | bindsym $mod+Shift+3 move container to workspace number $ws3 136 | bindsym $mod+Shift+4 move container to workspace number $ws4 137 | bindsym $mod+Shift+5 move container to workspace number $ws5 138 | bindsym $mod+Shift+6 move container to workspace number $ws6 139 | bindsym $mod+Shift+7 move container to workspace number $ws7 140 | bindsym $mod+Shift+8 move container to workspace number $ws8 141 | bindsym $mod+Shift+9 move container to workspace number $ws9 142 | bindsym $mod+Shift+0 move container to workspace number $ws10 143 | 144 | # reload the configuration file 145 | bindsym $mod+Shift+c reload 146 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 147 | bindsym $mod+Shift+r restart 148 | # exit i3 (logs you out of your X session) 149 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" 150 | 151 | # resize window (you can also use the mouse for that) 152 | mode "resize" { 153 | # These bindings trigger as soon as you enter the resize mode 154 | 155 | # Pressing left will shrink the window’s width. 156 | # Pressing right will grow the window’s width. 157 | # Pressing up will shrink the window’s height. 158 | # Pressing down will grow the window’s height. 159 | bindsym j resize shrink width 10 px or 10 ppt 160 | bindsym k resize grow height 10 px or 10 ppt 161 | bindsym l resize shrink height 10 px or 10 ppt 162 | bindsym semicolon resize grow width 10 px or 10 ppt 163 | 164 | # same bindings, but for the arrow keys 165 | bindsym Left resize shrink width 10 px or 10 ppt 166 | bindsym Down resize grow height 10 px or 10 ppt 167 | bindsym Up resize shrink height 10 px or 10 ppt 168 | bindsym Right resize grow width 10 px or 10 ppt 169 | 170 | # back to normal: Enter or Escape or $mod+r 171 | bindsym Return mode "default" 172 | bindsym Escape mode "default" 173 | bindsym $mod+r mode "default" 174 | } 175 | 176 | bindsym $mod+r mode "resize" 177 | 178 | # Start i3bar to display a workspace bar (plus the system information i3status 179 | # finds out, if available) 180 | set $back #000000e6 181 | set $gold #d7af97 182 | set $gray #3a3b3f 183 | set $sep #3a3b3f 184 | set $red #fd6389 185 | set $green #2ec27e 186 | set $textcolor #5f5f5f 187 | set $btextcolor #ffffff 188 | set $itextcolor #5f5f5f 189 | 190 | bar { 191 | mode dock 192 | status_command i3status -c ~/.config/i3/i3status.conf 193 | i3bar_command i3bar --transparency 194 | position top 195 | colors { 196 | background $back 197 | statusline $textcolor 198 | separator $gray 199 | 200 | focused_workspace $gray $gray $gold 201 | inactive_workspace $gray $gray $itextcolor 202 | urgent_workspace $red $red $textcolor 203 | } 204 | } 205 | 206 | # Gaps 207 | for_window [class="^.*"] border pixel 2 208 | gaps inner 20 209 | gaps outer 10 210 | 211 | # Window compositor 212 | exec_always picom -f 213 | 214 | # Keymap 215 | exec_always setxkbmap -layout br -variant abnt2 216 | -------------------------------------------------------------------------------- /configure.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # --------------------------------- 4 | # OS Detection: Linux and macOS 5 | # --------------------------------- 6 | case "$OSTYPE" in 7 | darwin*) system="macOS" ;; 8 | linux*) system="linux" ;; 9 | *) system="" ;; 10 | esac 11 | 12 | # --------------------------------- 13 | # Paths 14 | # --------------------------------- 15 | # VIM 16 | vim_folder="$(pwd)/editors/vim" 17 | vim_path="$HOME/.vim" 18 | 19 | # NVIM 20 | nvim_folder="$(pwd)/editors/nvim" 21 | nvim_path="$HOME/.config/nvim" 22 | 23 | # Helix 24 | helix_folder="$(pwd)/editors/helix" 25 | helix_path="$HOME/.config/helix" 26 | 27 | # Vim Plug 28 | vimplug_file="$HOME/.vim/autoload/plug.vim" 29 | vimplug_url='https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 30 | 31 | # CoC 32 | coc_json="$(pwd)/editors/nvim/coc-settings.json" 33 | coc_nvim_path="$nvim_path/coc-settings.json" 34 | coc_vim_path="$vim_path/coc-settings.json" 35 | 36 | # Tmux 37 | tmux_file="$(pwd)/terminal/tmux/.tmux.conf" 38 | tmux_path="$HOME/.tmux.conf" 39 | 40 | # Zellij 41 | zellij_file="$(pwd)/terminal/zellij/config.kdl" 42 | zellij_folder="$HOME/.config/zellij" 43 | zellij_path="$zellij_folder/config.kdl" 44 | 45 | # Git 46 | git_file="$(pwd)/git/.gitconfig" 47 | git_path="$HOME/.gitconfig" 48 | 49 | # Fish 50 | fish_file="$(pwd)/terminal/fish/config.fish" 51 | fish_folder="$HOME/.config/fish" 52 | fish_path="$fish_folder/config.fish" 53 | 54 | # Nu Shell 55 | nu_config_file="$(pwd)/terminal/nushell/config.nu" 56 | nu_config_folder="$HOME/.config/nushell" 57 | nu_config_path="$nu_config_folder/config.nu" 58 | nu_env_file="$(pwd)/terminal/nushell/env.nu" 59 | nu_env_path="$nu_config_folder/env.nu" 60 | 61 | # Terminal 62 | term_info="$(pwd)/terminal/xterm-256color-italic.terminfo" 63 | 64 | # Alacritty 65 | alacritty_file="$(pwd)/terminal/alacritty/alacritty-$system.toml" 66 | alacritty_folder="$HOME/.config/alacritty" 67 | alacritty_path="$alacritty_folder/alacritty.toml" 68 | 69 | # Kitty 70 | kitty_file="$(pwd)/terminal/kitty/kitty-$system.conf" 71 | kitty_folder="$HOME/.config/kitty" 72 | kitty_path="$kitty_folder/kitty.conf" 73 | 74 | # Wezterm 75 | wezterm_file="$(pwd)/terminal/wezterm/wezterm-$system.lua" 76 | wezterm_folder="$HOME/.config/wezterm/" 77 | wezterm_path="$wezterm_folder/wezterm.lua" 78 | 79 | # i3 80 | i3_files="$(pwd)/wms/i3" 81 | i3_path="$HOME/.config/" 82 | 83 | # Sway and Waybar 84 | sway_files="$(pwd)/wms/sway/sway" 85 | waybar_files="$(pwd)/wms/sway/waybar" 86 | sway_path="$HOME/.config/" 87 | 88 | # Bash 89 | bash_rc="$(pwd)/terminal/bash/.bashrc" 90 | bash_profile="$(pwd)/terminal/bash/.profile" 91 | 92 | # Yazi 93 | yazi_file="$(pwd)/terminal/yazi/yazi.toml" 94 | yazi_folder="$HOME/.config/yazi/" 95 | 96 | # --------------------------------- 97 | # Colors and formatting 98 | # --------------------------------- 99 | b="$(tput bold)" 100 | d='\033[2m' 101 | y='\033[33;33m' 102 | n='\033[0m' 103 | 104 | # --------------------------------- 105 | # Detect CTRL-C 106 | # --------------------------------- 107 | function exitGracefully() { 108 | printf "\n Good luck." 109 | exit 2 110 | } 111 | 112 | trap exitGracefully 2 113 | 114 | # --------------------------------- 115 | # Create symbolic links 116 | # --------------------------------- 117 | function createLink() { 118 | if [ "$4" != "show" ]; then 119 | clear; 120 | echo "Creating symlinks to $3 configuration file(s):" 121 | fi 122 | 123 | if type -p "$3" > /dev/null; then 124 | echo -e " - ${d} $2 ${y}->${b} $1 ${n}" 125 | ln -sf $1 $2 126 | elif [ "$3" == 'alacritty' ]; then 127 | echo -e " - ${d} $2 ${y}->${b} $1 ${n}" 128 | ln -sf $1 $2 129 | else 130 | echo "Ooops: $3 not found." 131 | fi 132 | } 133 | 134 | # --------------------------------- 135 | # Configure italics on terminal 136 | # --------------------------------- 137 | function configureItalics() { 138 | clear 139 | echo -e "\033[3m Is this text in italics? \033[23m" 140 | read -p " [y/n]: " hasItalic 141 | 142 | case $hasItalic in 143 | [yY]) 144 | echo 'You do not need to setup this one!' 145 | break;; 146 | [nN]) 147 | echo 'Setting up terminal profile:' 148 | tic $term_info 149 | break;; 150 | *) 151 | echo 'Skipping!' 152 | break; 153 | esac 154 | } 155 | 156 | # --------------------------------- 157 | # Instructions on screen 158 | # --------------------------------- 159 | clear 160 | echo -e "$d-------------------------------------------------------$n" 161 | echo -e "$b Configuration files setup script $n" 162 | echo -e "$b Current OS:$n ${y}$system ${d}($OSTYPE)${n}" 163 | echo -e "$d-------------------------------------------------------$n" 164 | echo ' Select an action below to start:' 165 | echo -e " ${y}0)${n} Configure ${b}Vim${n}" 166 | echo -e " ${y}1)${n} Configure ${b}Neovim${n}" 167 | echo -e " ${y}2)${n} Configure ${b}Neovim (with Lua)${n}" 168 | echo -e " ${y}3)${n} Configure ${b}Helix${n}" 169 | echo -e " ${y}4)${n} Configure ${b}Tmux${n}" 170 | echo -e " ${y}5)${n} Configure ${b}Zellij${n}" 171 | echo -e " ${y}6)${n} Configure ${b}Git${n}" 172 | echo -e " ${y}7)${n} Configure ${b}Fish Shell${n}" 173 | echo -e " ${y}8)${n} Configure ${b}Nu Shell${n}" 174 | echo -e " ${y}9)${n} Configure ${b}italics${n} in terminal" 175 | echo -e " ${y}10)${n} Configure ${b}Alacritty${n}" 176 | echo -e " ${y}11)${n} Configure ${b}Kitty${n}" 177 | echo -e " ${y}12)${n} Configure ${b}Wezterm${n}" 178 | echo -e " ${y}13)${n} Install ${b}Vim Plug${n}" 179 | echo -e " ${y}14)${n} Configure ${b}i3${n}" 180 | echo -e " ${y}15)${n} Configure ${b}Sway${n} and ${b}Waybar${n}" 181 | echo -e " ${y}16)${n} Configure ${b}Bash${n} and ${b}Profile${n}" 182 | echo -e " ${y}17)${n} Configure ${b}Yazi${n}" 183 | echo -e "$d-------------------------------------------------------$n" 184 | 185 | # --------------------------------- 186 | # Input option 187 | # --------------------------------- 188 | read -p ' - Which option?: ' answer 189 | 190 | # --------------------------------- 191 | # Do the configuration after input 192 | # --------------------------------- 193 | while true 194 | do 195 | case $answer in 196 | '0') 197 | # Vim 198 | createLink $vim_folder/.vimrc "$HOME/.vimrc" 'vim' 199 | createLink $nvim_folder/colors/ $vim_path/colors 'vim' 'show' 200 | createLink $coc_json $coc_vim_path 'vim' 'show' 201 | break;; 202 | '1') 203 | # Neovim 204 | mkdir -p $nvim_path 205 | createLink $nvim_folder/init.vim "$nvim_path/init.vim" 'nvim' 206 | createLink $nvim_folder/colors/ $nvim_path/colors 'nvim' 'show' 207 | createLink $coc_json $coc_nvim_path 'nvim' 'show' 208 | break;; 209 | '2') 210 | # Packer 211 | git clone --depth 1 https://github.com/wbthomason/packer.nvim\ 212 | ~/.local/share/nvim/site/pack/packer/start/packer.nvim 213 | mkdir -p $nvim_path 214 | createLink $nvim_folder/init.lua "$nvim_path/init.lua" 'nvim' 215 | createLink $nvim_folder/colors/ $nvim_path/colors 'nvim' 'show' 216 | createLink $nvim_folder/lua/ $nvim_path/lua 'nvim' 'show' 217 | break;; 218 | '3') 219 | # Helix 220 | mkdir -p $helix_folder 221 | 222 | # Check for Arch linux, as Helix uses the 'helix' command there 223 | if [ -f "/etc/arch-release" ]; then 224 | createLink $helix_folder/config.toml "$helix_path/config.toml" 'helix' 225 | createLink $helix_folder/languages.toml "$helix_path/languages.toml" 'helix' 226 | else 227 | createLink $helix_folder/config.toml "$helix_path/config.toml" 'hx' 228 | createLink $helix_folder/languages.toml "$helix_path/languages.toml" 'hx' 229 | fi 230 | break;; 231 | '4') 232 | # Tmux 233 | createLink $tmux_file $tmux_path 'tmux' 234 | break;; 235 | '5') 236 | # Zellij 237 | mkdir -p $zellij_folder 238 | createLink $zellij_file $zellij_path 'zellij' 239 | break;; 240 | '6') 241 | # Git 242 | createLink $git_file $git_path 'git' 243 | break;; 244 | '7') 245 | # Fish shell 246 | mkdir -p $fish_folder 247 | createLink $fish_file $fish_path 'fish' 248 | break;; 249 | '8') 250 | # Nu shell 251 | mkdir -p $nu_config_folder 252 | createLink $nu_config_file $nu_config_path 'nu' 253 | createLink $nu_env_file $nu_env_path 'nu' 254 | break;; 255 | '9') 256 | # Italics 257 | configureItalics 258 | break;; 259 | '10') 260 | # Alacritty 261 | mkdir -p $alacritty_folder 262 | createLink $alacritty_file $alacritty_path 'alacritty' 263 | break;; 264 | '11') 265 | # Kitty 266 | createLink $kitty_file $kitty_path 'kitty' 267 | break;; 268 | '12') 269 | # Wezterm 270 | mkdir -p $wezterm_folder 271 | createLink $wezterm_file $wezterm_path 'cd' 272 | break;; 273 | '13') 274 | # VimPlug 275 | curl -fLo $vimplug_file --create-dirs $vimplug_url 276 | break;; 277 | '14') 278 | # i3 279 | createLink $i3_files $i3_path 'i3' 280 | break;; 281 | '15') 282 | # Sway 283 | createLink $sway_files $sway_path 'sway' 284 | createLink $waybar_files $sway_path 'waybar' 285 | break;; 286 | '16') 287 | # Bash and profile 288 | createLink $bash_rc "$HOME/.bashrc" 'bash' 289 | createLink $bash_profile "$HOME/.profile" 'bash' 290 | break;; 291 | '17') 292 | # Yazi 293 | mkdir -p $yazi_folder 294 | createLink $yazi_file "$HOME/.config/yazi/yazi.toml" 'yazi' 295 | break;; 296 | *) 297 | echo " Good luck." 298 | break; 299 | esac 300 | done 301 | 302 | -------------------------------------------------------------------------------- /system/nixos/configuration.nix: -------------------------------------------------------------------------------- 1 | # Edit this configuration file to define what should be installed on 2 | # your system. Help is available in the configuration.nix(5) man page 3 | # and in the NixOS manual (accessible by running ‘nixos-help’). 4 | 5 | { config, pkgs, ... }: 6 | 7 | let 8 | unstableTarball = 9 | fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"; 10 | in 11 | { 12 | imports = 13 | [ # Include the results of the hardware scan. 14 | ./hardware-configuration.nix 15 | ]; 16 | 17 | # Bootloader. 18 | boot = { 19 | supportedFilesystems = [ "ntfs" ]; 20 | loader = { 21 | systemd-boot = { 22 | configurationLimit = 10; 23 | consoleMode = "max"; 24 | enable = true; 25 | }; 26 | }; 27 | }; 28 | 29 | # Nix 30 | nix = { 31 | gc = { 32 | automatic = true; 33 | dates = "weekly"; 34 | options = "--delete-older-than 7d"; 35 | }; 36 | 37 | settings = { 38 | experimental-features = "nix-command flakes"; 39 | }; 40 | }; 41 | 42 | # AMD ROCm 43 | hardware.graphics.enable = true; 44 | 45 | # Bluetooth 46 | hardware.bluetooth.enable = true; 47 | 48 | # Networking 49 | networking.hostName = "nixos"; # Define your hostname. 50 | # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 51 | 52 | # Configure network proxy if necessary 53 | # networking.proxy.default = "http://user:password@proxy:port/"; 54 | # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 55 | 56 | # Enable networking 57 | networking.networkmanager.enable = true; 58 | networking.extraHosts = '' 59 | 127.0.0.1 local.elf 60 | 127.0.0.1 fepo.elf 61 | 127.0.0.1 test.elf 62 | ''; 63 | 64 | # Set your time zone. 65 | time.timeZone = "America/Sao_Paulo"; 66 | time.hardwareClockInLocalTime = true; 67 | 68 | # Select internationalisation properties. 69 | i18n.defaultLocale = "pt_BR.UTF-8"; 70 | 71 | i18n.extraLocaleSettings = { 72 | LC_ADDRESS = "pt_BR.UTF-8"; 73 | LC_IDENTIFICATION = "pt_BR.UTF-8"; 74 | LC_MEASUREMENT = "pt_BR.UTF-8"; 75 | LC_MONETARY = "pt_BR.UTF-8"; 76 | LC_NAME = "pt_BR.UTF-8"; 77 | LC_NUMERIC = "pt_BR.UTF-8"; 78 | LC_PAPER = "pt_BR.UTF-8"; 79 | LC_TELEPHONE = "pt_BR.UTF-8"; 80 | LC_TIME = "pt_BR.UTF-8"; 81 | }; 82 | 83 | # Enable the X11 windowing system. 84 | services.xserver.enable = true; 85 | 86 | # Enable the GNOME Desktop Environment. 87 | services.xserver.displayManager.gdm.enable = true; 88 | services.xserver.desktopManager.gnome.enable = true; 89 | # services.displayManager.sddm.enable = true; 90 | # services.displayManager.sddm.wayland.enable = true; 91 | # services.desktopManager.plasma6.enable = true; 92 | 93 | # DConf 94 | programs.dconf.enable = true; 95 | 96 | # Steam 97 | programs.steam = { 98 | enable = true; 99 | gamescopeSession.enable = true; 100 | remotePlay.openFirewall = true; 101 | dedicatedServer.openFirewall = true; 102 | }; 103 | 104 | # Gamemode 105 | programs.gamemode.enable = true; 106 | 107 | # Flatpak 108 | services.flatpak.enable = true; 109 | 110 | # Configure keymap in X11 111 | services.xserver.xkb = { 112 | layout = "br"; 113 | variant = ""; 114 | }; 115 | 116 | # Configure console keymap 117 | console.keyMap = "br-abnt2"; 118 | 119 | # Enable CUPS to print documents. 120 | services.printing.enable = true; 121 | 122 | # Enable sound with pipewire. 123 | hardware.pulseaudio.enable = false; 124 | security.rtkit.enable = true; 125 | services.pipewire = { 126 | enable = true; 127 | alsa.enable = true; 128 | alsa.support32Bit = true; 129 | pulse.enable = true; 130 | }; 131 | 132 | # Fonts 133 | fonts = { 134 | fontDir.enable = true; 135 | packages = with pkgs; [ 136 | fira 137 | (nerdfonts.override { fonts = [ "FiraCode" ]; }) 138 | ]; 139 | fontconfig = { 140 | defaultFonts = { 141 | serif = [ "Fira Sans" ]; 142 | sansSerif = [ "Fira Sans" ]; 143 | monospace = [ "FiraCode Nerd Font Retina" ]; 144 | }; 145 | }; 146 | }; 147 | 148 | # Virtualization 149 | virtualisation.libvirtd.enable = true; 150 | virtualisation.kvmgt.enable = true; 151 | 152 | # Fish Shell 153 | programs.fish.enable = true; 154 | 155 | # ADB 156 | programs.adb.enable = true; 157 | 158 | # Java 159 | programs.java.enable = true; 160 | 161 | # Install firefox. 162 | programs.firefox.enable = true; 163 | 164 | # Enable touchpad support (enabled default in most desktopManager). 165 | # services.xserver.libinput.enable = true; 166 | 167 | # Define a user account. Don't forget to set a password with ‘passwd’. 168 | users.users.elvessousa = { 169 | isNormalUser = true; 170 | description = "Elves Sousa"; 171 | extraGroups = [ "networkmanager" "wheel" "nginx" "kvm" "adbusers" ]; 172 | packages = with pkgs; [ 173 | adw-gtk3 174 | alacritty 175 | appimage-run 176 | authenticator 177 | blender-hip 178 | celluloid 179 | chromium 180 | # epiphany 181 | ffmpeg 182 | flatpak 183 | fragments 184 | # geary 185 | gimp 186 | dconf-editor 187 | gnome-extension-manager 188 | gnome-disk-utility 189 | gnome-software 190 | mdbook 191 | neovim 192 | nodejs 193 | onlyoffice-bin 194 | rustup 195 | ryujinx 196 | starship 197 | unstable.helix 198 | yazi 199 | vscodium 200 | wezterm 201 | winetricks 202 | wl-clipboard-x11 203 | zellij 204 | ]; 205 | }; 206 | 207 | # Allow unfree packages 208 | nixpkgs.config = { 209 | allowUnfree = true; 210 | packageOverrides = pkgs: { 211 | unstable = import unstableTarball { 212 | config = config.nixpkgs.config; 213 | }; 214 | }; 215 | }; 216 | 217 | # List packages installed in system profile 218 | environment.systemPackages = with pkgs; [ 219 | bat 220 | black 221 | bluez 222 | binutils 223 | eza 224 | gcc 225 | git 226 | glibc 227 | gnome-tweaks 228 | gnome-bluetooth 229 | go 230 | goimports-reviser 231 | gopls 232 | # lutris 233 | mkcert 234 | nil 235 | ntfs3g 236 | php 237 | php81Packages.composer 238 | python310Packages.pip 239 | python3Full 240 | taplo 241 | unzip 242 | vim 243 | vivaldi 244 | vivaldi-ffmpeg-codecs 245 | wget 246 | wineWowPackages.stable 247 | winetricks 248 | watchman 249 | ]; 250 | 251 | 252 | # LEMP Stack 253 | services.nginx = { 254 | user = "elvessousa"; 255 | enable = true; 256 | virtualHosts = 257 | let 258 | makeHost = address: { 259 | root = "/var/www/${address}"; 260 | serverName = address; 261 | serverAliases = [ address ]; 262 | extraConfig = '' 263 | index index.php index.html; 264 | ''; 265 | listen = [{ port = 80; addr="0.0.0.0"; }]; 266 | locations = { 267 | "/".extraConfig = '' 268 | try_files $uri $uri/ /index.php?$args; 269 | ''; 270 | "~* /(?:uploads|files)/.*\.php$".extraConfig = '' 271 | deny all; 272 | ''; 273 | "~ \.php$".extraConfig = '' 274 | fastcgi_intercept_errors on; 275 | fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket}; 276 | ''; 277 | "~* \.(js|css|png|jpg|jpeg|gif|ico)$".extraConfig = '' 278 | expires max; 279 | log_not_found off; 280 | ''; 281 | }; 282 | }; 283 | in 284 | { 285 | "local.elf" = (makeHost "local.elf"); 286 | "fepo.elf" = (makeHost "fepo.elf"); 287 | "test.elf" = (makeHost "test.elf"); 288 | }; 289 | }; 290 | 291 | # MySQL 292 | services.mysql = { 293 | enable = true; 294 | package = pkgs.mariadb; 295 | settings = { "mysqld" = { "bind-address" = "0.0.0.0"; "port" = 3308; }; }; 296 | initialScript = 297 | pkgs.writeText "initial-script" '' 298 | CREATE USER IF NOT EXISTS 'root'@'localhost' IDENTIFIED BY 'root'; 299 | CREATE USER IF NOT EXISTS 'fepo'@'%' IDENTIFIED BY 'fepo'; 300 | CREATE USER IF NOT EXISTS 'auction'@'%' IDENTIFIED BY 'auction'; 301 | 302 | CREATE DATABASE IF NOT EXISTS wordpress; 303 | CREATE DATABASE IF NOT EXISTS fepo; 304 | CREATE DATABASE IF NOT EXISTS auction; 305 | 306 | GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost'; 307 | GRANT ALL PRIVILEGES ON fepo.* TO 'root'@'localhost'; 308 | GRANT ALL PRIVILEGES ON auction.* TO 'root'@'localhost'; 309 | GRANT ALL PRIVILEGES ON bookario.* TO 'root'@'localhost'; 310 | 311 | GRANT ALL PRIVILEGES ON auction.* TO 'auction'@'%'; 312 | GRANT ALL PRIVILEGES ON fepo.* TO 'fepo'@'%'; 313 | ''; 314 | ensureDatabases = [ "wordpress" "fepo" "auction" "bookario" ]; 315 | ensureUsers = [ 316 | { 317 | name = "root"; 318 | ensurePermissions = { 319 | "root.*" = "ALL PRIVILEGES"; 320 | "*.*" = "ALL PRIVILEGES"; 321 | }; 322 | } 323 | ]; 324 | }; 325 | 326 | # PHPFM 327 | services.phpfpm.pools.mypool = { 328 | user = "nobody"; 329 | settings = { 330 | pm = "dynamic"; 331 | "listen.owner" = config.services.nginx.user; 332 | "pm.max_children" = 5; 333 | "pm.start_servers" = 2; 334 | "pm.min_spare_servers" = 1; 335 | "pm.max_spare_servers" = 3; 336 | "pm.max_requests" = 500; 337 | }; 338 | }; 339 | 340 | # Some programs need SUID wrappers, can be configured further or are 341 | # started in user sessions. 342 | # programs.mtr.enable = true; 343 | # programs.gnupg.agent = { 344 | # enable = true; 345 | # enableSSHSupport = true; 346 | # }; 347 | 348 | # List services that you want to enable: 349 | 350 | # Enable the OpenSSH daemon. 351 | # services.openssh.enable = true; 352 | 353 | # Open ports in the firewall. 354 | # networking.firewall.allowedTCPPorts = [ ... ]; 355 | # networking.firewall.allowedUDPPorts = [ ... ]; 356 | # Or disable the firewall altogether. 357 | # networking.firewall.enable = false; 358 | 359 | # This value determines the NixOS release from which the default 360 | # settings for stateful data, like file locations and database versions 361 | # on your system were taken. It‘s perfectly fine and recommended to leave 362 | # this value at the release version of the first install of this system. 363 | # Before changing this value read the documentation for this option 364 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 365 | system.stateVersion = "24.11"; # Did you read the comment? 366 | } 367 | -------------------------------------------------------------------------------- /editors/nvim/init.lua.old: -------------------------------------------------------------------------------- 1 | --------------------------------- 2 | -- Options 3 | --------------------------------- 4 | local set = vim.opt 5 | 6 | set.background = "dark" 7 | set.clipboard = "unnamedplus" 8 | set.completeopt = "noinsert,menuone,noselect" 9 | set.cursorline = true 10 | set.expandtab = true 11 | set.foldexpr = "nvim_treesitter#foldexpr()" 12 | set.foldmethod = "manual" 13 | set.hidden = true 14 | set.inccommand = "split" 15 | set.mouse = "a" 16 | set.number = true 17 | set.relativenumber = true 18 | set.shiftwidth = 2 19 | set.smarttab = true 20 | set.splitbelow = true 21 | set.splitright = true 22 | set.swapfile = false 23 | set.tabstop = 2 24 | set.termguicolors = true 25 | set.title = true 26 | set.ttimeoutlen = 0 27 | set.updatetime = 250 28 | set.wildmenu = true 29 | set.wrap = true 30 | 31 | --------------------------------- 32 | -- Color scheme 33 | --------------------------------- 34 | vim.cmd([[ 35 | filetype plugin indent on 36 | syntax on 37 | colorscheme sobrio_ghost 38 | ]]) 39 | 40 | --------------------------------- 41 | -- Plugins 42 | --------------------------------- 43 | local packer = require("packer") 44 | vim.cmd([[packadd packer.nvim]]) 45 | 46 | packer.startup(function() 47 | use("hrsh7th/cmp-buffer") 48 | use("hrsh7th/cmp-cmdline") 49 | use("hrsh7th/cmp-nvim-lsp") 50 | use("hrsh7th/cmp-path") 51 | use("hrsh7th/nvim-cmp") 52 | -- Snippet engine 53 | use("L3MON4D3/LuaSnip") 54 | use("saadparwaiz1/cmp_luasnip") 55 | -- Formatting 56 | use("jose-elias-alvarez/null-ls.nvim") 57 | -- Language servers 58 | use("neovim/nvim-lspconfig") 59 | use("williamboman/mason.nvim") 60 | use("williamboman/mason-lspconfig.nvim") 61 | use("simrat39/rust-tools.nvim") 62 | -- Syntax parser 63 | use("nvim-treesitter/nvim-treesitter") 64 | use("nvim-treesitter/playground") 65 | use("wuelnerdotexe/vim-astro") 66 | -- Plugin manager 67 | use("wbthomason/packer.nvim") 68 | -- Utilities 69 | use("windwp/nvim-autopairs") 70 | use("norcalli/nvim-colorizer.lua") 71 | use("lewis6991/gitsigns.nvim") 72 | -- Dependences needed 73 | use("nvim-lua/plenary.nvim") 74 | use("kyazdani42/nvim-web-devicons") 75 | use("MunifTanjim/nui.nvim") 76 | -- Finder 77 | use("nvim-telescope/telescope.nvim") 78 | -- Interface 79 | use("akinsho/bufferline.nvim") 80 | use({ "nvim-neo-tree/neo-tree.nvim", branch = "v2.x" }) 81 | use("nvim-lualine/lualine.nvim") 82 | -- use 'elvessousa/sobrio' 83 | end) 84 | 85 | --------------------------------- 86 | -- Misc plugins 87 | --------------------------------- 88 | -- Autopairs 89 | require("nvim-autopairs").setup({ 90 | disable_filetype = { "TelescopePrompt" }, 91 | }) 92 | 93 | -- LSP Installer 94 | require("mason").setup() 95 | 96 | -- Colorizer 97 | require("colorizer").setup() 98 | 99 | -- Git signs 100 | require("gitsigns").setup() 101 | 102 | -- Bufferline 103 | require("bufferline").setup() 104 | 105 | -- Lualine 106 | require("lualine").setup() 107 | 108 | -- Neo tree 109 | require("neo-tree").setup({ 110 | -- Close Neo-tree if it is the last window left in the tab 111 | close_if_last_window = false, 112 | enable_diagnostics = true, 113 | enable_git_status = true, 114 | popup_border_style = "rounded", 115 | sort_case_insensitive = false, 116 | filesystem = { 117 | filtered_items = { 118 | hide_dotfiles = false, 119 | hide_gitignored = false, 120 | }, 121 | }, 122 | window = { width = 30 }, 123 | }) 124 | 125 | --------------------------------- 126 | -- Syntax highlighting 127 | --------------------------------- 128 | require("nvim-treesitter.configs").setup({ 129 | ensure_installed = { 130 | "bash", 131 | "c", 132 | "cpp", 133 | "css", 134 | "elixir", 135 | "fish", 136 | "graphql", 137 | "html", 138 | "javascript", 139 | "json", 140 | "lua", 141 | "markdown", 142 | "markdown_inline", 143 | "php", 144 | "python", 145 | "regex", 146 | "ruby", 147 | "rust", 148 | "scss", 149 | "sql", 150 | "toml", 151 | "tsx", 152 | "typescript", 153 | "vim", 154 | "yaml", 155 | }, 156 | highlight = { enable = true }, 157 | indent = { enable = true }, 158 | autotag = { 159 | enable = true, 160 | filetypes = { 161 | "html", 162 | "javascript", 163 | "javascriptreact", 164 | "rust", 165 | "svelte", 166 | "typescript", 167 | "typescriptreact", 168 | "vue", 169 | "xml", 170 | }, 171 | }, 172 | }) 173 | 174 | --------------------------------- 175 | -- Treesitter playground 176 | --------------------------------- 177 | require("nvim-treesitter.configs").setup({ 178 | playground = { 179 | disable = {}, 180 | enable = true, 181 | persist_queries = false, 182 | updatetime = 25, 183 | keybindings = { 184 | focus_language = "f", 185 | goto_node = "", 186 | show_help = "?", 187 | toggle_anonymous_nodes = "a", 188 | toggle_hl_groups = "i", 189 | toggle_injected_languages = "t", 190 | toggle_language_display = "I", 191 | toggle_query_editor = "o", 192 | unfocus_language = "F", 193 | update = "R", 194 | }, 195 | }, 196 | }) 197 | 198 | --------------------------------- 199 | -- Completion 200 | --------------------------------- 201 | local cmp = require("cmp") 202 | 203 | cmp.setup({ 204 | snippet = { 205 | expand = function(args) 206 | require("luasnip").lsp_expand(args.body) 207 | end, 208 | }, 209 | mapping = cmp.mapping.preset.insert({ 210 | [""] = cmp.mapping.scroll_docs(-4), 211 | [""] = cmp.mapping.scroll_docs(4), 212 | [""] = cmp.mapping.complete(), 213 | [""] = cmp.mapping.abort(), 214 | [""] = cmp.mapping.confirm({ select = true }), 215 | }), 216 | sources = cmp.config.sources({ 217 | { name = "nvim_lsp" }, 218 | { name = "luasnip" }, 219 | { name = "buffer" }, 220 | { name = "path" }, 221 | }), 222 | }) 223 | 224 | -- Set configuration for specific filetype 225 | cmp.setup.filetype("gitcommit", { 226 | sources = cmp.config.sources({ 227 | { name = "cmp_git" }, 228 | }, { 229 | { name = "buffer" }, 230 | }), 231 | }) 232 | 233 | -- Command line completion 234 | cmp.setup.cmdline("/", { 235 | mapping = cmp.mapping.preset.cmdline(), 236 | sources = { { name = "buffer" } }, 237 | }) 238 | 239 | cmp.setup.cmdline(":", { 240 | mapping = cmp.mapping.preset.cmdline(), 241 | sources = cmp.config.sources({ 242 | { name = "path" }, 243 | }, { 244 | { name = "cmdline" }, 245 | }), 246 | }) 247 | 248 | --------------------------------- 249 | -- Floating diagnostics message 250 | --------------------------------- 251 | vim.diagnostic.config({ 252 | float = { source = "always", border = border }, 253 | virtual_text = false, 254 | signs = true, 255 | }) 256 | 257 | local util = require("vim.lsp.util") 258 | 259 | local formatting_callback = function(client, bufnr) 260 | vim.keymap.set("n", "f", function() 261 | local params = util.make_formatting_params({}) 262 | client.request("textDocument/formatting", params, nil, bufnr) 263 | end, { buffer = bufnr }) 264 | end 265 | 266 | --------------------------------- 267 | -- Language servers 268 | --------------------------------- 269 | local lspconfig = require("lspconfig") 270 | local caps = vim.lsp.protocol.make_client_capabilities() 271 | local no_format = function(client, bufnr) 272 | client.server_capabilities.document_formatting = false 273 | end 274 | 275 | -- Capabilities 276 | caps.textDocument.completion.completionItem.snippetSupport = true 277 | 278 | -- Astro 279 | lspconfig.astro.setup({ capabilities = caps }) 280 | 281 | -- Python 282 | lspconfig.pyright.setup({ capabilities = caps, on_attach = no_format }) 283 | 284 | -- PHP 285 | lspconfig.phpactor.setup({ capabilities = caps }) 286 | 287 | -- JavaScript/Typescript 288 | lspconfig.tsserver.setup({ capabilities = caps, on_attach = no_format }) 289 | 290 | -- Rust 291 | lspconfig.rust_analyzer.setup({ 292 | capabilities = caps, 293 | on_attach = function(client, bufnr) 294 | --formatting_callback(client, bufnr) 295 | common_on_attach(client, bufnr) 296 | end, 297 | }) 298 | 299 | -- Emmet 300 | lspconfig.emmet_ls.setup({ 301 | capabilities = snip_caps, 302 | filetypes = { 303 | "css", 304 | "html", 305 | "javascriptreact", 306 | "less", 307 | "sass", 308 | "scss", 309 | "typescriptreact", 310 | }, 311 | }) 312 | 313 | --------------------------------- 314 | -- Rust tools 315 | --------------------------------- 316 | local rust_tools = require("rust-tools") 317 | 318 | rust_tools.setup({ 319 | server = { 320 | on_attach = function(client, bufnr) 321 | vim.keymap.set("n", "", rust_tools.hover_actions.hover_actions, { buffer = bufnr }) 322 | vim.keymap.set("n", "a", rust_tools.code_action_group.code_action_group, { buffer = bufnr }) 323 | client.server_capabilities.document_formatting = false 324 | client.server_capabilities.document_range_formatting = false 325 | end, 326 | }, 327 | inlay_hints = { 328 | auto = true, 329 | only_current_line = false, 330 | max_len_align = false, 331 | max_len_align_padding = 1, 332 | right_align = false, 333 | right_align_padding = 7, 334 | highlight = "Comment", 335 | }, 336 | }) 337 | 338 | --------------------------------- 339 | -- Formatting 340 | --------------------------------- 341 | local diagnostics = require("null-ls").builtins.diagnostics 342 | local formatting = require("null-ls").builtins.formatting 343 | local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) 344 | 345 | require("null-ls").setup({ 346 | sources = { 347 | formatting.black, 348 | formatting.phpcsfixer, 349 | formatting.prettier, 350 | formatting.rustfmt, 351 | formatting.stylua, 352 | }, 353 | on_attach = function(client, bufnr) 354 | if client.name == "tsserver" or client.name == "rust_analyzer" or client.name == "pyright" then 355 | client.resolved_capabilities.document_formatting = false 356 | end 357 | 358 | if client.supports_method("textDocument/formatting") then 359 | vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) 360 | vim.api.nvim_create_autocmd("BufWritePre", { 361 | group = augroup, 362 | buffer = bufnr, 363 | callback = function() 364 | vim.lsp.buf.format() 365 | end, 366 | }) 367 | end 368 | end, 369 | }) 370 | 371 | --------------------------------- 372 | -- Theming Utility 373 | --------------------------------- 374 | local fn = vim.fn 375 | local function get_color(group, attr) 376 | return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr) 377 | end 378 | 379 | --------------------------------- 380 | -- Key bindings 381 | --------------------------------- 382 | local map = vim.api.nvim_set_keymap 383 | local kmap = vim.keymap.set 384 | local opts = { noremap = true, silent = true } 385 | 386 | -- Leader 387 | vim.g.mapleader = " " 388 | 389 | -- Vim 390 | map("n", "", ":Neotree toggle", opts) 391 | map("n", "", ":q!", opts) 392 | map("n", "", ":bd", opts) 393 | map("n", "", ":sp:terminal", opts) 394 | map("n", "", "gT", opts) 395 | map("n", "", "gt", opts) 396 | map("n", " ", ":tabnew", opts) 397 | map("n", "", ":TSHighlightCapturesUnderCursor", opts) 398 | map("n", "", ':lua require("telescope.builtin").find_files()', opts) 399 | 400 | -- Diagnostics 401 | kmap("n", "e", vim.diagnostic.open_float, opts) 402 | kmap("n", "[d", vim.diagnostic.goto_prev, opts) 403 | kmap("n", "]d", vim.diagnostic.goto_next, opts) 404 | kmap("n", "q", vim.diagnostic.setloclist, opts) 405 | 406 | local on_attach = function(client, bufnr) 407 | -- Enable completion triggered by 408 | vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") 409 | 410 | -- Mappings. 411 | local bufopts = { noremap = true, silent = true, buffer = bufnr } 412 | kmap("n", "gD", vim.lsp.buf.declaration, bufopts) 413 | kmap("n", "gd", vim.lsp.buf.definition, bufopts) 414 | kmap("n", "K", vim.lsp.buf.hover, bufopts) 415 | kmap("n", "gi", vim.lsp.buf.implementation, bufopts) 416 | kmap("n", "", vim.lsp.buf.signature_help, bufopts) 417 | kmap("n", "wa", vim.lsp.buf.add_workspace_folder, bufopts) 418 | kmap("n", "wr", vim.lsp.buf.remove_workspace_folder, bufopts) 419 | kmap("n", "wl", function() 420 | print(vim.inspect(vim.lsp.buf.list_workspace_folders())) 421 | end, bufopts) 422 | kmap("n", "D", vim.lsp.buf.type_definition, bufopts) 423 | kmap("n", "rn", vim.lsp.buf.rename, bufopts) 424 | kmap("n", "ca", vim.lsp.buf.code_action, bufopts) 425 | kmap("n", "gr", vim.lsp.buf.references, bufopts) 426 | kmap("n", "f", vim.lsp.buf.formatting, bufopts) 427 | end 428 | 429 | --------------------------------- 430 | -- Auto commands 431 | --------------------------------- 432 | vim.cmd([[ autocmd BufWritePre lua vim.lsp.buf.formatting_sync() ]]) 433 | vim.cmd([[ autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]) 434 | vim.cmd([[ autocmd FileType php setl textwidth=120 softtabstop=4 shiftwidth=4 tabstop=4 colorcolumn=120]]) 435 | -------------------------------------------------------------------------------- /terminal/zellij/config.kdl: -------------------------------------------------------------------------------- 1 | // If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" 2 | keybinds { 3 | unbind "Ctrl q" 4 | normal { 5 | // uncomment this and adjust key if using copy_on_select=false 6 | // bind "Alt c" { Copy; } 7 | } 8 | locked { 9 | bind "Ctrl g" { SwitchToMode "Normal"; } 10 | } 11 | resize { 12 | bind "Ctrl n" { SwitchToMode "Normal"; } 13 | bind "h" "Left" { Resize "Increase Left"; } 14 | bind "j" "Down" { Resize "Increase Down"; } 15 | bind "k" "Up" { Resize "Increase Up"; } 16 | bind "l" "Right" { Resize "Increase Right"; } 17 | bind "H" { Resize "Decrease Left"; } 18 | bind "J" { Resize "Decrease Down"; } 19 | bind "K" { Resize "Decrease Up"; } 20 | bind "L" { Resize "Decrease Right"; } 21 | bind "=" "+" { Resize "Increase"; } 22 | bind "-" { Resize "Decrease"; } 23 | } 24 | pane { 25 | bind "Ctrl p" { SwitchToMode "Normal"; } 26 | bind "h" "Left" { MoveFocus "Left"; } 27 | bind "l" "Right" { MoveFocus "Right"; } 28 | bind "j" "Down" { MoveFocus "Down"; } 29 | bind "k" "Up" { MoveFocus "Up"; } 30 | bind "p" { SwitchFocus; } 31 | bind "n" { NewPane; SwitchToMode "Normal"; } 32 | bind "d" { NewPane "Down"; SwitchToMode "Normal"; } 33 | bind "r" { NewPane "Right"; SwitchToMode "Normal"; } 34 | bind "x" { CloseFocus; SwitchToMode "Normal"; } 35 | bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; } 36 | bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } 37 | bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; } 38 | bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } 39 | bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;} 40 | } 41 | move { 42 | bind "Ctrl h" { SwitchToMode "Normal"; } 43 | bind "n" "Tab" { MovePane; } 44 | bind "p" { MovePaneBackwards; } 45 | bind "h" "Left" { MovePane "Left"; } 46 | bind "j" "Down" { MovePane "Down"; } 47 | bind "k" "Up" { MovePane "Up"; } 48 | bind "l" "Right" { MovePane "Right"; } 49 | } 50 | tab { 51 | bind "Ctrl t" { SwitchToMode "Normal"; } 52 | bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } 53 | bind "h" "Left" "Up" "k" { GoToPreviousTab; } 54 | bind "l" "Right" "Down" "j" { GoToNextTab; } 55 | bind "n" { NewTab; SwitchToMode "Normal"; } 56 | bind "x" { CloseTab; SwitchToMode "Normal"; } 57 | bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; } 58 | bind "1" { GoToTab 1; SwitchToMode "Normal"; } 59 | bind "2" { GoToTab 2; SwitchToMode "Normal"; } 60 | bind "3" { GoToTab 3; SwitchToMode "Normal"; } 61 | bind "4" { GoToTab 4; SwitchToMode "Normal"; } 62 | bind "5" { GoToTab 5; SwitchToMode "Normal"; } 63 | bind "6" { GoToTab 6; SwitchToMode "Normal"; } 64 | bind "7" { GoToTab 7; SwitchToMode "Normal"; } 65 | bind "8" { GoToTab 8; SwitchToMode "Normal"; } 66 | bind "9" { GoToTab 9; SwitchToMode "Normal"; } 67 | bind "Tab" { ToggleTab; } 68 | } 69 | scroll { 70 | bind "Ctrl s" { SwitchToMode "Normal"; } 71 | bind "e" { EditScrollback; SwitchToMode "Normal"; } 72 | bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } 73 | bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } 74 | bind "j" "Down" { ScrollDown; } 75 | bind "k" "Up" { ScrollUp; } 76 | bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } 77 | bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } 78 | bind "d" { HalfPageScrollDown; } 79 | bind "u" { HalfPageScrollUp; } 80 | // uncomment this and adjust key if using copy_on_select=false 81 | // bind "Alt c" { Copy; } 82 | } 83 | search { 84 | bind "Ctrl s" { SwitchToMode "Normal"; } 85 | bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } 86 | bind "j" "Down" { ScrollDown; } 87 | bind "k" "Up" { ScrollUp; } 88 | bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } 89 | bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } 90 | bind "d" { HalfPageScrollDown; } 91 | bind "u" { HalfPageScrollUp; } 92 | bind "n" { Search "down"; } 93 | bind "p" { Search "up"; } 94 | bind "c" { SearchToggleOption "CaseSensitivity"; } 95 | bind "w" { SearchToggleOption "Wrap"; } 96 | bind "o" { SearchToggleOption "WholeWord"; } 97 | } 98 | entersearch { 99 | bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } 100 | bind "Enter" { SwitchToMode "Search"; } 101 | } 102 | renametab { 103 | bind "Ctrl c" { SwitchToMode "Normal"; } 104 | bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } 105 | } 106 | renamepane { 107 | bind "Ctrl c" { SwitchToMode "Normal"; } 108 | bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } 109 | } 110 | session { 111 | bind "Ctrl o" { SwitchToMode "Normal"; } 112 | bind "Ctrl s" { SwitchToMode "Scroll"; } 113 | bind "d" { Detach; } 114 | } 115 | tmux { 116 | bind "[" { SwitchToMode "Scroll"; } 117 | bind "Ctrl b" { Write 2; SwitchToMode "Normal"; } 118 | bind "\"" { NewPane "Down"; SwitchToMode "Normal"; } 119 | bind "%" { NewPane "Right"; SwitchToMode "Normal"; } 120 | bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; } 121 | bind "c" { NewTab; SwitchToMode "Normal"; } 122 | bind "," { SwitchToMode "RenameTab"; } 123 | bind "p" { GoToPreviousTab; SwitchToMode "Normal"; } 124 | bind "n" { GoToNextTab; SwitchToMode "Normal"; } 125 | bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; } 126 | bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; } 127 | bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; } 128 | bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; } 129 | bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; } 130 | bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; } 131 | bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; } 132 | bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } 133 | bind "o" { FocusNextPane; } 134 | bind "d" { Detach; } 135 | bind "Space" { NextSwapLayout; } 136 | bind "x" { CloseFocus; SwitchToMode "Normal"; } 137 | } 138 | shared_except "locked" { 139 | bind "Ctrl g" { SwitchToMode "Locked"; } 140 | bind "Ctrl x" { Quit; } 141 | bind "Alt n" { NewPane; } 142 | bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } 143 | bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } 144 | bind "Alt j" "Alt Down" { MoveFocus "Down"; } 145 | bind "Alt k" "Alt Up" { MoveFocus "Up"; } 146 | bind "Alt =" "Alt +" { Resize "Increase"; } 147 | bind "Alt -" { Resize "Decrease"; } 148 | bind "Alt [" { PreviousSwapLayout; } 149 | bind "Alt ]" { NextSwapLayout; } 150 | } 151 | shared_except "normal" "locked" { 152 | bind "Enter" "Esc" { SwitchToMode "Normal"; } 153 | } 154 | shared_except "pane" "locked" { 155 | bind "Ctrl p" { SwitchToMode "Pane"; } 156 | } 157 | shared_except "resize" "locked" { 158 | bind "Ctrl n" { SwitchToMode "Resize"; } 159 | } 160 | shared_except "scroll" "locked" { 161 | bind "Ctrl s" { SwitchToMode "Scroll"; } 162 | } 163 | shared_except "session" "locked" { 164 | bind "Ctrl m" { SwitchToMode "Session"; } 165 | } 166 | shared_except "tab" "locked" { 167 | bind "Ctrl t" { SwitchToMode "Tab"; } 168 | } 169 | shared_except "move" "locked" { 170 | bind "Ctrl h" { SwitchToMode "Move"; } 171 | } 172 | shared_except "tmux" "locked" { 173 | bind "Ctrl b" { SwitchToMode "Tmux"; } 174 | } 175 | } 176 | 177 | plugins { 178 | tab-bar { path "tab-bar"; } 179 | status-bar { path "status-bar"; } 180 | strider { path "strider"; } 181 | compact-bar { path "compact-bar"; } 182 | } 183 | 184 | scrollback_editor "/usr/bin/hx" 185 | // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP 186 | // eg. when terminal window with an active zellij session is closed 187 | // Options: 188 | // - detach (Default) 189 | // - quit 190 | // 191 | on_force_close "quit" 192 | 193 | // Send a request for a simplified ui (without arrow fonts) to plugins 194 | // Options: 195 | // - true 196 | // - false (Default) 197 | // 198 | // simplified_ui true 199 | 200 | // Choose the path to the default shell that zellij will use for opening new panes 201 | // Default: $SHELL 202 | // 203 | default_shell "fish" 204 | 205 | // Toggle between having pane frames around the panes 206 | // Options: 207 | // - true (default) 208 | // - false 209 | // 210 | // pane_frames false 211 | 212 | // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible 213 | // Options: 214 | // - true (default) 215 | // - false 216 | // 217 | // auto_layout true 218 | 219 | // Define color themes for Zellij 220 | // For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes 221 | // Once these themes are defined, one of them should to be selected in the "theme" section of this file 222 | // 223 | // themes { 224 | // dracula { 225 | // fg 248 248 242 226 | // bg 40 42 54 227 | // red 255 85 85 228 | // green 80 250 123 229 | // yellow 241 250 140 230 | // blue 98 114 164 231 | // magenta 255 121 198 232 | // orange 255 184 108 233 | // cyan 139 233 253 234 | // black 0 0 0 235 | // white 255 255 255 236 | // } 237 | // } 238 | // themes { 239 | // sobrio { 240 | // fg "#5f5f5f" 241 | // bg "#121212" 242 | // red "#121212" 243 | // green "#d7af87" 244 | // yellow "#d7af87" 245 | // blue "#84afd7" 246 | // magenta "#fd6389" 247 | // orange "#d7af87" 248 | // cyan "#7cdce7" 249 | // black "#121212" 250 | // white "#ffffff" 251 | // } 252 | // } 253 | themes { 254 | sobrio { 255 | fg "#5f5f5f" 256 | bg "#121212" 257 | red "#121212" 258 | green "#d7af87" 259 | yellow "#d7af87" 260 | blue "#84afd7" 261 | magenta "#fd6389" 262 | orange "#d7af87" 263 | cyan "#7cdce7" 264 | black "#121212" 265 | white "#ffffff" 266 | } 267 | 268 | sobrio_light { 269 | fg "#121212" 270 | bg "#5f5f5f" 271 | red "#eeeeee" 272 | green "#af875f" 273 | yellow "#af875f" 274 | blue "#6787af" 275 | magenta "#dd4c4f" 276 | orange "#af875f" 277 | cyan "#5fafaf" 278 | black "#ffffff" 279 | white "#121212" 280 | } 281 | } 282 | // Choose the theme that is specified in the themes section. 283 | // Default: default 284 | // 285 | theme "sobrio" 286 | 287 | // The name of the default layout to load on startup 288 | // Default: "default" 289 | // 290 | // default_layout "compact" 291 | 292 | // Choose the mode that zellij uses when starting up. 293 | // Default: normal 294 | // 295 | // default_mode "locked" 296 | 297 | // Toggle enabling the mouse mode. 298 | // On certain configurations, or terminals this could 299 | // potentially interfere with copying text. 300 | // Options: 301 | // - true (default) 302 | // - false 303 | // 304 | // mouse_mode false 305 | 306 | // Configure the scroll back buffer size 307 | // This is the number of lines zellij stores for each pane in the scroll back 308 | // buffer. Excess number of lines are discarded in a FIFO fashion. 309 | // Valid values: positive integers 310 | // Default value: 10000 311 | // 312 | // scroll_buffer_size 10000 313 | 314 | // Provide a command to execute when copying text. The text will be piped to 315 | // the stdin of the program to perform the copy. This can be used with 316 | // terminal emulators which do not support the OSC 52 ANSI control sequence 317 | // that will be used by default if this option is not set. 318 | // Examples: 319 | // 320 | // copy_command "xclip -selection clipboard" // x11 321 | // copy_command "wl-copy" // wayland 322 | // copy_command "pbcopy" // osx 323 | 324 | // Choose the destination for copied text 325 | // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. 326 | // Does not apply when using copy_command. 327 | // Options: 328 | // - system (default) 329 | // - primary 330 | // 331 | // copy_clipboard "primary" 332 | 333 | // Enable or disable automatic copy (and clear) of selection when releasing mouse 334 | // Default: true 335 | // 336 | // copy_on_select false 337 | 338 | // Path to the default editor to use to edit pane scrollbuffer 339 | // Default: $EDITOR or $VISUAL 340 | // 341 | // scrollback_editor "/usr/bin/vim" 342 | 343 | // When attaching to an existing session with other users, 344 | // should the session be mirrored (true) 345 | // or should each user have their own cursor (false) 346 | // Default: false 347 | // 348 | // mirror_session true 349 | 350 | // The folder in which Zellij will look for layouts 351 | // 352 | // layout_dir "/path/to/my/layout_dir" 353 | 354 | // The folder in which Zellij will look for themes 355 | // 356 | // theme_dir "/path/to/my/theme_dir" 357 | -------------------------------------------------------------------------------- /terminal/nushell/config.nu: -------------------------------------------------------------------------------- 1 | # Nushell Config File 2 | 3 | module completions { 4 | # Custom completions for external commands (those outside of Nushell) 5 | # Each completions has two parts: the form of the external command, including its flags and parameters 6 | # and a helper command that knows how to complete values for those flags and parameters 7 | # 8 | # This is a simplified version of completions for git branches and git remotes 9 | def "nu-complete git branches" [] { 10 | ^git branch | lines | each { |line| $line | str replace '[\*\+] ' '' | str trim } 11 | } 12 | 13 | def "nu-complete git remotes" [] { 14 | ^git remote | lines | each { |line| $line | str trim } 15 | } 16 | 17 | # Download objects and refs from another repository 18 | export extern "git fetch" [ 19 | repository?: string@"nu-complete git remotes" # name of the repository to fetch 20 | branch?: string@"nu-complete git branches" # name of the branch to fetch 21 | --all # Fetch all remotes 22 | --append(-a) # Append ref names and object names to .git/FETCH_HEAD 23 | --atomic # Use an atomic transaction to update local refs. 24 | --depth: int # Limit fetching to n commits from the tip 25 | --deepen: int # Limit fetching to n commits from the current shallow boundary 26 | --shallow-since: string # Deepen or shorten the history by date 27 | --shallow-exclude: string # Deepen or shorten the history by branch/tag 28 | --unshallow # Fetch all available history 29 | --update-shallow # Update .git/shallow to accept new refs 30 | --negotiation-tip: string # Specify which commit/glob to report while fetching 31 | --negotiate-only # Do not fetch, only print common ancestors 32 | --dry-run # Show what would be done 33 | --write-fetch-head # Write fetched refs in FETCH_HEAD (default) 34 | --no-write-fetch-head # Do not write FETCH_HEAD 35 | --force(-f) # Always update the local branch 36 | --keep(-k) # Keep downloaded pack 37 | --multiple # Allow several arguments to be specified 38 | --auto-maintenance # Run 'git maintenance run --auto' at the end (default) 39 | --no-auto-maintenance # Don't run 'git maintenance' at the end 40 | --auto-gc # Run 'git maintenance run --auto' at the end (default) 41 | --no-auto-gc # Don't run 'git maintenance' at the end 42 | --write-commit-graph # Write a commit-graph after fetching 43 | --no-write-commit-graph # Don't write a commit-graph after fetching 44 | --prefetch # Place all refs into the refs/prefetch/ namespace 45 | --prune(-p) # Remove obsolete remote-tracking references 46 | --prune-tags(-P) # Remove any local tags that do not exist on the remote 47 | --no-tags(-n) # Disable automatic tag following 48 | --refmap: string # Use this refspec to map the refs to remote-tracking branches 49 | --tags(-t) # Fetch all tags 50 | --recurse-submodules: string # Fetch new commits of populated submodules (yes/on-demand/no) 51 | --jobs(-j): int # Number of parallel children 52 | --no-recurse-submodules # Disable recursive fetching of submodules 53 | --set-upstream # Add upstream (tracking) reference 54 | --submodule-prefix: string # Prepend to paths printed in informative messages 55 | --upload-pack: string # Non-default path for remote command 56 | --quiet(-q) # Silence internally used git commands 57 | --verbose(-v) # Be verbose 58 | --progress # Report progress on stderr 59 | --server-option(-o): string # Pass options for the server to handle 60 | --show-forced-updates # Check if a branch is force-updated 61 | --no-show-forced-updates # Don't check if a branch is force-updated 62 | -4 # Use IPv4 addresses, ignore IPv6 addresses 63 | -6 # Use IPv6 addresses, ignore IPv4 addresses 64 | --help # Display the help message for this command 65 | ] 66 | 67 | # Check out git branches and files 68 | export extern "git checkout" [ 69 | ...targets: string@"nu-complete git branches" # name of the branch or files to checkout 70 | --conflict: string # conflict style (merge or diff3) 71 | --detach(-d) # detach HEAD at named commit 72 | --force(-f) # force checkout (throw away local modifications) 73 | --guess # second guess 'git checkout ' (default) 74 | --ignore-other-worktrees # do not check if another worktree is holding the given ref 75 | --ignore-skip-worktree-bits # do not limit pathspecs to sparse entries only 76 | --merge(-m) # perform a 3-way merge with the new branch 77 | --orphan: string # new unparented branch 78 | --ours(-2) # checkout our version for unmerged files 79 | --overlay # use overlay mode (default) 80 | --overwrite-ignore # update ignored files (default) 81 | --patch(-p) # select hunks interactively 82 | --pathspec-from-file: string # read pathspec from file 83 | --progress # force progress reporting 84 | --quiet(-q) # suppress progress reporting 85 | --recurse-submodules: string # control recursive updating of submodules 86 | --theirs(-3) # checkout their version for unmerged files 87 | --track(-t) # set upstream info for new branch 88 | -b: string # create and checkout a new branch 89 | -B: string # create/reset and checkout a branch 90 | -l # create reflog for new branch 91 | --help # Display the help message for this command 92 | ] 93 | 94 | # Push changes 95 | export extern "git push" [ 96 | remote?: string@"nu-complete git remotes", # the name of the remote 97 | ...refs: string@"nu-complete git branches" # the branch / refspec 98 | --all # push all refs 99 | --atomic # request atomic transaction on remote side 100 | --delete(-d) # delete refs 101 | --dry-run(-n) # dry run 102 | --exec: string # receive pack program 103 | --follow-tags # push missing but relevant tags 104 | --force(-f) # force updates 105 | --ipv4(-4) # use IPv4 addresses only 106 | --ipv6(-6) # use IPv6 addresses only 107 | --mirror # mirror all refs 108 | --no-verify # bypass pre-push hook 109 | --porcelain # machine-readable output 110 | --progress # force progress reporting 111 | --prune # prune locally removed refs 112 | --push-option(-o): string # option to transmit 113 | --quiet(-q) # be more quiet 114 | --receive-pack: string # receive pack program 115 | --recurse-submodules: string # control recursive pushing of submodules 116 | --repo: string # repository 117 | --set-upstream(-u) # set upstream for git pull/status 118 | --signed: string # GPG sign the push 119 | --tags # push tags (can't be used with --all or --mirror) 120 | --thin # use thin pack 121 | --verbose(-v) # be more verbose 122 | --help # Display the help message for this command 123 | ] 124 | } 125 | 126 | # Get just the extern definitions without the custom completion commands 127 | use completions * 128 | 129 | # For more information on themes, see 130 | # https://www.nushell.sh/book/coloring_and_theming.html 131 | let dark_theme = { 132 | # color for nushell primitives 133 | separator: white 134 | leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off 135 | header: green_bold 136 | empty: blue 137 | # Closures can be used to choose colors for specific values. 138 | # The value (in this case, a bool) is piped into the closure. 139 | bool: { if $in { 'light_cyan' } else { 'light_gray' } } 140 | int: white 141 | filesize: {|e| 142 | if $e == 0b { 143 | 'white' 144 | } else if $e < 1mb { 145 | 'cyan' 146 | } else { 'blue' } 147 | } 148 | duration: white 149 | date: { (date now) - $in | 150 | if $in < 1hr { 151 | 'red3b' 152 | } else if $in < 6hr { 153 | 'orange3' 154 | } else if $in < 1day { 155 | 'yellow3b' 156 | } else if $in < 3day { 157 | 'chartreuse2b' 158 | } else if $in < 1wk { 159 | 'green3b' 160 | } else if $in < 6wk { 161 | 'darkturquoise' 162 | } else if $in < 52wk { 163 | 'deepskyblue3b' 164 | } else { 'dark_gray' } 165 | } 166 | range: white 167 | float: white 168 | string: white 169 | nothing: white 170 | binary: white 171 | cellpath: white 172 | row_index: green_bold 173 | record: white 174 | list: white 175 | block: white 176 | hints: dark_gray 177 | 178 | shape_and: purple_bold 179 | shape_binary: purple_bold 180 | shape_block: blue_bold 181 | shape_bool: light_cyan 182 | shape_custom: green 183 | shape_datetime: cyan_bold 184 | shape_directory: cyan 185 | shape_external: cyan 186 | shape_externalarg: green_bold 187 | shape_filepath: cyan 188 | shape_flag: blue_bold 189 | shape_float: purple_bold 190 | # shapes are used to change the cli syntax highlighting 191 | shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} 192 | shape_globpattern: cyan_bold 193 | shape_int: purple_bold 194 | shape_internalcall: cyan_bold 195 | shape_list: cyan_bold 196 | shape_literal: blue 197 | shape_matching_brackets: { attr: u } 198 | shape_nothing: light_cyan 199 | shape_operator: yellow 200 | shape_or: purple_bold 201 | shape_pipe: purple_bold 202 | shape_range: yellow_bold 203 | shape_record: cyan_bold 204 | shape_redirection: purple_bold 205 | shape_signature: green_bold 206 | shape_string: green 207 | shape_string_interpolation: cyan_bold 208 | shape_table: blue_bold 209 | shape_variable: purple 210 | } 211 | 212 | let light_theme = { 213 | # color for nushell primitives 214 | separator: dark_gray 215 | leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off 216 | header: green_bold 217 | empty: blue 218 | # Closures can be used to choose colors for specific values. 219 | # The value (in this case, a bool) is piped into the closure. 220 | bool: { if $in { 'dark_cyan' } else { 'dark_gray' } } 221 | int: dark_gray 222 | filesize: {|e| 223 | if $e == 0b { 224 | 'dark_gray' 225 | } else if $e < 1mb { 226 | 'cyan_bold' 227 | } else { 'blue_bold' } 228 | } 229 | duration: dark_gray 230 | date: { (date now) - $in | 231 | if $in < 1hr { 232 | 'red3b' 233 | } else if $in < 6hr { 234 | 'orange3' 235 | } else if $in < 1day { 236 | 'yellow3b' 237 | } else if $in < 3day { 238 | 'chartreuse2b' 239 | } else if $in < 1wk { 240 | 'green3b' 241 | } else if $in < 6wk { 242 | 'darkturquoise' 243 | } else if $in < 52wk { 244 | 'deepskyblue3b' 245 | } else { 'dark_gray' } 246 | } 247 | range: dark_gray 248 | float: dark_gray 249 | string: dark_gray 250 | nothing: dark_gray 251 | binary: dark_gray 252 | cellpath: dark_gray 253 | row_index: green_bold 254 | record: white 255 | list: white 256 | block: white 257 | hints: dark_gray 258 | 259 | shape_and: purple_bold 260 | shape_binary: purple_bold 261 | shape_block: blue_bold 262 | shape_bool: light_cyan 263 | shape_custom: green 264 | shape_datetime: cyan_bold 265 | shape_directory: cyan 266 | shape_external: cyan 267 | shape_externalarg: green_bold 268 | shape_filepath: cyan 269 | shape_flag: blue_bold 270 | shape_float: purple_bold 271 | # shapes are used to change the cli syntax highlighting 272 | shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} 273 | shape_globpattern: cyan_bold 274 | shape_int: purple_bold 275 | shape_internalcall: cyan_bold 276 | shape_list: cyan_bold 277 | shape_literal: blue 278 | shape_matching_brackets: { attr: u } 279 | shape_nothing: light_cyan 280 | shape_operator: yellow 281 | shape_or: purple_bold 282 | shape_pipe: purple_bold 283 | shape_range: yellow_bold 284 | shape_record: cyan_bold 285 | shape_redirection: purple_bold 286 | shape_signature: green_bold 287 | shape_string: green 288 | shape_string_interpolation: cyan_bold 289 | shape_table: blue_bold 290 | shape_variable: purple 291 | } 292 | 293 | # External completer example 294 | # let carapace_completer = {|spans| 295 | # carapace $spans.0 nushell $spans | from json 296 | # } 297 | 298 | 299 | # The default config record. This is where much of your global configuration is setup. 300 | $env.config = { 301 | ls: { 302 | use_ls_colors: true # use the LS_COLORS environment variable to colorize output 303 | clickable_links: true # enable or disable clickable links. Your terminal has to support links. 304 | } 305 | rm: { 306 | always_trash: false # always act as if -t was given. Can be overridden with -p 307 | } 308 | # cd: { 309 | # abbreviations: false # allows `cd s/o/f` to expand to `cd some/other/folder` 310 | # } 311 | table: { 312 | mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other 313 | index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column 314 | trim: { 315 | methodology: wrapping # wrapping or truncating 316 | wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology 317 | truncating_suffix: "..." # A suffix used by the 'truncating' methodology 318 | } 319 | } 320 | 321 | explore: { 322 | help_banner: true 323 | exit_esc: true 324 | 325 | command_bar_text: '#C4C9C6' 326 | # command_bar: {fg: '#C4C9C6' bg: '#223311' } 327 | 328 | status_bar_background: {fg: '#1D1F21' bg: '#C4C9C6' } 329 | # status_bar_text: {fg: '#C4C9C6' bg: '#223311' } 330 | 331 | highlight: {bg: 'yellow' fg: 'black' } 332 | 333 | status: { 334 | # warn: {bg: 'yellow', fg: 'blue'} 335 | # error: {bg: 'yellow', fg: 'blue'} 336 | # info: {bg: 'yellow', fg: 'blue'} 337 | } 338 | 339 | try: { 340 | # border_color: 'red' 341 | # highlighted_color: 'blue' 342 | 343 | # reactive: false 344 | } 345 | 346 | table: { 347 | split_line: '#404040' 348 | 349 | cursor: true 350 | 351 | line_index: true 352 | line_shift: true 353 | line_head_top: true 354 | line_head_bottom: true 355 | 356 | show_head: true 357 | show_index: true 358 | 359 | # selected_cell: {fg: 'white', bg: '#777777'} 360 | # selected_row: {fg: 'yellow', bg: '#C1C2A3'} 361 | # selected_column: blue 362 | 363 | # padding_column_right: 2 364 | # padding_column_left: 2 365 | 366 | # padding_index_left: 2 367 | # padding_index_right: 1 368 | } 369 | 370 | config: { 371 | cursor_color: {bg: 'yellow' fg: 'black' } 372 | 373 | # border_color: white 374 | # list_color: green 375 | } 376 | } 377 | 378 | history: { 379 | max_size: 10000 # Session has to be reloaded for this to take effect 380 | sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file 381 | file_format: "plaintext" # "sqlite" or "plaintext" 382 | } 383 | completions: { 384 | case_sensitive: false # set to true to enable case-sensitive completions 385 | quick: true # set this to false to prevent auto-selecting completions when only one remains 386 | partial: true # set this to false to prevent partial filling of the prompt 387 | algorithm: "prefix" # prefix or fuzzy 388 | external: { 389 | enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow 390 | max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options 391 | completer: null # check 'carapace_completer' above as an example 392 | } 393 | } 394 | filesize: { 395 | metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard) 396 | format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto 397 | } 398 | cursor_shape: { 399 | emacs: line # block, underscore, line (line is the default) 400 | vi_insert: block # block, underscore, line (block is the default) 401 | vi_normal: underscore # block, underscore, line (underscore is the default) 402 | } 403 | color_config: $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme` 404 | use_grid_icons: true 405 | footer_mode: "25" # always, never, number_of_rows, auto 406 | float_precision: 2 # the precision for displaying floats in tables 407 | # buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL 408 | use_ansi_coloring: true 409 | edit_mode: emacs # emacs, vi 410 | shell_integration: true # enables terminal markers and a workaround to arrow keys stop working issue 411 | # true or false to enable or disable the welcome banner at startup 412 | show_banner: false 413 | render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt. 414 | 415 | hooks: { 416 | pre_prompt: [{ 417 | null # replace with source code to run before the prompt is shown 418 | }] 419 | pre_execution: [{ 420 | null # replace with source code to run before the repl input is run 421 | }] 422 | env_change: { 423 | PWD: [{|before, after| 424 | null # replace with source code to run if the PWD environment is different since the last repl input 425 | }] 426 | } 427 | display_output: { 428 | if (term size).columns >= 100 { table -e } else { table } 429 | } 430 | } 431 | menus: [ 432 | # Configuration for default nushell menus 433 | # Note the lack of source parameter 434 | { 435 | name: completion_menu 436 | only_buffer_difference: false 437 | marker: "| " 438 | type: { 439 | layout: columnar 440 | columns: 4 441 | col_width: 20 # Optional value. If missing all the screen width is used to calculate column width 442 | col_padding: 2 443 | } 444 | style: { 445 | text: green 446 | selected_text: green_reverse 447 | description_text: yellow 448 | } 449 | } 450 | { 451 | name: history_menu 452 | only_buffer_difference: true 453 | marker: "? " 454 | type: { 455 | layout: list 456 | page_size: 10 457 | } 458 | style: { 459 | text: green 460 | selected_text: green_reverse 461 | description_text: yellow 462 | } 463 | } 464 | { 465 | name: help_menu 466 | only_buffer_difference: true 467 | marker: "? " 468 | type: { 469 | layout: description 470 | columns: 4 471 | col_width: 20 # Optional value. If missing all the screen width is used to calculate column width 472 | col_padding: 2 473 | selection_rows: 4 474 | description_rows: 10 475 | } 476 | style: { 477 | text: green 478 | selected_text: green_reverse 479 | description_text: yellow 480 | } 481 | } 482 | # Example of extra menus created using a nushell source 483 | # Use the source field to create a list of records that populates 484 | # the menu 485 | { 486 | name: commands_menu 487 | only_buffer_difference: false 488 | marker: "# " 489 | type: { 490 | layout: columnar 491 | columns: 4 492 | col_width: 20 493 | col_padding: 2 494 | } 495 | style: { 496 | text: green 497 | selected_text: green_reverse 498 | description_text: yellow 499 | } 500 | source: { |buffer, position| 501 | $nu.scope.commands 502 | | where name =~ $buffer 503 | | each { |it| {value: $it.name description: $it.usage} } 504 | } 505 | } 506 | { 507 | name: vars_menu 508 | only_buffer_difference: true 509 | marker: "# " 510 | type: { 511 | layout: list 512 | page_size: 10 513 | } 514 | style: { 515 | text: green 516 | selected_text: green_reverse 517 | description_text: yellow 518 | } 519 | source: { |buffer, position| 520 | $nu.scope.vars 521 | | where name =~ $buffer 522 | | sort-by name 523 | | each { |it| {value: $it.name description: $it.type} } 524 | } 525 | } 526 | { 527 | name: commands_with_description 528 | only_buffer_difference: true 529 | marker: "# " 530 | type: { 531 | layout: description 532 | columns: 4 533 | col_width: 20 534 | col_padding: 2 535 | selection_rows: 4 536 | description_rows: 10 537 | } 538 | style: { 539 | text: green 540 | selected_text: green_reverse 541 | description_text: yellow 542 | } 543 | source: { |buffer, position| 544 | $nu.scope.commands 545 | | where name =~ $buffer 546 | | each { |it| {value: $it.name description: $it.usage} } 547 | } 548 | } 549 | ] 550 | keybindings: [ 551 | { 552 | name: completion_menu 553 | modifier: none 554 | keycode: tab 555 | mode: [emacs vi_normal vi_insert] 556 | event: { 557 | until: [ 558 | { send: menu name: completion_menu } 559 | { send: menunext } 560 | ] 561 | } 562 | } 563 | { 564 | name: completion_previous 565 | modifier: shift 566 | keycode: backtab 567 | mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list 568 | event: { send: menuprevious } 569 | } 570 | { 571 | name: history_menu 572 | modifier: control 573 | keycode: char_r 574 | mode: emacs 575 | event: { send: menu name: history_menu } 576 | } 577 | { 578 | name: next_page 579 | modifier: control 580 | keycode: char_x 581 | mode: emacs 582 | event: { send: menupagenext } 583 | } 584 | { 585 | name: undo_or_previous_page 586 | modifier: control 587 | keycode: char_z 588 | mode: emacs 589 | event: { 590 | until: [ 591 | { send: menupageprevious } 592 | { edit: undo } 593 | ] 594 | } 595 | } 596 | { 597 | name: yank 598 | modifier: control 599 | keycode: char_y 600 | mode: emacs 601 | event: { 602 | until: [ 603 | {edit: pastecutbufferafter} 604 | ] 605 | } 606 | } 607 | { 608 | name: unix-line-discard 609 | modifier: control 610 | keycode: char_u 611 | mode: [emacs, vi_normal, vi_insert] 612 | event: { 613 | until: [ 614 | {edit: cutfromlinestart} 615 | ] 616 | } 617 | } 618 | { 619 | name: kill-line 620 | modifier: control 621 | keycode: char_k 622 | mode: [emacs, vi_normal, vi_insert] 623 | event: { 624 | until: [ 625 | {edit: cuttolineend} 626 | ] 627 | } 628 | } 629 | # Keybindings used to trigger the user defined menus 630 | { 631 | name: commands_menu 632 | modifier: control 633 | keycode: char_t 634 | mode: [emacs, vi_normal, vi_insert] 635 | event: { send: menu name: commands_menu } 636 | } 637 | { 638 | name: vars_menu 639 | modifier: alt 640 | keycode: char_o 641 | mode: [emacs, vi_normal, vi_insert] 642 | event: { send: menu name: vars_menu } 643 | } 644 | { 645 | name: commands_with_description 646 | modifier: control 647 | keycode: char_s 648 | mode: [emacs, vi_normal, vi_insert] 649 | event: { send: menu name: commands_with_description } 650 | } 651 | ] 652 | } 653 | 654 | # Aliases 655 | alias cat = bat 656 | 657 | # Starship 658 | source ~/.cache/starship/init.nu 659 | --------------------------------------------------------------------------------