So whenever I start mint I want librewolf (my browser) to launch visible on all workspaces.
I found this page on the forums that seemed to have the solution, but problematically librewolf changes its window title depending on what site youre visiting (so does discord btw).
After some convoluted steps of googling all kinds of little problems i arrived at this command that i put into the app launcher (you can get to this by opening the launcher, searching for the programme you want, right clicking it in the launcher and clicking "properties"):
sh -c "/usr/share/librewolf/librewolf %u & while ! wmctrl -lx | grep -qi 'Navigator.librewolf'; do sleep 2; done; wmctrl -x -r Navigator.librewolf -b add,sticky"
It is probably bloated so im sure someone more capable than I will comment something much better but this worked for me!
To explain, to the best of my abilities;
sh -c ".."
runs the command in the shell. The double quotes instead of single quotes are important./usr/share/librewolf/librewolf %u &
launches librewolf in the background. Replace /librewolf/librewolf with whatever the path to the application you want to apply this to. The%uis a placeholder for a search term for librewolf and id bet would be there for all firefox-based browsers. I know for discord for example it isnt present.while ! wmctrl -lx | grep -qi 'Navigator.librewolf'; do sleep 2; done;
waits until its launched before running the next command. I dont really understand this part too well but all some person reading this in the future needs to know (afaik) is to open the programme, then runwmctrl -lxin their terminal and find whatever text it prints out that is in the place ofNavigator.librewolfon a line that looks something like this:
->0x03a0003e 2 Navigator.librewolf meiju New Tab — Mozilla Firefox.
and replaceNavigator.librewolfwith that!wmctrl -x -r Navigator.librewolf -b add,sticky
It's a slightly modified version of what the forum page has, but instead of the window title it uses the window class (i think) to make the window sticky!
I would like feedback on how I can make this more efficient (and explain the solution more clearly!)