-
-
Save dluciv/592c630211fe77624d174ce6bd6a9e55 to your computer and use it in GitHub Desktop.
Sway browser pop-up window float hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Sway Popup Window Detector | |
// @namespace https://dluciv.name/ | |
// @version 0.1 | |
// @description Detect "pop-up" windows because for some reason Wayland doesn't have a built-in way to do it??! | |
// @author Maddison Hellstrom <github.com/b0o> | |
// @author Dmitry Luciv <github.com/dluciv> | |
// @include /^.*$/ | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
if ((window.titlebar && window.titlebar.visible === false) | |
|| (window.menubar && window.menubar.visible === false)) { | |
document.title = `🗨 ${document.title}` | |
} | |
})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for_window { | |
[title="^🗨 "] { | |
floating enable | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment