HackerTrans
TopNewTrendsCommentsPastAskShowJobs

TymekDev

no profile record

Submissions

Show HN: A Dark Mode Toggle Without JavaScript

tymekdev.github.io
4 points·by TymekDev·há 3 anos·5 comments

comments

TymekDev
·há 4 meses·discuss
I have been on JetBrains Mono ever since it's release. I am getting FOMO from not using Berkely Mono, because it totally looks like something that would sit right with me.
TymekDev
·há 4 meses·discuss
That's my impression too. However, I might give `vim.pack` a go for the novelty.

That being said, there is a way to lazy-load the plugins — Evgeni has a guide for that [1]. The "Load not during startup" variant is really simple with putting `vim.pack.add()` into `vim.schedule()`. The other myriad of options (keys, cmds, event) that lazy.nvim provides would require you to set up appropriate autocommands.

It gives me vibes of writing in Go. Everything is right there — builtin — but there's some verbosity to bear with.

[1]: https://echasnovski.com/blog/2026-03-13-a-guide-to-vim-pack....
TymekDev
·há 4 meses·discuss
> The folke/lazy.nvim is the most used plugin manager at the time of this writing. And rightly so: it is very capable with lots of features. Ironically, this itself makes it not very suitable to be a part of Neovim as most of the features come with significant code and maintenance complexity. Plus the whole idea of treating lazy loading as the main goal of a plugin manager does not sit well with Neovim core team.

https://echasnovski.com/blog/2026-03-13-a-guide-to-vim-pack....
TymekDev
·há 2 anos·discuss
If you need to adjust cursor speed and want scroll behavior to differ between the TrackPad and a mouse, then I can vouch for LinearMouse [1]. It is free of charge and open-source, and perfectly covers my needs.

[1]: https://github.com/linearmouse/linearmouse
TymekDev
·há 3 anos·discuss
With JavaScript you could make it a three state toggle: light, dark, and auto. The last one would allow to to back to the default - no preference.

I thought this might use indeterminate checkbox, but that wouldn't be necessary. 'Light', 'dark', and lack of thereof in localStorage already amount to three distinct states.
TymekDev
·há 3 anos·discuss
It's already there in Firefox for Android! If you take a look at MDN, it states it's available since 121 that released on 2023-12-19.

In fact, I am using it right now, and the example works without issues.
TymekDev
·há 3 anos·discuss
ijq [1] is. I am using it almost every time I need to come up with a jq expression. However, it gets noticeably laggy with enormous JSONs.

[1]: https://sr.ht/~gpanders/ijq/
TymekDev
·há 3 anos·discuss
It looks like the README in jj repository does not do justice when it comes to available syntax for queries. jj uses gjson (by the same author) and its syntax [0]. From what I saw the first one can be handled with:

    jj 'data.#(age<=25)#' -i input.json
I don't think there is a way to sort an array, though. However, there is an option to have keys sorted. Personally, I don't think there is much annoyance in that. One could just pipe jj output to `sort | uniq -c`.

I just discovered that gjson supports custom modifiers [1]. So technically, you could fork jj, and add another file registering `@sort` modifier via `gjson.AddModifier` and have a custom jj version supporting sorting.

[0]: https://github.com/tidwall/gjson/blob/master/SYNTAX.md

[1]: https://github.com/tidwall/gjson/blob/master/SYNTAX.md#modif...
TymekDev
·há 4 anos·discuss
It is the same conference! They have rebranded this year to Neovim conf [0]. The conference however is not exclusive to Neovim content.

[0]: https://www.neovimconf.live/rebranding-rationale