• Limeey@lemmy.world
    link
    fedilink
    English
    arrow-up
    122
    arrow-down
    1
    ·
    11 months ago

    A gui is helpful sometimes, but there’s a lot of cases where there’s no feasible way to make a good gui that does what the terminal can do.

    Right tools for the right job.

    For example, a gui to move a file from one folder to another is nice - drag and drop.

    A gui that finds all files in a directory with a max depth of 2 but excludes logs and runs grep and on matching files extracts the second field of every line in the file? Please just let me write a one liner in bash

      • ElderWendigo@sh.itjust.works
        link
        fedilink
        arrow-up
        5
        ·
        11 months ago

        Surely you’ve used something roughly equivalent like searching a text, be it web page or other document, for a word or filtering a spreadsheet?

        • Tlaloc_Temporal@lemmy.ca
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          11 months ago

          How would one use grep for a webpage in a browser? Does the page need to be accessed outside the browser?

    • Dmian@lemmy.world
      link
      fedilink
      arrow-up
      9
      arrow-down
      21
      ·
      edit-2
      11 months ago

      Disagree. Anything that can be done with terminal can be done with a GUI, you just need to be good at UX. Most programmers I know are pretty bad at UX, and program for themselves, not the user.

      Edit, just to clarify (because I know some of you will feel personally attacked): I’m not saying a GUI may be better, or more efficient than a CLI, I’m just saying that it can be done. And as an example, see 3D shaders in modern programs, that need no code at all and are purely visual. That was unthinkable some years ago.

      • kpw@kbin.social
        link
        fedilink
        arrow-up
        11
        ·
        11 months ago

        They tried to replace programming languages with drag-and-drop toolkits too. It can be done, but sometimes there’s a reason we don’t do it.

        • Dmian@lemmy.world
          link
          fedilink
          arrow-up
          1
          arrow-down
          5
          ·
          edit-2
          11 months ago

          But I’m not talking about programming languages, I’m talking about CLI programs, or system commands.

          And I’m not telling a GUI would be better, or more efficient, I’m just saying that it can be done (something you are saying too about programming languages).

          That’s the point: a GUI can replace a CLI. Is it better? Sometimes it is, sometimes it isn’t. Is it possible? Absolutely.

          • Captain Aggravated@sh.itjust.works
            link
            fedilink
            arrow-up
            3
            ·
            11 months ago

            I would assert that basically every shell I’m aware of is also a programming/scripting langauge, able to handle things like loops and branches. This is possible to do in a GUI but it’s kind of telling no one has achieved this in a desktop environment to any significant degree, including in the Linux space.

            “Iterate over all of the files in this folder, if it’s a video file of any format, create a folder with the same name as the video file in ~/Videos and move the file there.” I’m unaware of an OS desktop environment that can do even that level of automation with default GUI tools. It’s like 5 lines of Bash including “done;” at the end. You can probably do it in PowerShell, but I bet Windows power users would rather use AutoHotKey for this.

            • Dmian@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              arrow-down
              3
              ·
              11 months ago

              You really can’t imagine doing that with a GUI? Here you have something to give you an idea (sorry it’s in Spanish, but I guess you can get an idea of how it may work):

              Here I’m selecting a specific type of files (PDFs, but I can select several different types, as I’m organising by file type), after which I did a right click, and selected a contextual action that shows a popup to do a following action. In this case it’s renaming, but it could easily be a “Move to…” that could include a check option of “Create a folder for each file”. I mean, it was actually pretty fast too. It’s not that difficult.

              • howrar@lemmy.ca
                link
                fedilink
                arrow-up
                4
                ·
                edit-2
                11 months ago

                It wouldn’t make sense to add clutter to a GUI that benefits a tiny fraction of users a tiny fraction of the time while making the experience worse for everyone else.

              • Captain Aggravated@sh.itjust.works
                link
                fedilink
                arrow-up
                1
                ·
                11 months ago

                I can imagine making a GUI that does it. But most aren’t able to. “That could include a check option of…” yeah it doesn’t though, is my point. GUIs are for doing things manually.

        • grue@lemmy.world
          link
          fedilink
          English
          arrow-up
          5
          arrow-down
          1
          ·
          11 months ago

          https://en.wikipedia.org/wiki/Automator_(macOS), or in general, https://en.wikipedia.org/wiki/Visual_programming_language

          'Course, there’s a reason those things basically never catch on, which is that they don’t actually reduce the inherent difficulty of figuring out the algorithm, and for anything non-trivial messing with a whole bunch of drop-down lists and shit is more cumbersome than just typing the damn thing.

        • Limeey@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 months ago

          This right here, you can gui a single program, but with pipes we can chain nearly infinite programs. No way can you make a gui that is that flexible, I refuse to believe until I see it

        • Dmian@lemmy.world
          link
          fedilink
          arrow-up
          4
          arrow-down
          3
          ·
          edit-2
          11 months ago

          Are you talking about sending the output of one process to the input of another?

          I think the shaders I’ve mentioned are a great example of that: you do something in a block, then send the result to the input of another block.

          Sorry if it’s not what you mean, but my point is that, with some effort, you can create a visual representation of even the most abstract concepts. Physicists do this constantly. If we can make a visual representations of 4D, for example, what prevents us from doing the same for programming logic? Or for commands?

          • Avid Amoeba@lemmy.ca
            link
            fedilink
            arrow-up
            6
            ·
            11 months ago

            Yeah, and doing this would take significantly longer to use every time than typing up a chain of commands in a terminal.

            • Dmian@lemmy.world
              link
              fedilink
              arrow-up
              2
              arrow-down
              5
              ·
              11 months ago

              Agreed. But that’s not my point. My point is that it can be done.

              And in some cases, even if it’s less than ideal, and is way more cumbersome than using a CLI, you are helping non-tech-savvy people do things they couldn’t do any other way.

              • Kecessa@sh.itjust.works
                link
                fedilink
                arrow-up
                4
                arrow-down
                1
                ·
                11 months ago

                Linux users: Non tech savvy people? Yuck

                Also Linux users: Everyone should be running Linux instead of Windows!

                • grue@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  6
                  ·
                  11 months ago

                  Put those two statements together and the logical conclusion is that Linux users simply want everybody to be tech-savvy (although I’d use a different term: computer-literate). What’s wrong with that?

              • grue@lemmy.world
                link
                fedilink
                English
                arrow-up
                2
                ·
                11 months ago

                Nobody capable of defining an algorithm in a visual flowchart like that isn’t also capable of doing it in a CLI (or at least, in text in general – writing a script). It’s thinking through what you want to happen that’s the hard part; expressing it in the UI is trivial in comparison.

                • Dmian@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  4
                  ·
                  edit-2
                  11 months ago

                  Some people have problems remembering commands, for example. And it’s easier for them if they can see it.

                  Yes, you can teach a kid to program (with some effort), but there’s a reason why Scratch presents logic units with shapes and colors and a GUI.

                  There are many reasons why a visual representation may be easier to grasp than just resorting to memory and remembering abstract concepts.

                  I mean, do you remember everything that you write? You’ve never had to visit Stack Overflow to remember how to do something, because you forgot the exact syntax of an operation? Now, how about if I put things visually in front of you? What would be easier?

            • Buddahriffic@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              11 months ago

              Things like that have been around for a long time. It was like two decades ago that I saw this shader scheme in softimage|xsi.

              For implementing something like that, each node in that graph would have an array of inputs and outputs. Each of those would have a type like vector, scalar, colour, string. Then you only allow connections if the inputs and outputs match types (though you can also have conversion nodes or selectors that say pick the red channel of a colour to turn it into a scalar). Each input can be set to a constant value instead of connecting something else to it. Outputs don’t need to be connected, which is mostly useful if a node has multiple outputs. Then each node has an evaluation function that takes all input parameters and maybe internal configuration parameters (though you might as well make everything an input param since there’s no real functional difference) and uses them to calculate the outputs, which it then sends on to anything connected to those.

              I’m not much of a UI guy but displaying it for the GUI would just involve drawing boxes or some shape for the node, then spaces for each of the inputs on the left side and outputs on the right side maybe colour code them by type, and lines running along the connections. Then just add the name and/or other visual information you want to display and positional information to let users move it around their work area.

      • taladar@sh.itjust.works
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        11 months ago

        Most programmers are bad at UX but not nearly as bad as GUI designers are at understanding abstraction.

        • Dmian@lemmy.world
          link
          fedilink
          arrow-up
          3
          arrow-down
          8
          ·
          edit-2
          11 months ago

          That’s your opinion, and I disagree with it. It takes a lot of abstract thinking to synthesize an action in a visual way, like an icon.

          Designers are good at lateral thinking, and founding visual ways of representing abstract concepts (and you can’t represent something visually if you don’t understand it first).

      • radiosimian@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        You can have your GUI do anything a terminal can I guess, but you’d need a few million buttons on that gui where the programmer has anticipated each and every combination of CLI command that you are going to use, encoded that to a button or menu, included text entry boxes for each variable and have bundled every program, application and dependency that has ever existed. Totally possible.

  • 0x4E4F@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    51
    arrow-down
    1
    ·
    11 months ago

    Super + T in my case, but still…

    (shhh 🤫, it’s actually the win key, but don’t let the Linux users hear ya 🤫)

      • ayaya@lemdro.id
        link
        fedilink
        English
        arrow-up
        10
        ·
        11 months ago

        For me it’s the (custom-ordered) Arch logo key ◉⁠‿⁠◉

    • rtxn@lemmy.worldM
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      11 months ago

      For me, it’s:

      • mod + return for terminal
      • mod + e for file manager
      • mod + r for dmenu/bemenu
      • mod + d to switch to the next empty workspace.

      All because I have to work with win10 workstations and using a different, superior shortcut scheme would mess up my muscle memory. Remembering to use shutdown -s -f -t 0 instead of poweroff is difficult enough, and don’t even get me started with the audacity to use curl as an alias for Invoke-WebRequest!

    • yesman@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      11 months ago

      I have to confess. I had to look up the shortcut for terminal because I haven’t interacted with a Linux desktop in years. I’m a Windows cuck, but not a total imposter bc I’ve kept a debian server running on my network for years. Whenever something breaks or I do an update (the updates are invariably the cause of the breakage) I manage her with ssh.

      • 0x4E4F@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        It’s Ctrl+Alt+T on most DEs… but, that’s way too many keys for my taste, so I usually just add Super+T as well (don’t remove the default).

  • cetvrti_magi@lemmy.world
    link
    fedilink
    arrow-up
    52
    arrow-down
    2
    ·
    11 months ago

    Few days ago I was in meeting with two friend, we did something for school, and my screen was shared. At one point I had to type something in Vim so I opened a terminal. They were shocked, confused and said something like “we aren’t hackers” (and we are on IT department). More people should know about beauty of CLI.

  • misophist@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    11 months ago

    Honestly, I like both. I use whichever provides the biggest productivity multiplier. For example, I can navigate around the filesystem and manipulate text files and code extremely quickly in the terminal. On the flip side, I like to use a gui which allows me to spread 6-12 terminal windows across my multiple displays.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      13
      ·
      11 months ago

      Yeah, GUIs are great. I especially like having multiple tabs to organize my terminals for different tasks.

  • Agent641@lemmy.world
    link
    fedilink
    arrow-up
    29
    arrow-down
    3
    ·
    11 months ago

    The terminal is not fancy, or pretty, and its not that nice to use, but its always available and it gets the job done, just like OPs mum

  • Yaarmehearty@lemmy.ml
    link
    fedilink
    arrow-up
    23
    ·
    11 months ago

    I can’t say I love the terminal, if there’s a GUI for a task I’ll use that but there comes a time in every troubleshooting session where the terminal is just the only way to do something reliably.

    I’m not going to lie though, I forget commands constantly so have to search the most basic shit to type in.

        • PlutoParty@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          Ash is the only one I’m aware of, but that’s primarily going to be found and used on stuff like routers or other embedded devices. Any modern shell can support history. That said, many users will disable it or wipe it on logout for security reasons.

          • chitak166@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            11 months ago

            It’s not just history support. It will provide autocomplete suggestions based on what you’ve already typed and allow you to browse the history of a specific query.

            Zsh is the only shell I’ve used that supports it, using Manjaro.

            My Ubuntu 22.04 server using Bash does not. It only supports the basic history that I think you are referring to where you can just browse the history of all your commands at once.

  • dQw4w9WgXcQ@lemm.ee
    link
    fedilink
    arrow-up
    21
    ·
    11 months ago

    Intellij: Has a modern GUI for Git with code cleanup, import optimization and visualization of changes.

    Me: Open terminal, ‘git commit -m “wrote code” && git push’. Then realize I forgot to add half of the files, so I make another commit. Then realize I forgot to cleanup bad indents, so I make another commit. Then realize my code doesn’t even build, so I make another commit, etc.

    • Pasta Dental@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      The only Git GUI that I find actually lets me do the basics in a simple way is GitHub desktop. It allows me to quickly see a diff of the changes, select a few lines or a chunk or all the file, it manages stashes and conflicts for me which is like 98% of my usage. Otherwise I use gitui or the git cli for anything more complex than committing and switching/merging branches.

      • kdm@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        11 months ago

        I’ve started using LazyGit recently and I love it. It runs in CLI and essentially just maps the git commands to keyboard shortcuts. Really easy to use and learn, definitely increased my productivity

  • southsamurai@sh.itjust.works
    link
    fedilink
    arrow-up
    19
    arrow-down
    2
    ·
    11 months ago

    Don’t forget us dyslexics though! Cli is rough on that, but gui tends to avoid the errors a typo can cause.

    I swear, having to copy/paste stuff in terminal to avoid typing the damn commands five times is way less convenient.

    I get it, Linux veterans love the terminal because it is efficient and capable. But there’s multiple reasons for a gui interface for common tasks, accessibility being the biggest.

  • Semi-Hemi-Demigod@kbin.social
    link
    fedilink
    arrow-up
    13
    ·
    11 months ago

    Say I wanted to make a bunch of folders with sequentially numbered names, and the same sub folders in them.

    This would take ages with a GUI but you can do it with one line in the terminal