u/gkaiser8

▲ 6 r/tea

Loose leaf rate of degradation when opened?

I'm a slow tea drinker and people often gift me loose leaf teas--some vacuum packed and some not, usually varieties jasmine green tea and oolong tea from Hong Kong and Taiwan.

I don't expect loose leaf teas to ever go bad, but I am hesitant to try more than 1-2 varieties at a time because it could take at least a few months to go through a pack (part of that is I use less leaves because often just want the flavor of tea to replace water). If I try more varieties, opened pack might take a year or more to finish.

Can someone describe what to expect with regards to the rate of degradation in quality? For example, in the coffee world, coffee grounds don't last long and grinding beans from fresh is a necessity for a quality cup. Coffee beans not vacuum packed and opened should ideally be consumed within 2 weeks (up to a month in some rare circumstances depending on the beans).

I expect teas to last way longer than that since it's less oily and probably drier. Old beans might taste off, but old tea leaves might be fainter in flavor? Avid loose leaf tea drinkers--is this ever a consideration and do you do more than to just open a packs and store them normally or try to prevent such degradation by vacuum-packing, freezing, etc.?

P.S. On an somewhat-related note--if you were to re-use tea leaves after steeping, would it make any difference whether you re-steep immediately after while the tea leaves are still hot or could you get better results allowing it to cool down?

reddit.com
u/gkaiser8 — 1 day ago
▲ 17 r/neovim

vim.keymap.set: differences between the form <cmd> and lua function directly?

In plugins' README, I often see the vim.keymap.set rhs form <cmd>... vs require('module').... Isn't the latter strictly better being just Lua for both negligible performance improvement and more importantly syntax highlighting? <cmd>... can "lazy load" but you can do the same wrapping the require('module')... in an anonymous function, which you would need to do(?) if you wanted to pass arguments to the Lua function anyway.

You can consistently make both dot-repeatable too, right?

Is there any reason to prefer <cmd>... if the Lua equivalent is available? I came across this a plugin's with the following mappings:

vim.keymap.set("n", "*", "*<Cmd>lua require('hlslens').start()<CR>", { silent = true})
vim.keymap.set("n", "#", "#<Cmd>lua require('hlslens').start()<CR>", { silent = true})
vim.keymap.set("n", "g*", "g*<Cmd>lua require('hlslens').start()<CR>", { silent = true})
vim.keymap.set("n", "g#", "g#<Cmd>lua require('hlslens').start()<CR>", { silent = true})

I'm not sure this can or should be written without the <Cmd> form.

P.S. Does it make sense to make a simple wrapper around vim.keymap.set for readability as a global function in Neovim config? Or for any same functions you define more than once in your Lua config instead of as local functions.

reddit.com
u/gkaiser8 — 5 days ago
▲ 12 r/taiwan

Does driving in Taiwan need to be so hard?

It's easy to attribute the driving environment to the abundance scooters and also the mentality of drivers, but road design and law enforcement don't make it easy. Not sharing something new, just came across some clips that are amusing:

Another common complain is that the countdown time for the traffic light is way too long and not optimized, e.g. you wait 90 seconds only to have to wait another 90 seconds for the next light. Or pedestrians struggling to find the light that should be in front of them where they cross. I've heard (from some years ago) news of fatal accidents with rail crossing because of unclear or late signs.

