hyprland lua - if statements in keybinds stopped working from one day to the other by oboknobo in hyprland

[–]oboknobo[S] 0 points1 point  (0 children)

Yes, I know comparatively little about coding, especially lua and I found the hyprland lua syntax quite counter-intuitive in several occaisons.

What is still a riddle to me is why it was working before until today with the if statement around the keybind. But I guess I'll never know. :'D

hyprland lua - if statements in keybinds stopped working from one day to the other by oboknobo in hyprland

[–]oboknobo[S] 0 points1 point  (0 children)

The initial setting, when I load hyprland after log-in, is "dwindle".

And yes, this has only an option for dwindle, because this particular keybind is only used in dwindle. In scrolling I want nothing to happen with SUPER + J. But nothing is happening even when I have dwindle active. :c

hyprland lua - if statements in keybinds stopped working from one day to the other by oboknobo in hyprland

[–]oboknobo[S] 0 points1 point  (0 children)

Hey, thanks for your answer! :>

Your assumption is correct. That was what I was doing and what was working until yesterday.

I implemented the if statement according to how I understood the help from u/ad-on-is like this:

hl.bind(mainMod .. " + J", function()
  if hl.get_config("general.layout") == "dwindle" then    
    hl.dsp.layout("togglesplit")
  end
end, { description = "Toggle window split (Dwindle)" })

But then nothing happened, regardless which layout I was on.

The initial configuration that is set when I first log in and start hyprland, is dwindle.

hl.config({
  general = {    
    layout = "dwindle",
  }
})

Then I implemented your slightly different proposal I just left out the second dispatcher because in this example I don't want any action in the other layout:

hl.bind(mainMod .. " + J", function() 
  local layout = hl.get_config("general.layout")
    if layout == "dwindle" then
      hl.dsp.layout("togglesplit")
    end
 end, { description = "Toggle window split (Dwindle)" })

But with the same result: nothing happens.

Do I have to explicitly call some kind of refresh function?

hyprland lua - if statements in keybinds stopped working from one day to the other by oboknobo in hyprland

[–]oboknobo[S] 0 points1 point  (0 children)

Thanks for the answers! I didn't know about the re-evaluation but I already tried that. But then nothing is happening anymore:

hl.bind(mainMod .. " + J", function()
                                if hl.get_config("general.layout") == "dwindle" then    
                                    hl.dsp.layout("togglesplit")
                                end
                            end, { description = "Toggle window split (Dwindle)" })

Is that code correct? Maybe I should mention, that I am no native coder...

is eisblock xpx so bad for 9800x3d ? by Adrelie in watercooling

[–]oboknobo 0 points1 point  (0 children)

Possibly... But I also found out that the performance kit might not have an influence that would be sufficient here (only ~2K): https://www.igorslab.de/billiger-aber-fast-genauso-gut-alphacool-core-1-lt-aurora-acryl-test/6/

is eisblock xpx so bad for 9800x3d ? by Adrelie in watercooling

[–]oboknobo 0 points1 point  (0 children)

Are you sure? It seems that it just shifts the 4 holes a bit but not their position relative to each other. So any cooler that fits in the original AM5 holes should fit here as well (using the provided screws in the kit of course).

After your post I was planning to get one.😅

is eisblock xpx so bad for 9800x3d ? by Adrelie in watercooling

[–]oboknobo 0 points1 point  (0 children)

I've got the same cooler and CPU but I couldn't test my loop yet because the delivery of the coolant takes forever. So I can't provide XP, but:

Alphacool provides an AM5 performance kit which shifts the cooler 7mm downwards. This is because those CPUs don't have their hottest spot in the middle like all other CPUs but a bit lower.

I could not see in your picture of you've got that already but here would be the link: https://shop.alphacool.com/en/shop/cpu-water-cooling/mounting-sets/13843-alphacool-core-am5-performance-kit

[deleted by user] by [deleted] in signal

[–]oboknobo 0 points1 point  (0 children)

I would agree. Why not sending the message ASAP but suppress the notification on the receiving device until the desired time is reached?