Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/genesisneo/sokan
Easily organize windows without using a mouse.
https://github.com/genesisneo/sokan
app application control css css3 electron html html5 javascript move nodejs window windows
Last synced: 12 days ago
JSON representation
Easily organize windows without using a mouse.
- Host: GitHub
- URL: https://github.com/genesisneo/sokan
- Owner: genesisneo
- License: mit
- Created: 2017-09-03T15:37:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T15:31:14.000Z (over 1 year ago)
- Last Synced: 2023-03-05T20:02:35.569Z (over 1 year ago)
- Topics: app, application, control, css, css3, electron, html, html5, javascript, move, nodejs, window, windows
- Language: JavaScript
- Homepage:
- Size: 675 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sōkan (壮観)
Easily organize windows without using a mouse.
---
#### Table of Contents:
* [Download](#download)
* [How to setup](#how-to-setup)
* [Development](#development)
* [Task Scheduler](#task-scheduler)
* [Question](#question)---
## Download
You can download the application on the release page.
https://github.com/genesisneo/window-control/releases---
## How to setup
* This application only works on **_Windows_** operating system
* Download, Fork, or Clone this repo
* Download and install [node.js ^16.10.0](https://nodejs.org/en/download/releases/). If you need multiple version you can use [nvm-windows](https://github.com/coreybutler/nvm-windows)
* Open your preferred **_shell_**. If your using **_PowerShell_** as Administrator, you need to execute this command
```
Set-ExecutionPolicy RemoteSigned
```
* Install `node-gyp` globally
```
npm i node-gyp -g
```
* Install `windows-build-tools` globally
```
npm i -g --production windows-build-tools --vs2015
```
* Configure `msvs 2015`
```
npm config set msvs_version 2015
```
* Set Python executable path, where `{user}` is your **_Windows_** user name
```
npm config set python C:\Users\{user}\.windows-build-tools\python27\python.exe
```
* Open **_Environment Variables_** and under **_User variables for Windows_** add `PYTHON` with the value of `%USERPROFILE%\.windows-build-tools\python27\python.exe`
* Under **_System variables_** add `PY_HOME` with value of `%USERPROFILE%\.windows-build-tools\python27\`
* On **_System variables_**, look for `Path` and add this values through "Edit text..." `%PY_HOME%;%PY_HOME%\Lib;%PY_HOME%\DLLs;%PY_HOME%\Lib\lib-tk;`
* Apply all changes, close **_Environment Variables_** and restart your prefered **_shell_**
* On your prefered **_shell_**, navigate to this repo and install all the dependencies
```
npm i
```
* You can now do the following:
```
# start application
npn run start# package the application
npm run package# build the application
npm run build
```---
## Development
To show developer tool and excute console log. You can add the following code after `window.loadFile`.
```
window.webContents.openDevTools();
window.webContents.executeJavaScript(`console.log(">>> ${process.execPath}")`);
```---
## Task Scheduler
Since the application is not signed, it will not run on Windows start, even if the application is added through `Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run` or `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup`. To run the application on Windows start, we can use Task Scheduler. The `scheduler.bat` file, will create a basic task when **_Run as administrator_**.
Please note that before running this file as administrator, edit the file using Notepad and update the `"C:\PATH\TO\Sokan.exe"` accordingly. See example below.
```
SCHTASKS /CREATE /SC ONSTART /TN "Sokan" /TR "C:\Program Files\Customization\Sokan.exe" /RL HIGHEST
```---
## Question
If you have question, you can always contact me on Twitter [@genesis_neo](https://twitter.com/genesis_neo) and of course here in GitHub [@genesisneo](https://github.com/genesisneo). Thank you.
---
-=[ :heart: ]=-