I have driven once before on the east coast where driving is a breeze, but the speed limit seemed way too low considering the amount of cars I encountered at the time (barely any). Not suggesting they should increase the speed limit or anything (I'm just an ignorant tourist), just that there seems to be little standard or optimization to deal with these issues. If I have to make a throwaway guess, I think maybe the local government has too much control on the the implementation and don't value the people who plan for this stuff. Good design requires a lot of planning and observations and maybe only Taipei is up to standards.

u/gkaiser8 — 6 days ago

Split keyboard users, do you use built-in laptop keyboard?

I'm moving from traditional qwerty keyboard to an alt layout on a Glove80 and after some reading planning to use 34-key layout and probably Urob's homerow mods (any other "timeless" homerow implemention or successful non-homerow mods to consider as well?).

However, my workflow is heavily keyboard-driven with apps like tiling window manager, tmux, fzf, terminal, neovim, emacs (org-mode), etc.--maintaining it for keyboards of different keys to optimize for both might be a wreck.

I'm thinking ideally I would have a 34-key keyboard to use everywhere, but I'm wondering: do you guys still use builtin laptop keyboard often? Do you optimize its traditional keyboard layout which could make it very different than the split layout variant or do you trade ergonomic layout for less cognitive overhead by simply using your split layout mappings where possible? Trying to find a good balance between ergonomics and cognitive overhead. I also wonder if e.g. if one switched to an alt layout whether they can use a qwerty keyboard productively if they need to once in a blue moon (say once every 1-2 years).

At the moment I'm thinking of optimizing only for the split layout and re-use it as much as possible for the laptop. Not sure whether to still use homerow mods on laptop though or to keep it traditional only. I thought about low-profile 34-key keyboard that I can use as both desktop and laptop but I think I might value the ergonomic aspect of a concave keyboard and would probably want a different split board for the laptop (something like a Toucan which has a touchpad but a better implementation of the touchpad and without the display screen, maybe).

u/gkaiser8 — 6 days ago

No popup or context menus after some time

Since ~2-4 releases ago (currently on latest 150.0.2), popup and context menus no longer open after while--anyone experience something similar and/or is this a known issue that can be tracked? These include menus from e.g. right-click, toolbar context menus, and the small windows/menus opened when clicking on extension icons on the menu. I can still open new windows with keyboard shortcuts, but they have the same issue.

To get them working again I must restart the instance, not practical if I have an ongoing download that cannot be resumed.

There has not been a change to any of my settings or workflow for many months now (no issues whatsoever prior). My profile uses Sidebery extension and have always had ~3.5k tabs of which up ~5-50 are loaded at a given time (the only bottleneck I've encountered is available memory, no real issues with performance or any other unexpected behavior--I have such a setup that's been working fine for years).

reddit.com
u/gkaiser8 — 8 days ago
▲ 8 r/swaywm

Ideas for better bindings, particularly for workspaces?

For the longest time, I have workspaces done all on my left hand--this makes sense to me since following e.g. "focus workspace" or "move to workspace" use the chances of using the mouse is high so my right hand is already ready. However, I have Super+{tab,q,w,e,1,2,3} keys to switch to workspaces and where holding Ctrl (Capslock in my case since I have it has Ctrl when held and ESC when tapped, a common layer key remapping) moves the active window to the target workspace.

With this setup I am developing thumb pain due to the thumb tuck to press the Super key. To workaround this, I have Tab key mapped to super and use my pinky instead.

I plan to move to a 34-key split keyboard approach with homerow mods but would still like to find a solution for traditional keyboard layout (still useful when using laptop's builtin keyboard). I'm not sure I'd want to commit to the learning curve of homerow mods on a qwerty keyboard without first gathering other people's experiences with this since homerow mods on 34-key split keyboard is already quite the investment itself (I'm not sure it's that trivial to switch between 34-key homerow mod setup vs traditional keyboard homerow mod setup--to me the cognitive overhead makes me hesitant to simply try homerow mods on traditional keyboard setup).

Curious any ideas how you guys are dealing with this. I don't want to use modes or nested bindings to do something as frequent as switching workspaces and moving windows.

reddit.com
u/gkaiser8 — 10 days ago
▲ 4 r/bash

Run vim in command substitution?

I have a script that launches terminal on some temp file so I can edit it with vim bindings then on quit, prints the content and removes the temp file. I want to assign the output to a variable--is this possible? When I attempt this it vim doesn't run because it's inside the command substitution(?).

Do I need to workaround this by providing an option for the script to not delete the temp file and handle it manually after by the other script running it after getting its contents?

P.S. Unrelated, but I have a lua plugin for mpv which runs this shell script to launch a new terminal instance with vim running. If I close mpv, this new terminal instance with vim still persists. I expect this to close since it's a child(?) process and the contents of the script as well as running the script itself are all done in the foreground. I came across a stackoverflow about something to do with a grandparent process that might contribute to this behavior where the child process doesn't terminate (not sure if it's related) and was wondering if anyone has a guess how to deal with this.

reddit.com
u/gkaiser8 — 14 days ago
▲ 2 r/btrfs

Know how much a snapshot will take up before snapshotting?

Is it possible to get a good sense of how much a snapshot will take for a send/receive before snapshotting and in particular if the destination disk is offline?

Use case: I want to accumulate as much new changes as a detached external HDD allows to utilize most of its space on next send/receive for mirrored backup. With rsync, this is straightforward since I just compare the sizes of the source and destination and ensure the source should not exceed the destination after the accumulation of new changes--it just comes close to the max space on the external HDD (rsync --delete-before makes this straightforward).

I'm not sure if there is any decent way to go about this with btrfs send/receive especially if the disk is offline--I only know that sizes of snapshots depend on the amount of changed data but since btrfs operates at block-level: 1) this doesn't seem so straightforward, 2) if it's possible to e.g. save some metadata about the external HDD before it's detached so that it can be compared to the online data to figure out how much accumulated changes I can make, i.e. the size of the snapshot along with maybe the resulting disk usage of the external HDD if I were to complete the snapshot.

reddit.com
u/gkaiser8 — 15 days ago
▲ 2 r/neovim

By default both logs and shadafile use vim.fn.stdpath("log") which uses $XDG_STATE_HOME by default but I want my logs on tmpfs (LSP logs are spammy) and so it gets wiped on system reboots automatically (if I do need logs, having them persist for the session seems to be good enough).

Currently I run Neovim with XDG_STATE_HOME=/tmp nvim "$@" and hardcode the original $XDG_STATE_HOME for the shadafile: vim.opt.shada:append("n~/.local/state/nvim/shada/main.shada").

I don't like changing XDG_STATE_HOME just for logs (other settings might use $XDG_STATE_HOME which I do want persistence for) and hardcoding the original XDG_STATE_HOME path, but AFAIK all log files use vim.fn.stdpath("log"). NVIM_LOG_FILE covers only the main Neovim log. Perhaps I can change the log files of each LSP server as well as other sources to tmpfs but there's good chance not everything can be set and then the logs will not be consolidated.

reddit.com
u/gkaiser8 — 15 days ago
▲ 9 r/neovim+1 crossposts

I looked into alternatives to rsync renames and e.g. the patches to add this support seem hacky even according to the author. The two solutions that stand out are:

Curious how they compare and which inspires more confidence or if there are any gotchas before I use one for backups which by nature are important.

Ideally I'd use backup software like restic that operates at block-level and have other useful features like snapshots but IME it's simply unpredictable how much additional overhead is required to prevent out of disk space issues I'm having over time even with 200+ GB free space and with restricting to 1-2 snapshots as well as ensuring I don't add/change too much data between snapshots. My dataset consists mostly of media files between ~1-10 GB each on drives ranging from 2-8 TB, most ~70-95% full.

u/gkaiser8 — 4 days ago

I have plenty of external HDDs that I want to keep track of files on, along with basic metadata like size and modification time. Ideally, there's some decent way to visualize the size of directories.

Currently, I save the output of the tree -afhDFci -I .git/ to a text file when I run right before unmounting any external drive. It's hard to visualize directory sizes in this flat list and I don't really like the approach of grepping for this list because I often like to search a file from both my local filesystem as well as they external HDDs at once. I workaround this by re-creating the file hierarchy of these disks on the local system as empty files and where I use fsearch (Everything file indexer/launcher alternative for Linux) to search for these files alongside my actual files (they report as size 0 so I would then need to grep the saved tree output if I want to know about the metadata).

I was thinking something like locate but also has columns for such metadata that can be used offline. I suppose I can filter the tree files with fzf but none of these offer a decent way to see at a glance the type of files/directories disk space is being allocated to. I'd prefer CLI/TUI interface but beggars can't be choosers. I quite like fsearch since it reflects changes from the filesystem in "real time", as opposed to require updating the database which isn't so efficient if I'm searching things throughout the day.

reddit.com
u/gkaiser8 — 15 days ago
▲ 1 r/FedEx

I received a QR code for Fedex return from seller (Walmart) to drop off item for return and it has no other information. The return was dropped off but a receipt wasn't issued (I should have insisted a receipt--I did not realize I would have no tracking # and assumed there was one associated with the QR code).

I've been trying to contact the seller since a refund hasn't been issued but the call hangs up minutes in every time they start looking into it (this is my third day and attempt now). Going to the order package, there is no indication that a return was even initiated and their live chat instructs me to call. I'm just trying to at least get tracking info to build up a case for dispute.

Is it possible to get tracking # from QR code?

reddit.com
u/gkaiser8 — 22 days ago

I have mounted NFS storage on a Raspberry Pi 4B where the disk is a slow SMR HDD disk and I notice especially when the disk is near full that any transfers to/from it affects the rest of the system's performance (random freezes lasting from brief to a few seconds on a modern PC like switching workspaces on a minimal tiling window manager on Wayland). Not just that, but shell completion, general filesystem navigation, etc. even if it doesn't seem to involve the NFS storage at all.

Is this avoidable or just the nature of slow (NFS) storage? It'd make sense if performance suffers when navigating within the mounted storage and working with its files, but even as I'm typing this post I can see micro freezes on when typing continuously on a web browser where my CPU and memory is not maxed and the transfer doesn't involve files on the system (SSD) disk.

I'm wondering if there are things I can do to improve NFS performance. I'm using NFS4 and mount options via fstab: x-systemd.automount,x-systemd.device-timeout=10,x-systemd.mount-timeout=10,x-systemd.requires=network-online.target 0 0.

reddit.com
u/gkaiser8 — 23 days ago
▲ 8 r/bash

Looking for a performant/intuitive way to left align the first column, right align the second column, and keep the rest the same. Example unformated data is in the format:

1 4GB file1.txt
8 11.2GB video   2.mp4
14 3.2MB img3.jpg
...

I have something close:

awk -v W="$W" -v G="$G" -v E="$E" '{
    # Define widths: Column 1 (left-aligned, 2 chars), Column 2 (right-aligned, 5 chars)
    # %-2s = left align, %5s = right align
    printf "%-2s %5s", W $1 E, $2;

    # Print remaining columns starting from the 3rd
    for (i=3; i<=NF; i++) printf " %s", $i;

    # End the line
    printf "\n"
}'

But the color codes ($W, $G, $E) messes with alignment and strips consecutive spaces.

P.S. Is there a tool to sum the sizes of the second column as-is with the units suffix?

reddit.com
u/gkaiser8 — 24 days ago
▲ 1 r/Backup+1 crossposts

My setup is simple--I have a NAS to consume media all my backup is cold storage. Previously, I used simple rsync for mirrored backups, e.g. backup media from Linux PC to an external HDD, mirror external HDD to another external HDD of the same size. Works great, but I often rename the source copy that is usually on PC first and this gets treated as new file by rsync so it gets synced again, making it very inefficient when you're renaming 5+ GB videos.

I then tried backup software like Kopia/Borg which handles this and also other useful features like deduplication and encryption (I use Btrfs on LUKS for my HDDs); however, despite limiting to only 1-2 snapshots, it seems inevitable that the backup disks are always full when attempting to backup the source disks which have even 200 GB remaining free space of overhead despite limiting to 1 snapshot (with rsync, I've gotten to 99% full without issues). There doesn't seem to be a good way to guess how much free space one actually needs for backing up with such software--I was conscious to make mostly file deletions and not introduce much changed or new data that would inflate the amount of space the snapshot would take. To be honest, I'm not sure how such backup software is usable for media files unless one has TBs of free space so I'm curious of others have better luck. I'm not keen on buying new disks every time it's approaching full as I prioritize deleting less important data as it approaches full. If there's decent way to guess how much space snapshotting would take up I'd love to stick with such software for the builtin encryption, deduplication, etc. handled at the block level which is presumably more efficient than anything at the file level.

I intend to move back to rsync but am looking to see if there are good solutions that can handle file renames. I've seen some rsync patches online--curious if anyone has experience with them since I'm hesitant to use something that has not been merged for something despite high demand necessitating the need for such patches.


P.S. To store an "index" of the files of the HDDs (filename and metadata like file size), I use tree saved to a text file and also replicate the file hierarchy as empty files like /cold-storage/hdd1/cat-video.mp4 so that if I use a file searching tool like find to look for a file on the system, I can know if the file I'm looking for is in the PC or on a particular external HDD. Is there a better approach to this? Something like locate but preserves the metadata even when the drive is unplugged and searching for filename would show its metadata too. A database seems more suitable than a huge text file to grep through.

reddit.com
u/gkaiser8 — 29 days ago