2bwm on installer

It would be great to have 2bwm available in community editions for systems lower on resources since calamares now can install Endeavouros on computers with RAM less than two GB.
I have this mini laptop with following specs
CPU: Intel Celeron N2840 @ 2x 2.5823GHz
GPU: Mesa DRI Intel(R) HD Graphics (BYT)
RAM: 1631MiB / 1873MiB

2bwm is a great option for such low specs systems.

Thanks

Well, you can just do a basic install without insalling any DE or WM. Then install 2bwm from the AUR using yay.

3 Likes

Community editions are created and maintained by the broader community. A member of the community would need to be interested in it enough to create, test and maintain it. Additionally, if 2bwm isn’t available in the repos, members of the team would have to maintain that package.

To start, you could install EndeavourOS without selecting a DE and then install and configure it yourself.

3 Likes

Agreed upon both the posts , installing base , then compiling 2bwm with desired changes during compiling/installing from source in config.h file , creating an autostart file , a bar e.g polybar are basic steps of getting a working 2bwm , I have an installation following these steps already on my this mini laptop . I was just hoping that if EndeavourOS community gives 2bwm a consideration for low end systems and make it available with EndeavourOS configuration it will be a great addition to the existing work done by the team .

2 Likes

do you have a config for it?
just tried and seems it needs some to be usable at all.
But i do not find any wiki tuto on starting it… also i can start it with ly – lightdm p.e. does not show it…

1 Like

Yes I will share the files I used , I tried uploading configuration/settings I used to Github but I am not that versed with Github so I badly failed . I will post the different files I used here in links

config.h file for 2bwm

///---User configurable stuff---///
///---Modifiers---///
#define MOD             XCB_MOD_MASK_4       /* Super/Windows key  or check xmodmap(1) with -pm*/
///--Speed---///
/* Move this many pixels when moving or resizing with keyboard unless the window has hints saying otherwise.
 *0)move step slow   1)move step fast
 *2)mouse slow       3)mouse fast     */
static const uint16_t movements[] = {20,40,15,400};
/* resize by line like in mcwm -- jmbi */
static const bool     resize_by_line          = true;
/* the ratio used when resizing and keeping the aspect */
static const float    resize_keep_aspect_ratio= 1.03;
///---Offsets---///
/*0)offsetx          1)offsety
 *2)maxwidth         3)maxheight */
static const uint8_t offsets[] = {0,0,0,0};
///---Colors---///
/*0)focuscol         1)unfocuscol
 *2)fixedcol         3)unkilcol
 *4)fixedunkilcol    5)outerbordercol
 *6)emptycol         */
static const char *colors[] = {"#c1cada","#192330","#5f819d","#a54242","#85678f","#080B0F","#080B0F"};
/* if this is set to true the inner border and outer borders colors will be swapped */
static const bool inverted_colors = false;
///---Cursor---///
/* default position of the cursor:
 * correct values are:
 * TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, MIDDLE
 * All these are relative to the current window. */
#define CURSOR_POSITION MIDDLE
///---Borders---///
/*0) Outer border size. If you put this negative it will be a square.
 *1) Full borderwidth    2) Magnet border size
 *3) Resize border size  */
