diff --git a/Settings.ui b/Settings.ui
index 35357f8..b9c6880 100644
--- a/Settings.ui
+++ b/Settings.ui
@@ -12,6 +12,11 @@
1
10
+
+
+
+ True
+ True
+
+
+ True
+ False
+ 12
+ 12
+ 32
+
+
+ True
+ False
+ True
+ Bottom margin
+ 0
+
+
+ 0
+ 0
+
+
+
+
+ True
+ True
+ 2
+ 2
+ 0
+ 1
+ number
+ vertical_margin_bottom
+ True
+ True
+ if-valid
+
+
+ 1
+ 0
+
+
+
+
+
+
True
diff --git a/prefs.js b/prefs.js
index 7c57dae..e5cd01f 100644
--- a/prefs.js
+++ b/prefs.js
@@ -86,10 +86,16 @@ class SettingsWidget {
this._settings.set_int('horizontal-margin', hMargin.get_value());
});
- let vMargin = this.builder.get_object('vmargin_spinner');
- vMargin.set_value(this._settings.get_int('vertical-margin'));
- vMargin.connect('value-changed', () => {
- this._settings.set_int('vertical-margin', vMargin.get_value());
+ let topMargin = this.builder.get_object('top_margin_spinner');
+ topMargin.set_value(this._settings.get_int('vertical-margin'));
+ topMargin.connect('value-changed', () => {
+ this._settings.set_int('vertical-margin', topMargin.get_value());
+ });
+
+ let bottomMargin = this.builder.get_object('bottom_margin_spinner');
+ bottomMargin.set_value(this._settings.get_int('vertical-margin-bottom'));
+ bottomMargin.connect('value-changed', () => {
+ this._settings.set_int('vertical-margin-bottom', bottomMargin.get_value());
});
let onlyScratch = this.builder.get_object('only-scratch-in-overview');
diff --git a/schemas/gschemas.compiled b/schemas/gschemas.compiled
index 0f37ec8..ece3a72 100644
Binary files a/schemas/gschemas.compiled and b/schemas/gschemas.compiled differ
diff --git a/schemas/org.gnome.shell.extensions.org-scrollwm.gschema.xml b/schemas/org.gnome.shell.extensions.org-scrollwm.gschema.xml
index b3f3c3e..1defbc9 100644
--- a/schemas/org.gnome.shell.extensions.org-scrollwm.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.org-scrollwm.gschema.xml
@@ -202,7 +202,12 @@
5
- Minimum margin from windows top and bottom edge
+ Minimum margin from windows top edge
+
+
+
+ 0
+ Minimum margin from windows bottom edge
diff --git a/settings.js b/settings.js
index 8b9ac48..bf25404 100644
--- a/settings.js
+++ b/settings.js
@@ -19,8 +19,8 @@ var KEYBINDINGS_KEY = 'org.gnome.Shell.Extensions.PaperWM.Keybindings';
var META_KEY_ABOVE_TAB = 0x2f7259c9;
var prefs = {};
-['window-gap', 'vertical-margin', 'horizontal-margin', 'workspace-colors',
- 'default-background', 'animation-time', 'use-workspace-name',
+['window-gap', 'vertical-margin', 'vertical-margin-bottom', 'horizontal-margin',
+ 'workspace-colors', 'default-background', 'animation-time', 'use-workspace-name',
'pressure-barrier', 'default-show-top-bar', 'swipe-sensitivity',
'cycle-width-steps', 'cycle-height-steps']
.forEach((k) => setState(null, k));
diff --git a/tiling.js b/tiling.js
index 19204de..b5a71f3 100644
--- a/tiling.js
+++ b/tiling.js
@@ -373,7 +373,7 @@ class Space extends Array {
return;
}
let availableHeight = (workArea.y - this.monitor.y + workArea.height -
- (panelBox.height)*this.showTopBar - prefs.vertical_margin);
+ (panelBox.height)*this.showTopBar - prefs.vertical_margin - prefs.vertical_margin_bottom);
let y0 = (panelBox.height)*this.showTopBar + prefs.vertical_margin;
let fixPointAttempCount = 0;