Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

genesisneo/sokan

Repository files navigation



Sōkan (壮観)

Easily organize windows without using a mouse.


Table of Contents:


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. If you need multiple version you can use 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 and of course here in GitHub @genesisneo. Thank you.


-=[ ❤️ ]=-