static const uint8_t borders[] = {3,6,6,6};
/* Windows that won't have a border.*/
#define LOOK_INTO "WM_NAME"
static const char *ignore_names[] = {"bar", "xclock"};
///--Menus and Programs---///
static const char *menucmd[]   = { "/usr/bin/rofi", "-show", "run", NULL };
static const char *gmrun[]     = { "/usr/bin/gmrun",NULL};
static const char *terminal[]  = { "terminator", NULL };
static const char *click1[]    = { "xdotool","click", "1", NULL };
static const char *click2[]    = { "xdotool","click", "2", NULL };
static const char *click3[]    = { "xdotool","click", "3", NULL };
///--Custom foo---///
static void halfandcentered(const Arg *arg)
{
	Arg arg2 = {.i=2};
	maxhalf(&arg2);
	Arg arg3 = {.i=0};
	teleport(&arg3);
}
///---Shortcuts---///
/* Check /usr/include/X11/keysymdef.h for the list of all keys
 * 0x000000 is for no modkey
 * For AZERTY keyboards XK_1...0 should be replaced by :
 *      DESKTOPCHANGE(     XK_ampersand,                     0)
 *      DESKTOPCHANGE(     XK_eacute,                        1)
 *      DESKTOPCHANGE(     XK_quotedbl,                      2)
 *      DESKTOPCHANGE(     XK_apostrophe,                    3)
 *      DESKTOPCHANGE(     XK_parenleft,                     4)
 *      DESKTOPCHANGE(     XK_minus,                         5)
 *      DESKTOPCHANGE(     XK_egrave,                        6)
 *      DESKTOPCHANGE(     XK_underscore,                    7)
 *      DESKTOPCHANGE(     XK_ccedilla,                      8)
 *      DESKTOPCHANGE(     XK_agrave,                        9)*
 */
