antiX 22 dwm Unofficial Spin – Release 2

Forum Forums antiX-development antiX Respins antiX 22 dwm Unofficial Spin – Release 2

Tagged: , ,

  • This topic has 28 replies, 5 voices, and was last updated Jan 30-12:47 pm by techore.
Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #98305
    Member
    andyprough
      Helpful
      Up
      0
      ::

      Ahh, I see, and here it’s described how “alias” in fish is just a wrapper for a function: https://fishshell.com/docs/3.6/language.html#defining-aliases

      And here it describes the use of fish “abbreviations” in place of functions: https://fishshell.com/docs/3.6/interactive.html#abbreviations

      What I’m doing with bash-style aliases is actually better if I do it as abbreviations with the ‘abbr’ command: https://fishshell.com/docs/3.6/cmds/abbr.html

      And abbr commands are correctly added to ~/.config/fish/config.fish

      To make an abbreviation, the command is like this to use “api” instead of “sudo apt-get install”:
      abbr -a api sudo apt-get install

      After re-starting the terminal, when you type your abbreviation and press the spacebar key, your full command is shown on the screen where you can edit it if you like:
      api [SPACEBAR]
      # becomes …
      sudo apt-get install
      # … on the screen and is ready for you to either edit the command or to tell it which package to install.

      This doesn’t seem to work with combined commands, such as “sudo apt-get update && sudo apt-get dist-upgrade”.
      EDIT: And aliases don’t work for combined commands with the && or & or | in fish from what I can see. So that’s probably where you would need to write functions.

      #98308
      Member
      techore
        Helpful
        Up
        0
        ::

        Related but a bit of a tanget.
        sudo is a nuisance and how you get it to work in bash is to add a space so it will interpret aliases. fish doesn’t permit this and the author has no intention of implementing the same mechanism.

        Be mindful that antix-dwm has a sudo (function), sudo.fish, that uses the same mechanism as the bash hack so if you want to experiment, move or delete it first, then experiment.

        sudo.fish

        # Reference: https://bsago.me/tech-notes/sudo-with-aliases-in-fish
        function sudo -d "sudo wrapper that handles aliases"
            if functions -q -- $argv[1]
                set -l new_args (string join ' ' -- (string escape -- $argv))
                set argv fish -c "$new_args"
            end
        
            command sudo $argv
        end
        #98315
        Moderator
        Brian Masinick
          Helpful
          Up
          0
          ::

          Thanks for sharing these subtle, important differences and some useful solutions.

          I’m not certain that I will be using fish, but if I do, I’ll try to remember the excellent suggestions here – and I’ll send myself a link to the discussion “just in case” I do experiment with fish, because this has been a very good dialogue!

          --
          Brian Masinick

          #98316
          Member
          techore
            Helpful
            Up
            0
            ::

            I know you are capable of doing this yourself, but I like your alias so created it.

            apu.fish

            function apu -d "apt-get update and dist-upgrade"
                sudo apt-get update
                sudo apt-get dist-upgrade
            end
            #98317
            Member
            techore
              Helpful
              Up
              0
              ::

              @andyprough, if you have other aliases you would like included with antix-dwm, please share. I’ll give them serious consideration to be included.

              #98335
              Member
              techore
                Helpful
                Up
                0
                ::

                because this has been a very good dialogue!

                Agreed, Brian.

                #98339
                Member
                andyprough
                  Helpful
                  Up
                  0
                  ::

                  @andyprough, if you have other aliases you would like included with antix-dwm, please share. I’ll give them serious consideration to be included.

                  Most of my aliases are ones I made because I have to enter some ridiculously long and complicated commands to get into my work network from home. They wouldn’t be of use to anyone but me. By the way, the “apu” function also works if I just drop it into the bottom of the config.fish file. Kind of interesting. The developers have clearly tried to make fish easy to interact with and configure.

                  #98342
                  Member
                  techore
                    Helpful
                    Up
                    0
                    ::

                    Gotcha on the additional aliases. May rename apu to sau for sudo apt update. I’ll think on it.

                    By the way, the “apu” function also works if I just drop it into the bottom of the config.fish file. Kind of interesting. The developers have clearly tried to make fish easy to interact with and configure.

                    Neat! Didn’t know that.

                    #98344
                    Member
                    mcpderez
                      Helpful
                      Up
                      0
                      ::

                      This looks excellent!

                      Do you know if any of your building blocks present hurdles for making a 32-bit ISO? I’ll probably try it by following your build instructions and starting with a 32-bit AntiX core ISO, but I didn’t want to waste a bunch of time if there are known obstacles.

                      #98346
                      Member
                      techore
                        Helpful
                        Up
                        0
                        ::

                        Do you know if any of your building blocks present hurdles for making a 32-bit ISO?

                        In theory, install antiX core 32 bit, apt install git, git clone https://gitlab.com/techore/antix-dwm, review and execute steps from antix-dwm/doc/build.md. HOWEVER, review the git and inst scripts found in antix-dwm/build. I am certain there are amd64 releases being git cloned. Those will need to updated before executing antix-dwm/build.sh.

                        If this is something you are willing to invest time, we may want to collaborate to update the build process to take an argument, e.g. 32 or 64, and update the build.sh to build for either 32 or 64 bit.

                        #98347
                        Member
                        mcpderez
                          Helpful
                          Up
                          0
                          ::

                          I’ll give it a try and keep notes on where the amd64 releases are referenced. Thanks for the tip about where to look for the dependencies. I’m willing to invest time, but it might take me a few weeks.

                          On your gitlab did you mean to write “staging” instead of “stagging” in that top level directory?

                          #98353
                          Member
                          techore
                            Helpful
                            Up
                            0
                            ::

                            Shh.. these are not the droids you are looking for.

                            fixed.

                            • This reply was modified 3 months, 1 week ago by techore.
                            #98541
                            Member
                            mcpderez
                              Helpful
                              Up
                              0
                              ::

                              I have this mostly working on my Sony VGN-P530H. Some of the key bindings aren’t doing anything (e.g. mod-shift-enter to bring up a Terminal), but I haven’t investigated further. The main hurdle seems like it will be neovim as they don’t release an i386 build. I’ve seen reports that it can be compiled from source but have not tried it yet. The package available in cli-aptiX seems very old (0.4.4-1). I just commented out the neovim-related sections in build.sh.

                              I encountered some problems building dwm via /usr/local/bin/conf-dwm.sh. It seemed to be mostly missing X libraries. I am going to have to rebuild this since I didn’t realize you were using the runit version. I’ll be running each section of build.sh by hand to try to see if I can see where things went wrong.

                              I think there is a droid I’m not looking for in /usr/local/bin/conf-dwm.sh at line 62:
                              cp "$confdir/patchese.def.h" "$confdir/patches.h"

                              That should read (i.e. remove the extra ‘e’ after the first “patches”):
                              cp "$confdir/patches.def.h" "$confdir/patches.h"

                              Can you teach me how to make a screenshot in dwm? I see the Screenshot item in the Toolbox menu, but it doesn’t seem to be doing anything (either that or I don’t know where it is storing the screenshots).

                              #98548
                              Member
                              techore
                                Helpful
                                Up
                                0
                                ::

                                1. typo

                                cp "$confdir/patches.def.h" "$confdir/patches.h"

                                Fixed and thank you! To get updates:

                                cd /usr/local/src/antix-dwm
                                git pull

                                2. On the screenshot. You should see a dialog, so something isn’t right. From a terminal:

                                antixscreenshot.sh

                                If you are unable to open a shell after ‘startx’, you can edit using nano .xinitrc and place command above exec dwm like ‘kitty &’ or any terminal you want to use. After startx, the terminal should be launched.

                                3. On neovim and 32 bit. Ouch! I’ll take some time out to learn more on 32 bit and neovim. It does highlight a concern I had with the ton of customizations I did with neovim which in turn resulted with having to use a newer github version. I could just install the Debian repo package and create a neovim-nvchad installation script to run after OS installation. Something for me to think on.

                                4. building dwm. Ensure you have the build requirements installed.

                                https://gitlab.com/-/ide/project/techore/antix-dwm/tree/main/-/build/git-dwm.sh/

                                With all the above being said, I’ve never tried to do an antiX 32 bit build.

                                • This reply was modified 3 months, 1 week ago by techore.
                              Viewing 14 posts - 16 through 29 (of 29 total)
                              • You must be logged in to reply to this topic.