Giter Club home page Giter Club logo

monsterwm's Introduction

monsterwm

โ†’ tiny and monstrous!

monsterwm is a minimal, lightweight, tiny but monstrous dynamic tiling window manager. It will try to stay as small as possible. Currently under 700 lines with the config file included. It provides a set of different layout modes (see below), including floating mode support. Each virtual desktop has its own properties, unaffected by other desktops' or monitors' settings. For screenshots and ramblings/updates check the topic on ArchLinux forums.

Modes

Monsterwm allows opening the new window as master or opening the window at the bottom of the stack (attach_aside)


Common tiling mode:

--------------
|        | W |
|        |___|
| Master |   |
|        |___|
|        |   |
--------------

Bottom Stack (bstack) tiling mode:

-------------
|           |
|  Master   |
|-----------|
| W |   |   |
-------------

Grid tiling mode:

-------------
|   |   |   |
|---|---|---|
|   |   |   |
|---|---|---|
|   |   |   |
-------------

one can have as many windows he wants. GRID layout automatically manages the rows and columns.


Monocle mode (aka fullscreen)

-------------
|           |
| no        |
| borders!  |
|           |
-------------

MONOCLE layout presents one window at a time in fullscreen mode. Windows have no borders on this layout to save space. See the monocleborders branch to give those windows borders.


floating mode

