philopaterwaheed / pwm

X window manager for linux
MIT License
12 stars 1 forks source link
cpp window-manager x11

pwm window_manager (philo's window manager)

X11 window manager for linux built from scratch in C++. It supports basic window management features such as tiling, floating windows, multi-monitor setups, workspaces, and more. The window manager is designed to be lightweight, efficient, and customizable. inspired by dwm ; we can say it's a love letter to dwm . wakatime

Features

Dependencies

This window manager is built using the X11 library. Ensure that you have the following dependencies installed:

Installation

  1. Clone the repository:

    git clone https://github.com/philopaterwaheed/pwm.git
    cd pwm
  2. Compile the window manager:

    sudo make clean install
  3. Run the window manager: You can test the window manager by launching it from a different X session:

    startx ./pwm -- :1

    or add it to your .xinitrc script

Usage

Keybindings

you can customize the Keybindings in the config.h file but those are the default Keybinding Action
Mod + t Launch terminal (default: st)
Mod + ; Launch terminal (default: dmenu) you also can use mine if you want launchio
Mod + Arrow Keys Move floating window
Mod + Shift + Arrow Keys Resize floating window
Mod + Left Mouse Button Drag window
Mod + Right Mouse Button Resize window
Mod + 1-5 Switch to workspace
Mod + Shift + 1-5 Move window to workspace
Mod + q Close focused window
Mod + Return Make focuse window fullscreen
Mod + s Make focuse window sticky
Mod + b Toggle bar
Mod + l Increase master width
Mod + h Decrease master width
Mod + j Change focus to next window
Mod + k Change focus to previous window
Mod + Shift + j Swap with next window
Mod + Shift + k Swap with previous window
Mod + Shift + Space Toggle floating of focused window
Mod + Shift + f Set as master
Mod + Shift + l Increase stacked window hight
Mod + Shift + h Decrease stacked window hight
Mod + Alt + Space Switch to tiling layout
Mod + Alt + m Switch to fullscreen layout
Mod + Alt + c Switch to center master layout
Mod + Alt + g Switch to grid layout
Mod + , Focus next monitor
Mod + . Focus previous monitor
Mod + Shift + , Move focused window to next monitor
Mod + Shift + . Move focused window to previous monitor

Mouse Actions

Workspace Management

The status bar displays the active workspaces and the current status. You can update the bar by setting the root window name using the xsetroot command. For example:

xsetroot -name "Hello, World!"

Floating and Tiling Windows

Layouts

The window manager supports the following layouts:

Window Resizing and Moving

Advanced Configuration

Fonts

Fonts in the bar are configured using the Fontconfig library. Ensure that you have appropriate fonts installed (e.g., awesome-font for icons).

Customizing the Bar

The status bar is divided into three sections:

You can modify the bar by editing the rendering logic in the source code.

Contributions

Feel free to contribute by submitting pull requests, reporting issues, or suggesting features.

License

This window manager is released under the MIT License.


screen shots

2024-09-23_06-13 image image 2024-09-23_06-31 image