Code Monkey home page Code Monkey logo

xcb-wswm's Introduction

XCB-WSWM

Early Release

This build of xcb-wswm is not fully feature ready.

Why Use this.

  • Low Memory Usage (~4-7 MiB) (When compiled in Release Mode)
  • Low CPU usage (~.1-2%) idle
  • Low CPU usage when doing expensive stuff (mapping windows) (~4-10%)

Why Not Use this.

  • Code base is, ok
  • Doesnt use C++
  • XCB

Requirements

  • dmenu
  • st
  • xorg
  • xorg-xinit
  • libxcb
  • xcb-proto
  • xcb-util
  • xcb-util-errors
  • xcb-util-cursor
  • xcb-util-image
  • xcb-util-keysyms
  • xcb-util-wm

Pacman && yay

sudo pacman -S --needed dmenu xorg xorg-xinit libxcb xcb-util xcb-util-errors xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-wm && yay -S st

Usage

To use xcb-wswm you must first compile it. Afterwards you must put exec xcb-wswm in your ~/.xinitrc file. See Below.

Compiling

  1. Clone this repository.
git clone https://github.com/DerjenigeUberMensch/xcb-wswm.git
  1. Change Directory to xcb-wswm.
cd xcb-wswm
  1. Checkout the Experimental branch. (Legacy support)
git checkout origin/Experimental
  1. Configure it See Configuration (Optional)
  2. Compile using Make
make
  1. Install on system, install location '/usr/local/bin'
sudo make install
  1. Done.

Uninstalling

  1. Change Directory to xcb-wswm.
cd xcb-wswm
  1. Uninstall using Make
sudo make uninstall

How to Run/Use

  1. Compile, See Above.
  2. Choose option(s) below.
  3. Locate binary
    • if installed should be "xcb-wswm"
    • else should be located under "bin/release/" folder as "xcb-wswm"

Normal Usage

  1. Put "exec YOUR_BINARY_LOCATION" in ~/.xinitrc or similiar XServer configuration.
    • if it doesnt work make sure that no window-manager/desktop manager is run before.

Xephyr (Debug/Testing Usage)

  1. Start a Xephyr server.
    • Example: Xephyr :1 -ac c 25 +xinerama -resizeable -screen 680x480 &
  2. After locating the binary location make sure you are in the correct display server.
    • Example: export DISPLAY=:1
  3. After setting the correct external xserver display variable simply run the binary file.
    • Example: ./bin/release/xcb-wswm or xcb-wswm

Configuration

Currently Configuration is not supported in this version of xcb-wswm

Troubleshoot

This is an experimental build and may contain bugs, Screen tearing can be mitigated by using a compositor or by enabling it in your driver setting

If you have any major issues with the current commit you can revert to a previous commit for a generally stabler version. Or you can open an issue about it.

Planned Features

  • Panel that user can just click buttons or type values to configure windows (kinda like a dev panel).
  • Fully Extend XCB-TRL to use other features.
  • More modularity
  • Less Complex Code Base
  • Better Documentatin (Likely when I finish implementing the usability part of the Window manager (AKA when I switch over to this.))

xcb-wswm's People

Contributors

derjenigeubermensch avatar

Stargazers

 avatar

Watchers

Lucian avatar  avatar

xcb-wswm's Issues

Improved file structure.

Due to my lack of knowledge of Makefiles, and their overall confusing nature (to me). The file structure isn't the best.

It would be wise to update this and have separate directories for each component, src, include, tools...

Windows moving when changing desktops

Some windows like picture-in-picture (firefox) seem to warp to the side of the screen when changing video (autoplay) in a seperate desktop when changing back to the desktop in which picture-in-picture is in.

Slow grid on -O3

Extremely slow grid tiling when switching from monocle -> grid when compilingon -O3, this issue doesnt exist when compiling in debug mode.

Hash Map for propertynotify

Due to the fact that we probably shouldnt re-manage a window after managing, (unless unmapped) I propose a hash map hashing the atoms, and jumping to the correct update function for their properties.

Slow to add new clients because of arrange() + Flicker

Due to arrange being called when ever a client is mapped/unmapped we are required to send thousands of events to xcb to proccess which is bad as xcb is pretty slow (due to latency), rather X11 is slow (latency). So I propose we calculate the window dimentions and calculate restacking to make as little calls to XCB as possible.

Use XInput over X11's grab/ungrab actions

Due to the current usage of X's windowing grab/ungrab features it is impossible for clients to grab certain types of events, this could be used for data sanitation (keyloggers...).

But Xinput would still be preferable, as it seems to have better developer tooling

Stack issues showing selected window

While the stack is correctly updated showing the windows (technically). It seems that it doesnt raise or put up the currently selected client for some reason, this seems to occur on layouts like monocle

Arraylist over Linked list for less memory usage

Should save about ~12bytes per list type, so about ~48bytes in total per client.

Assuming we use uint16_t(s), limiting max client creation to UINT16_MAX which shouldnt really be a problem as it is unlikely any user would make that many clients, consistently

Janking clickmouse on windows

For some reason, clicking on multiple windows at the same time triggers arrange() in an inconvenient manner that causes Janky window movement,

Improve getprop.c

As it stands getprop.c kinda sucks, mainly in its lack luster thread implementation.

It would stand to improve this as to make these threads more independent and more reponsive rather than a somewhat bare bones funtionality

Confused Input with mouse events

For some reason when resizing the monitor (Xephyr) the clients seem to stop receiving events that were "below" them relative to the starting point of the original x/y coordinates of the window.

This seems to mostly be a y coordinate issue as the x coordinate seems to be mostly fine.

Wierd icon bug.

Some windows like thunar dont set their icon until mapped? I think.

Either that or XCB is too fast, which I dont believe, perhaps we can update in property notify.

Soft/Hard Restarts

Implement Soft Restarts, (currently in use), with Hard restarts as a separate optional method (execvp, previous restart method)

Fully fix sendevent

MAIN ISSUE: It works most of the time but when it fails (somewhat often) it throws a couple errors.

dont know how but ill prob look in the Xlib source to see how they do it

Starvation on bar-like windows

Some windows like polybar seem to act strangely when grabbing buttons, grabbutons();

And seem to cause a starvation that causes the XServer connection to never send back ANY form of event, seemingly stuck in poll(), or "XCBNextEvent".

HOWEVER: It seems that the XServer still receives events that we send, this is notable as wakeupconnection() still seems to be able to allow for process termination.

Bad memory access sometimes when moving bar

Sometimes when you move the bar, kill the bar, and switch desktops the window manager exists due to memory violation, it's apparently focused? Somehow.
This is somewhat finicky, but you can force trigger it via quitting early most of the time.

Steps.
1.) Spawn a bar-window in the first desktop (desktop 0)
2.) Switch to another desktop.
3.) Spawn a window (doesnt matter what window)
4.) Drag the bar-window around.
5.) While still dragging the kill/terminate the window.
6.) Switch back to the first desktops.

Affected version 2.4.0

Add snap to Drag/Resize(Window) operations

Due to the fact that some windows may invoke these operations, they also can often be accidentally clicked/pressed, this while good for responsive UI, isn't so good when they are moved very slightly ~1-5 pixels, which causes the window to be marked as “floating” which users may not want

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.