diff --git a/configs/hypr/hyprland.conf b/configs/hypr/hyprland.conf index dad5701..2788638 100644 --- a/configs/hypr/hyprland.conf +++ b/configs/hypr/hyprland.conf @@ -110,13 +110,14 @@ gestures { input { touchpad { - disable_while_typing=true + disable_while_typing=false drag_lock=false middle_button_emulation=true natural_scroll=true scroll_factor=0.500000 tap-to-click=true } + follow_mouse=1 kb_layout=us kb_model= diff --git a/configs/hypr/hyprlock.conf b/configs/hypr/hyprlock.conf index 03c8f63..7451a92 100644 --- a/configs/hypr/hyprlock.conf +++ b/configs/hypr/hyprlock.conf @@ -1,7 +1,7 @@ background { blur_passes=2 blur_size=8 - path=$HOME/pictures/.wallpapers/bloody_snow.jpg + path=$HOME/pictures/.wallpapers/green-forest.png } general { diff --git a/configs/nvim/after/plugin/colors.lua b/configs/nvim-bak/after/plugin/colors.lua similarity index 100% rename from configs/nvim/after/plugin/colors.lua rename to configs/nvim-bak/after/plugin/colors.lua diff --git a/configs/nvim/after/plugin/dap.lua b/configs/nvim-bak/after/plugin/dap.lua similarity index 100% rename from configs/nvim/after/plugin/dap.lua rename to configs/nvim-bak/after/plugin/dap.lua diff --git a/configs/nvim/after/plugin/evil_lualine.lua.bak b/configs/nvim-bak/after/plugin/evil_lualine.lua.bak similarity index 100% rename from configs/nvim/after/plugin/evil_lualine.lua.bak rename to configs/nvim-bak/after/plugin/evil_lualine.lua.bak diff --git a/configs/nvim/after/plugin/fugitive.lua b/configs/nvim-bak/after/plugin/fugitive.lua similarity index 100% rename from configs/nvim/after/plugin/fugitive.lua rename to configs/nvim-bak/after/plugin/fugitive.lua diff --git a/configs/nvim/after/plugin/harpoon.lua b/configs/nvim-bak/after/plugin/harpoon.lua similarity index 100% rename from configs/nvim/after/plugin/harpoon.lua rename to configs/nvim-bak/after/plugin/harpoon.lua diff --git a/configs/nvim/after/plugin/lsp.lua b/configs/nvim-bak/after/plugin/lsp.lua similarity index 100% rename from configs/nvim/after/plugin/lsp.lua rename to configs/nvim-bak/after/plugin/lsp.lua diff --git a/configs/nvim/after/plugin/lualine.lua b/configs/nvim-bak/after/plugin/lualine.lua similarity index 100% rename from configs/nvim/after/plugin/lualine.lua rename to configs/nvim-bak/after/plugin/lualine.lua diff --git a/configs/nvim/after/plugin/telescope.lua b/configs/nvim-bak/after/plugin/telescope.lua similarity index 100% rename from configs/nvim/after/plugin/telescope.lua rename to configs/nvim-bak/after/plugin/telescope.lua diff --git a/configs/nvim/after/plugin/treesitter.lua b/configs/nvim-bak/after/plugin/treesitter.lua similarity index 100% rename from configs/nvim/after/plugin/treesitter.lua rename to configs/nvim-bak/after/plugin/treesitter.lua diff --git a/configs/nvim/after/plugin/ts-context.lua b/configs/nvim-bak/after/plugin/ts-context.lua similarity index 100% rename from configs/nvim/after/plugin/ts-context.lua rename to configs/nvim-bak/after/plugin/ts-context.lua diff --git a/configs/nvim/after/plugin/undotree.lua b/configs/nvim-bak/after/plugin/undotree.lua similarity index 100% rename from configs/nvim/after/plugin/undotree.lua rename to configs/nvim-bak/after/plugin/undotree.lua diff --git a/configs/nvim-bak/init.lua b/configs/nvim-bak/init.lua new file mode 100644 index 0000000..dffca52 --- /dev/null +++ b/configs/nvim-bak/init.lua @@ -0,0 +1 @@ +require("liamm") diff --git a/configs/nvim/lua/liamm/init.lua b/configs/nvim-bak/lua/liamm/init.lua similarity index 100% rename from configs/nvim/lua/liamm/init.lua rename to configs/nvim-bak/lua/liamm/init.lua diff --git a/configs/nvim/lua/liamm/keymap.lua b/configs/nvim-bak/lua/liamm/keymap.lua similarity index 100% rename from configs/nvim/lua/liamm/keymap.lua rename to configs/nvim-bak/lua/liamm/keymap.lua diff --git a/configs/nvim/lua/liamm/packer.lua b/configs/nvim-bak/lua/liamm/packer.lua similarity index 100% rename from configs/nvim/lua/liamm/packer.lua rename to configs/nvim-bak/lua/liamm/packer.lua diff --git a/configs/nvim/lua/liamm/remap.lua b/configs/nvim-bak/lua/liamm/remap.lua similarity index 99% rename from configs/nvim/lua/liamm/remap.lua rename to configs/nvim-bak/lua/liamm/remap.lua index dd35963..3106f27 100644 --- a/configs/nvim/lua/liamm/remap.lua +++ b/configs/nvim-bak/lua/liamm/remap.lua @@ -1,7 +1,6 @@ local nnoremap = require("liamm.keymap").nnoremap nnoremap("pv", "Ex") -nnoremap("tv", "ToggleTerm") nnoremap("tt", "TSContextToggle") vim.keymap.set("v", "ss", ":CarbonNow", { silent = true }) diff --git a/configs/nvim/lua/liamm/set.lua b/configs/nvim-bak/lua/liamm/set.lua similarity index 100% rename from configs/nvim/lua/liamm/set.lua rename to configs/nvim-bak/lua/liamm/set.lua diff --git a/configs/nvim/init.lua b/configs/nvim/init.lua index dffca52..2e7ac74 100644 --- a/configs/nvim/init.lua +++ b/configs/nvim/init.lua @@ -1 +1,2 @@ -require("liamm") +require("liamm.lazy") +require("liamm.core") diff --git a/configs/nvim/lua/liamm/core/binds.lua b/configs/nvim/lua/liamm/core/binds.lua new file mode 100644 index 0000000..99453a3 --- /dev/null +++ b/configs/nvim/lua/liamm/core/binds.lua @@ -0,0 +1,77 @@ +local remap = require("liamm.core.keymap") +local nnoremap = remap.nnoremap +local vnoremap = remap.vnoremap + +-- Normal Mode Mappings +nnoremap("pv", "Ex") +nnoremap("tt", "TSContextToggle") +nnoremap("J", "mzJ`z") +nnoremap("", "zz") +nnoremap("", "zz") +nnoremap("n", "nzzzv") +nnoremap("N", "Nzzzv") +nnoremap("bg", "") +nnoremap("y", "\"+y") +nnoremap("Y", "\"+Y") +nnoremap("x", "!chmod +x %", {silent = true}) + +nnoremap("w", "") + +nnoremap("qq", ":x") +nnoremap(".", ":find ~/") +nnoremap("oc", ":find ~/.config/nvim/lua/liamm/core/binds.lua") +nnoremap("bs", ":lua Build()") + +-- Visual Mode Mappings +vnoremap("K", ":m '<-2gv=gv") +vnoremap("J", ":m '>+1gv=gv") +vnoremap("y", "\"+y") + +-- BUILD SCRIPT INVOKATIONS +-- generic build function +local function set(list) + local _set = {} + for _, l in ipairs(list) do + _set[l] = true + end + return _set +end + +-- TODO: add support for passing flags +function Build() + local out_buf = vim.api.nvim_create_buf(false, true) + + local build_scripts = set(vim.fs.find({ "build.sh", "build.zig", "build.bat" }, { upward = true, type = "file", path = "." })) + local output = "[No Build Output]" + + if build_scripts['build.zig'] then + vim.cmd('echo "Running build.zig"') + output = vim.fn.system({ 'zig', 'build' }) + else + if jit.os == 'Windows' and build_scripts['build.bat'] then + output = vim.fn.system({ 'build', '' }) + elseif build_scripts['build.sh'] then + output = vim.fn.system({ './build.sh', '' }) + else + end + end + vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, {"[ Build Output ]"}) + vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, vim.split(output, '\n')) + + local window = vim.api.nvim_open_win(out_buf, false, { + split = 'right', + win = 0, + width = math.floor(vim.o.columns * 0.35), + style = 'minimal', + }) + vim.api.nvim_set_current_win(window) + + -- Keybind to close the window on pressing Enter + vim.api.nvim_buf_set_keymap(out_buf, 'n', '', '', { + noremap = true, + silent = true, + callback = function() + vim.api.nvim_win_close(window, true) + end + }) +end diff --git a/configs/nvim/lua/liamm/core/init.lua b/configs/nvim/lua/liamm/core/init.lua new file mode 100644 index 0000000..de04ba5 --- /dev/null +++ b/configs/nvim/lua/liamm/core/init.lua @@ -0,0 +1,3 @@ +require("liamm.core.binds") +require("liamm.core.keymap") +require("liamm.core.options") diff --git a/configs/nvim/lua/liamm/core/keymap.lua b/configs/nvim/lua/liamm/core/keymap.lua new file mode 100644 index 0000000..53c5cd3 --- /dev/null +++ b/configs/nvim/lua/liamm/core/keymap.lua @@ -0,0 +1,20 @@ +local M = {} + +local function bind(op, outer_opts) + outer_opts = outer_opts or {noremap = true} + return function(lhs, rhs, opts) + opts = vim.tbl_extend("force", + outer_opts, + opts or {} + ) + vim.keymap.set(op, lhs, rhs, opts) + end +end + +M.nmap = bind("n", {noremap = false}) +M.nnoremap = bind("n") +M.vnoremap = bind("v") +M.xnoremap = bind("x") +M.inoremap = bind("i") + +return M diff --git a/configs/nvim/lua/liamm/core/options.lua b/configs/nvim/lua/liamm/core/options.lua new file mode 100644 index 0000000..1fae0c1 --- /dev/null +++ b/configs/nvim/lua/liamm/core/options.lua @@ -0,0 +1,69 @@ +local opt = vim.opt + +vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" } + +opt.cursorline = true +opt.expandtab = true +opt.fillchars = { + foldopen = "", + foldclose = "", + fold = " ", + foldsep = " ", + diff = "╱", + eob = " ", +} +opt.foldlevel = 99 +opt.grepformat = "%f:%l:%c:%m" +opt.grepprg = "rg --vimgrep" +opt.ignorecase = true +opt.hlsearch = false +opt.incsearch = true +opt.inccommand = "nosplit" +opt.jumpoptions = "view" +opt.laststatus = 3 +opt.linebreak = true +opt.mouse = "a" +opt.pumblend = 10 +opt.pumheight = 10 +opt.number = true +opt.relativenumber = true +opt.ruler = false +opt.scrolloff = 4 +opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" } +opt.shiftround = true +opt.shiftwidth = 2 +opt.shortmess:append({ W = true, I = true, c = true, C = true }) +opt.showmode = false +opt.sidescrolloff = 8 +opt.signcolumn = "yes" +opt.smartcase = true +opt.smartindent = true +opt.spelllang = { "en" } +opt.splitbelow = true +opt.splitkeep = "screen" +opt.splitright = true +opt.tabstop = 2 +opt.termguicolors = true +opt.timeoutlen = vim.g.vscode and 1000 or 300 +opt.undofile = true +opt.undolevels = 10000 +opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +opt.updatetime = 200 +opt.swapfile = false +opt.virtualedit = "block" +opt.wildmode = "longest:full,full" +opt.winminwidth = 5 +opt.wrap = true + +if vim.fn.has("nvim-0.10") == 1 then + opt.smoothscroll = true + opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" + opt.foldmethod = "expr" + opt.foldtext = "" +else + opt.foldmethod = "indent" + opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()" +end + +-- Fix markdown indentation settings +vim.g.markdown_recommended_style = 0 diff --git a/configs/nvim/lua/liamm/lazy.lua b/configs/nvim/lua/liamm/lazy.lua new file mode 100644 index 0000000..3448e28 --- /dev/null +++ b/configs/nvim/lua/liamm/lazy.lua @@ -0,0 +1,40 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--branch=stable", + lazyrepo, + lazypath + }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end + +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + { import = "liamm.plugins" }, + { import = "liamm.plugins.lsp" }, + }, + install = { colorscheme = { "sonokai" } }, + checker = { enabled = true, notify = false }, + change_detection = { notify = false }, +}) diff --git a/configs/nvim/lua/liamm/plugins/base.lua b/configs/nvim/lua/liamm/plugins/base.lua new file mode 100644 index 0000000..6c065b1 --- /dev/null +++ b/configs/nvim/lua/liamm/plugins/base.lua @@ -0,0 +1,88 @@ +return { + -- which-key... will setup at some point + { + "folke/which-key.nvim", + lazy = true, + }, + + -- statup time tracking + { + "dstein64/vim-startuptime", + cmd = "StartupTime", + -- init is called during startup. Configuration for vim plugins typically should be set in an init function + init = function() + vim.g.startuptime_tries = 10 + end, + }, + + -- completions + { + "hrsh7th/nvim-cmp", + -- load cmp on InsertEnter + event = "InsertEnter", + -- these dependencies will only be loaded when cmp loads + -- dependencies are always lazy-loaded unless specified otherwise + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + "L3MON4D3/LuaSnip", + }, + config = function() + local cmp = require("cmp") + local luasnip = require("luasnip") + + cmp.setup({ + completion = { + completeopt = "menu,meuone,preview,noselect", + }, + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.scroll_docs(4), -- scroll preview forward + [''] = cmp.mapping.scroll_docs(-4), -- scroll preview backward + [''] = cmp.mapping.confirm({ select = false }), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.complete(), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, -- lsp completions + { name = "luasnip" }, -- snippets + { name = "buffer" }, -- text within buffer + { name = "path" }, -- filesystem paths + }), + }) + end, + }, + + -- mason + { + "williamboman/mason.nvim", + dependencies = { + "williamboman/mason-lspconfig.nvim", + }, + config = function() + local mason = require("mason") + local mason_lspconfig = require("mason-lspconfig") + + mason.setup({}) + + mason_lspconfig.setup({ + ensure_installed = { + "lua_ls", + "zls", + "ols", + "rnix", + }, + automatic_installation = true, -- auto-install configured servers + automatic_enable = false, + }) + end, + } +} diff --git a/configs/nvim/lua/liamm/plugins/colorscheme.lua b/configs/nvim/lua/liamm/plugins/colorscheme.lua new file mode 100644 index 0000000..7a64c20 --- /dev/null +++ b/configs/nvim/lua/liamm/plugins/colorscheme.lua @@ -0,0 +1,29 @@ +return { + -- the colorscheme should be available when starting Neovim + { + "sainnhe/sonokai", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme sonokai]]) + end, + }, + + { + "p00f/alabaster.nvim", + name = "alabaster", + }, + + -- Other colorschemes + { + "karoliskoncevicius/sacredforest-vim", + lazy = false, + name = "sacredforest" + }, + { + "folke/tokyonight.nvim", + lazy = true, + name = "tokyonight", + }, +} diff --git a/configs/nvim/lua/liamm/plugins/harpoon.lua b/configs/nvim/lua/liamm/plugins/harpoon.lua new file mode 100644 index 0000000..d99d8ce --- /dev/null +++ b/configs/nvim/lua/liamm/plugins/harpoon.lua @@ -0,0 +1,37 @@ +local map = require("liamm.core.keymap").nnoremap +-- return { +-- "theprimeagen/harpoon", +-- branch = "harpoon2", +-- dependencies = { +-- "nvim-lua/plenary.nvim", +-- }, +-- lazy = false, +-- config = function() +-- local harpoon = require("harpoon") +-- +-- ---@diagnostic disable-next-line: missing-parameter +-- harpoon:setup() +-- map("a", function() harpoon:list():append() end) +-- map("h", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) +-- map("", function() harpoon:list():select(1) end) +-- map("", function() harpoon:list():select(2) end) +-- map("", function() harpoon:list():select(3) end) +-- map("", function() harpoon:list():select(4) end) +-- end, +-- } + +return { + "ThePrimeagen/harpoon", + branch = "harpoon2", + config = function() + local harpoon = require("harpoon") + ---@diagnostic disable-next-line: missing-parameter + harpoon:setup() + map("a", function() harpoon:list():add() end) + map("", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) + map("", function() harpoon:list():select(1) end) + map("", function() harpoon:list():select(2) end) + map("", function() harpoon:list():select(3) end) + map("", function() harpoon:list():select(4) end) + end, +} diff --git a/configs/nvim/lua/liamm/plugins/lsp/lspconfig.lua b/configs/nvim/lua/liamm/plugins/lsp/lspconfig.lua new file mode 100644 index 0000000..47e4e26 --- /dev/null +++ b/configs/nvim/lua/liamm/plugins/lsp/lspconfig.lua @@ -0,0 +1,107 @@ +local map = require("liamm.core.keymap").nnoremap +local vmap = require("liamm.core.keymap").vnoremap + +return { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + }, + config = function() + local lspconfig = require("lspconfig") + local cmp_nvim_lsp = require("cmp_nvim_lsp") + + local opts = { noremap = true, silent = true } + local on_attach = function(client, bufnr) + opts.buffer = bufnr + + opts.desc = "Show LSP References" + map("gR", "Telescope lsp_references", opts) + + opts.desc = "Go To Declaration" + map("gD", vim.lsp.buf.declaration, opts) + + opts.desc = "Show LSP Definition" + map("gd", "Telescope lsp_definitions", opts) + + opts.desc = "Show LSP Type Definitions" + map("gt", "Telescope lsp_type_definitions", opts) + + opts.desc = "Show LSP Implementations" + map("gi", "Telescope lsp_implementations", opts) + + opts.desc = "See Available Code Actions" + map("ca", vim.lsp.buf.code_action, opts) + vmap("ca", vim.lsp.buf.code_action, opts) + + opts.desc = "Smart Rename" + map("rn", vim.lsp.buf.rename, opts) + + opts.desc = "Show Buffer Diagnostics" + map("vD", "Telescope diagnostics bufnr=0", opts) + + opts.desc = "Show Line Diagnostics" + map("vd", vim.diagnostic.open_float, opts) + + opts.desc = "Go To Prev Diagnostic" + map("[d", "vim.diagnostic.jump({ count = 1, float = true })", opts) + + opts.desc = "Go To Next Diagnostic" + map("]d", "vim.diagnostic.jump({ count = -1, float = true })", opts) + + opts.desc = "Show Documentation For Cursor Hover" + map("K", vim.lsp.buf.hover, opts) + + opts.desc = "Show Documentation For Cursor Hover" + map("rs", "LspRestart", opts) + end + + local capabilities = cmp_nvim_lsp.default_capabilities() + + local signs = { + Error = ' ', + Warn = ' ', + Info = ' ', + Hint = 'H', + } + + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + end + + lspconfig["zls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + lspconfig["rnix"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + lspconfig["lua_ls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = { + Lua = { + diagnostic = { + globals = { "vim" }, + }, + workspace = { + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.stdpath("config") .. "/lua"] = true, + }, + }, + }, + }, + }) + + lspconfig["ols"].setup({ + capabilities = capabilities, + on_attach = on_attach, + single_file_support = true, + }) + end, +} diff --git a/configs/nvim/lua/liamm/plugins/lualine.lua b/configs/nvim/lua/liamm/plugins/lualine.lua new file mode 100644 index 0000000..d76446c --- /dev/null +++ b/configs/nvim/lua/liamm/plugins/lualine.lua @@ -0,0 +1,72 @@ +return { + "nvim-lualine/lualine.nvim", + config = function() + lualine = require("lualine") + lualine.setup({ + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '|', right = '|'}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 75, + tabline = 10000, + winbar = 10000, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { + 'branch', + 'diff', + { + 'diagnostics', + --sources = 'nvim_diagnostic' + sources = { 'nvim_diagnostic' }, + + -- Displays diagnostics for the defined severity types + sections = { 'error', 'warn', 'info', 'hint' }, + diagnostics_color = { + -- Same values as the general color option can be used here. + error = 'DiagnosticError', -- Changes diagnostics' error color. + warn = 'DiagnosticWarn', -- Changes diagnostics' warn color. + info = 'DiagnosticInfo', -- Changes diagnostics' info color. + hint = 'DiagnosticHint', -- Changes diagnostics' hint color. + }, + symbols = { + error = ' ', + warn = ' ', + info = ' ', + hint = 'H' + }, + colored = true, -- Displays diagnostics status in color if set to true. + update_in_insert = false, -- Update diagnostics in insert mode. + always_visible = false, -- Show diagnostics even if there are none. + }, + }, + lualine_x = {'encoding', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + }) + end, +} diff --git a/configs/nvim/lua/liamm/plugins/snacks.lua b/configs/nvim/lua/liamm/plugins/snacks.lua new file mode 100644 index 0000000..61f1db0 --- /dev/null +++ b/configs/nvim/lua/liamm/plugins/snacks.lua @@ -0,0 +1,13 @@ +return { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = { + input = { enabled = true }, + picer = { enabled = true }, + notifier = { enabled = true }, + scope = { enabled = true }, + sroll = { enabled = true }, + }, +} diff --git a/configs/nvim/lua/liamm/plugins/telescope.lua b/configs/nvim/lua/liamm/plugins/telescope.lua new file mode 100644 index 0000000..7c6a644 --- /dev/null +++ b/configs/nvim/lua/liamm/plugins/telescope.lua @@ -0,0 +1,44 @@ +return { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release" + }, + }, + lazy = false, + config = function() + local telescope = require("telescope") + local actions = require("telescope.actions") + + telescope.setup({ + defaults = { + mappings = { + i = { + [""] = actions.move_selection_previous, + [""] = actions.move_selection_next, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + }, + }, + }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = smart_case, + }, + }, + }) + + telescope.load_extension("fzf") + end, + keys = { + { "ff", "Telescope find_files", desc = "Find files in cwd" }, + { "fg", "Telescope git_files", desc = "Find git file cwd" }, + { "fr", "Telescope oldfiles", desc = "Find recent files in cwd" }, + { "fs", "Telescope live_grep", desc = "Find string in cwd" }, + { "fc", "Telescope grep_string", desc = "Find string under cursor in cwd" }, + }, +} diff --git a/configs/waybar/modules.jsonc b/configs/waybar/modules.jsonc index 853a10f..12d3ee8 100644 --- a/configs/waybar/modules.jsonc +++ b/configs/waybar/modules.jsonc @@ -253,8 +253,9 @@ "modules": ["battery", "power-profiles-daemon"], }, "battery": { + "interval": 1, "states": { - "good": 95, + "good": 90, "warning": 30, "critical": 15 }, diff --git a/hosts/darp8/configuration.nix b/hosts/darp8/configuration.nix index eb88ea6..a6932de 100644 --- a/hosts/darp8/configuration.nix +++ b/hosts/darp8/configuration.nix @@ -30,7 +30,7 @@ in enable = true; # Open ports in the firewall. - allowedTCPPorts = [ 21 22 80 443 4070 ]; + allowedTCPPorts = [ 21 22 80 443 4070 5037 ]; allowedUDPPorts = [ 4070 ]; allowedTCPPortRanges = [ @@ -86,6 +86,9 @@ in }; }; }; + udev = { + packages = [ pkgs.android-udev-rules ]; + }; libinput.enable = true; blueman.enable = true; @@ -224,6 +227,7 @@ in ripgrep spotify unzip + usbutils uxplay vim wget diff --git a/hosts/darp8/pkgs.nix b/hosts/darp8/pkgs.nix index 919de02..f096cb4 100644 --- a/hosts/darp8/pkgs.nix +++ b/hosts/darp8/pkgs.nix @@ -18,6 +18,7 @@ fastfetch filezilla floorp + fzf genymotion gimp gtk4 @@ -49,6 +50,8 @@ swaynotificationcenter swww texliveFull + xfce.thunar + xfce.thunar-volman tree waybar wev diff --git a/scripts/battery-warn.sh b/scripts/battery-warn.sh index 98cc6a0..c155e47 100755 --- a/scripts/battery-warn.sh +++ b/scripts/battery-warn.sh @@ -6,5 +6,5 @@ bat_lvl=$(grep "" /sys/class/power_supply/BAT0/capacity ) bat_status=$(grep Discharging /sys/class/power_supply/BAT0/status ) if (( $bat_lvl < $bat_alert_lvl )) && [ $bat_status == "Discharging" ]; then - notify-send -a low_battery -u critical "Low Battery" "Connect Power Adapter" -i battery-low -r $notif_id -t 60000 + notify-send -a low_battery -u critical "Low Battery" "Connect Power Adapter" -i battery-low -r $notif_id -t 1000 fi