• 4 Posts
  • 149 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle


  • Ephera@lemmy.mlOPtoLinux@lemmy.mlUnderappreciated `top`
    link
    fedilink
    English
    arrow-up
    16
    ·
    7 days ago

    Yeah, I especially don’t understand it here, because it’s a graphical tool. You don’t have to keep backwards compatibility.

    Even if you’re worried about people depending on the format that’s being piped, you could keep only the piped format stable. We have the technology.


  • Ephera@lemmy.mlOPtoLinux@lemmy.mlUnderappreciated `top`
    link
    fedilink
    English
    arrow-up
    14
    ·
    7 days ago

    Yeah, I would often just grab htop because I had no idea how to read the CPU usage out of top.
    For example, for me it says:

    %Cpu(s):  0,4 us,  0,4 sy,  0,0 ni, 98,8 id,  0,0 wa,  0,3 hi,  0,0 si,  0,0 st
    

    Now that I look at it, I can guess that us and sy are supposed to be user and system time. And I guess id is supposed to be idle.
    I have no guess what the other numbers might be, though. And well, I would often like to see the CPU usage per core.
    Now I know that I can just press 1t and get effectively the same view as in htop.

    I might learn top’s filtering workflow, too. But so far, I always killed processes with ps -ef | grep <process-name> and then kill <pid>, which isn’t particularly more cumbersome, so will see…




  • I can’t really sell this as a solution, as it requires quite a lot more involvement than a simple configuration file should, but I use Nix Home Manager with Plasma Manager for this.

    This is part of the tooling you’d use on NixOS, but you can use it on other distros, too, and it generally works fine (although I’m not sure, if the current version of Plasma Manager still supports Plasma 5, in case you’re still on a distro with that).

    Basically, it allows you to define e.g. keyboard shortcuts like this:

        shortcuts = {
          ksmserver = {
            "Lock Session" = [
              "Screensaver"
              "Meta+Ctrl+Alt+L"
            ];
          };
    
          kwin = {
            "Expose" = "Meta+,";
            "Switch Window Down" = "Meta+J";
            "Switch Window Left" = "Meta+H";
            "Switch Window Right" = "Meta+L";
            "Switch Window Up" = "Meta+K";
          };
        };
    

    It then fucks up the formatting, so that it looks like KDE expects, and throws it into ~/.config/kglobalshortcutsrc.
    (KDE does actually have a text-based config, it’s just borderline unusable.)

    Well, and you can do this with lots of other Plasma options, too. Here’s their official example: https://github.com/nix-community/plasma-manager/blob/trunk/examples/home.nix














  • Ephera@lemmy.mltoLinux@lemmy.mlI must have died and gone to heaven [nushell]
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    2 months ago

    somewhat logical, but entirely in practice verb-noun command structure.

    That’s supposed to be “impractical”, not “in practice”, for others reading along.

    For example, the “proper” command to list a directory is: Get-ChildItem
    The “proper” command to fetch a webpage is: Invoke-WebRequest https://example.com/

    In these particular cases, they do have aliases defined, so you can use ls, dir and curl instead, but …yeah, that’s still generally what the command names are like.

    It’s partially more verbose than C#, which is one of the most verbose programming languages out there. I genuinely feel like this kind of defeats the point of having a scripting language in the first place, when it isn’t succinct.
    Like, you’re hardly going to use it interactively, because it is so verbose, so you won’t know the commands very well. Which means, if you go to write a script with Powershell, you’ll need to look up how to do everything just as much as with a full-fledged programming language. And I do typically prefer the better tooling of a full-fledged programming language…


  • Ephera@lemmy.mltoLinux@lemmy.mlLinux security
    link
    fedilink
    English
    arrow-up
    37
    ·
    2 months ago

    I just want to say that you’re probably worrying too much about it. Of course, there is lots of things one can do to improve security (which the others here are listing dutifully) and it is foolish to just assume that one’s computer is entirely secure, because as a user, you will always have the ability to bypass that.

    But there’s a pretty firm consensus in the IT industry that Linux is more secure than Windows. And that the popular Linux distributions are more trustworthy organizations than Microsoft.

    So, it’s good to inform yourself, but if you survived on Windows, you at least should not worry about the Linux side of things. It’s more than fine.