From 30792095338ef8588fca477a49b2271c88f7bb26 Mon Sep 17 00:00:00 2001 From: Samuel Walker Date: Wed, 23 Oct 2024 15:54:28 -0600 Subject: [PATCH] stuff --- .bashrc | 3 +- .config/hypr/hyprland.conf | 8 +++- .config/kitty/kitty.conf | 1 + .config/nvim/init.lua | 52 ++++++++++++++++++++++++++ .config/nvim/lazy-lock.json | 14 +++++++ .config/nvim/lua/config/lazy.lua | 35 +++++++++++++++++ .config/nvim/lua/plugins/core.lua | 4 ++ .config/nvim/lua/plugins/languages.lua | 3 ++ .config/nvim/lua/plugins/visual.lua | 24 ++++++++++++ .config/waybar/config.jsonc | 33 ++++++++-------- 10 files changed, 158 insertions(+), 19 deletions(-) create mode 100644 .config/kitty/kitty.conf create mode 100644 .config/nvim/init.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/config/lazy.lua create mode 100644 .config/nvim/lua/plugins/core.lua create mode 100644 .config/nvim/lua/plugins/languages.lua create mode 100644 .config/nvim/lua/plugins/visual.lua diff --git a/.bashrc b/.bashrc index cb3829a..83b6019 100644 --- a/.bashrc +++ b/.bashrc @@ -7,9 +7,10 @@ alias ls='ls --color=auto' alias grep='grep --color=auto' +alias vim=nvim PS1='[\u@\h \W]\$ ' alias config='EDITOR=vim /usr/bin/git --git-dir=/home/piwalker/.cfg/ --work-tree=/home/piwalker' -EDITOR=vim +EDITOR=nvim fastfetch diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index f1a8df4..3c4734a 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -59,6 +59,7 @@ exec-once = waybar & hyprpaper env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 +env = XDG_CURRENT_DESKTOP="hyprland" ##################### @@ -132,6 +133,10 @@ dwindle { preserve_split = true # You probably want this } +binds { + allow_workspace_cycles = true +} + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master { new_status = master @@ -188,12 +193,13 @@ $mainMod = SUPER # Sets "Windows" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Return, exec, $terminal bind = $mainMod, W, killactive, -bind = $mainMod, M, exit, +bind = $mainMod+Shift, E, exit, bind = $mainMod, E, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod, Space, exec, $menu bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle +bind = $mainMod, Escape, workspace, previous # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..d3ea8b1 --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1 @@ +background_opacity 0.7 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..7d75f80 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,52 @@ +require("config.lazy") + +local map = vim.api.nvim_set_keymap +local opts = {noremap = true, silent = true} + +-- Move to previous/next +map('n', '', 'BufferPrevious', opts) +map('n', '', 'BufferNext', opts) +-- Re-order to previous/next +map('n', '', 'BufferMovePrevious', opts) +map('n', '>', 'BufferMoveNext', opts) +-- Goto buffer in position... +map('n', '', 'BufferGoto 1', opts) +map('n', '', 'BufferGoto 2', opts) +map('n', '', 'BufferGoto 3', opts) +map('n', '', 'BufferGoto 4', opts) +map('n', '', 'BufferGoto 5', opts) +map('n', '', 'BufferGoto 6', opts) +map('n', '', 'BufferGoto 7', opts) +map('n', '', 'BufferGoto 8', opts) +map('n', '', 'BufferGoto 9', opts) +map('n', '', 'BufferLast', opts) +-- Pin/unpin buffer +map('n', '', 'BufferPin', opts) +-- Goto pinned/unpinned buffer +-- :BufferGotoPinned +-- :BufferGotoUnpinned +-- Close buffer +map('n', '', 'BufferClose', opts) +-- Wipeout buffer +-- :BufferWipeout +-- Close commands +-- :BufferCloseAllButCurrent +-- :BufferCloseAllButPinned +-- :BufferCloseAllButCurrentOrPinned +-- :BufferCloseBuffersLeft +-- :BufferCloseBuffersRight +-- Magic buffer-picking mode +map('n', '', 'BufferPick', opts) +-- Sort automatically by... +map('n', 'bb', 'BufferOrderByBufferNumber', opts) +map('n', 'bn', 'BufferOrderByName', opts) +map('n', 'bd', 'BufferOrderByDirectory', opts) +map('n', 'bl', 'BufferOrderByLanguage', opts) +map('n', 'bw', 'BufferOrderByWindowNumber', opts) + +-- Other: +-- :BarbarEnable - enables barbar (enabled by default) +-- :BarbarDisable - very bad command, should never be used + +vim.cmd('Neotree') +vim.o.tabstop = 4 diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..abfef18 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,14 @@ +{ + "LazyVim": { "branch": "main", "commit": "2f6c1f60834108359b3404748453a65843909a03" }, + "barbar.nvim": { "branch": "master", "commit": "7c28de8c22f4c00ed43a78ae16c13dd6a248fe1a" }, + "coc.nvim": { "branch": "master", "commit": "9fd857818977ce9f9f6f7271034fc917dede7035" }, + "gitsigns.nvim": { "branch": "main", "commit": "ee7634ab4f0a6606438fe13e16cbf2065589a5ed" }, + "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "themery.nvim": { "branch": "main", "commit": "15c29229e9a25655587462c8c64a62d9aadf0a92" }, + "tokyonight.nvim": { "branch": "main", "commit": "19f39b53ef5e148bf94ea3696df36175af7e31e6" }, + "transparent.nvim": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" } +} diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..f5ee74c --- /dev/null +++ b/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,35 @@ +-- 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. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/.config/nvim/lua/plugins/core.lua b/.config/nvim/lua/plugins/core.lua new file mode 100644 index 0000000..19d97fa --- /dev/null +++ b/.config/nvim/lua/plugins/core.lua @@ -0,0 +1,4 @@ +return { + { "folke/lazy.nvim", version = false }, + { "LazyVim/LazyVim", version = false }, +} diff --git a/.config/nvim/lua/plugins/languages.lua b/.config/nvim/lua/plugins/languages.lua new file mode 100644 index 0000000..cf1b9e9 --- /dev/null +++ b/.config/nvim/lua/plugins/languages.lua @@ -0,0 +1,3 @@ +return { + "neoclide/coc.nvim" +} diff --git a/.config/nvim/lua/plugins/visual.lua b/.config/nvim/lua/plugins/visual.lua new file mode 100644 index 0000000..c946434 --- /dev/null +++ b/.config/nvim/lua/plugins/visual.lua @@ -0,0 +1,24 @@ +return { + "xiyaowong/transparent.nvim", + "nvim-tree/nvim-web-devicons", + "lewis6991/gitsigns.nvim", + "romgrk/barbar.nvim", + {"nvim-neo-tree/neo-tree.nvim", branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim"}}, + {"zaldih/themery.nvim", lazy = false, config = function () + require("themery").setup({ + themes = {"tokyonight"}, + livePreview = true; + }) + end + }, + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, +} +} diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 6649f87..7d90a5e 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -33,23 +33,22 @@ "tray", "custom/power" ], - // Modules configuration - // "sway/workspaces": { - // "disable-scroll": true, - // "all-outputs": true, - // "warp-on-scroll": false, - // "format": "{name}: {icon}", - // "format-icons": { - // "1": "", - // "2": "", - // "3": "", - // "4": "", - // "5": "", - // "urgent": "", - // "focused": "", - // "default": "" - // } - // }, + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "warp-on-scroll": false, + "format": "{name}: {icon}", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "urgent": "", + "focused": "", + "default": "" + } + }, "keyboard-state": { "numlock": true, "capslock": true,