A beginners guide to setting up bspwm and much more specifically for MXlinux.

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
Vipul88
Posts: 142
Joined: Wed Mar 18, 2020 9:04 am

A beginners guide to setting up bspwm and much more specifically for MXlinux.

#1 Post by Vipul88 »

How i get a fresh install ready
as asked by @andyprough in the mx 19 screenshot section of the forums.
whenever i do a fresh install of mx. after the fresh install i do a certain checks.
1. Change repo to any of the US based ones from MX repo manager, because i live in India and by default the mirrors are selected to be indian however they are generally not up to date and my isp doesnt connect to some of their IPs. The US based mirrors are fast, up-to-date, never have any problem of some ip being rejected and need to setup just once.
2. Then i run this command just to be sure everything is upgraded.

Code: Select all

sudo apt update && sudo apt upgrade -y
3. After a succesfull upgrade the next thing i do is remove the stuff i dont want,
NOTE: This is not mandatory and you should test it out before running this on your primary mx install.

Code: Select all

sudo aptitude remove vim-tiny vim-common asunder bluetooth clementine gimp gimp-data gimp-python libgimp2.0 simple-scan gscan2pdf hexchat lbreakout2 gnome-mahjongg mc mc-data nomacs nomacs-l10n thunderbird transmission-gtk transmission-common xfburn papirus-icon-theme
and later on i remove thunderbird, fluxbox, firefox then replace them with bspwm and ungoogled-chromium(that i have packaged as a binary https://mpr.hunterwittenborn.com/packag ... -linchrome)
4. The next thing to do is install the fonts required for various applications were gonna use later on. polybar and starship prompt for example will not work without these fonts.

Code: Select all

sudo aptitude install fonts-noto-color-emoji fonts-symbola node-emojis-list ttf-ancient-fonts-symbola fonts-fork-awesome fonts-powerline fonts-roboto fonts-roboto-fontface fonts-ubuntu ttf-ubuntu-font-family fonts-font-awesome fonts-fork-awesome fonts-material-design-icons-iconfont
NOTE: the package

Code: Select all

fonts-material-design-icons-iconfont
is not in buster but only in bullseye.
5. The fonts are still not setup we will need some extra fonts as well heres a complete list of the fonts i use other than the above one's
  • joypixels
  • material-design fonts
6. After the fonts are being dealt with i install all the packages that would be needed later,

Code: Select all

sudo aptitude install vim cmake  bspwm sxhkd lxappearance polybar fzf evince w3m w3m-img youtube-dl lolcat arandr nitrogen sxiv mpv x11-utils mpd mpc ncmpcpp pylint dmenu netcat jq ffmpeg caca-utils chafa libsixel1 flameshot libsixel-bin  uget rofi rofi-calc network-manager git curl wget tree libreadline-dev xattr zathura zathura-cb zathura-djvu zathura-pdf-poppler zathura-ps python3-setuptools python3-dev python3-pip atool rar moc mediainfo exiftool odt2txt rtorrent python3-wheel python3-docopt rxvt-unicode-256color tmux python3-ueberzug
NOTE: if you are using buster then from this list replace the following from the mxtest-repo alternatives of them,

Code: Select all

polybar
and

Code: Select all

tmux
from the backports as the tmux from standard repo is not usable in any ways whatsoever. and the test repo polybar has the xresources plugin enabled and i use that in my polybar config if the standard polybar is used then my config would make the polybar look fully blank instead of populated with the desired modules. not needed if youre on bullseye

7. now here is my ~/.config/bspwmrc https://gitlab.com/only_vip/mxtest-dope ... wm/bspwmrc
sxhkdrc ~/.config/sxhkd/sxhkdrc https://gitlab.com/only_vip/mxtest-dope ... kd/sxhkdrc
here are my complete dotfiles https://gitlab.com/only_vip/mxtest-dope-dots. git clone it then copy all the contents to home directory is what i do. excluding the .git folder and readme and other unnecssary files.


8. After this setup is done the next thing i do is install a bunch of custom apps. now i have started mainaining them all as individual packages over at MPR so installing them all and managing them would be a lot easier for anyone who wants to try them out. heres a link to all of them, SideNote: compton or picom any one is needed as both will conflict each other. i use jonaburgs fork as it has blur, rounded corners and animations. the latest fzf is needed for ytfzf to show the images as thumbnails while using it as

Code: Select all

ytfzf -t <search query>
SideNote: fzf needs a dependency from mpr i.e https://mpr.hunterwittenborn.com/packag ... ction-git/ so get rl-custom-function-git before installing fzf only the git version of neofetch has support for ueberzug as backend to display images. nnn is one of the best tui file managers that i have come across. if you wanna know about its potential, do look at this page https://github.com/jarun/nnn/tree/maste ... tallation
SideNote: i use the preview-tui plugin in nnn to get file previews in tmux. it can also be used in kitty to get file previews right in the terminal 9. Later i remove the default libreoffice and and get the backports version of libreoffice from MX pi under the popular tabs.
10. some other apps that are not on the mpr but i use and are not in the standard repos of mx as well. 11. The next thing i install is pywal. it helps automate the theming process. i.e. my theme changes and is based on the wallpaper. i have a cronjob scheduled at every half an hour so it runs, picks a random wallpaper from desired directory and sets it up using pywal. remember i mentioned that we need to get polybar from mx test repo as it is configured to use xresources? this is the reason. my polybar colorscheme changes along with the change in wallpaper. rxvt also fetches colors from xresources file so the colorscheme of wallpaper, polybar and urxvt is coherent and based on the changed wallpaper.

Code: Select all

pip3 install pywal colorz
Sidenote: i use a custom colorz backend file so that it give 16 different color pallete instead of the default 8 color set repeated twice. heres a link to it, replace it with the colorz backend file located in ~/.local/lib/python/pywal/backends/colorz.py https://gitlab.com/only_vip/mxtest-dope ... /colorz.py
12. Here's the crontab entry to run pywal every half an hour

Code: Select all

*/30 * * * * DISPLAY=:0 ~/.local/bin/wal -a "50" --backend colorz -i $(find ~/wals/* | shuf | head -n 1)
edit crontab file by running

Code: Select all

crontab -e
choose your favourite text editor and add the above code, below the last line in the crontab -e file.
13. In order to get weather in the polybar as module i use ntfd(https://github.com/kamek-pf/ntfd)
14. some miscellaneous commands that are needed to be run after all these setup,
  • Code: Select all

    ln -s -f ~/.tmux/.tmux.conf ~/.tmux.conf
for themeing tmux i use https://github.com/gpakosz/.tmux

15. Regarding the post i made in mx screenshot section in here viewtopic.php?p=648834#p648834

  • On the bottom image, top left is bottom, below it is cava, below that is thunar, top right is neofetch,below that is tmux with nnn+ preview-tui plugin, below that is ncmpcpp with ueberzug to show embedded album art in ncmpcpp heres the dotfile for that : https://gitlab.com/only_vip/mxtest-dope ... ug-working copy these contents to

    Code: Select all

    ~/.config/ncmpcpp/
    then run ncmpcpp as

    Code: Select all

    ~/.config/ncmpcpp/ncmpcpp-ueberzug/ncmpcpp-ueberzug
    to get the exact effect.
  • I used to use termite and used to compile it from source in mx but have stopped using termite as its deprecated now and use urxvt instead.
  • most of you might not like urxvt as it is ugly out of the box. i have made a sane default changes in urxvt that makes it usable, as you can see all the terminal open in my forum post above are urxvt. urxvt should be used in deamon client mode to get the efficient resource usage. i.e run urxvtd in your startup script and then instead of executing urxvt to start urxvt use urxvtc this drastically reduces the resource usage of urxvt if used in multiple instances of urxvt. just an example, in real life i tried opening 100 instances of urxvtc and the total ram usage it consumed was under 300 megs. the config directories pertaining to urxvt are as follows:
16. ungoogled chromium does not have a extension working by default so i enable it from chrome://flags and then use this extension https://github.com/NeverDecaf/chromium-web-store

EndNote: feel free to ask any questions that youre confused with. i might have missed something which may be unclear ask that if thats the case.

credits: manyroads, eftech linux on youtube, dolphin oracle, jerry3904, siduck76,distrotube, luke smith.
Last edited by Vipul88 on Fri Sep 17, 2021 12:18 am, edited 7 times in total.

User avatar
junoluna
Posts: 522
Joined: Sun Sep 29, 2019 11:53 pm

Re: A beginners guide to setting up bspwm and much more specifically for MXlinux.

#2 Post by junoluna »

wow

much appreciated


wonderful post

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

Re: A beginners guide to setting up bspwm and much more specifically for MXlinux.

#3 Post by andyprough »

@Vipul88 - thanks very much, this is a very thorough writeup. I hope to give bspwm a try soon, but mostly I'm seeing a lot of stuff you do with bspwm that I can transfer over to my DWM and herbstluftwm setups. This is super helpful.
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
Vipul88
Posts: 142
Joined: Wed Mar 18, 2020 9:04 am

Re: A beginners guide to setting up bspwm and much more specifically for MXlinux.

#4 Post by Vipul88 »

andyprough wrote: Fri Aug 27, 2021 4:11 am @Vipul88 - thanks very much, this is a very thorough writeup. I hope to give bspwm a try soon, but mostly I'm seeing a lot of stuff you do with bspwm that I can transfer over to my DWM and herbstluftwm setups. This is super helpful.
Thanks. Yes I haven't talked much about my dotfiles. But yeah it can be used in dwm or herb as well.
For dwm check this out. It's a dwm build with saner patches added and to use it properly, check the comments section for how to edit it. I have made it available in mpr so that installing and removing it becomes easier.
For user specific changes,
You run a make install after making changes once again on a git cloned chadwm after changing the config.def.h file that would not affect the mpr install. I have given a way to do that on the mpr comments section if anyone wants to walk that path
https://mpr.hunterwittenborn.com/packages/chadwm-git/
https://github.com/siduck76/chadwm

Post Reply

Return to “Tips & Tricks by users”