Skip to content

Commit 44bb18a

Browse files
authored
Merge pull request #91 from HB9HIL/resizable_variable
Add possibility to make Window resizable by ENV
2 parents 352d848 + f95897e commit 44bb18a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,15 @@ Access advanced settings by pressing **Ctrl+Shift+D** in the configuration windo
140140

141141
**Note**: Advanced settings are in beta - restart the application after changes to ensure they're applied correctly.
142142

143+
### Special: Tiling Window Managers like i3 or Hyprland
144+
145+
With tiling window managers the window will be at it's fixed size which is usually okay for the normal user. In tiling WM this doesn't work properly. To fix that you can allow the window to resize by setting a env variable. This will only affect a handful of users and they will know how to handle it.
146+
147+
```bash
148+
export WLGATE_RESIZABLE=true
149+
./path_to_your_bin
150+
```
151+
143152
## Development
144153

145154
### Prerequisites

main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ const xml = require("xml2js");
66
const net = require('net');
77
const WebSocket = require('ws');
88

9+
// In some cases we need to make the WLgate window resizable (for example for tiling window managers)
10+
// Default: false
11+
const resizable = process.env.WLGATE_RESIZABLE === 'true' || false;
12+
913
const gotTheLock = app.requestSingleInstanceLock();
1014

1115
let powerSaveBlockerId;
@@ -47,7 +51,7 @@ function createWindow () {
4751
const mainWindow = new BrowserWindow({
4852
width: 430,
4953
height: 250,
50-
resizable: false,
54+
resizable: resizable, // Default: false, can be overwritten with WLGATE_RESIZABLE
5155
autoHideMenuBar: app.isPackaged,
5256
webPreferences: {
5357
contextIsolation: false,

0 commit comments

Comments
 (0)