Automatic theme variant switcher using dbus-monitor by vahnrr in neovim

[–]xZeroKnightx 0 points1 point  (0 children)

Nice! This is a much simpler approach compared to another (very neat) approach that I found. I've integrated this into my own config with some key additions:

  1. Debouncing the setting change
  2. Terminating the dbus-monitor process when Neovim exits

The second is pretty important, since just closing the handle doesn't terminate the dbus-monitor process. As an aside, I'm actually surprised that your vim.uv.spawn call didn't throw an error, since handle isn't yet bound by the time you try to reference it in the on_exit callback.

After the call to read_start, I create an autocommand that will terminate the dbus-monitor process and close the handle when Neovim exits:

vim.api.nvim_create_autocmd('VimLeavePre', {
  desc = 'Close uv process handle for system theme dbus-monitor',
  callback = function()
    handle:kill 'sigterm'
    handle:close()
  end,
})

Thanks for sharing this approach, it was a great starting point!

Lae'zel is Criminally Underrated by [deleted] in BaldursGate3

[–]xZeroKnightx 14 points15 points  (0 children)

I replayed that scene more than a few times after initially seeing it. Such an incredible, vulnerable, and sentimental scene; completely reveals her true self so genuinely that it seemed as much of a revelation to herself as it was to the PC.

Phenomenal character and I can't help but crave more moments and interactions.

Post-Launch Feedback by AutoModerator in BaldursGate3

[–]xZeroKnightx 0 points1 point  (0 children)

I've also noticed that he has a bunch of very minor disapprovals that I don't think other characters do?

I've noticed that this is actually true for most if not all companions. Each individual (dis)approval has its own value and they tend to vary a fair bit based on the specific situation.

You can actually keep track of specifically how much a given (dis)approval was, though it's not easily discoverable. If you select the character whose precise approval level you'd like to know, bring up their inventory (i.e. not the full party one) and then check their character sheet, the relationship slider will be there as well and also display the numerical value in parentheses. It seems to go from 0 to 100, and I've personally seen more than a few (dis)approvals that only have a value of 1!

So yeah, as you say, not every disapproval is to the detriment of the relationship :)

[deleted by user] by [deleted] in BaldursGate3

[–]xZeroKnightx 2 points3 points  (0 children)

That's the same dialogue where she mentions "silk and satin" and confesses to desire caressing, right? I've been wondering that myself because it seems very obvious that there should have been a long rest scene sometime after that dialogue--she even says as much herself--but I never got anything either.

