Compare commits

...

3 Commits

Author SHA1 Message Date
Henrik Bakken 4c362b4a71 newsboat -> eilmeldung 2026-03-25 15:34:39 +01:00
Henrik Bakken 0a1940c966 nvim bugfixes 2026-03-22 23:35:37 +01:00
Henrik Bakken ddd7cb9fc4 nvim treesitter fix 2026-03-22 23:30:55 +01:00
5 changed files with 42 additions and 154 deletions
-98
View File
@@ -1,98 +0,0 @@
# ttrss
ttrss-flag-publish "b"
ttrss-flag-star "a"
ttrss-login "admin"
ttrss-mode "multi"
ttrss-passwordeval "pass show ttrss"
ttrss-url "https://rss.hjarl.com/"
urls-source "ttrss"
# data
cache-file "~/.cache/newsboat/cache.db"
cookie-cache "~/.cache/newsboat/cookies.txt"
# feeds
auto-reload yes
delete-read-articles-on-quit yes
feed-sort-order unreadarticlecount-asc
prepopulate-query-feeds yes
reload-threads 11
reload-time 30
scrolloff 15
# display
article-sort-order date
datetime-format "%D %R"
download-full-page yes
external-url-viewer "urlscan"
html-renderer "w3m -dump -T text/html"
show-read-articles no
show-read-feeds no
text-width 72
# navigation
browser "$BROWSER %u >/dev/null 2>&1 &"
#browser "w3m %u"
goto-next-feed yes
goto-first-unread no
mark-as-read-on-hover yes
# bindings
# original bindings here https://raw.githubusercontent.com/newsboat/newsboat/master/src/keymap.cpp
# unbind
unbind-key f
unbind-key F
unbind-key C
unbind-key n
unbind-key p
unbind-key ^k
unbind-key ,
# bind
bind SPACE everywhere macro-prefix
bind l everywhere open
bind h everywhere quit
bind j everywhere down
bind k everywhere up
bind J everywhere next-feed
bind K everywhere prev-feed
bind J article next
bind K article prev
bind n everywhere next
bind p everywhere prev
bind g everywhere home
bind G everywhere end
bind ^F everywhere halfpagedown
bind ^B everywhere halfpageup
bind ^D everywhere pagedown
bind ^U everywhere pageup
bind d everywhere delete-article
bind D everywhere delete-all-articles
bind $ everywhere purge-deleted
bind a everywhere mark-all-above-as-read
bind A everywhere mark-feed-read
bind ^A everywhere mark-all-feeds-read
bind i everywhere sort
bind I everywhere rev-sort
bind T everywhere set-tag
bind t everywhere toggle-article-read
bind b everywhere toggle-source-view
bind U everywhere toggle-show-read-feeds
# macros
macro w set browser "w3m %u"; open-in-browser ; set browser "$BROWSER %u >/dev/null 2>&1 &"
macro l set browser "links %u"; open-in-browser ; set browser "$BROWSER %u >/dev/null 2>&1 &"
macro m set browser "mpv %u"; open-in-browser ; set browser "$BROWSER %u >/dev/null 2>&1 &"
# format
feedlist-title-format "(%u unread, %t total) Your feeds%?T? - tag %T&?"
articlelist-title-format "(%u unread, %t total) Articles in feed %T - %U"
searchresult-title-format "(%u unread, %t total) Search result"
itemview-title-format "(%u unread, %t total) Article %T"
filebrowser-title-format "%?O?Open File&Save File? - %f"
help-title-format "Help"
selecttag-title-format "Select Tag"
selectfilter-title-format "Select Filter"
urlview-title-format "URLs"
dialogs-title-format "Dialogs"
include "~/.config/newsboat/themes/catppuccin.dark"
-19
View File
@@ -1,19 +0,0 @@
# https://raw.githubusercontent.com/catppuccin/newsboat/refs/heads/main/themes/dark
color listnormal color15 default
color listnormal_unread color2 default
color listfocus_unread color2 color0
color listfocus default color0
color background default default
color article default default
color end-of-text-marker color8 default
color info color4 color8
color hint-separator default color8
color hint-description default color8
color title color14 color8
highlight article "^(Feed|Title|Author|Link|Date): .+" color4 default bold
highlight article "^(Feed|Title|Author|Link|Date):" color14 default bold
highlight article "\\((link|image|video)\\)" color8 default
highlight article "https?://[^ ]+" color4 default
highlight article "\[[0-9]+\]" color6 default bold
-19
View File
@@ -1,19 +0,0 @@
# https://raw.githubusercontent.com/catppuccin/newsboat/refs/heads/main/themes/latte
color listnormal color15 default
color listnormal_unread color2 default
color listfocus_unread color2 color15
color listfocus default color15
color background default default
color article default default
color end-of-text-marker color8 default
color info color4 color7
color hint-separator default color7
color hint-description default color7
color title color14 color7
highlight article "^(Feed|Title|Author|Link|Date): .+" color4 default bold
highlight article "^(Feed|Title|Author|Link|Date):" color14 default bold
highlight article "\\((link|image|video)\\)" color8 default
highlight article "https?://[^ ]+" color4 default
highlight article "\[[0-9]+\]" color6 default bold
+38 -12
View File
@@ -908,7 +908,7 @@ local function makespec_fugitive()
group = vim.api.nvim_create_augroup("fugitive_folds", { clear = true }),
pattern = { "fugitive", "gitcommit" },
callback = function()
vim.opt_local.foldmethod = "syntax"
vim.opt_local.foldmethod = "expr"
vim.opt_local.foldlevel = 99
end,
})
@@ -1183,7 +1183,22 @@ local function makespec_snacks()
}):map("<leader>uS")
-- Toggle for Neoscroll
local ns_keys = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" }
local ns_keys = {
["<C-u>"] = function() require("neoscroll").ctrl_u({ half_win_duration = 250 }) end,
["<C-d>"] = function() require("neoscroll").ctrl_d({ half_win_duration = 250 }) end,
["<C-b>"] = function() require("neoscroll").ctrl_b({ half_win_duration = 450 }) end,
["<C-f>"] = function() require("neoscroll").ctrl_f({ half_win_duration = 450 }) end,
["<C-y>"] = function()
require("neoscroll").scroll(-0.1, { move_cursor = false, duration = 100 })
end,
["<C-e>"] = function()
require("neoscroll").scroll(0.1, { move_cursor = false, duration = 100 })
end,
["zt"] = function() require("neoscroll").zt({ half_win_duration = 250 }) end,
["zz"] = function() require("neoscroll").zz({ half_win_duration = 250 }) end,
["zb"] = function() require("neoscroll").zb({ half_win_duration = 250 }) end,
}
vim.g.neoscroll_enabled = false
Snacks.toggle({
@@ -1192,14 +1207,13 @@ local function makespec_snacks()
set = function(state)
vim.g.neoscroll_enabled = state
if state then
-- Turn ON: Tell neoscroll to hijack the keys
require("neoscroll").setup({
mappings = ns_keys,
hide_cursor = true,
})
-- Turn ON: Map the keys to Neoscroll's functions
for key, func in pairs(ns_keys) do
vim.keymap.set({ "n", "v", "x" }, key, func, { desc = "Smooth Scroll " .. key })
end
else
-- Turn OFF: Delete the hijacks so Neovim returns to default scrolling
for _, key in ipairs(ns_keys) do
-- Turn OFF: Delete the maps, returning Neovim to default scrolling
for key, _ in pairs(ns_keys) do
pcall(vim.keymap.del, { "n", "v", "x" }, key)
end
end
@@ -1422,6 +1436,8 @@ local function makespec_treesitter()
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
lazy = false,
main = "nvim-treesitter.configs",
opts = {
ensure_installed = {
"bash",
@@ -1524,13 +1540,23 @@ local function makespec_lint()
}
local lint_augroup = vim.api.nvim_create_augroup("nvim_lint", { clear = true })
local timer = vim.uv.new_timer()
-- Use a timer to debounce linting to prevent UI stutter
local timer = vim.uv.new_timer()
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
group = lint_augroup,
callback = function()
timer:start(200, 0, vim.schedule_wrap(function() lint.try_lint() end))
callback = function(args)
timer:stop()
local bufnr = args.buf
timer:start(
200,
0,
vim.schedule_wrap(function()
if vim.api.nvim_buf_is_valid(bufnr) then
require("lint").try_lint(nil, { bufnr = bufnr })
end
end)
)
end,
})
end,
+4 -6
View File
@@ -124,12 +124,11 @@ installmap = dict(
"khard", # contacts
"khal", # calendar
"aerc", # email
"newsboat", # rss reader
"eilmeldung", # rss reader
"vdirsyncer", # sync calendar+contacts
"pandoc", # md2html for aerc
"pass", # password manager for aerc and newsboat
"w3m", # terminal browser for aerc and newsboat
"urlscan", # url finder for newsboat
"pass", # password manager for aerc
"w3m", # terminal browser for aerc
"python-aiohttp-oauthlib", # for google vdirsyncer
),
monitors=(
@@ -358,13 +357,12 @@ def install_monitors(overwrite: bool, reinstall: bool) -> None:
def install_emailcalrss(overwrite: bool, reinstall: bool) -> None:
helper_install(*installmap["emailcalrss"], reinstall=reinstall)
for tgt in ["vdirsyncer", "khard", "khal", "aerc", "newsboat"]:
for tgt in ["vdirsyncer", "khard", "khal", "aerc"]:
helper_clone_foldercontents(CFG_SRC, CFG_TGT, tgt, overwrite)
tgt = ".local/share/applications/userapp-khalimport.desktop"
helper_maybe_copy(HOME_SRC, HOME_TGT, tgt, overwrite, symlink=True)
run("systemctl enable --user --now vdirsyncer.timer".split())
run(f"chmod 600 {CFG_TGT / 'aerc/accounts.conf'}".split())
(HOME_TGT / ".cache/newsboat").mkdir(exist_ok=True)
(HOME_TGT / "Calendars").mkdir(exist_ok=True)
(HOME_TGT / "Contacts").mkdir(exist_ok=True)