From bc499db140e8354d772b03c5801838c169d45dc6 Mon Sep 17 00:00:00 2001 From: Nikolai Papin Date: Fri, 4 Jul 2025 21:17:03 +0300 Subject: [PATCH] feat: updated neovim snippets; feat: added gpg sign shortcut to neovim; feat: yuck plugin; refactor: my theme; feat: tty color theme (for tty colors compatibility); refactor: minor hyprland changes --- hypr/hyprpaper.conf | 4 +- hypr/scripts/muza.sh | 2 +- nvim/lua/mappings.lua | 7 ++++ nvim/lua/plugins/eww.lua | 4 ++ nvim/lua/snippets/markdown.lua | 23 ++++++++++-- nvim/lua/themes/kolyan.lua | 12 +++--- nvim/lua/themes/tty.lua | 68 ++++++++++++++++++++++++++++++++++ 7 files changed, 108 insertions(+), 12 deletions(-) create mode 100644 nvim/lua/plugins/eww.lua create mode 100644 nvim/lua/themes/tty.lua diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index 9996056..05200b9 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,4 +1,4 @@ -wallpaper = eDP-1,/home/greg/Pictures/Wallpapers/rain_glass_purple_blue_lights2.jpg -wallpaper = HDMI-A-1,/home/greg/Pictures/Wallpapers/rain_glass_purple_blue_lights2.jpg +wallpaper = eDP-1,/home/greg/Pictures/Wallpapers/current/art-sakura-sea-volcano-red.jpg +wallpaper = HDMI-A-1,/home/greg/Pictures/Wallpapers/current/art-sakura-sea-volcano-red.jpg ipc = on diff --git a/hypr/scripts/muza.sh b/hypr/scripts/muza.sh index 113cfb6..ccd902c 100755 --- a/hypr/scripts/muza.sh +++ b/hypr/scripts/muza.sh @@ -7,7 +7,7 @@ sleep 0.1 hyprctl dispatch resizeactive 0 250 sleep 0.1 #bspwm_resize expand west 100 -hyprctl dispatch resizeactive -100 0 +hyprctl dispatch resizeactive -90 0 hyprctl dispatch movefocus l diff --git a/nvim/lua/mappings.lua b/nvim/lua/mappings.lua index 62f9a18..8440248 100644 --- a/nvim/lua/mappings.lua +++ b/nvim/lua/mappings.lua @@ -96,6 +96,13 @@ vim.keymap.set("n", "tn", 'tabNext', { desc = "Tab Next" }) vim.keymap.set("n", "tm", 'tabnew', { desc = "Tab More!" }) vim.keymap.set("n", "tc", 'tabclose', { desc = "Tab Close" }) +-- sign file with GPG +vim.keymap.set("n", "gpg", function() + local opened_file_path = vim.fn.expand('%:p') + os.execute("gpg --detach-sign " .. opened_file_path) -- Execute the GPG sign command +end, { desc = "Sign currently open file with GPG" }) + + function Leave_snippet() if ((vim.v.event.old_mode == 's' and vim.v.event.new_mode == 'n') or vim.v.event.old_mode == 'i') diff --git a/nvim/lua/plugins/eww.lua b/nvim/lua/plugins/eww.lua new file mode 100644 index 0000000..aac39a6 --- /dev/null +++ b/nvim/lua/plugins/eww.lua @@ -0,0 +1,4 @@ +return { + "elkowar/yuck.vim", + event = 'BufEnter', + } diff --git a/nvim/lua/snippets/markdown.lua b/nvim/lua/snippets/markdown.lua index 7d17a42..d318691 100644 --- a/nvim/lua/snippets/markdown.lua +++ b/nvim/lua/snippets/markdown.lua @@ -19,16 +19,33 @@ local get_name = function() end return { + -- Creates a frontmatter with markdown note metadata s("frontmatter", { t("---"), + t({ "", "Markdown note", "" }), t({ "", "title: \"" }), i(1), t("\""), - t({ "", "date: " }), f(get_date, {}), + t({ "", "date: \"" }), f(get_date, {}), t("\""), t({ "", "author: \"" }), f(get_name, {}), t("\""), + t({ "", "keywords: ["}), i(2), t("]"), + t({ "", "tags: [["}), i(3), t("]]"), t({ "", "id: " }), f(timestamp, {}), t({ "", "---", "", "# " }), rep(1), -- Reuses the first insert node t({ "", ""}), t({ "", ""}), - i(3) -- Final cursor position - }) + i(4) -- Final cursor position + }), + + -- Creates a mood report template + s("wellbeingreport", { + t("---"), + t({ "", "Well-being report", "" }), + t({ "", "date: " }), f(get_date, {}), + t({ "", "sleep: " }), i(1), t("/5"), + t({ "", "emotions: [" }), i(2), t("]"), + t({ "", "comfort: " }), i(3), t("/5"), + t({ "", "complaints: ["}), i(4), t("]"), + t({ "", "mood: " }), i(5), t("/10"), + t({ "", "---" }), + }), } diff --git a/nvim/lua/themes/kolyan.lua b/nvim/lua/themes/kolyan.lua index 0ea9549..1cb516c 100644 --- a/nvim/lua/themes/kolyan.lua +++ b/nvim/lua/themes/kolyan.lua @@ -2,13 +2,13 @@ local M = {} M.base_30 = { white = "#D6D8DA", -- color7 - darker_black = "#0a0d11", - black = "#1c1c1c", -- background - black2 = "#191d22", + darker_black = "#181818", + black = "#1c1c1d", -- background + black2 = "#1c1c1c", one_bg = "#444551", -- color0 one_bg2 = "#292c30", one_bg3 = "#33363a", - grey = "#3e4145", + grey = "#5e6165", grey_fg = "#65686c", grey_fg2 = "#4a4d51", light_grey = "#626569", @@ -27,14 +27,14 @@ M.base_30 = { teal = "#63b3ad", orange = "#f0a988", cyan = "#D6D8DA", -- color6 - statusline_bg = "#15191e", + statusline_bg = "#1c1c1c", lightbg = "#24282d", pmenu_bg = "#3bdda2", folder_bg = "#FB6F80", } M.base_16 = { - base00 = "#1c1c1c", -- background + base00 = "#1c1c1d", -- background base01 = "#1a1d21", base02 = "#23262a", base03 = "#5b5e62", diff --git a/nvim/lua/themes/tty.lua b/nvim/lua/themes/tty.lua new file mode 100644 index 0000000..b7a3ab1 --- /dev/null +++ b/nvim/lua/themes/tty.lua @@ -0,0 +1,68 @@ +local M = {} + +M.base_30 = { + white = "#FFFFFF", -- White + darker_black = "#000000", -- Black + black = "#000000", -- Black + black2 = "#000000", -- Black + one_bg = "#000000", -- Black + one_bg2 = "#808080", -- Dark Gray + one_bg3 = "#808080", -- Dark Gray + grey = "#808080", -- Dark Gray + grey_fg = "#808080", -- Dark Gray + grey_fg2 = "#808080", -- Dark Gray + light_grey = "#C0C0C0", -- Light Gray + red = "#CC0403", -- Red + baby_pink = "#FF8080", -- Light Red + pink = "#FF00FF", -- Magenta + line = "#000000", -- Black + green = "#19CB00", -- Green + vibrant_green = "#00FF00", -- Green + nord_blue = "#0D73CC", -- Blue + blue = "#0000FF", -- Blue + yellow = "#CECB00", -- Yellow + sun = "#FFFF00", -- Yellow + purple = "#FF00FF", -- Magenta + dark_purple = "#CB1ED1", -- Magenta + teal = "#00FFFF", -- Cyan + orange = "#FF0000", -- Red + cyan = "#00FFFF", -- Cyan + statusline_bg = "#000000", -- Black + lightbg = "#C0C0C0", -- Light Gray + pmenu_bg = "#00FF00", -- Green + folder_bg = "#0000FF", -- Blue + lavender = "#C0C0C0", -- Light Gray +} + +M.base_16 = { + base00 = "#000000", -- Black + base01 = "#808080", -- Dark Gray + base02 = "#C0C0C0", -- Light Gray + base03 = "#808080", -- Dark Gray + base04 = "#808080", -- Dark Gray + base05 = "#FFFFFF", -- White + base06 = "#C0C0C0", -- Light Gray + base07 = "#FFFFFF", -- White + base08 = "#FF0000", -- Red + base09 = "#FF0000", -- Red + base0A = "#FFFF00", -- Yellow + base0B = "#00FF00", -- Green + base0C = "#00FFFF", -- Cyan + base0D = "#0000FF", -- Blue + base0E = "#FF00FF", -- Magenta + base0F = "#FF0000", -- Red +} + +M.polish_hl = { + treesitter = { + ["@variable"] = { fg = M.base_30.lavender }, + ["@property"] = { fg = M.base_30.teal }, + ["@variable.builtin"] = { fg = M.base_30.red }, + }, +} + +M.type = "dark" + +M = require("base46").override_theme(M, "catppuccin") + +return M