-------------
|  |        |
|--'  .---. |
|     |   | |
|     |   | |
------`---'--

In floating mode one can freely move and resize windows in the screen space. Changing desktops, adding or removing floating windows, does not affect the floating status of the windows. Windows will revert to their tiling mode position once the user selects a tiling mode. To enter the floating mode, either change the layout to FLOAT, or enabled it by moving or resizing a window with the mouse, the window is then marked as being in floating mode.


All shortcuts are accessible via the keyboard and the mouse, and defined in config.h file.

All desktops store their settings independently.

  • The window W at the top of the stack can be resized on a per desktop basis.
  • Changing a tiling mode or window size on one desktop doesn't affect the other desktops.
  • toggling the panel in one desktop does not affect the state of the panel in other desktops.

Panel - Statusbar

The user can define an empty space (by default 18px) on the bottom or top(default) of the screen, to be used by a panel. The panel is toggleable, but will be visible if no windows are on the screen.

Monsterwm does not provide a panel and/or statusbar itself. Instead it adheres to the UNIX philosophy and outputs information about the existent desktop, the number of windows on each, the mode of each desktop, the current desktop and urgent hints whenever needed. The user can use whatever tool or panel suits him best (dzen2, conky, w/e), to process and display that information.

To disable the panel completely set PANEL_HEIGHT to zero 0. The SHOW_PANELL setting controls whether the panel is visible on startup, it does not control whether there is a panel or not.

Here is a list of minimal and lightweight panels:

You can find an examples configurations of panels here. You can actually parse monsterwm's output with any language you want, build anything you want, and display the information however you like. Do not be limited by those examples.

Installation

You need Xlib, then, copy config.def.h as config.h and edit to suit your needs. Build and install.

$ cp config.def.h config.h
$ $EDITOR config.h
$ make
# make clean install

Patches

Some extensions to the code are supported in the form of patches. See other branches for the patch and code. Easiest way to apply a patch, is to git merge that branch.

Currently:

  • centerwindow : center new floating windows on the screen and center any window with a shortcut
  • fibonacci : adds fibonacci layout mode
  • initlayouts : define initial layouts for every desktop
  • monocleborders : adds borders to the monocle layout
  • nmaster : adds nmaster layout - multiple master windows for BSTACK and TILE layouts
  • rectangle : draws only a rectangle when moving/resizing windows to keep resources low (ie through an ssh forwarded session)
  • showhide : adds a function to show and hide all windows on all desktops
  • uselessgaps : adds gaps around every window on screen
  • warpcursor : cursors follows and is placed in the center of the current window
  • windowtitles : along with the rest desktop info, output the title of the current window

There is also another branch, called [core]. core is an even more stripped and minimal version of monsterwm, on top of which the master branch is built and extended.

The is also xinerama support for multiple monitors.

  • xinerama-core : the equivalent of core branch with xinerama support
  • xinerama-master : the equivalent of master branch with xinerama support
  • xinerama-init : configurable initial values for each desktop on each monitor

Bugs

For any bug or request fill an issue on GitHub or report on the ArchLinux topic

License

Licensed under MIT/X Consortium License, see LICENSE file for more copyright and license information.

Thanks

monsterwm's People

Contributors

c00kiemon5ter avatar jasonwryan avatar moetunes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monsterwm's Issues

Can't exit with return code 0

This line don't work with any branch of monsterwm.

 {  ALT|CONTROL|SHIFT, XK_q,          quit,              {.i = 0}}, /* quit with exit value 0 */

Also, I noticed that this shortcut : "Control+Alt+Shift+q" isn't working too, but even with another shortcut, monsterwm don't quit.

Doesn't adopt/tile windows at startup.

I was surprised that monsterwm doesn't adopt and tile windows already on the screen: I killed the WM I was using, and although monsterwm noticed and handled new windows, old windows were left alone.

Is adopting windows against monster's philosophy? I couldn't see a config option. :)

Every Window launches offcenter

Hello there,

I Use this fork: (https://github.com/A1phaZer0/monsterwm-xinerama) of the xinerama-init branch.
I run a Triple Monitor Setup Consisting of 3 Different Monitors with 2 Different Resolutions (2x 1920x1080, 1x 1280x1024).
In my .xinitrc i have a xrandr script to set my monitors in the correct order, but once its executed, it messes up monsterwm's window positioning. As a result every window launches offcenter. Does anyone know how to fix this?

Thanks in Advance

Window flickering with monocle mode and FOLLOW_MOUSE

Hi, I've noticed that in some cases, changing focus in monocle mode while FOLLOW_MOUSE is true will cause a rapid, fullscreen flicker, as if the focused window is very rapidly changing. I'm not exactly sure what triggers it, but one way I've been able to reproduce the issue is to do the following:

(this is using the master branch; FOLLOW_MOUSE is True; the rest of config.h is the default):

  • Start with an empty desktop in the default tiling mode
  • Spawn two windows, side by side. (The problem will be much more apparent if the windows have different backgrounds; a dark and a light)
  • Switch to Monocle mode
  • Spawn a third window
  • Change focus with Mod1+j

At this point, the flickering occurs, and remains that way until switching back to a different tiling mode.

The issue does not happen when FOLLOW_MOUSE is False.

Thanks!

Resizing can crash monsterwm

If you resize in tiling mode there is no catch to see if you are setting W/H of XMoveResizeWindow() to 0. Thus it is possible to crash monsterwm while resizing. To see this happen: Start monsterwm, launch two windows. Hold down Alt+l. When a window is calculated as 0 width, monsterwm will crash.

See my fix here:
mil@5e104b4

Cannot spawn() amixer

When I have amixer commands bound to MOD4+XK_F# they don't seem to run. The commands are declared as follows:

static const char *vol_mt[] = { "amixer sset Master,0 toggle", NULL };
static const char *vol_up[] = { "amixer sset Master,0 5%+", NULL };
static const char *vol_dn[] = { "amixer sset Master,0 5%-", NULL };

and bound like so:

{ MOD4, XK_F3, spawn, {.com = vol_mt}},
{ MOD4, XK_F5, spawn, {.com = vol_dn}},
{ MOD4, XK_F6, spawn, {.com = vol_up}},

all other spawn bindings work so I'm not sure why these won't. Maybe because they need to run in a shell? I don't want to run urxvtc -e because it temporarily opens up a window and messes my layout up.

Send Mouse clicks to windows when focus changes.

When you click an unfocused window the event should be send to the window.

diff --git a/monsterwm.c b/monsterwm.c
index be31f62..3cb505e 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -235,7 +235,11 @@ void buttonpress(XEvent *e) {

     if (!wintoclient(e->xbutton.window, &c, &d)) return;

-    if (CLICK_TO_FOCUS && d->curr != c && e->xbutton.button == Button1) focus(c, d);
+    if (CLICK_TO_FOCUS && d->curr != c && e->xbutton.button == Button1){
+        focus(c, d);
+        XSendEvent(dis, PointerWindow, False, BUTTONMASK, e);        
+        XFlush(dis);
+    }

     for (unsigned int i = 0; i < LENGTH(buttons); i++)
         if (CLEANMASK(buttons[i].mask) == CLEANMASK(e->xbutton.state)

transient windows/desktop issue

  • open an xterm
  • open firefox and ensure it has the focus
  • change to monocle mode
  • from the file menu in firefox, select 'save page as'
  • cycle through all the desktops till you're back at the desktop you started from...

...only the transient window is shown...

...close it and all other windows must be 'forced' to reappear for instance by invoking grid mode.

Hope this helps (I'm on the verge of switching to monsterwm me thinks you've nailed it), its simple/minimal/robust & chiefly - no-nonsense. Please keep up the good work!

transient windows/focus issue

Have discovered two issues (2nd issue posted separately). I'll simply explain the steps to reproduce the (mis)behavior...

  • open an xterm
  • open firefox
  • ensure firefox has the focus
  • select 'save page as' from the file menu, then cancel saving the page
  • the focus is mistakenly given to the xterm rather than firefox which before the transient popup had the focus

Follow Desktop puts window under existing windows

When certain programs (for example mplayer) are set in config.h to follow to a new desktop on launch, they get placed underneath any existing windows on that desktop. For example, I have mplayer set like:
{ "MPlayer", 3, True, False }, and when it is launched from urxtv in desktop 0, the desktop changes to 3, but mplayer is placed underneath an existing urxvt window there. Same thing happens with dwb and Firefox.

The send-to-desktop command seems to work correctly, however.

Thanks!
Scott

(commit #b6f2f0076e3f) on master branch w/ useless gaps

Autodetecting a second screen?

Hey,

A while ago on the forums you had mentioned possibly investigating adding auto detection of adding/removing displays so monsterwm wouldn't need to be restarted. I'm thinking of the laptop user who plugs into a TV or external display for movie watching or presentations, primarily.

Not a big deal, just a request. I won't be offended if you're not interested in pursuing that!

Thanks,
Scott

Rox-filer: dialog windows

When using rox-filer under monsterwm the main directory windows do tile as expected, but a lot of the related dialog windows tile as well when it seems that they should be floating windows instead. When using rox-filer in other tiling WMs such as Awesome and DWM, these same dialog windows do float rather than tile by default.

Is there a shortcut to set all those dialog windows to float, or does a separate rule need to be created for each dialog window that is misbehaving?

Window freezes

Hello!

I think I found a bug. To reproduce do this:

  • Open Chromium or Firefox
  • Try to save a page, then it asks where to save the file
  • Close the window

Then the original Firefox/Chromium window is freezed. Actually it's not, but you have to switch to another desktop then back to be able to do anything with it.

The bug only appears, when you have only one window (Firefox/Chromium) on that desktop.

It also happens when you exit a fullscreen flash window.

Not detecting screen resolution

I'm using xrandr to set the screen size (800x600), and when I start monsterwm afterwards, it does not fit the size. It still goes outside the edges of the screen.

.xinitrc:

xrandr --output Virtual-1 --mode 800x600 &
xwallpaper --zoom /root/Files/Images/stream.jpg &
monsterwm

MonsterWM output directed to console

Good day, cookie - each time I log out of monsterwm, the console is heavily saturated with various output from monsterwm, most of it being desktop and windows count output. Otherwise, monster is just the way I want it to.

Is there any simple way to disable that output to the console itself, but still make use of it within monsterwm? I'm currently using the windowtitles branch with the monsterwm2dzen_titles script.

Thanks for your help.

selected window highlight border

hi,

have you ever noticed, how when switching between windows (mod+k, mod+j), sometimes the border doesn't move to the highlighted window?
i'll see if i can reproduce it.

cheers and thanks for the awesome monsterwm!

Can't build on freebsd

I am on FreeBSD 10 x64 and by gmake I get

monsterwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Wextra -I. -I/usr/include -I/usr/X11R6/include -DVERSION="cookies-git" -Os
LDFLAGS  = -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -s
CC       = cc
creating config.h from config.def.h
CC monsterwm.c
monsterwm.c:11:10: fatal error: 'X11/Xutil.h' file not found
#include <X11/Xutil.h>
         ^
1 error generated.
gmake: *** [monsterwm.o] Error 

So I added -I/usr/local/include at the end of CFALGS line and I got

cc: warning: argument unused during compilation: '-L/usr/local/include'
monsterwm.c:11:10: fatal error: 'X11/Xutil.h' file not found
#include <X11/Xutil.h>
         ^
1 error generated.
gmake: *** [monsterwm.o] Error 

Man page typo.

In the man page of monsterwm there is written that "mod1+shift+q" and "mod1+shift+r" close the wm, but it should be ctrl (at least I think so). On the are wiki, and in the source code it is correct of course. Unimportant issue, but still, this can save someone some time.

Shortcuts doesn't work using dvorak keymap

Keymap config:
~ $ localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: dvorak
X11 Layout: us,ru
X11 Model: pc104
X11 Variant: dvp,
X11 Options: grp:alt_space_toggle,ctrl:nocaps

In config.h:
static Key keys[] = {
{ MOD4, XK_d, spawn, {.com = menucmd}},

If I press Super_L+d dmenu doesn't start, Super_L+e doesn't work either. Note that "e" on dvorak keymap is "d" on qwerty. However if i press Super_L+e+d it starts. Same behavior with other keys. dwm doesn't have this issue.

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.