From 383761b23a3882368fe994a776d540d03cc00a7b Mon Sep 17 00:00:00 2001 From: afranco Date: Sun, 21 May 2023 20:18:09 +0100 Subject: [PATCH] chore(MISC): A bunch of files I forgot to commit over time. --- .config/alacritty/alacritty.yml | 6 ++--- .config/fish/myfunctions/dotfiles.fish | 6 +++++ .config/fish/myfunctions/qol.fish | 6 +++++ .config/nvim/.gitignore | 1 + .config/nvim/lua/plugins/cmp.lua | 32 +++++++++++++++---------- .config/nvim/lua/plugins/lazy.lua | 1 + .config/nvim/lua/plugins/null-ls.lua | 2 +- .config/nvim/lua/plugins/treesitter.lua | 2 +- .config/tmux/tmux.conf | 4 ++-- .gitconfig | 2 ++ .local/bin/wrappedhl | 2 +- .xinitrc | 24 ++----------------- 12 files changed, 45 insertions(+), 43 deletions(-) diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 0f33c0b..b93a0a2 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -19,8 +19,8 @@ import: # Any items in the `env` entry below will be added as # environment variables. Some entries may override variables # set by alacritty itself. -#env: - # TERM variable +env: + TERM: xterm-256color # # This value is used to set the `$TERM` environment variable for # each instance of Alacritty. If it is not present, alacritty will @@ -163,7 +163,7 @@ font: #style: Bold Italic # Point size - #size: 11.0 + size: 12.0 # Offset is the extra space around each character. `offset.y` can be thought # of as modifying the line spacing, and `offset.x` as modifying the letter diff --git a/.config/fish/myfunctions/dotfiles.fish b/.config/fish/myfunctions/dotfiles.fish index f8d6bd3..30a0f59 100644 --- a/.config/fish/myfunctions/dotfiles.fish +++ b/.config/fish/myfunctions/dotfiles.fish @@ -2,3 +2,9 @@ function config /usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME $argv end +function lazyconfig + lazygit --git-dir=$HOME/dotfiles/ --work-tree=$HOME/ $argv +end +alias lc=lazyconfig + + diff --git a/.config/fish/myfunctions/qol.fish b/.config/fish/myfunctions/qol.fish index f95ecb9..7b1dde4 100644 --- a/.config/fish/myfunctions/qol.fish +++ b/.config/fish/myfunctions/qol.fish @@ -1,4 +1,10 @@ bind \cH backward-kill-path-component bind "[3;5~" kill-word +function backup --argument filename + cp $filename $filename.bak +end +function restore --argument file + mv $file (echo $file | sed s/.bak//) +end diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore index 8cb205e..648bf93 100644 --- a/.config/nvim/.gitignore +++ b/.config/nvim/.gitignore @@ -1 +1,2 @@ plugin +lazy-lock.json diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index d60fee3..54a7527 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -42,6 +42,7 @@ local kind_icons = { Event = "", Operator = "", TypeParameter = "", + Copilot = "", } -- find more here: https://www.nerdfonts.com/cheat-sheet @@ -52,7 +53,7 @@ cmp.setup { end, }, mapping = { - [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.scroll_docs( -1), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), [""] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. @@ -61,7 +62,10 @@ cmp.setup { c = cmp.mapping.close(), }, -- Accept currently selected item. If none selected, do nothing. - [""] = cmp.mapping.confirm { select = false }, + [""] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = false + }, [""] = cmp.mapping(function(fallback) if luasnip.expandable() then luasnip.expand() @@ -74,8 +78,8 @@ cmp.setup { end end), [""] = cmp.mapping(function(fallback) - if luasnip.jumpable(-1) then - luasnip.jump(-1) + if luasnip.jumpable( -1) then + luasnip.jump( -1) else fallback() end @@ -109,13 +113,14 @@ cmp.setup { vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) -- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind vim_item.menu = ({ - nvim_lsp = "(LSP)", - luasnip = "(Snippet)", - buffer = "(Text)", - nvim_lsp_signature_help = "(Signature)", - nvim_lua = "(Nvim LSP)", - path = "(Path)", - })[entry.source.name] + nvim_lsp = "(LSP)", + copilot = "(Copilot)", + luasnip = "(Snippet)", + buffer = "(Text)", + nvim_lsp_signature_help = "(Signature)", + nvim_lua = "(Nvim LSP)", + path = "(Path)", + })[entry.source.name] return vim_item end, }, @@ -138,7 +143,9 @@ cmp.setup { if char_before_cursor == "." then if kind == 2 or kind == 5 then return true - else return false end + else + return false + end elseif string.match(line, "^%s*%w*$") then if kind == 3 or kind == 6 then return true @@ -151,7 +158,6 @@ cmp.setup { }, { name = 'nvim_lua' }, - { name = 'copilot' }, { name = 'luasnip' }, { name = 'nvim_lsp_signature_help' }, { name = "path" }, diff --git a/.config/nvim/lua/plugins/lazy.lua b/.config/nvim/lua/plugins/lazy.lua index af837e5..6fafdc9 100644 --- a/.config/nvim/lua/plugins/lazy.lua +++ b/.config/nvim/lua/plugins/lazy.lua @@ -34,6 +34,7 @@ lazy.setup({ --Change add and remove surroundings from words 'tpope/vim-surround', + 'tpope/vim-obsession', --Tmux navigation { diff --git a/.config/nvim/lua/plugins/null-ls.lua b/.config/nvim/lua/plugins/null-ls.lua index 41ba246..adbdb96 100644 --- a/.config/nvim/lua/plugins/null-ls.lua +++ b/.config/nvim/lua/plugins/null-ls.lua @@ -5,7 +5,7 @@ null_ls.setup({ null_ls.builtins.formatting.rustfmt, null_ls.builtins.formatting.stylish_haskell, null_ls.builtins.formatting.fourmolu, - null_ls.builtins.formatting.black, + null_ls.builtins.formatting.blue, null_ls.builtins.formatting.prettierd.with({ filetypes = { "html", "json", "yaml", "markdown" }, }), diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index ed70d9c..107bfdd 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -13,7 +13,7 @@ local options = { highlight = { enable = true, use_languagetree = true, - additional_vim_regex_highlighting = { "markdown" , "org"}, + additional_vim_regex_highlighting = {"org"}, }, indent = { enable = true, diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index b0e0328..23ece69 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -42,8 +42,8 @@ set -g @catppuccin_window_tabs_enabled on #THIS IS GOD MOD FOR TMUX set -g @plugin 'tmux-plugins/tmux-resurrect' -#THIS IS ALSO GOD MOD FOR TMUX -#THIS HAS TO BE LAST IN THE LIST OF PLUGINS +set -g @resurrect-strategy-nvim 'session' +set -g @resurrect-capture-pane-contents 'on' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @continuum-restore 'on' set -g @continuum-save-interval '10' diff --git a/.gitconfig b/.gitconfig index 1cf5bfd..276e126 100644 --- a/.gitconfig +++ b/.gitconfig @@ -15,3 +15,5 @@ format = ssh [tag] gpgsign = true +[pull] + rebase = false diff --git a/.local/bin/wrappedhl b/.local/bin/wrappedhl index 208d9d8..9ed45ef 100755 --- a/.local/bin/wrappedhl +++ b/.local/bin/wrappedhl @@ -10,5 +10,5 @@ export XDG_CURRENT_DESKTOP=sway export GBM_BACKEND=nvidia-drm export __GLX_VENDOR_LIBRARY_NAME=nvidia export WLR_NO_HARDWARE_CURSORS=1 - +echo "Starting Hyprland..." exec Hyprland diff --git a/.xinitrc b/.xinitrc index 446880a..004acd2 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,7 +1,7 @@ #!/bin/sh -XDG_SESSION_TYPE=x11 -XDG_CURRENT_DESKTOP=X-Generic +export XDG_SESSION_TYPE=x11 +export XDG_CURRENT_DESKTOP=X-Generic userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap sysresources=/etc/X11/xinit/.Xresources @@ -10,33 +10,14 @@ sysmodmap=/etc/X11/xinit/.Xmodmap # merge in defaults and keymaps if [ -f $sysresources ]; then - - - - - - - xrdb -merge $sysresources - fi - if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi - if [ -f "$userresources" ]; then - - - - - - - xrdb -merge "$userresources" - fi - if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi @@ -54,6 +35,5 @@ setxkbmap -layout us,pt setxkbmap -option grp:win_space_toggle setxkbmap -option caps:escape xrandr --output DP-0 --primary --left-of HDMI-0 -xscreensaver -no-splash & dunst & /home/afonso/.local/bin/xmonad