{"id":13423516,"url":"https://github.com/venam/2bwm","last_synced_at":"2025-10-28T12:36:08.168Z","repository":{"id":7401918,"uuid":"8732247","full_name":"venam/2bwm","owner":"venam","description":"A fast floating WM written over the XCB library and derived from mcwm.","archived":false,"fork":false,"pushed_at":"2024-05-04T20:08:54.000Z","size":1078,"stargazers_count":808,"open_issues_count":0,"forks_count":97,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-06-08T03:57:34.526Z","etag":null,"topics":["manager","window","wm","x11","xcb"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/venam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-12T16:14:27.000Z","updated_at":"2025-05-31T10:33:25.000Z","dependencies_parsed_at":"2023-01-11T17:10:29.679Z","dependency_job_id":"ecf87d80-695d-4791-809c-bf6974a24b7c","html_url":"https://github.com/venam/2bwm","commit_stats":{"total_commits":436,"total_committers":27,"mean_commits":16.14814814814815,"dds":0.2660550458715596,"last_synced_commit":"3e20bc1faea7bc89490b5186b1c8376d60bcc918"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/venam/2bwm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venam%2F2bwm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venam%2F2bwm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venam%2F2bwm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venam%2F2bwm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venam","download_url":"https://codeload.github.com/venam/2bwm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venam%2F2bwm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269527588,"owners_count":24432442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["manager","window","wm","x11","xcb"],"created_at":"2024-07-31T00:00:36.456Z","updated_at":"2025-10-28T12:36:08.159Z","avatar_url":"https://github.com/venam.png","language":"C","readme":"![2bwm](https://raw.github.com/venam/2bwm/master/2bWM.png)\n\n2bwm\n==========\nA fast floating WM, with the particularity of having 2 borders, written over\nthe XCB library and derived from mcwm written by Michael Cardell.  \nIn 2bWM everything is accessible from the keyboard but a pointing device can be\nused for move, resize and raise/lower.  \nWARNING: This WM and this repository are experimental, 2bwm is only meant for\nadvanced users.  \n\n\nFeatures:\n=========\n\nmcwm's features\n---------------\n\nYou can check what mcwm already had here:  \nhttp://www.hack.org/mc/hacks/mcwm/features.html  \nhttp://www.hack.org/mc/hacks/mcwm/  \n\n* Maximize horizontally\n* Maximize vertically\n* 10 virtual workspaces\n* Crash proof window placement\n* Snappy borders\n* **Controlled entirely with the keyboard**\n\n2bwm features\n-------------\n\n2bwm brings a whole set of features to the table. Here is the exhaustive list:\n\n* Teleport windows in the corners\n* Teleport windows in the {top,middle,bottom} center\n* Teleport windows to cover a half of the monitor\n* Add offsets around the monitor\n* Multiply / Divide window's width or height by 2\n* Grow / Shrink windows keeping aspect ratio\n* Move / Resize windows by two user defined amount\n* 2 borders fully customizable that show the window status\n\nresources comparison\n--------------------\n\nWhen comparing compiled executables' size, 2bwm is 36KB, dwm is 33KB,\ndvtm 37KB, and i3 343KB.\n\n    raptor $ size /usr/local/bin/2bwm\n        text   data    bss    dec    hex   filename\n        29576   2456    780  32812   802c  /usr/local/bin/2bwm\n    raptor $ size /usr/bin/i3\n        text    data    bss    dec    hex   filename\n        284247  10020   5704 299971  493c3  /usr/bin/i3\n    raptor $ size /usr/local/bin/dwm\n        text   data    bss    dec  hex   filename\n        28802  1932    528  31262   7a1e  /usr/local/bin/dwm\n    raptor /usr/local/bin $ size dvtm\n        text   data    bss    dec    hex    filename\n        30955  2212  33408    66575  1040f  dvtm\n    raptor /usr/local/bin $ size monsterwm\n        text   data    bss    dec    hex    filename\n        17778  1428     72    19278  4b4e   monsterwm\n    % size /usr/local/bin/w9wm\n        text   data     bss     dec     hex filename\n        35325  3360     952   39637    9ad5 /usr/local/bin/w9wm\n    % size /usr/local/bin/evilwm\n        text   data     bss     dec     hex filename\n        39456  2080     600   42136    a498 /usr/local/bin/evilwm\n    % size /usr/local/bin/openbox\n        text   data     bss     dec     hex filename\n        316466 3572    2368  322406   4eb66 /usr/local/bin/openbox\n    % size /usr/local/bin/ctwm\n        text   data     bss     dec     hex filename\n        336742 12076    23840  372658   5afb2 /usr/local/bin/ctwm\n    raptor /usr/bin $ size awesome\n        text   data     bss     dec     hex filename\n        296570 1984    1832  300386   49562 awesome\n\nNow for memory (RAM) usage (in KB):\nmcwm -- the wm 2bwm is based upon  \ndvtm -- a terminal multiplexer  \n\n     ~ \u003e ps -eo args,size,vsize,rss \n     mcwm                          300   2480   668\n     2bwm                          296   2672   728\n     9wm                           296   3816  1160\n     cwm                           584   7044  3308\n     bspwm                         304   2872   964\n     dwm                           300   5400  1384\n     monsterwm                     304   3708  1008\n     herbstluftwm                  316   5536  1844\n     herbstclient --idle           312   5204  1224\n     ctwm                          708   7112  2360\n     twm                           964   6820  2552\n     i3                           1400  14760  4248\n     openbox                      1952  16412  736\n     dvtm                         5624   9656  6256\n     fbpanel                      3460 135928 14012\n\nNotice that all those WM are really small and that size doesn't really matter\nin the end.\n\nPanels / Status bar\n===================\n\n2bwm does not come with any bar or panel. 2bwm will respect the \n`_NET_WM_WINDOW_TYPE_DOCK` of windows, and ignore them, thus most \npanels should work. The following were tested and work with 2bwm:\n\nPanels\n------\n\n* [cairo-dock](http://www.glx-dock.org)\n* [fbpanel](http://aanatoly.github.io/fbpanel/)\n* [hpanel](http://freecode.com/projects/hpanel)\n* [lxpanel](https://wiki.lxde.org/en/LXPanel)\n* [tint2](https://gitlab.com/o9000/tint2)\n* [xfce4-panel](http://docs.xfce.org/xfce/xfce4-panel/start)\n\nBars\n----\n\n* [bar](https://github.com/LemonBoy/bar)\n* [dzen2](https://github.com/robm/dzen)\n\nInstallation\n============\n\n2bwm depends on the XCB libraries, and some of them are\nquite new, so most systems won't have them installed by default.\nHere's a (non-exhaustive) list of the dependencies:\n\n+ xcb-randr\n+ xcb-keysyms\n+ xcb-icccm\n+ xcb-ewmh\n+ xcb-xrm (this one is quite new)\n\nIf your system doesn't provide the above, or lacks some of them, you\ncan download them [here](https://xcb.freedesktop.org/dist/).\n\n**Note**: `xcb-xrm` is not oficial yet,\n[here's the link](https://github.com/Airblader/xcb-util-xrm) to the repo.\nArchlinux and Voidlinux have it in their repositories as xcb-util-xrm.\n\nTo build and install `xcb-xrm`, clone it and do the following commands:\n\n    cd xcb-util-xrm\n    git submodule update --init\n    ./autogen.sh --prefix=/usr\n    make\n    sudo make install\n\nInstall it from your system's repositories in case it's available.\n\nArchlinux\n---------\n\nAvailable on the AUR:\n[2bwm](https://aur.archlinux.org/packages/2bwm/)\n[2bwm-git](https://aur.archlinux.org/packages/2bwm-git/)\n\nDownload and extract the tarball, then install it as a package:\n\n    $ git clone https://aur.archlinux.org/2bwm.git\n    $ cd 2bwm\n    $ makepkg\n    # pacman -U 2bwm-*.pkg.tar.xz\n\nCRUX\n----\n\nAvailable through z3bra's collection:\n[2bwm-git](http://crux.z3bra.org/ports/2bwm-git/)\n\n    $ httpup sync http://crux.z3bra.org/ports/#2bwm-git 2bwm-git\n    $ cd 2bwm-git\n    $ ${EDITOR:=vi} config.h\n    $ fakeroot pkgmk -d\n    # pkgadd 2bwm#*.pkg.tar.gz\n\nUsing `pkgsrc`\n-------------\n\n    $ cd /usr/pkgsrc/wm/2bwm\n    $ make\n    # make install\n\nGentoo/Funtoo\n-------------\n\nHere's an ebuild by crshd [2bwm](https://github.com/nixers-projects/uh-portage/tree/master/x11-wm/2bwm)\n\n\nOpenBSD\n-------\n\nTweaks you need for 2bwm on OpenBSD: add `/usr/X11R6/include` to search path,\ninstall `gcc-4.7`, use `CC=egcc make`\n\n\n\nFrom sources\n------------\n\nIn case 2bwm is not packaged for your distribution, you can compile and install\nit right from the sources\n\n    $ git clone git://github.com/venam/2bwm.git\n    $ cd 2bwm\n    $ ${EDITOR:=vi} config.h\n    $ make\n    # make install\n\n\nTroubleshooting\n===============\n\nClickable areas with `bar`\n--------------------------\n\nThe problem with https://github.com/u-ra/bar got solved by z3bra:\n\n    sed -i 's/RELEASE/PRESS/;s/release/press' bar.c\n\nbar from lemonboy has rencently implemented the clickable feature so you'd rather\nuse this one instead of the one from u-ra.\n\nWhite java windows\n------------------\n\nIf you experience problems with java GUI you can refer to\n[this](http://awesome.naquadah.org/wiki/Problems_with_Java) most probably doing\n`export _JAVA_AWT_WM_NONREPARENTING=1` will resolve the problem.\n\nRaising hidden windows\n----------------------\n\nTo show hidden windows you can use the hidden tool:\n\n    hidden -c|xargs 9menu -popup -label Iconics -font \"terminus12-10\"\n\nXresources configuration\n------------------------\n\nThese are the values 2bwm will try loading from Xresources at startup:\n\n    twobwm.border_width: number\n    twobwm.outer_border: number\n    twobwm.focus_color: #RRGGBB\n    twobwm.unfocus_color: #RRGGBB\n    twobwm.fixed_color: #RRGGBB\n    twobwm.unkill_color: #RRGGBB\n    twobwm.outer_border_color: #RRGGBB\n    twobwm.fixed_unkill_color: #RRGGBB\n    twobwm.inverted_colors: true|false\n    twobwm.enable_compton: true|false\n\n**Note**: set `enable_compton` option to true in case you're using a\ncomposition manager.\n\nPreventing X11 Crash\n--------------------\nTo prevent X to crash you can start the X session over your favorite terminal\nemulator. Here's an example of a .xinitrc file that will do that:\n\n    2bwm\u0026\n    exec urxvt\n\n\nScreenshots:\n============\n\n![2bwm](https://venam.nixers.net/blog/assets/scrots/1.png)\n![2bwm with panel](https://venam.nixers.net/blog/assets/scrots/17.png)\n![2bwm fancy 3 borders](https://venam.nixers.net/blog/assets/scrots/19.png)\n\nRecommended Softwares\n=====================\n2bwm doesn't come with any third party software but it's nice to know what\ncan help building up a complete working and effective system.\n\n* bar/panel\n* program launcher\n* notification system\n* terminal emulator\n\nTesting\n=======\n\nThe following features are currently being implemented. Feel free to try and\ntest them. \n\nText based config file\n----------------------\n\n### CURRENT STATE ###\nActive development\n\n### DESCRIPTION ###\nMake 2bwm source a plain text file to customize the application upon starting\nit.\n\n### GET IT ###\nCheckout the `devel` branch of the repo.\n\nOne border inside the other\n--------------\n\n### CURRENT STATE ###\nWorking\n\n### DESCRIPTION ###\nMake the status border appear \"within\" the other border. This makes it look as if there were three borders.\n\n\n### GET IT ###\nCheckout the `3bwm` branch of the repo\n\n\nTODO:\n=====\n\n* Fix the race condition bug that happens when switching workspaces too fast.\n\n* Bug related to gtkfilechooser dialog in telegram-desktop - needs more information to debug\n\n* Use the `xcb_ewmh.h` functions instead of that ugly hardcoded ATOM enum for\n  example instead of the `ATOM[atom_client_list]` we could use `xcb_ewmh_set_client_list`\n\n* Toggable sticky workspace per monitor\n\n* Extended Window Manager Hints (EWMH)\n\n  - Use the new xcb-ewmh for the EWMH hints.\n     _NET_WM_STATE, _NET_WM_STATE_STICKY,\n     _NET_WM_STATE_MAXIMIZED_VERT, [etc](https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472615568).\n\n* A separate workspace list for every monitor. (CTRL+NUM)\n\t* get the cursor position (on which monitor)\n\t* unmap all window that are only on this monitor\n\t* map window on the workspace NUM that are on this monitor\n\t* problem with curws and remapping\n\t* curws could be associated with the focuswin instead\n\n* Check why the input focus doesn't work well with applications such as macopix\n\nAuthors:\n=======\n`venam`  \nBig thanks for the help of the following persons:\n\n* nifisher\n* dcat\n* bidulock\n* Yrmt\n* maxrp\n* Z3bra\n* cicku\n* tbck\n* crshd\n* jolia\n* anshin\n* strikersh\n\nThanks to the UnixHub/Nixers community for the support and ideas.  \nThanks to Michael Cardell for starting it all.\n","funding_links":[],"categories":["C","Applications","Window Managers","others","Packages"],"sub_categories":["Window Managers","Stacking Window Managers","Stacking window managers","window-managers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenam%2F2bwm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenam%2F2bwm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenam%2F2bwm/lists"}