All Projects → davidfig → window-manager

davidfig / window-manager

Licence: MIT License
A javascript-only Window Manager

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to window-manager

use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (-55.56%)
Mutual labels:  window
api-lambda-save-dynamodb
Deploy instantly on Serverless Application Repository
Stars: ✭ 55 (+1.85%)
Mutual labels:  save
fullcontrols
Reworked version of the wpf controls, plus new controls and features.
Stars: ✭ 28 (-48.15%)
Mutual labels:  window
YdarWallpaper
opengl渲染的动态桌面壁纸
Stars: ✭ 65 (+20.37%)
Mutual labels:  window
cemu-smmdb
No description or website provided.
Stars: ✭ 56 (+3.7%)
Mutual labels:  save
deno desktop
Windowing support for Deno WebGPU.
Stars: ✭ 49 (-9.26%)
Mutual labels:  window
ee.Yrewind
Can rewind and save YouTube live stream
Stars: ✭ 133 (+146.3%)
Mutual labels:  save
butterfly
🦋 Butterfly helps you to build adaptive and responsive UIs for Android with Jetpack WindowManager.
Stars: ✭ 169 (+212.96%)
Mutual labels:  windowmanager
eseed-window
A minimal cross-platform C++17 window management library for rendering (deprecated)
Stars: ✭ 18 (-66.67%)
Mutual labels:  window
Hephaistos
NBT & Anvil save format library
Stars: ✭ 22 (-59.26%)
Mutual labels:  save
nobox
prog minimalist stacking window manager
Stars: ✭ 45 (-16.67%)
Mutual labels:  windowmanager
plain-modal
The simple library for customizable modal window.
Stars: ✭ 21 (-61.11%)
Mutual labels:  window
vue-identify-network
⚡ Identify what kinda internet your users are using!
Stars: ✭ 60 (+11.11%)
Mutual labels:  window
dotfiles
My awesomewm dotfiles for awesome people! ✨
Stars: ✭ 1,764 (+3166.67%)
Mutual labels:  windowmanager
3d-core-raub
An extensible Node.js 3D core for desktop applications
Stars: ✭ 55 (+1.85%)
Mutual labels:  window
transwin
Make window/frame transparent.
Stars: ✭ 22 (-59.26%)
Mutual labels:  window
sherlock
🔎 Find usernames across social networks
Stars: ✭ 52 (-3.7%)
Mutual labels:  window
For 0416
당신의 컴퓨터에 노란리본을 달아드립니다. For_0416 & Remember 0416
Stars: ✭ 70 (+29.63%)
Mutual labels:  window
mcwm
mcwm window manager
Stars: ✭ 34 (-37.04%)
Mutual labels:  window
hotscript
HotScript - Revolutionizing how Windows works.
Stars: ✭ 29 (-46.3%)
Mutual labels:  window

simple-window-manager

A javascript-only Window Manager

version 2

  • the API has changed from v1 to v2
  • rollup is used to compile the libraries, so there is no longer a default export: see sample code below
  • animations are deprecated for now since they felt slow--I'm open to putting them back in
  • finally moved away from style.left and style.top to transform: translate(x, y) (should have done this sooner)
  • snapping working much better; screen snapping now optionally responds to window resize
  • minimize has been removed since it does the same thing as close (unless we add a taskbar)

features

  • basic windowing experience (works great with electron to run multiple windows under one process)
  • create normal and modal windows
  • optionally snap windows to screen edges and/or other windows
  • takes advantage of all the features of the DOM, including undefined width and/or height to automatically adjust size of window based on content
  • windows may be resized, maximized, and minimized
  • minimize works by minimizing to a small square that can be moved independently. Clicking it restores to its original size and location. Minimizing again moves the small square back to the last minimized location.
  • can save and load windowing state (e.g., using localStorage or json files using Electron)
  • emits events (using eventemitter3)
  • uses javascript animations instead of CSS

rationale

I used Ventus to build internal tools and editors, but I wanted a more configurable solution with a better event model that didn't rely on CSS.

live example

https://davidfig.github.io/window-manager/

installation

npm i simple-window-manager

API documentation

https://davidfig.github.io/window-manager/jsdoc/

sample code

    import { WindowManager } from 'simple-window-manager'
    // or const WindowManager = require('simple-window-manager').WindowManager

    // this is the window manager with one of the default options changed
    const wm = new WindowManager({ backgroundWindow: 'green' });

    // enable window snapping to screen edges and other windows when moving
    wm.snap()

    // create a window    
    const window = wm.createWindow({ width: 500, height: 500, title: 'Test Window' })

    // set content of window
    window.content.style.margin = '10px'
    window.content.innerHTML = 'This is a nifty window.'

License

MIT License
(c) 2020 YOPEY YOPEY LLC by David Figatner

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].