#define DESKTOPCHANGE(K,N) \
{  MOD ,             K,              changeworkspace, {.i=N}}, \
{  MOD |SHIFT,       K,              sendtoworkspace, {.i=N}},
static key keys[] = {
    /* modifier           key            function           argument */
    // Focus to next/previous window
    {  MOD ,              XK_Tab,        focusnext,         {.i=0}},
    {  MOD |SHIFT,        XK_Tab,        focusnext,         {.i=1}},
    // Kill a window
    {  MOD ,              XK_q,          deletewin,         {.i=0}},
    // Resize a window
    {  MOD |SHIFT,        XK_k,          resizestep,        {.i=2}},
    {  MOD |SHIFT,        XK_j,          resizestep,        {.i=1}},
    {  MOD |SHIFT,        XK_l,          resizestep,        {.i=3}},
    {  MOD |SHIFT,        XK_h,          resizestep,        {.i=0}},
    // Resize a window slower
    {  MOD |SHIFT|CONTROL,XK_k,          resizestep,        {.i=6}},
    {  MOD |SHIFT|CONTROL,XK_j,          resizestep,        {.i=5}},
    {  MOD |SHIFT|CONTROL,XK_l,          resizestep,        {.i=7}},
    {  MOD |SHIFT|CONTROL,XK_h,          resizestep,        {.i=4}},
    // Move a window
    {  MOD ,              XK_k,          movestep,          {.i=2}},
    {  MOD ,              XK_j,          movestep,          {.i=1}},
    {  MOD ,              XK_l,          movestep,          {.i=3}},
    {  MOD ,              XK_h,          movestep,          {.i=0}},
    // Move a window slower
    {  MOD |CONTROL,      XK_k,          movestep,          {.i=6}},
    {  MOD |CONTROL,      XK_j,          movestep,          {.i=5}},
    {  MOD |CONTROL,      XK_l,          movestep,          {.i=7}},
    {  MOD |CONTROL,      XK_h,          movestep,          {.i=4}},
    // Teleport the window to an area of the screen.
    // Center:
    {  MOD ,              XK_g,          teleport,          {.i=0}},
    // Center y:
    {  MOD |SHIFT,        XK_g,          teleport,          {.i=3}},
    // Center x:
    {  MOD |CONTROL,      XK_g,          teleport,          {.i=-3}},
    // Top left:
    {  MOD ,              XK_y,          teleport,          {.i=2}},
    // Top right:
    {  MOD ,              XK_u,          teleport,          {.i=-2}},
    // Bottom left:
    {  MOD ,              XK_b,          teleport,          {.i=1}},
    // Bottom right:
    {  MOD ,              XK_n,          teleport,          {.i=-1}},
    // Resize while keeping the window aspect
    {  MOD ,              XK_Home,       resizestep_aspect, {.i=0}},
    {  MOD ,              XK_End,        resizestep_aspect, {.i=1}},
    // Full screen window without borders
    {  MOD ,              XK_x,         maximize,          {.i=0}},
    //Full screen window without borders overiding offsets
    {  MOD |SHIFT ,       XK_x,          maximize,          {.i=1}},
    // Maximize vertically
    {  MOD ,              XK_m,          maxvert_hor,       {.i=1}},
    // Maximize horizontally
    {  MOD |SHIFT,        XK_m,          maxvert_hor,       {.i=0}},
    // Maximize and move
    // vertically left
    {  MOD |SHIFT,        XK_y,          maxhalf,           {.i=2}},
    // vertically right
    {  MOD |SHIFT,        XK_u,          maxhalf,           {.i=1}},
    // horizontally left
    {  MOD |SHIFT,        XK_b,          maxhalf,           {.i=-1}},
    // horizontally right
    {  MOD |SHIFT,        XK_n,          maxhalf,           {.i=-2}},
    //fold half vertically
    {  MOD |SHIFT|CONTROL,XK_y,          maxhalf,           {.i=4}},
    //fold half horizontally
    {  MOD |SHIFT|CONTROL,XK_b,          maxhalf,           {.i=-4}},
    //unfold vertically
    {  MOD |SHIFT|CONTROL,XK_u,          maxhalf,           {.i=3}},
    //unfold horizontally
    {  MOD |SHIFT|CONTROL,XK_n,          maxhalf,           {.i=-3}},
    // Next/Previous screen
    {  MOD ,              XK_comma,      changescreen,      {.i=0}},
    {  MOD ,              XK_period,     changescreen,      {.i=1}},
    // Raise or lower a window
    {  MOD ,              XK_r,          raiseorlower,      {.i=0}},
    // Next/Previous workspace
    {  MOD ,              XK_v,          nextworkspace,     {.i=0}},
    {  MOD ,              XK_c,          prevworkspace,     {.i=0}},
    // Move to Next/Previous workspace
    {  MOD |SHIFT ,       XK_v,          sendtonextworkspace,{.i=0}},
    {  MOD |SHIFT ,       XK_c,          sendtoprevworkspace,{.i=0}},
    // Iconify the window
    {  MOD ,              XK_i,          hide,              {.i=0}},
    // Make the window unkillable
    {  MOD ,              XK_a,          unkillable,        {.i=0}},
    // Make the window appear always on top
    {  MOD,               XK_t,          always_on_top,     {.i=0}},
    // Make the window stay on all workspaces
    {  MOD ,              XK_f,          fix,               {.i=0}},
    // Move the cursor
    {  MOD ,              XK_Up,         cursor_move,       {.i=4}},
    {  MOD ,              XK_Down,       cursor_move,       {.i=5}},
    {  MOD ,              XK_Right,      cursor_move,       {.i=6}},
    {  MOD ,              XK_Left,       cursor_move,       {.i=7}},
    // Move the cursor faster
    {  MOD |SHIFT,        XK_Up,         cursor_move,       {.i=0}},
    {  MOD |SHIFT,        XK_Down,       cursor_move,       {.i=1}},
    {  MOD |SHIFT,        XK_Right,      cursor_move,       {.i=2}},
    {  MOD |SHIFT,        XK_Left,       cursor_move,       {.i=3}},
    // Start programs
    {  MOD ,              XK_Return,     start,             {.com = terminal}},
    {  MOD ,              XK_w,          start,             {.com = menucmd}},
    // Exit or restart 2bwm
    {  MOD |CONTROL,      XK_q,          twobwm_exit,         {.i=0}},
    {  MOD |CONTROL,      XK_r,          twobwm_restart,      {.i=0}},
    {  MOD ,              XK_space,      halfandcentered,    {.i=0}},
    // Fake clicks using xdotool
    {  MOD |CONTROL,      XK_Up,         start,             {.com = click1}},
    {  MOD |CONTROL,      XK_Down,       start,             {.com = click2}},
    {  MOD |CONTROL,      XK_Right,      start,             {.com = click3}},
    // Change current workspace
       DESKTOPCHANGE(     XK_1,                             0)
       DESKTOPCHANGE(     XK_2,                             1)
       DESKTOPCHANGE(     XK_3,                             2)
       DESKTOPCHANGE(     XK_4,                             3)
       DESKTOPCHANGE(     XK_5,                             4)
       DESKTOPCHANGE(     XK_6,                             5)
       DESKTOPCHANGE(     XK_7,                             6)
       DESKTOPCHANGE(     XK_8,                             7)
       DESKTOPCHANGE(     XK_9,                             8)
       DESKTOPCHANGE(     XK_0,                             9)
};
static Button buttons[] = {
    {  MOD        ,XCB_BUTTON_INDEX_1,     mousemotion,   {.i=TWOBWM_MOVE}},
    {  MOD        ,XCB_BUTTON_INDEX_3,     mousemotion,   {.i=TWOBWM_RESIZE}},
    {  MOD|CONTROL,XCB_BUTTON_INDEX_3,     start,         {.com = menucmd}},
    {  MOD|SHIFT,  XCB_BUTTON_INDEX_1,     changeworkspace, {.i=0}},
    {  MOD|SHIFT,  XCB_BUTTON_INDEX_3,     changeworkspace, {.i=1}},
    {  MOD|ALT,    XCB_BUTTON_INDEX_1,     changescreen,    {.i=1}},
    {  MOD|ALT,    XCB_BUTTON_INDEX_3,     changescreen,    {.i=0}}
};

