Skip to content

Commit 31104c9

Browse files
committed
feat: ✨ added option to configure autohide
1 parent fdbf124 commit 31104c9

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ click=toggle-cycle
9494
menu-click=show
9595
#Exclude windows whose class or instance contains one of these values
9696
exclude=scratchpad;
97+
#Automatically hides Polydock if another window overlaps
98+
autoHide=true
9799

98100
[commands]
99101
hide=bspc node {window} -g hidden=on -f

config/settings.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ groupBy=instance;visibility;
1919
activeWorkspaceOnly=false
2020
showHidden=true
2121
showVisible=true
22+
#Automatically hides Polydock if another window overlaps
23+
autoHide=true
2224
#Action on click. One of: show, hide, toggle, cycle, toggle-cycle
2325
click=toggle-cycle
2426
menu-click=show

src/app-window.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ export class AppWindow {
161161
}
162162

163163
autoHide() {
164-
const overlaps = this.overlapsWithActiveWindow()
164+
const overlaps =
165+
config.settings.behavior.autoHide && this.overlapsWithActiveWindow()
165166
const show = this.dock.show && !overlaps
166167

167168
if (show) {

src/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const defaults = {
2020
activeWorkspaceOnly: false,
2121
showHidden: true,
2222
showVisible: true,
23+
autoHide: true,
2324
click: "toggle-cycle" as DockAction,
2425
"menu-click": "show" as DockAction,
2526
exclude: ["scratchpad"],
@@ -141,6 +142,11 @@ class Config {
141142
"iconTheme",
142143
`An gtk icon theme name, or 'default'`
143144
)
145+
ini.set_comment(
146+
"behavior",
147+
"autoHide",
148+
"Automatically hides Polydock if another window overlaps"
149+
)
144150
ini.set_comment(
145151
"behavior",
146152
"click",

0 commit comments

Comments
 (0)