diff --git a/.config/X11/profile b/.config/X11/profile index ea87891..0df47f1 100644 --- a/.config/X11/profile +++ b/.config/X11/profile @@ -13,9 +13,9 @@ export PATH export EDITOR=nvim export VISUAL=nvim -export TERMINAL=/usr/bin/alacritty +export TERMINAL=alacritty export FILE_BROWSER=thunar -export BROWSER=zen-browser +export BROWSER=brave export READER=zathura if [ $DESKTOP_SESSION != "plasma" ]; then diff --git a/.config/fish/conf.d/rustup.fish b/.config/fish/conf.d/rustup.fish deleted file mode 100644 index 89b158b..0000000 --- a/.config/fish/conf.d/rustup.fish +++ /dev/null @@ -1 +0,0 @@ -source "/home/shubham/.local/share/cargo/env.fish" diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 950f7d1..541ae56 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -37,3 +37,7 @@ bind -M insert \b backward-kill-word bind -M insert \cl 'history merge; commandline -f clear-screen' bind -M visual \cl 'history merge; commandline -f clear-screen' complete -c dnf5 -w dnf + +# bun +set --export BUN_INSTALL "$HOME/.local/share/bun" +set --export PATH $BUN_INSTALL/bin $PATH diff --git a/.config/hypr/autostart.sh b/.config/hypr/autostart.sh index 1fac06f..0394caf 100755 --- a/.config/hypr/autostart.sh +++ b/.config/hypr/autostart.sh @@ -15,6 +15,11 @@ waybar & swaync & nm-applet & swaybg --image ~/.config/wall.png --mode stretch & -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +if test -f /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1; then + /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +fi +if test -f /usr/lib/polkit-kde-authentication-agent-1; then + /usr/lib/polkit-kde-authentication-agent-1 & +fi systemctl --user reload-or-restart xdg-desktop-portal.service xdg-desktop-portal-hyprland.service & hyprshade auto & diff --git a/.config/nvim-vscode/after/plugin/theme.lua b/.config/nvim-vscode/after/plugin/theme.lua index eda0ab3..a5abb6d 100644 --- a/.config/nvim-vscode/after/plugin/theme.lua +++ b/.config/nvim-vscode/after/plugin/theme.lua @@ -11,4 +11,7 @@ if vim.g.vscode == nil then }) vim.cmd.colorscheme "tokyodark" end + if vim.fn.isdirectory(vim.fn.stdpath('data') .. '/plugged/mono-jade') == 1 then + vim.cmd("colo mono-jade") + end end diff --git a/.config/nvim-vscode/init.vim b/.config/nvim-vscode/init.vim index 2ed8d32..6ea0d14 100644 --- a/.config/nvim-vscode/init.vim +++ b/.config/nvim-vscode/init.vim @@ -14,7 +14,7 @@ Plug 'folke/flash.nvim' Plug 'monaqa/dial.nvim' Plug 'tpope/vim-abolish' if !exists('g:vscode') - Plug 'tiagovla/tokyodark.nvim' + Plug 'masar3141/mono-jade' Plug 'windwp/nvim-autopairs' endif diff --git a/.config/nvim/lua/plugins/avante.lua b/.config/nvim/lua/plugins/avante.lua index ad1098d..186e87a 100644 --- a/.config/nvim/lua/plugins/avante.lua +++ b/.config/nvim/lua/plugins/avante.lua @@ -3,77 +3,54 @@ return { 'yetone/avante.nvim', event = 'VeryLazy', version = false, -- set this if you want to always pull the latest change - -- keys = function(_, keys) - -- ---@type avante.Config - -- local opts = - -- require('lazy.core.plugin').values(require('lazy.core.config').spec.plugins['avante.nvim'], 'opts', false) - -- - -- local mappings = { - -- { - -- opts.mappings.ask, - -- function() - -- require('avante.api').ask() - -- end, - -- desc = 'avante: ask', - -- mode = { 'n', 'v' }, - -- }, - -- { - -- opts.mappings.refresh, - -- function() - -- require('avante.api').refresh() - -- end, - -- desc = 'avante: refresh', - -- mode = 'v', - -- }, - -- { - -- opts.mappings.edit, - -- function() - -- require('avante.api').edit() - -- end, - -- desc = 'avante: edit', - -- mode = { 'n', 'v' }, - -- }, - -- } - -- mappings = vim.tbl_filter(function(m) - -- return m[1] and #m[1] > 0 - -- end, mappings) - -- return vim.list_extend(mappings, keys) - -- end, - opts = { - -- add any opts here - ---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string - provider = 'ollama', - vendors = { - ---@type AvanteProvider - ollama = { - ['local'] = true, - endpoint = '127.0.0.1:11434/v1', - model = 'llama3.2', - parse_curl_args = function(opts, code_opts) - return { - url = opts.endpoint .. '/chat/completions', - headers = { - ['Accept'] = 'application/json', - ['Content-Type'] = 'application/json', - }, - body = { - model = opts.model, - messages = require('avante.providers').copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced - max_tokens = 2048, - stream = true, - }, - } - end, - parse_response_data = function(data_stream, event_state, opts) - require('avante.providers').openai.parse_response(data_stream, event_state, opts) - end, + opts = function() + local identity = vim.fn.expand '$HOME/.config/age/identity.txt' + local secret = vim.fn.expand '$HOME/.config/age/gemini_api.age' + vim.env.GEMINI_API_KEY = require('age').get(secret, identity) -- Get secret + local ollama_setup = { + -- add any opts here + ---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string + provider = 'gemini', + vendors = { + ---@type AvanteProvider + ollama = { + ['local'] = true, + endpoint = '127.0.0.1:11434/v1', + model = 'llama3.2', + parse_curl_args = function(opts, code_opts) + return { + url = opts.endpoint .. '/chat/completions', + headers = { + ['Accept'] = 'application/json', + ['Content-Type'] = 'application/json', + }, + body = { + model = opts.model, + messages = require('avante.providers').copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced + max_tokens = 2048, + stream = true, + }, + } + end, + parse_response_data = function(data_stream, event_state, opts) + require('avante.providers').openai.parse_response(data_stream, event_state, opts) + end, + }, }, - }, - }, + } + if not vim.env.GEMINI_API_KEY then + return ollama_setup + end + return { + ---@type "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string + provider = 'gemini', + } + end, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` build = 'make', -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows dependencies = { + 'KingMichaelPark/age.nvim', -- Add age dependency 'nvim-treesitter/nvim-treesitter', { 'stevearc/dressing.nvim', diff --git a/.config/nvim/lua/plugins/theme.lua b/.config/nvim/lua/plugins/theme.lua index 6429790..2eae28c 100644 --- a/.config/nvim/lua/plugins/theme.lua +++ b/.config/nvim/lua/plugins/theme.lua @@ -4,7 +4,7 @@ return { 'catppuccin/nvim', name = 'catppuccin', event = 'VimEnter', - enabled = false, + enabled = true, config = function() require 'plugins.config.catppuccin' end, @@ -49,7 +49,7 @@ return { }, { 'AlexvZyl/nordic.nvim', - enabled = true, + enabled = false, event = 'VimEnter', config = function() require 'plugins.config.nordic' diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 1e19183..810e9b7 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,10 +1,3 @@ -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then -# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -# fi - # Set the directory we want to store zinit and plugins ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" # Download Zinit, if it's not there yet @@ -45,7 +38,7 @@ zinit ice trigger-load!man wait'0' lucid; zinit snippet OMZP::colored-man-pages zinit ice wait"2" as"command" from"gh-r" lucid \ mv"zoxide*/zoxide -> zoxide" \ atclone"./zoxide init zsh > zo_init.zsh" \ - atpull"%atclone" src"zo_init.sh" + atpull"%atclone" src"zo_init.zsh" zinit light ajeetdsouza/zoxide # zinit ice wait"2" as"command" from"gh-r" lucid \ # atclone"./fnm env --use-on-cd > fnmenv.zsh" \ @@ -104,3 +97,6 @@ zinit snippet ~/Documents/dotfiles/.config/zsh/mfunctions.zsh # Ensure unique path typeset -gU cdpath fpath mailpath path + +# bun completions +[ -s "/home/shubham/.local/share/bun/_bun" ] && source "/home/shubham/.local/share/bun/_bun" diff --git a/.config/zsh/bindings.zsh b/.config/zsh/bindings.zsh index b831be7..9e70fc5 100644 --- a/.config/zsh/bindings.zsh +++ b/.config/zsh/bindings.zsh @@ -58,6 +58,9 @@ bindkey -M viins '^J' autosuggest-accept # bindkey -M vicmd "b" backward-word # bindkey -M vicmd "w" forward-word +# C-x a to expand alias +bindkey "^Xa" _expand_alias + # Change cursor shape for different vi modes. function zle-keymap-select { if [[ ${KEYMAP} == vicmd ]] ||