feat: rofi plugins

This commit is contained in:
DACHXY 2025-01-16 21:06:10 +08:00
parent 26e0aed70e
commit 5a383e7aad
18 changed files with 139 additions and 113 deletions

3
.prettierrc Normal file
View file

@ -0,0 +1,3 @@
{
"trailingComma": "none"
}

View file

@ -1,10 +0,0 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data
lazy-lock.json
lazyvim.json

View file

@ -1,15 +0,0 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

View file

@ -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" },
},

View file

@ -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,
},
}

View file

@ -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 },
},
},
},
}

View file

@ -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 = {},
},
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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 &

View file

@ -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"
]
}
]

View file

@ -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}",

View file

@ -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''

View file

@ -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 &

View file

@ -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; })
];
};
}

View file

@ -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
];

View file

@ -39,7 +39,6 @@
qt6.qtwayland
wlogout
wl-clipboard
rofi-wayland-unwrapped
waybar
];

View file

@ -17,5 +17,12 @@
tailwindcss-language-server
vscode-langservers-extracted
gopls
pyright
yaml-language-server
marksman
# formatter
prettierd
black
];
}