diff --git a/modules/glance/default.nix b/modules/glance/default.nix new file mode 100644 index 0000000..6fd74bd --- /dev/null +++ b/modules/glance/default.nix @@ -0,0 +1,207 @@ +{ + services.glance = { + enable = true; + settings = { + server = { + port = 9001; + }; + theme = { + background-color = 264 31.3 6.3; + primary-color = 9 92.1 85.1; + contrast-multiplier = 1.2; + positive-color = 174 100 32; + negative-color = 354 100 70.8; + disable-picker = false; + }; + pages = [ + { + name = "Home"; + columns = [ + { + size = "small" + widgets = [ + + { + type = "monitor"; + cache = "1m"; + title = "Selfhosted"; + sites = [ + { + title = "Fastmail"; + url = "https://app.fastmail.com/"; + icon = "si:protonmail"; + } + { + title = "Actual"; + url = "https://actual.dnsc.io"; + icon = "si:actualbudget"; + } + { + title = "Vaultwarden"; + url = "https://vault.dnsc.io"; + icon = "si:vaultwarden"; + } + { + title = "Uptime Kuma"; + url = "https://uptime.dnsc.io"; + icon = "si:uptimekuma"; + } + { + title = "dnsc.io"; + url = "https://dnsc.io"; + icon = "si:htmx"; + } + { + title = "Jellyfin"; + url = "http://100.103.199.4:8096"; + icon = "si:jellyfin"; + } + ]; + } + { + type = "bookmarks"; + groups = [ + { + title = "Hosting"; + color = 187 56.6 47.8; + links = [ + { + title = "Porkbun"; + url = "https://porkbun.com/account/domainsSpeedy"; + } + { + title = "Tailscale"; + url = "https://login.tailscale.com/admin/machines"; + } + { + title = "Hetzner"; + url = "https://console.hetzner.com/projects/1355757/dashboard"; + } + { + title = "Netcup"; + url = "https://www.servercontrolpanel.de/SCP/Home"; + } + ]; + } + { + title = "Dev"; + color = 319 37.6 63.5; + links = [ + { + title = "Codeberg"; + url = "https://codeberg.org/dnscio"; + } + { + title = "Github"; + url = "https://github.com/dennisschoepf?tab=repositories"; + } + ]; + } + ]; + } + ]; + } + { + size = "full"; + widgets = [ + { + type = "hacker-news"; + limit = 15; + collapse-after = 5; + } + { + type = "twitch-channels"; + channels = [ + "theprimeagen" + "tsoding" + "noway4u_sir" + "broxah" + "caedrel" + "bashbunni" + ]; + } + { + type = "group"; + widgets = [ + { + type = "rss"; + title = "r/neovim"; + single-line-titles = true; + feeds = [ + { + url = "https://www.reddit.com/r/neovim.rss"; + } + ]; + } + { + type = "rss"; + title = "r/onepiece"; + single-line-titles = true; + feeds = [ + { + url = "https://www.reddit.com/r/onepiece.rss"; + } + ]; + } + { + type = "rss"; + title = "r/triathlon"; + single-line-titles = true; + feeds = [ + { + url = "https://www.reddit.com/r/triathlon.rss"; + } + ]; + } + ]; + } + { + type = "videos"; + collapse-after = 6; + channels = [ + "UCuTaETsuCOkJ0H_GAztWt0Q" + "UCJVMrR290HU9pDxaP35u_cg" + "UCqqJQ_cXSat0KIAVfIfKkVA" + "UCdC0An4ZPNr_YiFiYoVbwaw" + "UCsXVk37bltHxD1rDPwtNM8Q" + "UCofJu853kJKpkg4y5a-9YXg" + "UCewLMcro9tNP97XQ1rxtLXQ" + "UCuo9VyowIT-ljA5G2ZuC6Yw" + "UCipCyKo5D3FyWE6_TpQyr5A" + "UCmL9OhLB27r1lTCHQ3pEiIQ" + "UCNIuvl7V8zACPpTmmNIqP2A" + "UC-gct8TB_8l5HsQHBBr8hyQ" + ]; + } + ]; + } + { + size = "small"; + widgets = [ + { + type = "server-stats"; + servers = [ + { + name = "dnsc-vps-sm"; + type = "local"; + } + ]; + } + { + type = "calendar"; + first-day-of-the-week = "monday"; + } + { + type = "weather"; + units = "metric"; + hour-format = "24h"; + location = "Munich, Germany" + } + ]; + } + ]; + } + ]; + }; + }; +} diff --git a/modules/nvim/config/colors/winterly.lua b/modules/nvim/config/colors/winterly.lua index 6d6e725..d526cd4 100644 --- a/modules/nvim/config/colors/winterly.lua +++ b/modules/nvim/config/colors/winterly.lua @@ -131,6 +131,7 @@ hi("SnippetTabstopActive", { link = "SnippetTabstop" }) -- Text hi("@markup.raw", { link = "Special" }) hi("@markup.link", { link = "Identifier" }) +hi("@markup.link.label", { link = "ConstantUnderlined" }) hi("@markup.heading", { link = "Title" }) hi("@markup.heading.gitcommit", { bg = palette.bg, fg = palette.fg, bold = true }) hi("@markup.link.url", { link = "Underlined" }) @@ -277,6 +278,7 @@ else hi("Comment", { fg = palette.grey, ctermfg = "Cyan" }) hi("Unused", { fg = palette.grey_bright, undercurl = true, ctermfg = "LightGrey" }) hi("Constant", { fg = palette.yellow_brighter, ctermfg = "LightYellow" }) + hi("ConstantUnderlined", { fg = palette.yellow_brighter, underline = true, ctermfg = "LightYellow" }) hi("Special", { fg = palette.silver, ctermfg = "LightGrey" }) hi("Identifier", { fg = palette.fg, ctermfg = "White", cterm = { bold = true } }) hi("Statement", { fg = palette.fg_alt, bold = true, ctermfg = "White" }) diff --git a/modules/nvim/config/lazy-lock.json b/modules/nvim/config/lazy-lock.json index ebaffc7..4b4babd 100644 --- a/modules/nvim/config/lazy-lock.json +++ b/modules/nvim/config/lazy-lock.json @@ -1,23 +1,25 @@ { "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, - "codecompanion.nvim": { "branch": "main", "commit": "ca87f13b7559257f5aa91e4fcd1326a61311be13" }, + "codecompanion.nvim": { "branch": "main", "commit": "ee7f44ca9c2f22a7b82139719856a2f3d68efd49" }, "conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "follow-md-links.nvim": { "branch": "main", "commit": "728d96d268eef9666f0ee77a083e7e2f0b44f607" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "gitportal.nvim": { "branch": "main", "commit": "3abb1b87a48a8c07f042eb8c570dfe325ebf8702" }, "gopher.nvim": { "branch": "main", "commit": "295e21e637f9194a4d2bc34622d324a88b028141" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" }, "mini.pairs": { "branch": "main", "commit": "b316e68f2d242d5bd010deaab645daa27ed86297" }, - "neogit": { "branch": "master", "commit": "2cc5daffb838f718174d2c07f2ca0c39149bb2c1" }, + "neogit": { "branch": "master", "commit": "614a63489be5734b14f314c3449535566b8352d4" }, "nvim-surround": { "branch": "main", "commit": "fcfa7e02323d57bfacc3a141f8a74498e1522064" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "schemastore.nvim": { "branch": "main", "commit": "976b31e094615b2c27009561b3c67a37c87c93c2" }, + "schemastore.nvim": { "branch": "main", "commit": "eed1834170f343c14a6768f085b26b3571a55302" }, "snacks.nvim": { "branch": "main", "commit": "dec29f55666f8f4545835636077a86b150faf630" }, + "snipe.nvim": { "branch": "main", "commit": "d2d196c335919767803f905d573ce66340e33ee6" }, "substitute.nvim": { "branch": "main", "commit": "9db749a880e3dd3b0eb57f698aa8f1e1630e1f25" }, "vim-cool": { "branch": "master", "commit": "9ea940c0d537e55de0de4c0298c04b976960fb12" }, "vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" }, diff --git a/modules/nvim/config/lua/plugins/gitportal.lua b/modules/nvim/config/lua/plugins/gitportal.lua new file mode 100644 index 0000000..98ad0b7 --- /dev/null +++ b/modules/nvim/config/lua/plugins/gitportal.lua @@ -0,0 +1,24 @@ +return { + "trevorhauter/gitportal.nvim", + opts = { + always_include_current_line = true, + switch_branch_or_commit_upon_ingestion = "ask_first", + }, + keys = { + { + "gll", + "GitPortal", + desc = "Browse file at git remote", + }, + { + "gly", + "GitPortal copy_link_to_clipboard", + desc = "Yank git link to clipboard", + }, + { + "glo", + "GitPortal open_link", + desc = "Browse file at git remote", + }, + }, +} diff --git a/modules/nvim/config/lua/plugins/git.lua b/modules/nvim/config/lua/plugins/neogit.lua similarity index 89% rename from modules/nvim/config/lua/plugins/git.lua rename to modules/nvim/config/lua/plugins/neogit.lua index 8066ed4..8955ec7 100644 --- a/modules/nvim/config/lua/plugins/git.lua +++ b/modules/nvim/config/lua/plugins/neogit.lua @@ -10,7 +10,6 @@ return { keys = { { "gg", "Neogit", desc = "Open neogit", mode = "n" }, { "gc", "Neogit commit", desc = "Open neogit commit UI", mode = "n" }, - { "gb", "Neogit branch", desc = "Open neogit branch UI", mode = "n" }, { "gp", "Neogit push", desc = "Open neogit push UI", mode = "n" }, { "gf", "Neogit pull", desc = "Open neogit pull UI", mode = "n" }, { "gm", "Neogit merge", desc = "Open neogit merge UI", mode = "n" }, diff --git a/modules/nvim/config/lua/plugins/snacks.lua b/modules/nvim/config/lua/plugins/snacks.lua index a481640..54db56b 100644 --- a/modules/nvim/config/lua/plugins/snacks.lua +++ b/modules/nvim/config/lua/plugins/snacks.lua @@ -14,11 +14,12 @@ return { lazy = false, opts = { bigfile = { enabled = true }, + bufdelete = { enabled = true }, git = { enabled = true }, - gitbrowse = { - enabled = true, - what = "commit", - }, + -- TODO: Integrate GH and see how that works out + -- gh = { + -- enabled = true + -- } indent = { enabled = true, }, @@ -51,13 +52,6 @@ return { end, desc = "Show git blame for current line", }, - { - "gl", - function() - Snacks.gitbrowse() - end, - desc = "Open link to line at git remote", - }, -- Zen Mode { "z", @@ -104,10 +98,31 @@ return { desc = "Projects", }, { - "bb", + "bl", function() Snacks.picker.buffers() end, + desc = "List buffers", + }, + { + "bd", + function() + Snacks.bufdelete() + end, + desc = "Buffers", + }, + { + "bD", + function() + Snacks.bufdelete.all() + end, + desc = "Buffers", + }, + { + "bo", + function() + Snacks.bufdelete.other() + end, desc = "Buffers", }, -- Search diff --git a/modules/nvim/config/lua/plugins/snipe.lua b/modules/nvim/config/lua/plugins/snipe.lua new file mode 100644 index 0000000..09b0d66 --- /dev/null +++ b/modules/nvim/config/lua/plugins/snipe.lua @@ -0,0 +1,19 @@ +return { + "leath-dub/snipe.nvim", + keys = { + { + "gb", + function() + require("snipe").open_buffer_menu() + end, + desc = "Open Snipe buffer menu", + }, + }, + opts = { + position = "center", + open_win_override = { + title = "Select buffer", + border = "rounded", + }, + }, +} diff --git a/modules/nvim/config/lua/plugins/which-key.lua b/modules/nvim/config/lua/plugins/which-key.lua index 7e05765..80346c8 100644 --- a/modules/nvim/config/lua/plugins/which-key.lua +++ b/modules/nvim/config/lua/plugins/which-key.lua @@ -22,12 +22,6 @@ return { mode = "n", }, { "b", group = "+buffer", mode = "n" }, - { - "bd", - "bd!", - desc = "Delete current buffer", - mode = "n", - }, { "bn", "bn", @@ -40,6 +34,12 @@ return { desc = "Move to previous buffer", mode = "n", }, + { + "bk", + "bn", + desc = "Kill buffer and window", + mode = "n", + }, { "c", group = "+code", mode = "n" }, { "cr",