".xprofile:

#!/bin/sh
# ~/.xprofile that with Arch Linux / startx

# Sourced at boot by ~/.xinitrc and most display managers
# Most DMs do source ~/.xprofile before calling xinit

export TERMINAL=terminator
export BROWSER=firefox

polybar mybar &
picom -b &
nm-applet &
volumeicon &
nitrogen --restore &
xfce4-power-manager &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
feh --bg-fill /home/saleem/backgrounds/keep-it-simple.jpg &
#xrandr --dpi 192 &
#redshift-gtk &
xbacklight -set 50 &


# vim:ft=sh:

" /usr/share/xsessions/2bWM.desktop"

[Desktop Entry]
Encoding=UTF-8
Name=2bWM
Comment=Binary space partitioning window manager
Exec=2bwm
Type=Application

“polybar config”

[colors]
background = ${xrdb:background}
background-alt = ${xrdb:background}
foreground = ${xrdb:foreground}
color1 = ${xrdb:color1}
color2 = ${xrdb:color2} 
color3 = ${xrdb:color3}
color4 = ${xrdb:color4}
color5 = ${xrdb:color5}
color6 = ${xrdb:color6}
color7 = ${xrdb:color7}
color8 = ${xrdb:color8}

[bar/mybar]
override-redirect = true
bottom = false
;background = ${colors.background}
background = transparent
foreground = ${colors.foreground}
fixed-center = true
width = 95%
height = 30
radius = 0.0
line-size = 2
line-color = #f00
offset-y = 10 
offset-x = 2%
wm-restack = 2bwm

font-0 = SFMono Nerd Font:style=Regular:pixelsize=9.6:antialias=true;1
font-1 = SFMono Nerd Font:style=Regular:pixelsize=9.6:antialias=true;0

modules-right = alsa date power
modules-center = 
modules-left = 2bws ewmh polywins
tray-position = none
tray-maxsize = 15
tray-background = ${colors.background}
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 0
module-margin = 0


[module/bspwm]
type = internal/bspwm
format = <label-state> <label-mode>

label-empty-foreground = ${colors.color8}
label-focused-background = ${colors.background-alt} 
label-focused = %name%
label-focused-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-empty = %name%
label-empty-padding = 1

label-monocle = M
label-tiled = T
label-floating = F
label-pseudotiled = P

[module/ewmh]
type = internal/xworkspaces
format = <label-state>

