Coder Social home page Coder Social logo

mlvwm's Introduction

MLVWM

MLVWM System 7 Theme

OVERVIEW

MLVWM (Macintosh-Like Virtual Window Manager) is an X11 window manager with a classic MacOS appearance. Its primary features include:

  • Emulation of MacOS 7 & 8 menu bar & window decorations
  • Optional multiple virtual desktops
  • A main menu bar across the top of the screen, with:
    • Configurable global and per-application menus
    • Menu items trigger application functionality via keyboard shorcuts or commands
    • An icon menu which shows all windows and supports:
      • Switching desktops
      • Selecting, hiding, and showing windows
    • A balloon help menu
    • The ability to "swallow" small windows into the menu bar
  • Windows which support:
    • Title bars with optional close, zoom, and shade buttons
    • Resize handle
    • Optional double-click to toggle window shade
    • Drag as solid window or just outline
  • Balloon help which shows X window information
  • Global keyboard shortcuts
  • Numerous configuration options to tune functionality

SCREENSHOTS

Default theme (System 7-like):

Default System 7 Theme

System8 theme (MacOS 8/9-like):

MacOS 8/9 Theme

INSTALLATION

Building from Source

Build & installation currently still requires imake & make. While the original documentation says that xmkmf -a should work, we've found it's usually necessary to do the following:

cd man && xmkmf && cd -
cd sample_rc && xmkmf && cd -
cd mlvwm && xmkmf && cd -
xmkmf
make && make install

Package Managers

Native packages are provided on some operating systems, including:

  • OpenBSD: pkg_add mlvwm

CONFIGURATION

While some sample configuration files are included in the sample_rc directory, we highly suggest using the configuration files from the mlvwmrc project.

DOCUMENTATION

We suggest reading the manual page (man mlvwm; English), but you may also find the original documentation helpful:

Note: the English documentation above was automatically generated from the Japanese documentation.

CONTRIBUTING

Contributions are welcome and appreciated. Please read and follow the CONTRIBUTING guidelines.

HISTORY

MLVWM was originally developed in 1997 by Takashi HASEGAWA, based on FVWM, while studying at Nagoya University. Active development proceeded through 2000. In 2020, Morgan Aldridge obtained permission to continue maintenance & development.

LICENSE

This software is distributed as freeware as long as the original copyright remains in the source code and all documentation. Some files retain their original MIT license and one file is in the public domain.

Macintosh and MacOS are registered trademarks of Apple, Inc. (née Apple Computer, Inc.)

mlvwm's People

Contributors

morgant avatar themorc 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

mlvwm's Issues

Segmentation fault, when start.

Starting program: /usr/bin/mlvwm -debug
Welcome to MLVWM World !
Display Startup Screen !
Pixmap Create !

Program received signal SIGSEGV, Segmentation fault.
#0  0x00007ffff7e82714 in XmbTextExtents () from /usr/lib/libX11.so.6
#1  0x00005555555776e7 in ?? ()
#2  0x000055555557111c in ?? ()
#3  0x0000555555576bce in ?? ()
#4  0x000055555557793e in ?? ()
#5  0x0000555555579b55 in ?? ()
#6  0x00007ffff7c5f290 in ?? () from /usr/lib/libc.so.6
#7  0x00007ffff7c5f34a in __libc_start_main () from /usr/lib/libc.so.6
#8  0x0000555555559a75 in ?? ()

ioquake3 fails to create window

ioquake3 fails to create a window with the following logged to the terminal:

----- R_Init -----
SDL using driver "x11"
Initializing OpenGL display
Display aspect: 1.778
...setting mode -1: 1920 1080
tty]X Error of failed request:  BadMatch (invalid parameter attributes)
  Major op code of failed request:  42 (X_SetupInputFocus)
  Serial number of failed request:  157
  Current serial number in output stream:  158

Add new README

Now that I've officially picked up development and am preparing a new release, I should create a new, GitHub-friendly, README.md file.

Add configuration option to remove window shadows

When using a compositor such as picom with translucent shadows enabled, it'd be nice to offer a configuration option to remove the hard shadows that are rendered on windows by mlvwm. That said, the hard window shadows rendered by mlvwm are part of the look-and-feel, so they should be enabled by default.

`Style` commands don't search `WM_WINDOW_ROLE` X window properties

It doesn't appear that the built-in Style command appname string (which accepts '*' & '?' wildcards; see mlvwm(1) manual page) can match against the WM_WINDOW_ROLE X window property. I believe it currently only matches against WM_CLASS or WM_NAME.

