diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..36b3563 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "trailingComma": "none" +} diff --git a/home/config/nvim/.gitignore b/home/config/nvim/.gitignore deleted file mode 100644 index 82df8de..0000000 --- a/home/config/nvim/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -tt.* -.tests -doc/tags -debug -.repro -foo.* -*.log -data -lazy-lock.json -lazyvim.json diff --git a/home/config/nvim/.neoconf.json b/home/config/nvim/.neoconf.json deleted file mode 100644 index 7c48087..0000000 --- a/home/config/nvim/.neoconf.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - } -} diff --git a/home/config/nvim/lua/config/lazy.lua b/home/config/nvim/lua/config/lazy.lua index c4a9734..49e5fce 100644 --- a/home/config/nvim/lua/config/lazy.lua +++ b/home/config/nvim/lua/config/lazy.lua @@ -44,7 +44,7 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.lang.toml" }, { import = "lazyvim.plugins.extras.lang.yaml" }, { import = "lazyvim.plugins.extras.linting.eslint" }, - { import = "lazyvim.plugins.extras.ui.dashboard-nvim" }, + { import = "lazyvim.plugins.extras.ui.alpha" }, { import = "lazyvim.plugins.extras.ui.edgy" }, { import = "lazyvim.plugins.extras.ui.mini-animate" }, { import = "lazyvim.plugins.extras.ui.mini-indentscope" }, @@ -52,7 +52,7 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.ui.treesitter-context" }, { import = "lazyvim.plugins.extras.util.dot" }, { import = "lazyvim.plugins.extras.util.mini-hipatterns" }, - { import = "lazyvim.plugins.extras.util.project" }, + { import = "lazyvim.plugins.extras.editor.telescope" }, -- import/override with your plugins { import = "plugins" }, }, diff --git a/home/config/nvim/lua/plugins/alpha.lua b/home/config/nvim/lua/plugins/alpha.lua new file mode 100644 index 0000000..3fff0b1 --- /dev/null +++ b/home/config/nvim/lua/plugins/alpha.lua @@ -0,0 +1,20 @@ +return { + { + "goolord/alpha-nvim", + opts = function() + local dashboard = require("alpha.themes.dashboard") + local logo = [[ + ██████████ █████████ █████████ █████ █████ █████ █████ █████ █████ + ░░███░░░░███ ███░░░░░███ ███░░░░░███░░███ ░░███ ░░███ ░░███ ░░███ ░░███ + ░███ ░░███ ░███ ░███ ███ ░░░ ░███ ░███ ░░███ ███ ░░███ ███ + ░███ ░███ ░███████████ ░███ ░███████████ ░░█████ ░░█████ + ░███ ░███ ░███░░░░░███ ░███ ░███░░░░░███ ███░███ ░░███ + ░███ ███ ░███ ░███ ░░███ ███ ░███ ░███ ███ ░░███ ░███ + ██████████ █████ █████ ░░█████████ █████ █████ █████ █████ █████ + ░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ + ]] + + dashboard.section.header.val = vim.split(logo, "\n") + end, + }, +} diff --git a/home/config/nvim/lua/plugins/conform.lua b/home/config/nvim/lua/plugins/conform.lua new file mode 100644 index 0000000..523022b --- /dev/null +++ b/home/config/nvim/lua/plugins/conform.lua @@ -0,0 +1,11 @@ +return { + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + json = { "prettierd", "prettier", stop_after_first = true }, + jsonc = { "prettierd", "prettier", stop_after_first = true }, + }, + }, + }, +} diff --git a/home/config/nvim/lua/plugins/lsp.lua b/home/config/nvim/lua/plugins/lsp.lua index 2fa336d..43dab5c 100644 --- a/home/config/nvim/lua/plugins/lsp.lua +++ b/home/config/nvim/lua/plugins/lsp.lua @@ -2,41 +2,35 @@ local util = require("lspconfig.util") local async = require("lspconfig.async") local mod_cache = nil -require("lspconfig").lua_ls.setup({ - on_init = function(client) - local path = client.workspace_folders[1].name - if vim.loop.fs_stat(path .. "/.luarc.json") or vim.loop.fs_stat(path .. "/.luarc.jsonc") then - return - end - - client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, { - runtime = { - -- Tell the language server which version of Lua you're using - -- (most likely LuaJIT in the case of Neovim) - version = "LuaJIT", - }, - -- Make the server aware of Neovim runtime files - workspace = { - checkThirdParty = false, - library = { - vim.env.VIMRUNTIME, - -- Depending on the usage, you might want to add additional paths here. - "${3rd}/luv/library", - -- "${3rd}/busted/library", - }, - }, - }) - end, - settings = { - Lua = {}, - }, -}) - return { { "neovim/nvim-lspconfig", event = "LazyFile", opts = { + on_init = function(client) + local path = client.workspace_folders[1].name + if vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc") then + return + end + + client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, { + runtime = { + -- Tell the language server which version of Lua you're using + -- (most likely LuaJIT in the case of Neovim) + version = "LuaJIT", + }, + -- Make the server aware of Neovim runtime files + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME, + -- Depending on the usage, you might want to add additional paths here. + "${3rd}/luv/library", + -- "${3rd}/busted/library", + }, + }, + }) + end, servers = { -- biome = { -- root_dir = function(fname) @@ -80,10 +74,10 @@ return { filetypes = { "nginx" }, rootPatterns = { "nginx.conf", ".git" }, }, - jsonls = { - cmd = { "vscode-json-languageserver", "--stdio" }, - filetypes = { "json" }, - }, + -- jsonls = { + -- cmd = { "vscode-json-languageserver", "--stdio" }, + -- filetypes = { "json", "jsonc" }, + -- }, vuels = { cmd = { "vue-language-server", "--stdio" }, filetypes = { "vue" }, @@ -129,7 +123,7 @@ return { single_file_support = true, }, }, + setup = {}, }, - setup = {}, }, } diff --git a/home/config/rofi/config.rasi b/home/config/rofi/config.rasi index f50e311..b17d7d5 100644 --- a/home/config/rofi/config.rasi +++ b/home/config/rofi/config.rasi @@ -8,6 +8,8 @@ configuration { display-drun: "󰣖 drun:"; display-window: "󱂬 window:"; display-combi: "󰕘 combi:"; + display-emoji: "󰞅 emoji:"; + display-calc: "󰪚 calc:"; display-filebrowser: "󰉋 filebrowser:"; dpi: 110; diff --git a/home/config/rofi/gruvbox-material.rasi b/home/config/rofi/gruvbox-material.rasi index ddc3644..f7d38fa 100644 --- a/home/config/rofi/gruvbox-material.rasi +++ b/home/config/rofi/gruvbox-material.rasi @@ -29,6 +29,7 @@ transparent: rgba(0,0,0,0.1); + text-color: @gruv4; } window { @@ -51,8 +52,8 @@ mainbox { message { padding: 10px; - border: 0px 2px 2px 2px; - border-color: @gruv0; + border: 0px 4px 4px 4px; + border-color: @gruv6; background-color: @transparent; } diff --git a/home/config/scripts/waybarRestart.sh b/home/config/scripts/waybarRestart.sh index 18f50d2..457ee37 100755 --- a/home/config/scripts/waybarRestart.sh +++ b/home/config/scripts/waybarRestart.sh @@ -3,7 +3,7 @@ killall .waybar-wrapped killall .swaync-wrapped -waybar -c ~/.config/waybar/config.json -s ~/.config/waybar/style.css & +waybar -c ~/.config/waybar/config.jsonc -s ~/.config/waybar/style.css & XDG_CONFIG_HOME="$HOME/.dummy" # Prevent swaync use default gtk theme swaync -c ~/.config/swaync/config.json -s ~/.config/swaync/style.css & diff --git a/home/config/waybar/config.json b/home/config/waybar/config.jsonc similarity index 74% rename from home/config/waybar/config.json rename to home/config/waybar/config.jsonc index 1e7c253..b60d46b 100644 --- a/home/config/waybar/config.json +++ b/home/config/waybar/config.jsonc @@ -1,7 +1,42 @@ [ + // Primary + { + "output": "DP-3", + "include": "~/.config/waybar/modules.jsonc", + "layer": "top", + "exclusive": true, + "passthrough": false, + "position": "top", + "fixed-center": true, + "ipc": true, + "margin-top": 0, + "margin-left": 0, + "margin-right": 0, + "margin-bottom": 0, + + "modules-left": [ + "custom/os", + "hyprland/workspaces", + "clock", + "custom/cava", + "mpris" + ], + + "modules-center": ["hyprland/window"], + + "modules-right": [ + "wlr/taskbar", + "network", + "cpu", + "memory", + "pulseaudio", + "custom/swaync" + ] + }, + // Secondary { "output": "HDMI-A-2", - "include": "~/.config/waybar/modules.json", + "include": "~/.config/waybar/modules.jsonc", "layer": "top", "exclusive": true, "height": 54, @@ -19,16 +54,17 @@ "modules-center": ["hyprland/window"], "modules-right": [ - "wlr/taskbar", + "wlr/taskbar", "temperature", "cpu", "memory", "pulseaudio" ] }, + // Laptop { "output": "eDP-1", - "include": "~/.config/waybar/modules.json", + "include": "~/.config/waybar/modules.jsonc", "layer": "top", "exclusive": true, "passthrough": false, @@ -40,7 +76,13 @@ "margin-right": 0, "margin-bottom": 0, - "modules-left": ["custom/os", "hyprland/workspaces", "clock", "custom/cava", "mpris"], + "modules-left": [ + "custom/os", + "hyprland/workspaces", + "clock", + "custom/cava", + "mpris" + ], "modules-center": ["hyprland/window"], @@ -52,32 +94,5 @@ "battery", "custom/swaync" ] - }, - { - "output": "DP-3", - "include": "~/.config/waybar/modules.json", - "layer": "top", - "exclusive": true, - "passthrough": false, - "position": "top", - "fixed-center": true, - "ipc": true, - "margin-top": 0, - "margin-left": 0, - "margin-right": 0, - "margin-bottom": 0, - - "modules-left": ["custom/os", "hyprland/workspaces", "clock", "custom/cava", "mpris"], - - "modules-center": ["hyprland/window"], - - "modules-right": [ - "wlr/taskbar", - "network", - "cpu", - "memory", - "pulseaudio", - "custom/swaync" - ] } ] diff --git a/home/config/waybar/modules.json b/home/config/waybar/modules.jsonc similarity index 97% rename from home/config/waybar/modules.json rename to home/config/waybar/modules.jsonc index 3d2172f..cc38dcb 100644 --- a/home/config/waybar/modules.json +++ b/home/config/waybar/modules.jsonc @@ -92,12 +92,7 @@ "format-bluetooth": "󰂰 {volume}%", "format-muted": " Muted", "format-icons": { - "default": [ - "", - "", - " ", - " " - ], + "default": ["", "", " ", " "], "ignored-sinks": ["Easy Effects Sink"] }, "scroll-step": 5.0, @@ -182,7 +177,7 @@ "format-alt": "{icon} {time}" }, - "network" : { + "network": { "format": "{ifname}", "format-wifi": "󰤨 {essid} {bandwidthTotalBytes}", "format-ethernet": "󱓞 Ethernet {bandwidthTotalBytes}", diff --git a/home/user/hypr/bind.nix b/home/user/hypr/bind.nix index 8cde772..2785ed6 100644 --- a/home/user/hypr/bind.nix +++ b/home/user/hypr/bind.nix @@ -5,7 +5,6 @@ let terminal = "${prefix}ghostty"; filemanager = "nemo"; scripts = "~/.config/scripts"; - flatEmoji = "it.mijorus.smile"; # freezeShot = "--freeze"; freezeShot = ""; @@ -31,7 +30,8 @@ in ''${mainMod} SHIFT, s, exec, hyprshot -m region --clipboard-only ${freezeShot}'' ''CTRL SHIFT, s, exec, hyprshot -m window --clipboard-only ${freezeShot}'' ''CTRL SHIFT ${mainMod}, s, exec, hyprshot -m output --clipboard-only ${freezeShot}'' - ''${mainMod}, PERIOD, exec, flatpak run ${flatEmoji}'' + ''${mainMod}, PERIOD, exec, rofi -modi emoji -show emoji'' + ''CTRL ${mainMod}, c, exec, rofi -show calc -modi calc -no-show-match -no-sort'' ''${mainMod}, X, exec, sleep 0.1 && swaync-client -t -sw'' ''${mainMod} SHIFT, C, centerwindow'' '',F11, fullscreen'' diff --git a/home/user/hypr/exec.nix b/home/user/hypr/exec.nix index 2a30bfb..3691284 100644 --- a/home/user/hypr/exec.nix +++ b/home/user/hypr/exec.nix @@ -23,7 +23,7 @@ let dbus-update-activation-environment --systemd --all & systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & hyprpaper & - waybar -c ~/.config/waybar/config.json -s ~/.config/waybar/style.css & + waybar -c ~/.config/waybar/config.jsonc -s ~/.config/waybar/style.css & systemctl --user enable --now hypridle.service & fcitx5 -rd & fcitx5-remote -r & diff --git a/home/user/hyprland.nix b/home/user/hyprland.nix index 5f6fbe0..9b72247 100644 --- a/home/user/hyprland.nix +++ b/home/user/hyprland.nix @@ -170,4 +170,13 @@ in ]; }; }; + + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + plugins = with pkgs; [ + rofi-emoji-wayland + (rofi-calc.override { rofi-unwrapped = rofi-wayland-unwrapped; }) + ]; + }; } diff --git a/home/user/neovim.nix b/home/user/neovim.nix index 50b6a82..2f227b7 100644 --- a/home/user/neovim.nix +++ b/home/user/neovim.nix @@ -38,20 +38,15 @@ let configDir = ../config; in { - # Other Lsp servers are defined in system/module/lsp.nix + # Other Lsp servers & formatter are defined in system/module/lsp.nix home.packages = with pkgs; [ gh vue-language-server dockerfile-language-server-nodejs - black - prettierd javascript-typescript-langserver - marksman ruff ruff-lsp - pyright hadolint - yaml-language-server nodePackages_latest.typescript ]; diff --git a/system/modules/hyprland.nix b/system/modules/hyprland.nix index 62c47ee..7fa778b 100644 --- a/system/modules/hyprland.nix +++ b/system/modules/hyprland.nix @@ -39,7 +39,6 @@ qt6.qtwayland wlogout wl-clipboard - rofi-wayland-unwrapped waybar ]; diff --git a/system/modules/lsp.nix b/system/modules/lsp.nix index 3bf2f15..b4e5574 100644 --- a/system/modules/lsp.nix +++ b/system/modules/lsp.nix @@ -17,5 +17,12 @@ tailwindcss-language-server vscode-langservers-extracted gopls + pyright + yaml-language-server + marksman + + # formatter + prettierd + black ]; }