pin-workspaces = true
enable-click = true
enable-scroll = true
label-empty-foreground = ${colors.foreground}
label-focused-foreground = ${colors.foreground} 
label-active-foreground = ${colors.color5}
label-focused = %name%
label-focused-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-empty = %name%
label-empty-padding = 1
label-active = %name%
label-active-padding = 1
label-urgnet = %name%
label-urgent-padding = 1

[settings]
label-focused-undexrline= ${colors.background}
throttle-output = 5
throttle-output-for = 10
throttle-input-for = 30
screenchange-reload = true
pseudo-transparency = true

[module/date]
type = internal/date
time = %I:%M%P
format = "  <label>"
format-background = ${colors.color1}
format-foreground = ${colors.background} 
format-padding = 2
label = %time%
label-foreground = ${colors.foreground} 
click-left = orage
label-background = ${colors.background}
label-padding = 2

[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98

format-charging = BAT <label-charging>
format-discharging = BAT <label-discharging>
format-full = BAT <label-full>
label-charging = %percentage%%
label-discharging = %percentage%%

label-charging-foreground = ${colors.foreground}
label-discharging-foreground = ${colors.foreground}
label-full-foreground = ${colors.foreground}

format-charging-foreground = ${colors.color2}
format-discharging-foreground = ${colors.color2}
format-full-foreground = ${colors.color2}

format-charging-padding = 1
format-discharging-padding = 1
format-full-padding = 1

[module/network]
type = internal/network
interface = wlp3s0
interval = 3.0
unknown-as-up = true
accumulate-stats = true

format-connected = WIFI <label-connected>
label-connected = %essid%
format-connected-padding = 1
format-connected-foreground = ${colors.color4}
label-connected-foreground = ${colors.foreground}

[module/alsa]
type = internal/alsa

format-volume = "  <label-volume>"
label-muted = muted
label-muted-padding = 2
label-volume-padding = 2
label-volume-foreground = ${colors.foreground}
label-volume-background = ${colors.background}
format-volume-foreground = ${colors.background}
format-volume-background = ${colors.color5}
format-volume-padding = 2

[module/cpu]
type = internal/cpu

format = CPU <label>
format-foreground = ${colors.color3}
format-padding = 2
label = %percentage%%
label-foreground = ${colors.foreground}

[module/power]
type = custom/menu
expand-right = true
label-padding = 0
format-spacing = 0

label-open = "  EXIT  "
label-open-background = ${colors.foreground}
label-open-foreground = ${colors.color3}
label-close = " Cancel "
label-close-foreground = ${colors.foreground}
label-close-background = ${colors.color2}
label-separator = 
label-separator-foreground = ${colors.foreground}
format-background = ${colors.color3}

menu-0-0 = " Reboot "
menu-0-0-exec = menu-open-1
menu-0-0-background = ${colors.color3}
menu-0-1 = " Power Off "
menu-0-1-background = ${colors.color5}
menu-0-1-exec = menu-open-2

menu-1-0 = " cancel "
menu-1-0-exec = menu-open-0
menu-1-1 = " reboot "
menu-1-1-exec = sudo reboot

menu-2-0 = " Power Off "
menu-2-0-exec = sudo poweroff
menu-2-0-background = ${colors.color2}
menu-2-1 = " cancel "
menu-2-1-exec = menu-open-0

[module/brillo]
type = custom/script
format-padding = 2
label-padding = 2
format = "  <label>"
exec = echo ""$(brillo)"%"
interval = 0.1
format-foreground = ${colors.background}
format-background = ${colors.color8}
label-foreground = ${colors.color8}
label-background = ${colors.background}

[module/polywins]
type = custom/script
exec = ~/.config/polybar/scripts/polywins.sh 2>/dev/null
format = <label>
label = %output%
label-padding = 1
tail = true

[module/2bws]
type              = custom/script
exec              = bash ~/.config/polybar/scripts/2bwm.sh
interval          = 0.01
format-padding    = 3
format-background = ${colors.background}
scroll-up         = exec ~/.config/polybar/scripts/wscycle.sh -f
scroll-down       = exec ~/.config/polybar/scripts/wscycle.sh -r

" polybar scripts"

“2bwm.sh”

#!/bin/sh
ACTUAL=$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
case $ACTUAL in
	0)
	echo "■ □ □ □ □ □"
	;;
        1)
        echo "□ ■ □ □ □ □"
 	;;
        2)
        echo "□ □ ■ □ □ □"
        ;;
        3)
        echo "□ □ □ ■ □ □"
        ;;
        4)
	echo "□ □ □ □ ■ □"
	;;
	5)
	echo "□ □ □ □ □ ■"
	;;