There are many X11 applications that have different types of windows which should have different styles, including the menu bar itself as well as various window features. For example, Claws Mail has WM_CLASS(STRING) = "claws-mail", "Claws-mail" set on all windows, but the WM_WINDOW_ROLE differs by the various window types:

  • The main account/mailbox view has WM_WINDOW_ROLE(STRING) = "mainwindow"
  • A new message has WM_WINDOW_ROLE(STRING) = "compose"
  • Opening an existing message has WM_WINDOW_ROLE(STRING) = "messageview"

A window with a mainwindow role should have different menu bar options than messageview or compose. So, it'd be very helpful to be able to define multiple Style commands for the same WM_CLASS, but differing WM_WINDOW_ROLE.


It appears that WM_WINDOW_ROLE is part of the ICCCM specification, see section 5. Session Management.

EdgeResistance doesn't seem to do anything

The EdgeResistance configuration doesn't seem to work. I assume it should switch desks as you push past the edges of the screen, but I'm not quite sure. There is some code in mlvwm/event.c which uses Scr.resist_x & Scr.resist_y.

Initial click in inactive window is lost

When clicking on a control within an inactive window, the window is made active, but the click on the control is lost. This requires an additional click from the user and can be confusing as to why the initial click didn't register.

netwmpager reports "NetWM compatible window manager not running"

While mlvwm is a virtual window manager and has support for multiple "desks", it doesn't implement EWMH (Extended Window Manager Hints, a.k.a. NetWM). This means that netwmpager reports the following:

NetWM compatible window manager not running

I do not currently plan to build-in a "pager" as the application menu lists & supports switching to virtual "desks", plus there are configurable keyboard shortcuts. That said, some users might want to use an EWMH/NetWM-compatible pager, so it should support that.

More accurately emulate System 7 & MacOS 8 styling

Currently, MLVWM emulates the System 7 & MacOS 8 styling rather loosely. It would be preferable if it more closely emulated the styling, especially:

  • Menu bar height
  • Position & rendering of window close/zoom/collapse buttons
  • Rendering of horizontal lines in window titles
  • Size of window scroll bars
  • Rendering of window resize handles

Add `Menu` command label option to show `SendMessage` keyboard shortcuts

When using the built-in Menu command block to specify menu items/labels (see mlvwm(1) manual), one can specify an Action SendMessage and pass in keyboard shortcuts (see ShortCut command in mlvwm(1)). While this will send the key input to the X11 application, the menu items don't show what the associated keyboard shortcut is. It would help users understand what keyboard shortcuts they can use if Menu labels could optionally show the keyboard shortcut (like MacOS does).

Xephyr test failed

