this post was submitted on 22 Feb 2025
40 points (93.5% liked)
Linux
50208 readers
787 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If you are the person asking the floating window question from the other day as JustAnotherKay spotted, then this is how I set a window to floating in my config;
for_window [title="www.youtube.com" app_id="firefox"] floating enable, resize set 1280 720 , opacity 1
What this is doing is selecting any firefox app that has www.youtube.com anywhere in the title and make that floating, with a set size, and remove any opacity (transparency) that might be applied to the window.
You can add move absolute position 0 0 on the end if you want to set the absolute location for the window.
You can force a window to a particular workspace by:
assign [class="discord"] workspace number $ws2
and that workspace to a particular monitor with:
workspace $ws2 output DP-1
If I wanted to do this for all firefox windows I would just remove the title= part from the selection.
How do you get the titles and other components? Using swaymsg as follows:
swaymsg -t get_tree
this will output all your open windows per monitor, for each app you want to manage you are looking for something like:
#15: con "#tech-talk🖥 | 40% Keyboards - Discord" (xdg_shell, pid: 6260, app_id: "discord")
from here you its simple to pick up what you can use for a unique select, so app_id:="discord" in this case.
If you reload your config file, then reopen the app, it should reflect the changes you made to the config file. Logging on and off in the worst case will restart it.