esac

" polywins.sh"

#!/bin/sh
# POLYWINS

. "${HOME}/.cache/wal/colors.sh"

# SETTINGS {{{ ---

active_text_color="$background"
active_bg="$color7"
active_underline=

inactive_text_color="$color7"
inactive_bg="$background"
inactive_underline=

separator=" "
show="window_class" # options: window_title, window_class, window_classname
forbidden_classes="Polybar Conky Gmrun"
empty_desktop_message="Desktop jeje"

char_limit=20
max_windows=15
char_case="normal" # normal, upper, lower
add_spaces="true"
resize_increment=16
wm_border_width=1 # setting this might be required for accurate resize position

# --- }}}


main() {
	# If no argument passed...
	if [ -z "$2" ]; then
		# ...print new window list every time
		# the active window changes or
		# a window is opened or closed
		xprop -root -spy _NET_CLIENT_LIST _NET_ACTIVE_WINDOW |
			while IFS= read -r _; do
				generate_window_list
			done

	# If arguments are passed, run requested on-click function
	else
		"$@"
	fi
}



# ON-CLICK FUNCTIONS {{{ ---

raise_or_minimize() {
	if [ "$(get_active_wid)" = "$1" ]; then
		wmctrl -ir "$1" -b toggle,hidden
	else
		wmctrl -ia "$1"
	fi
}

close() {
	wmctrl -ic "$1"
}

slop_resize() {
	wmctrl -ia "$1"
	wmctrl -ir "$1" -e "$(slop -f 0,%x,%y,%w,%h)"
}

increment_size() {
	while IFS="[ .]" read -r wid ws wx wy ww wh _; do
		test "$wid" != "$1" && continue
		x=$(( wx - wm_border_width * 2 - resize_increment / 2 ))
		y=$(( wy - wm_border_width * 2 - resize_increment / 2 ))
		w=$(( ww + resize_increment ))
		h=$(( wh + resize_increment ))
	done <<-EOF
	$(wmctrl -lG)
	EOF

	wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
}

decrement_size() {
	while IFS="[ .]" read -r wid ws wx wy ww wh _; do
		test "$wid" != "$1" && continue
		x=$(( wx - wm_border_width * 2 + resize_increment / 2 ))
		y=$(( wy - wm_border_width * 2 + resize_increment / 2 ))
		w=$(( ww - resize_increment ))
		h=$(( wh - resize_increment ))
	done <<-EOF
	$(wmctrl -lG)
	EOF

	wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
}

# --- }}}



# WINDOW LIST SETUP {{{ ---

active_left="%{F$active_text_color}"
active_right="%{F-}"
inactive_left="%{F$inactive_text_color}"
inactive_right="%{F-}"
separator="%{F$inactive_text_color}$separator%{F-}"

if [ -n "$active_underline" ]; then
	active_left="${active_left}%{+u}%{u$active_underline}"
	active_right="%{-u}${active_right}"
fi

if [ -n "$active_bg" ]; then
	active_left="${active_left}%{B$active_bg}"
	active_right="%{B-}${active_right}"
fi

if [ -n "$inactive_underline" ]; then
	inactive_left="${inactive_left}%{+u}%{u$inactive_underline}"
	inactive_right="%{-u}${inactive_right}"
fi

if [ -n "$inactive_bg" ]; then
	inactive_left="${inactive_left}%{B$inactive_bg}"
	inactive_right="%{B-}${inactive_right}"
