MX-DWM/antiX-DWM - a thread for working toward an optimized respin

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Message
Author
User avatar
anticapitalista
Developer
Posts: 4315
Joined: Sat Jul 15, 2006 10:40 am

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#21 Post by anticapitalista »

andyprough wrote: Sat Dec 05, 2020 4:30 pm
So you are running without a volume icon, wihtout a clipboard manager, without a network indicator -- those make sense. But how are you running without dbus? If you've figured that out, there's a lot of Hyperbola fans and FreeBSD fans that would be flocking to antiX I think. One Hyperbola user was trying to get me to figure out if antiX could be run without dbus earlier this year, but I did not take the time to look into it as it seemed an impossibility.

Is that what you are doing with dzen2? Using it in place of dbus and some of the x packages? If so, that's worth checking out. How did you set that up?
I've been experimenting by removing/moving all dbus binaries from antiX.

I created a folder in /usr/bin called antiX and put these /usr/bin dbus executives in it, so they don't run

dbus-binding-tool
dbus-cleanup-sockets
dbus-daemon
dbus-launch
dbus-monitor
dbus-run-session
dbus-send
dbus-update-activation-environment
dbus-uuidgen


I might have done something else (can't remember)
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
andyprough
MX Packager
Posts: 918
Joined: Tue Jul 23, 2019 10:16 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#22 Post by andyprough »

Now, let's get rid of that silly default behavior where DWM opens every instance of firefox in the 9th out of 9 workspaces - basically hiding it from me 98% of the time.

To modify DWM, we are going to write changes to the config.h file and then do a 'make install' to rebuild DWM. I put my DWM source files in /usr/src/, so:

Code: Select all

cd /usr/src/dwm/
Need to back up the config.h file before I do anything:

Code: Select all

sudo cp config.h config.h.bak
Now open config.h in our editor of choice - mine is the excellent 'geany' which is the default text editor on antiX:

Code: Select all

sudo geany config.h
I'm going to look for a line that says

Code: Select all

{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
and I'm going to delete that line. In my config.h file, it's on line #31. That change by itself will stop the placement of firefox on the 9th workspace, and will allow firefox to start on any workplace that you happen to be working in.

While I'm in config.h, I'm going to make another change to make DWM run more to my liking.
I don't like using the left-Alt key as my primary key in the DWM key combos - I prefer using the Super (or "Windows") key. So I'm going to find the line that says

Code: Select all

#define MODKEY Mod1Mask
which is line #47 in my config.h file. I'm going to change it to read

Code: Select all

#define MODKEY Mod4Mask
. Mod4 refers to the Super key, so now all my key combos will start with Super. Calling up dmenu will be Super-p, calling up an st terminal will be Super-Shift-Enter, logging out of DWM will be Super-Shift-q, etc.

Now that we've made our changes, we've got to save the config.h file in our text editor and run our 'make install' command to rebuild DWM:

Code: Select all

sudo make install
This will take about 5 seconds to run. At the end, you can log out of whatever window manager you were working in, and go to the 'slim' login, hitting the F1 key about 14 times as it cycles through antiX's many window manager setups until it lands on DWM. Then login, and try starting firefox: Super-p to start dmenu, and then spell out a few letters of 'firefox' until 'firefox' is highlighted on the dmenu bar at the top of the screen, and hit Enter. Firefox should start up for you in your workspace.
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg

User avatar
andyprough
MX Packager
Posts: 918
Joined: Tue Jul 23, 2019 10:16 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#23 Post by andyprough »

So I found out another incredibly great thing about antiX today. I was using the live USB as usual, and I have my persistence set up nicely, and I can take it from computer to computer. And I thought, I wonder if I can take the USB stick out and just let it all run in memory so I don't have this stupid USB dongle hanging out the side of the laptop all the time and catching on things and worrying me that I'll break it as I move around the house. Well, of course that's no problem for antix. I selected the "toram" option at boot, and unmounted a UEFI partition once I was up and running, and antix's handy little "Unplug Removable Device" taskbar app told me that I was free to remove it. Very cool! And of course, running it all in ram is faster. This is a heckuva lot of fun exploring all the options.

I booted into a fresh DWM on a fresh live USB this evening and was only using 127mb of ram. Inching closer to my goal of 45mb.

I tried anticapitalista's trick of moving dbus binaries out of /usr/bin/, and I was able to boot back up and log in to DWM and run programs, which seemed remarkable to me. Got a few nagging error message popups, but nothing that stopped programs from working. However, I did lose networking, so I would need to figure that out if I were to try to go without dbus consistently in the future. It only saved me a couple mb's of ram, so from a minimal resources perspective it was basically worthless. But from a "dbus/systemd/pulseaudio is evil and is just RedHat/Canonical corporatists trying to take over the world" perspective, it was pretty cool to see how much stuff worked naturally without dbus.
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg

User avatar
mikeswifty
Posts: 26
Joined: Wed Jul 26, 2017 9:39 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#24 Post by mikeswifty »

I found a website that explains the relationship between config.def.h and config.h:

"By default if you compile dwm, that will generate a file called config.h, with the exact same content as config.def.h. If you then want to modify something, you have to edit the config.h file. This is not too sustainable as some patches (extra functionality that you can add to dwm) will modify the config.def.h file, so you would have to manually copy the changes to config.h."

The author goes on to suggest the following:

"The best solution is only modifying config.def.h and removing config.h after every new build (as it is generated automatically every time). To remove config.h automatically, you can modify the Makefile. Open the file and locate the following part:

Code: Select all

clean:
	rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
Add config.h to the end of the line after the rm command like this:

Code: Select all

clean:
	rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz config.h
So from now on you only have to deal with the config.def.h file and you can use the ‘sudo make clean install’ command to build dwm, as you normally would. (The config.h file still will be generated, but you don’t have to remove it anymore. Just leave it there and make your configurations in config.def.h)"

(Taken from: https://laszloszurok.github.io/blog/dwm-rice/)

User avatar
manyroads
Posts: 2657
Joined: Sat Jun 30, 2018 6:33 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#25 Post by manyroads »

This is probably getting close to a necro-post... but, has anyone (who uses slstatus perhaps @andyprough ) figured out a method to get the following conky command to work?

Code: Select all

"  ${exec dropbox status | sed -n 1p | tr -d "\"\`'" }", 
I'd like to get the update status of Dropbox in my slstatus 'bar'. :happy: :bagoverhead:
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

User avatar
manyroads
Posts: 2657
Joined: Sat Jun 30, 2018 6:33 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#26 Post by manyroads »

FWIW. I solved my problem. I have included the obligatory scrot plus the script I am running for my dwm status (no longer am I using slstatus). The bar is at the top... :lipsrsealed:

Image

Here is my script. The glyphs are from fontawesome and will magically appear if you install the fontawesome fonts. Enjoy.

Code: Select all

#!/usr/bin/env bash
while true; do

        date '+  %a. %b. %d %Y    %R ' > /tmp/CurTime.tmp

        sleep 60s
done &

while true; do

        LOCALTIME=$(< /tmp/CurTime.tmp)
        DB=$(dropbox status)
		VOL=$(pamixer --get-volume-human)
        MEM=$(free -h --kilo | awk '/^Mem:/ {print $3 "/" $2}')
        CPU=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}')
        DISK=$(df -Ph | grep "/dev/nvme0n1p2" | awk {'print $5'})
		WIFI=$(nmcli -f ACTIVE,SIGNAL dev wifi list | awk '$1=="yes" {print $2}')
        xsetroot -name "  $MEM   $CPU %   $DISK    $VOL   $WIFI %   $DB  $LOCALTIME   "
        sleep 10s
done &
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

drogon69
Posts: 38
Joined: Sat Jun 20, 2020 9:36 am

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#27 Post by drogon69 »

nice but are the software centers floating or mxsnaptshot and some other stuff inside mxtools and ect in your dwm , if not not usefull at all.
i dont think it wil work under a stand alone dwm distro mxlinux just like i3 , however i can be wrong , but i wil check this out. :cool:

you say respin dwm or i3 mmm i like to see that a perfect one out there for mxlinux but i tell you not possible.
and why is this some things need floating but wil not even open perfect how can you talk about respin i3 and dwm , , show me a picture of floating snapshot , sysnaptic , or mxtool installer for software , , dont work , so not usefull anymore.
and you can do what you want inside your config , some things iside the normal codee of i3 config and mxlinux programma wont float or run perfect , that is the true :cool:

for the topic starter , why you dont make a snapshot of your dmw , i know why , some things inside a dwm or i3 wil not work or wont floating or run iside dwm or i3 , and some of this programma's are usefull , and you cant use it anymore ,
so the only option is deleted them all and install your sotware the ald way true terminal . and there are alot of programma or appz dont wont run or floating so it is not usefull to try make respin of mxlinux i3 or dwm or whatever out there
even a standalone dwm and i3 wil be very tricky , because it wont run or open even not work in floating , have you seen in his topic a floating snapshot tool or synaptic no you have dont you.

mxlinux is not archlinux

drogon69
Posts: 38
Joined: Sat Jun 20, 2020 9:36 am

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#28 Post by drogon69 »

manyroads wrote: Fri Nov 20, 2020 1:10 pm FWIW: here are acouple of screenshots of my dwm Desktop

Image Image
and show me know a screenshot of floating mxsnapshot , synaptic , and the repomanager and software manager inside you dwm , how many money wil you set in that it wont work at all :number1:
thry to run it wont work try to floating wont work so what is the use of this topic than !!

User avatar
manyroads
Posts: 2657
Joined: Sat Jun 30, 2018 6:33 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#29 Post by manyroads »

drogon69 wrote: Tue Oct 05, 2021 3:22 am
manyroads wrote: Fri Nov 20, 2020 1:10 pm FWIW: here are acouple of screenshots of my dwm Desktop

Image Image
and show me know a screenshot of floating mxsnapshot , synaptic , and the repomanager and software manager inside you dwm , how many money wil you set in that it wont work at all :number1:
thry to run it wont work try to floating wont work so what is the use of this topic than !!
I'm not certain I understand what you are trying to say... but I can tell you all of the MX goodies work just fine. If you'd like to understand how-to build such environments, I publish tutorials on multiple sites including mine (here's a bunch on dwm). FWIW I build on MX, debian, antiX, devuan, arch, archlabs, manjaro and eos. None have any problem: https://eirenicon.org/?s=dwm
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

drogon69
Posts: 38
Joined: Sat Jun 20, 2020 9:36 am

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#30 Post by drogon69 »

manyroads wrote: Tue Oct 05, 2021 9:26 am
drogon69 wrote: Tue Oct 05, 2021 3:22 am
manyroads wrote: Fri Nov 20, 2020 1:10 pm FWIW: here are acouple of screenshots of my dwm Desktop

Image Image
and show me know a screenshot of floating mxsnapshot , synaptic , and the repomanager and software manager inside you dwm , how many money wil you set in that it wont work at all :number1:
thry to run it wont work try to floating wont work so what is the use of this topic than !!
I'm not certain I understand what you are trying to say... but I can tell you all of the MX goodies work just fine. If you'd like to understand how-to build such environments, I publish tutorials on multiple sites including mine (here's a bunch on dwm). FWIW I build on MX, debian, antiX, devuan, arch, archlabs, manjaro and eos. None have any problem: https://eirenicon.org/?s=dwm
i have ask you to give me some proof that synaptic open normaly in i3 or floating window , or repomanager , or some other things outside the mxtool box , but you wil not post that proof because it dont work at all.
i work under arch linux more than 10years with tilling windows managers and not one problem , if you say that mxlinux i3 works 100% than make a snaphot picture of your desktop that mxsnapshot tool floating or open normally , or sysnaptic or repomanager that is what i have ask

Post Reply

Return to “MX Modified”