Using mlvwm-2021-09-21-8eb373, mlvwmrc-20210717-06f6b36, the below happens (I'd test on second pure terminal but unsure how to use xinit to do that for mlvwm.)

[email protected]:~$ Xephyr :32 -screen 1280x0124 &
[1] 32206
[email protected]:~$ The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server

[email protected]:~$ DISPLAY=:32 mlvwm -debug
Welcome to MLVWM World !
Display Startup Screen !
Pixmap Create !
Segmentation Fault
        in 
[email protected]:~$ The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server

Libraries needed?

What libraries are needed to compile successfully? I am running Ubuntu 16.04 LTS.

Miss font loading takes a lot of time

Hi there,

I had some fun getting mlvwm running on Windows 10 via WSL and vcxsrv, but this issue isn't related to the OS.

Most things worked just as expected, but when I tried setting up the font's for the menu bar etc. I got stuck for a while until it checked for every single encoding (maybe related to #19), gave an error msg, including the acoustic ping. I think this behaviour can be improved, and it would also make sense to add the output to the -debug stream.

This should be the section of code responsible for this.

mlvwm/mlvwm/config.c

Lines 580 to 585 in 7a3daae

newfont = XCreateFontSet( dpy, fontname, &miss, &n_miss, &def );
if( n_miss>0 ){
for( lp=0; lp<n_miss; lp++ )
DrawErrMsgOnMenu( "Load miss font ", miss[lp] );
XFreeStringList( miss );
}

If I find the time, I'm going to do a PR, but it's worth creating an issue for the suggestion anyway.

Cheers

Menu `SendMessage` actions not working on OpenBSD 6.4

In the development various MLVWM styles for various applications as part of mlvwmrc, I can't seem to get Menu SendMessage actions (e.g. Menu "Open Location..." Action SendMessage C+G which should send a Control-G keypress to the active window) to function. I'm currently testing on OpenBSD 6.4.

I've even configured a style for xev (the X Windows event tester) and can confirm that a KeyPress is being sent. My current observations:

  • sendevent() in functions.c only fires a single 'KeyPress' XSendEvent() for each key, but doesn't send a 'KeyRelease'
  • sendevent() specifies same_screen = false, while actual keypress/keyrelease events have same_screen = true (as confirmed with xev)
  • When playing with xev, the KeyPress event does appear to have the correct state value (which specifies the modifier key), but maybe it'd be better to send a 'KeyPress' for the modifier, then the 'KeyPress' & 'KeyRelease' for the key, followed by a 'KeyRelease' for the modifier?
  • It also sounds like several sources saying that "events send by XSendEvent() (those send_event flag in Event struct were set) may ignored by some clients", see
    http://t-sato.in.coocan.jp/xvkbd/events.html

XKeycodeToKeysym is deprecated

There is currently one warning in mlvwm/event.c when compiling with clang on OpenBSD 6.8:

event.c:1791:26: warning: 'XKeycodeToKeysym' is deprecated [-Wdeprecated-declarations]
                        XKeysymToKeycode(dpy, XKeycodeToKeysym(dpy,ev->xkey.keycode,0));
                                              ^
/usr/X11R6/include/X11/Xlib.h:1686:1: note: 'XKeycodeToKeysym' has been explicitly marked deprecated here
_X_DEPRECATED
^
/usr/X11R6/include/X11/Xfuncproto.h:136:40: note: expanded from macro '_X_DEPRECATED'
# define _X_DEPRECATED  __attribute__((deprecated))

Doesn't start

I installed from source and also tried the AUR

mlvwm

Then put mlvwm in my .xinitrc like so but it doesn't start with startx also the log message seems normal besides

(WW) warning, (EE) not inplemented, (??) unknown.

Clean up code formatting

The code formatting is very old and inconsistent. At some point we should create a real style guide in CONTRIBUTING.md and work to update the code to conform to it. This is a low priority.

xdotool can't move windows

When using xdotool under OpenBSD 6.9, xdotool's windowsize command works to resize windows, but windowmove does not result in a window being moved. If I switch to fvwm, both windowsize & windowmove work correctly.

Add option to force monochrome rendering

mlvwm supports monochrome (1-bit) rendering (though it is mutually exclusive with the System8 configuration option), but most modern versions of X don't support color depths below 8-bit (256 colors). For those who might want to use the monochrome styling, or for development & testing, it'd be nice to add a configuration option that forces it.

Update README to reflect the updated AUR

As you know, the AUR was last updated in around 2015. It was updated today to 0.9.4, the latest release. It would be a good idea to update the "installation" section to reflect that.

xap not working well together

Hello. I have a Devuan 4 Chimaera system here. (=Debian 11 bullseye)
I successfully compiled and installed mlvwm, mlclock, and also got a version of xap working with gtk 1.2
However, when I run xap, it runs in windowed mode. I would like this to work like the app launcher panel of MacOS 9, to stay in that specific area and not show the window borders.
Is this possible?

Consider adding dynamic applications menus or menu items

Currently, one has to manually add menu items that exec applications if they want to list & launch applications from a menu. In mlvwmrc, an "Apple" menu is provided by the various themes, but also needs to be manually updated. I'm considering using or implementing a tool for mlvwmrc to generate application menu items, but that would still need to be run manually and would require a restart of mlvwm to update the menu items.

It might be most helpful if mlvwm could dynamically generate & update application menu items. In terms of customization, it'd probably be best to add a built-in command that could be used in menus (or as a submenu?) which would just include the dynamic list of applications.

Of course, to implement this, we'd need a way (or ways) to get a list of applications installed locally and preferably get 16x16 px icons for applications. If there's a way to get a class of application (e.g. "application", "utility", etc.), that'd be a bonus. According to the helloSystem project, there a number of APIs that can/need to be used:

There's a lot to research & understand. There are also applications like MenuLibre which allow editing desktop & menu entries.

I really don't want to require DBus, Glib, GTK, or Qt for mlvwm, so that might kill this idea pretty quickly.

Hangs up after loading resources

Hi,
I've built mlvwm from source on my Debian installation and then I copied and configured the appropriate resource files. Not having all of the appropriate .xcf files, I substituted them with a placeholder .xcf file. Now when I start it it just keeps loading infinitely.

I'm running this in a VM. Not sure if I can get a log out of it because it seems to soft lock everything and I can't get out of it. The only way to get out of it is by restating my VM.

Does not compile on FreeBSD: fatal error: ' X11 .rules' file not found

FreeBSD% cd man && xmkmf && cd -

imake -DUseInstalled -I/usr/local/lib/X11/config
In file included from Imakefile.c:15:
In file included from /usr/local/lib/X11/config/Imake.tmpl:316:
/usr/local/lib/X11/config/Imake.rules:1674:27: warning: empty character constant
      [-Winvalid-pp-token]
        for flag in ${MAKEFLAGS} ''; do \                               @@\
                                 ^
In file included from Imakefile.c:15:
/usr/local/lib/X11/config/Imake.tmpl:2144:10: fatal error: ' X11 .rules' file not found
#include ProjectRulesFile
         ^~~~~~~~~~~~~~~~
/usr/local/lib/X11/config/Imake.tmpl:2142:35: note: expanded from macro 'ProjectRulesFile'
# define ProjectRulesFile       Concat3(<,TopLevelProject,.rules>)
                                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/X11/config/Imake.rules:256:23: note: expanded from macro 'Concat3'
#define Concat3(a,b,c)a/**/b/**/c
                      ^~~~~~~~~~~
<scratch space>:3:1: note: expanded from here
< X11 .rules>
^~~~~~~~~~~~~
1 warning and 1 error generated.
imake: Exit code 1.
  Stop.

Do you know how to get it to compile on FreeBSD?

wayland port?

The title says all; wayland needs a simple and fast compositor. a classic mac like would be awesome!

Switch build system away from imake

MLVWM currently uses the old imake build system, but it should really be switched to something more modern with better cross-platform support, but keeping it as light-weight as possible. Maybe CMake?

Full Screen support

Full Screening videos in YouTube or full screening anything doesn't work.

Scooter Graphics' Virtue font doesn't work with MLVWM

This may be an issue with the font, not with MLVWM, but I'd like to use Scooter Graphics' Virtue font with the System8 theme. At least on OpenBSD 6.7+, Installing the font, then attempting to set any of the font configuration options to -*-virtue-*-*-*-*-*-*-*-*-*-*-*-* results in missed font messages in the menu bar, despite the font showing up in xfontsel.

Window shadows are 1px too thick

Window shadows, both on the default (System 7) and System8 themes, are rendered 1px too thick. I believe this is handled by SetUpFrame() in borders.c.

ShortCut doesn't seem to support Exec commands

I'd like to implement keyboard shortcuts for taking screenshots maim, but when I add the following to the ShortCut section in my ~/.mlvwmrc it doesn't seem to execute correctly:

3    SC    Exec "maim" maim "${HOME}/Downloads/screenshot-$(date +%Y%m%d-%H%M%S).png"
4    SC    Exec "maim" maim -s "${HOME}/Downloads/screenshot-$(date +%Y%m%d-%H%M%S).png"

If I run mlvwm -debug, I can see the following output when pressing ctrl-shift-3 or ctrl-shift-4, but no files are actually created:

Exec System <> !
Return WaitEvents
Fork Successful

I know that the shell substitutions probably won't work, but when other Exec commands are triggered, the angular brackets after Exec System contain the command name being executed.

Rounded corners should be optional

By default, MLVWM renders rounded corners on the screen, but as @TheMorc points out in PR #12, MacOS 9 doesn't always render rounded corners on all devices. I'm not sure, but I think MacOS might have rendered rounded corners on CRTs and later disabled them on LCDs. Regardless, we should make rounded corners optional.

Applications swallowed into menu bar which resize overdraw other swallowed applications

I've been testing stalonetray with mlvwm, "swallowed" into the menu bar with the following ~/.stalonetrayrc:

background "#dddddd"
decorations none
dockapp_mode none
fuzzy_edges 0
geometry 1x1+0+0
grow_gravity W
icon_gravity NW
icon_size 16
log_level err
max_geometry 0x1
no_shrink false
parent_bg false
scrollbars none
skip_taskbar false
sticky true
tint_color white
tint_level 0
transparent false
vertical false
window_layer normal
window_strut none
window_type normal
xsync false

This does work and allows "tray" applications to show in the mlvwm menu bar. However, as icons are added to the tray, mlvwm does not recalculate the width/position in the menubar, so the swallowed stalonetray window will expand to the right and draw over any other swallowed apps in the menu bar.

Incorrect top left & right rounded corners

The top-left and top-right rounded corners are incorrect, at least on the System8 theme, and don't match the bottom-left and bottom-right rounded corners. They should be improved.

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.