• 2 Posts
  • 61 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle






  • I just use Zsh’s command history, coupled with a bunch of functions and aliases to set up different HISTFILE values for different workflows.

    I keep HISTFILEs clean by prepending a whitespace before commands that I don’t want to remember, which unfortunately gave me the habit of doing that on Bash when Zsh isn’t available (which is ineffective at best, and actively annoying at worst).


  • I know what you’re talking about, my condolences.

    I had that bug too at times, and AFAIK it isn’t even Linux-specific; unfortunately, fixing it requires praying to all the gods you know of and hoping one of them hears your plight.

    Here are some of the forbidden rituals I’ve had some success with:

    • Whatever Proton version you’re using, change it (or change it back if it’s the second time you get this problem);
    • Rename or delete the HD2 compatdata directory, something like ~/.local/share/steam/steamapps/compatdata/six_digit_number_idr;
    • Restart your router if your ISP gives you a different IPv4 address every time (SoL if it doesn’t);
    • Disable IPv6 on your system;
    • Use Google’s DNS servers;
    • Use non-Google DNS servers;
    • Delete nProtect (it should be downloaded and installed back again automatically).

    If none of those work, which wouldn’t surprise me, I fear only time will fix your game as it did mine.

    As for the anti-cheat being the cause: I don’t doubt for a second that it makes the netcode janky as fuck, but I have ~600 hours on record, and not more than 2 hours were on Windows 10. Linux’s fine.





  • I saved this post hoping for a useful answer, alsa alas, there seems to be none.
    I’m not an audiophile so I’m more or less spreading misinformation, but I think you’re looking to configure ALSA’s device gain rather than going through pipewire.

    kusivittula here mentioned alsamixer, and I found a StackExchange answer saying that you can save its current state using alsactl store (with sudo or write access to /var/lib/alsa/asound.state).
    Alternatively, you can edit /var/lib/alsa/asound.state yourself.

    It doesn’t work if your problem involves audio streams (so *I* am SOL), but making changes through alsamixer seems to lower my headset’s volume so that I can comfortably set it to 100% through wireplumber - I imagine that would also apply to mic gain.






  • Here it is:

    #!/usr/bin/zsh
    
    nl=$'\n'
    dnl=$'\n\n'
    
    url=$1
    msgcontent=$url; shift
    argi=1
    for arg ($@); do
        argi=$(($argi + 1))
        msgcontent=${msgcontent}${nl}Argument\ ${argi}': '${arg}
    done
    
    title="${0:A}"
    msg="An application attempted to open a web page:${dnl}\"${msgcontent}\"${dnl}Copy the URL to clipboard?"
    
    kdialog --title $title --yesno $msg
    answer=$?
    
    if [[ $answer = 0 ]]; then wl-copy $url; fi
    

    If you want to translate it to Bash, keep in mind that arrays behave differently between the two shells, and syntax like for arg ($@); do would likely misbehave or not work at all.

    Also, there’s an issue where some applications do something weird, and the URL seems to be a zero-length argument. I have absolutely no idea what’s up with that.


  • You can set some browser-unrelated program or script as your desktop environment’s default browser, for example I wrote a Zsh script that creates a KDE dialog and asks me to copy the URL to the clipboard.

    I’m not currently at my PC, but if you want it I can paste it in a comment here when I get to it - it shouldn’t be too hard to translate it to Bash, either.

    Other than that? /usr/bin/true is a pretty nice default browser for applications to start without your consent, very minimal and lightweight.