fi

get_active_wid() {
	active_wid=$(xprop -root _NET_ACTIVE_WINDOW)
	active_wid="${active_wid#*\# }"
	active_wid="${active_wid%,*}" # Necessary for XFCE
	while [ ${#active_wid} -lt 10 ]; do
		active_wid="0x0${active_wid#*x}"
	done
	echo "$active_wid"
}

get_active_workspace() {
	wmctrl -d |
		while IFS="[ .]" read -r number active_status _; do
			test "$active_status" = "*" && echo "$number" && break
		done
}

generate_window_list() {
	active_workspace=$(get_active_workspace)
	active_wid=$(get_active_wid)
	window_count=0
	on_click="$0"

	# Format each window name one by one
	# Space and . are both used as IFS,
	# because classname and class are separated by '.'
	while IFS="[ .\.]" read -r wid ws cname cls host title; do
		# Don't show the window if on another workspace (-1 = sticky)
		if [ "$ws" != "$active_workspace" ] && [ "$ws" != "-1" ]; then
			continue
		fi

		# Don't show the window if its class is forbidden
		case "$forbidden_classes" in
			*$cls*) continue ;;
		esac

		# If max number of windows reached, just increment
		# the windows counter
		if [ "$window_count" -ge "$max_windows" ]; then
			window_count=$(( window_count + 1 ))
			continue
		fi
		
		# Show the user-selected window property
		case "$show" in
			"window_class") w_name="$cls" ;;
			"window_classname") w_name="$cname" ;;
			"window_title") w_name="$title" ;;
		esac
		
		# Use user-selected character case
		case "$char_case" in
			"lower") w_name=$(
				echo "$w_name" | tr '[:upper:]' '[:lower:]'
				) ;;
			"upper") w_name=$(
				echo "$w_name" | tr '[:lower:]' '[:upper:]'
				) ;;
		esac

		# Truncate displayed name to user-selected limit
		if [ "${#w_name}" -gt "$char_limit" ]; then
			w_name="$(echo "$w_name" | cut -c1-$((char_limit-1)))…"
		fi

		# Apply add-spaces setting
		if [ "$add_spaces" = "true" ]; then
			w_name=" $w_name "
		fi

		# Add left and right formatting to displayed name
		if [ "$wid" = "$active_wid" ]; then
			w_name="${active_left}${w_name}${active_right}"
		else
			w_name="${inactive_left}${w_name}${inactive_right}"
		fi

		# Add separator unless the window is first in list
		if [ "$window_count" != 0 ]; then
			printf "%s" "$separator"
		fi

		# Add on-click action Polybar formatting
		printf "%s" "%{A1:$on_click raise_or_minimize $wid:}"
		printf "%s" "%{A2:$on_click close $wid:}"
		printf "%s" "%{A3:$on_click slop_resize $wid:}"
		printf "%s" "%{A4:$on_click increment_size $wid:}"
		printf "%s" "%{A5:$on_click decrement_size $wid:}"
		# Print the final window name
		printf "%s" "$w_name"
		printf "%s" "%{A}%{A}%{A}%{A}%{A}"

		window_count=$(( window_count + 1 ))
	done <<-EOF
	$(wmctrl -lx)
	EOF

	# After printing all the windows,
	# print number of hidden windows
	if [ "$window_count" -gt "$max_windows" ]; then
		printf "%s" "+$(( window_count - max_windows ))"
	fi

	# Print empty desktop message if no windows are open
	if [ "$window_count" = 0 ]; then
#		printf "%s" "$empty_desktop_message"
		printf ""
	fi
	
	# Print newline
	echo ""
}

# --- }}}

main "$@"

These are the few basic settings I used , hope it will help you have a basic functional 2bwm .
I hope someone from EndeavourOS will get interested in cooking 2bwm setup for us with my small efforts. I can easily start it from sddm , you can do further experimentation to set 2bwm according to your needs and taste