Forum › Forums › antiX-development › antiX Respins › antiX 22 dwm Unofficial Spin – Release 2
- This topic has 28 replies, 5 voices, and was last updated Jan 30-12:47 pm by techore.
-
AuthorPosts
-
January 26, 2023 at 4:24 pm #98305Member
andyprough
::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 installAfter 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.January 26, 2023 at 4:49 pm #98308Member
techore
::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 endJanuary 26, 2023 at 5:41 pm #98315Moderator
Brian Masinick
::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 MasinickJanuary 26, 2023 at 5:45 pm #98316Member
techore
::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 endJanuary 26, 2023 at 5:48 pm #98317Member
techore
::@andyprough, if you have other aliases you would like included with antix-dwm, please share. I’ll give them serious consideration to be included.
January 26, 2023 at 9:13 pm #98335Member
techore
January 26, 2023 at 10:21 pm #98339Member
andyprough
::@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.
January 26, 2023 at 11:37 pm #98342Member
techore
::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.
January 27, 2023 at 12:41 am #98344Membermcpderez
::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.
January 27, 2023 at 1:13 am #98346Member
techore
::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.
January 27, 2023 at 1:52 am #98347Membermcpderez
::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?
January 27, 2023 at 3:12 am #98353Member
techore
::Shh.. these are not the droids you are looking for.
fixed.
- This reply was modified 3 months ago by techore.
January 30, 2023 at 10:15 am #98541Membermcpderez
::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).
Attachments:
January 30, 2023 at 12:47 pm #98548Member
techore
::1. typo
cp "$confdir/patches.def.h" "$confdir/patches.h"Fixed and thank you! To get updates:
cd /usr/local/src/antix-dwm git pull2. On the screenshot. You should see a dialog, so something isn’t right. From a terminal:
antixscreenshot.shIf 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 ago by techore.
-
AuthorPosts
- You must be logged in to reply to this topic.