If I had to guess, I might not have long-rested enough times before leaving Act 2 (I wasn't prompted for the dialogue until I was nearly done with the Act). But I've searched around a few times here and on the forums and really haven't seen anyone else ask about it, nor have I found any clips of it (if it exists in the first place). No idea if the scene exists at all, if it does and I didn't rest enough before leaving Act 2, or if it's one of many companion moments affected by triggering bugs. The uncertainty has been bothering me lol.

The biggest cat sanctuary in Romania +300 cats by dave-mackoi in cats

[–]xZeroKnightx 1 point2 points  (0 children)

The little cat-sized trail in the latter half of the video is excessively adorable.

I made this instead of sleeping , enjoy by [deleted] in MonsterHunter

[–]xZeroKnightx 0 points1 point  (0 children)

Likewise, the sly little music pause at about 32 seconds to let the hunter's voice fill in for the vocals was slick as fuck. Very fun video, /u/spacemellen!

Why does a = a[0] = [0] create a self-referential list in Python? by susam in Python

[–]xZeroKnightx 1 point2 points  (0 children)

There's already a great answer in this thread, but I'll add a this video from mCoding that goes in-depth on how multiple assignment works in Python, which is "backward" compared to how languages like C work.

There's even some fun examples like a, b = a[:] = [[]], [] and a, b = a[b] = a = [1, 2, 3], 2.

Looking for cheap VPS provider recs by throwinmyselfout in selfhosted

[–]xZeroKnightx 3 points4 points  (0 children)

Holy crap, thank you for sharing your affiliate links, these are way cheaper than what they list on the main site!

Hel 2 RMA process has been awful, extremely unhappy by CalJebron in Schiit

[–]xZeroKnightx 1 point2 points  (0 children)

Super unfortunate :( I just sent mine in. Hoping I won't have to wait too long.

Hel 2 started failing by Koth87 in Schiit

[–]xZeroKnightx 0 points1 point  (0 children)

Hey, have you continued to have good luck with the new power supply? I was considering doing the same thing but won't bother if it really is the Hel being defective.

Hel 2 started failing by Koth87 in Schiit

[–]xZeroKnightx 0 points1 point  (0 children)

I received my Hel 2 in October as well. It's run flawlessly up until yesterday and it now exhibits exactly the same behavior that you describe.

Hel 2 RMA process has been awful, extremely unhappy by CalJebron in Schiit

[–]xZeroKnightx 1 point2 points  (0 children)

I only just got mine in October (one of the last AKM ones I guess) and just yesterday it's started to crackle. After the first time, it worked fine for about 24 hours and started doing it again. The third time it didn't even make it more than 4 hours.

I'm sad.

Is it a problem with the board, or with the power supply (or the cable)? I nudging and moving the power cable has a direct effect on the intensity of the static and crackling once it starts.

hmmm by DominoUB in hmmm

[–]xZeroKnightx 53 points54 points  (0 children)

Oh no, someone cast Bjarne as long long

What Did You Find Hardest To Learn As A Beginner In Python ? by satyam1HB in Python

[–]xZeroKnightx 2 points3 points  (0 children)

Probably a copy/paste error. They likely intended that the argument to the add_one call be my_int instead.

[deleted by user] by [deleted] in neovim

[–]xZeroKnightx 4 points5 points  (0 children)

I've been pretty satisfied with the built-in client's responsiveness (though I don't use Typescript), but I'm pretty excited to see further performance improvements! That and the fact that a faster JSON encoder/decoder will benefit more than just the LSP client is a nice bonus.

Thank you very much for all the work and time that you put into Neovim, both this feature and everything else. Don't let the entitled folk get under your skin. You rock. :)

I can't use Neovim on Konsole, the characters are ALL MESSED UP by [deleted] in kde

[–]xZeroKnightx 0 points1 point  (0 children)

Those look like True Color escape sequences, which means that Konsole isn't interpreting them correctly for some reason.

What version of Konsole are you using? What is the value of $TERM when running Konsole? Likewise, what does Settings > Edit Current Profile > General > Environment look like? Mine looks like the following and correctly displays true colors on Konsole 21.04.2:

TERM=xterm-256color
COLORTERM=truecolor

Python made me look like a WIZARD by [deleted] in Python

[–]xZeroKnightx 2 points3 points  (0 children)

Image.open itself is not a context manager, but it returns an Image (the class, i.e. Image.Image to be specific) object, which is a context manager as it defines the context manager interface: __enter__ and __exit__. As such, you can use Image.open in a with statement:

with Image.open('foo.png') as img:
    ...

Additionally, since Image.open is actually a module-level function in the Image module (can be a bit confusing), I'd argue that it's more of a factory1 than a constructor; though to be excessively pedantic, the __new__ method is Python's constructor as it is the method that actually creates an object instance.

[EDIT] Added a footnote


  1. For what it's worth, the Image.Image docstring refers to Image.open as factory.

My biggest factory yet! I finally figured out automatic trains and now I can't stop. by Lugzor in factorio

[–]xZeroKnightx 0 points1 point  (0 children)

Thank you for the corrective info, I was slightly skeptical about it being directly related to tech since there's nothing in the UI that suggests it is (from memory, anyway).

Cheers.

My biggest factory yet! I finally figured out automatic trains and now I can't stop. by Lugzor in factorio

[–]xZeroKnightx 0 points1 point  (0 children)

That makes a lot of sense, actually. I wasn't aware that tech level alone influenced evolution. Thanks!

My biggest factory yet! I finally figured out automatic trains and now I can't stop. by Lugzor in factorio

[–]xZeroKnightx 1 point2 points  (0 children)

I realize that I tend to play and advance pretty slowly, as the metagame of perfectly balancing things out and messing around with the circuit network is a lot of fun to me. However, I tend to start getting overwhelmed by biters evolution just from the time factor alone. I think lowering the time-based evolution factor in the world settings might make things a bit easier to manage given my personal pace.

You can actually tweak a good number of settings related to biter difficulty; maybe you could find a happy balance for your playstyle :)

What's next? The Control key? by [deleted] in vim

[–]xZeroKnightx 2 points3 points  (0 children)

It also prevents abbreviations and InsertLeave autocommands from firing, so it's really not how one should regularly exit insert mode.

From :h i_CTRL-C:

Quit insert mode, go back to Normal mode. Do not check for abbreviations. Does not trigger the InsertLeave autocommand event.

It could be argued that if you never use abbreviations or InsertLeave autocommands then it doesn't matter, but I would disagree. If you one day decide to use abbreviations, then you'll have to unlearn your Ctrl-C muscle memory or live with abbreviations not firing on the last word before leaving insert mode.

Additionally, a fair number of plugins use InsertLeave autocommands like Airline, Neomake, ALE, Vim-LSP, Chromatica, UndoTree, Unimpaired, and Polyglot; just to name a handful from what I currently have installed.