diff --git a/.config/fish/functions/fuck.fish b/.config/fish/functions/fuck.fish new file mode 100644 index 00000000..503c6186 --- /dev/null +++ b/.config/fish/functions/fuck.fish @@ -0,0 +1,9 @@ +function fuck -d "Correct your previous console command" + set -l fucked_up_command $history[1] + env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command + if [ "$unfucked_command" != "" ] + eval $unfucked_command + builtin history delete --exact --case-sensitive -- $fucked_up_command + builtin history merge + end +end diff --git a/.config/fish/functions/vi.fish b/.config/fish/functions/vi.fish index 1bf20068..ba99bac0 100644 --- a/.config/fish/functions/vi.fish +++ b/.config/fish/functions/vi.fish @@ -1,4 +1,3 @@ function vi --wraps=nvim --description 'alias vi=nvim' - nvim $argv - + nvim $argv end diff --git a/.config/fish/variables.fish b/.config/fish/variables.fish index 957b3c72..032df312 100644 --- a/.config/fish/variables.fish +++ b/.config/fish/variables.fish @@ -47,5 +47,7 @@ set -xg fzf_preview_dir_cmd eza --long --header --icons --all --color=always --g set -xg fzf_fd_opts --hidden --exclude=.git --color=always set -xg fzf_diff_highlighter delta --paging=never --width=20 +set -x THEFUCK_OVERRIDDEN_ALIASES 'vi, yarn, eza, vim, neofetch, onefetch, cat, tty-clock, dua i' + set -xg LS_COLORS (vivid generate catppuccin-macchiato) set -xg BAT_THEME Catppuccin-macchiato diff --git a/.config/hypr/keybinds/binds.conf b/.config/hypr/keybinds/binds.conf index 06e6270b..a1312fb8 100644 --- a/.config/hypr/keybinds/binds.conf +++ b/.config/hypr/keybinds/binds.conf @@ -128,6 +128,9 @@ bind=SUPER,mouse_up,workspace,m+1 bind=SUPERCTRL,LEFT,workspace,m-1 bind=SUPERCTRL,RIGHT,workspace,m+1 +bind=SUPERCTRL,h,workspace,m-1 +bind=SUPERCTRL,l,workspace,m+1 + # Group control bind =SUPER, W, togglesplit bind=SUPER,S,togglegroup diff --git a/.config/nvim/lua/plugins/better-escape.lua b/.config/nvim/lua/plugins/better-escape.lua new file mode 100644 index 00000000..172dfce9 --- /dev/null +++ b/.config/nvim/lua/plugins/better-escape.lua @@ -0,0 +1,18 @@ +return { + { + "max397574/better-escape.nvim", + event = "VeryLazy", + config = function() + require("better_escape").setup({ + mapping = { "jk", "jj", "kj", "jl" }, -- a table with mappings to use + timeout = vim.o.timeoutlen, -- the time in which the keys must be hit in ms. Use option timeoutlen by default + clear_empty_lines = false, -- clear line after escaping if there is only whitespace + keys = "", -- keys used for escaping, if it is a function will use the result everytime + -- example(recommended) + -- keys = function() + -- return vim.api.nvim_win_get_cursor(0)[2] > 1 and 'l' or '' + -- end, + }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 48b144cf..5ed0c09f 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -63,6 +63,12 @@ return { }, }, lualine_y = { + { + function() + local ok, m = pcall(require, "better_escape") + return ok and m.waiting and "✺" or "" + end, + }, { "progress", separator = " ", padding = { left = 1, right = 0 } }, { "location", padding = { left = 0, right = 1 } }, }, diff --git a/.config/nvim/lua/plugins/neo-tree.lua b/.config/nvim/lua/plugins/neo-tree.lua index ee6a75fb..4c5524a4 100644 --- a/.config/nvim/lua/plugins/neo-tree.lua +++ b/.config/nvim/lua/plugins/neo-tree.lua @@ -46,6 +46,7 @@ return { window = { mappings = { [""] = "none", + ["e"] = "open", }, }, default_component_configs = { diff --git a/.config/nvim/lua/plugins/template-string.lua b/.config/nvim/lua/plugins/template-string.lua new file mode 100644 index 00000000..1041006d --- /dev/null +++ b/.config/nvim/lua/plugins/template-string.lua @@ -0,0 +1,9 @@ +return { + { + "axelvc/template-string.nvim", + event = "BufRead", + config = function() + require("template-string").setup() + end, + }, +} diff --git a/.config/nvim/lua/plugins/twilight.lua b/.config/nvim/lua/plugins/twilight.lua index 9d778d7f..957511e7 100644 --- a/.config/nvim/lua/plugins/twilight.lua +++ b/.config/nvim/lua/plugins/twilight.lua @@ -2,5 +2,28 @@ return { { "folke/twilight.nvim", cmd = "Twilight", + keys = { { "ut", "Twilight", desc = "Toggle Twilight" } }, + opts = { + { + dimming = { + alpha = 0.25, -- amount of dimming + -- we try to get the foreground from the highlight groups or fallback color + color = { "Normal", "#ffffff" }, + term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color + inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer) + }, + context = 20, -- amount of lines we will try to show around the current line + treesitter = true, -- use treesitter when available for the filetype + -- treesitter is used to automatically expand the visible text, + -- but you can further control the types of nodes that should always be fully expanded + expand = { -- for treesitter, we always try to expand to the top-most ancestor with these types + "function", + "method", + "table", + "if_statement", + }, + exclude = {}, -- exclude these filetypes + }, + }, }, } diff --git a/.config/nvim/lua/plugins/zen-mode.lua b/.config/nvim/lua/plugins/zen-mode.lua index 959e2dc8..0a4a511f 100644 --- a/.config/nvim/lua/plugins/zen-mode.lua +++ b/.config/nvim/lua/plugins/zen-mode.lua @@ -2,6 +2,7 @@ return { { "folke/zen-mode.nvim", cmd = "ZenMode", + keys = { { "uz", "ZenMode", desc = "Zen Mode" } }, opts = { plugins = { scrollview = { enabled = false },