Closed tsujan closed 1 year ago
Related to #1410
Yet another rule, that's especially important for notifications, is preventing the window from grabbing the focus (= being activated) on creation.
I don't know if Wayfire has a way of not activating a window on creation, but I didn't find any.
I don't know if Wayfire has a way of not activating a window on creation, but I didn't find any.
Wayfire tries to guess whether the window needs focus or not. What kind of a notification daemon do you use? Wayland-native ones like mako should work out of the box.
That was just a suggestion. lxqt-notificationd
works fine under Wayfire. My goal was making Qt apps that don't depend on X11 comfortably usable under Wayfire.
This is a patch that adds sticky, always_on_top and the 2nd idea from #1566.
@soreau, thanks! I applied it to 0.7.4, and now I can auto-start Conky on all desktops by using this rule:
on created if app_id is "Conky" then sticky
@tsujan Check out #1572, I changed it so it's 'set always_on_top' and 'set sticky', since it seemed to make more sense.
since it seemed to make more sense
Yes, it's more consistent with other parts, like "on created",...
@tsujan I tried this rule but conky only appeared on the first Desktop, How conky can appear to all workspace? Do you need to apply other settings? [window-rules] rule_21 = on created if app_id is "Conky" then sticky
@bluebyt65 I think the rule should be
rule_21 = on created if (app_id equals "Conky") then set sticky
@marcusbritanicus I tried this, but I have the same result, I restart conky and it appeared only on one Desktop, nevertheless thanks for helping me!
rule_21 = on created if (app_id equals "Conky") then set sticky
on created if app_id is "Conky" then set sticky
@tsujan No same result, it only appeared on the Desktop that I started conky.
@bluebyt65, are you sure you have the commit https://github.com/WayfireWM/wayfire/pull/1572?
I thought that this commit was merge to the master branch? wayfire -v 0.8.0-c3dac7ee (Oct 1 2022, branch 'HEAD')
My bad I thing I forgot to restart wayfire after updating to the master branch, I will try it later. Thanks for your helps!
Finally a have the latest master branch, but it still doesn't work. wayfire -v 0.8.0-c3dac7ee (Oct 1 2022, branch 'HEAD')
@bluebyt65 You want 'set sticky' in the rule not just 'sticky'.
@soreau What are the difference between 'set sticky' and 'sticky'? This is my rule: rule_21 = on created if app_id is "Conky" then set sticky
But Conky only appeared on the Desktop I have started Conky. I want it to appear on all workspace.
The app_id is "conky" with lowercase 'c'. You can find this information easily with wf-info.
Your conky id may not be "Conky". Find it with wf-info.
EDIT: Conky's id may be set in its config file.
I tried both 'Conky' and 'conky' but I got the same result.
@soreau I didn't know about wf-info, I usually get the ap_id in the file wayfire.log Example: app_id equals variant: [type: string, value: Conky]
I will post my config later, maybe it contain something wrong @tsujan 'EDIT: Conky's id may be set in its config file.' I didn't know that you can set Conky id, I will look at that.
For other reason I had to reinstall Wayfire and now somehow the rule sticky are working with conky. rule_21 = on created if app_id is "Conky" then set sticky
One think thought, conky shouldn't appear in Scale or switcher screen.
Would it be possible to define the layer to be able to set a dock accordingly? or a wallpaper app?
@JoaquinDecima Currently, there are no rules to define the layer. However, rather than using window rules, it's best to write a simple plugin to do the job. You should look at the background-view plugin from wayfire-plugins-extra.
https://github.com/WayfireWM/wayfire-plugins-extra/blob/master/src/background-view.cpp#L118
For other reason I had to reinstall Wayfire and now somehow the rule sticky are working with conky. rule_21 = on created if app_id is "Conky" then set sticky
One think thought, conky shouldn't appear in Scale or switcher screen.
If you set own_window_type=desktop in ~/.conkyrc, this patch should automatically place conky on the background layer and make it sticky, while not appearing in switchers or scale.
I also see it logical that all views should appear when switch and scale plugins are used (sticky views included), except for those views that aren't supposed to be focused or raised (at some point and by using future rules).
For other reason I had to reinstall Wayfire and now somehow the rule sticky are working with conky. rule_21 = on created if app_id is "Conky" then set sticky One think thought, conky shouldn't appear in Scale or switcher screen.
If you set own_window_type=desktop in ~/.conkyrc, this patch should automatically place conky on the background layer and make it sticky, while not appearing in switchers or scale.
@soreau I hope this patch will be merge to master branch, I have to learn how to apply a patch :)
@bluebyt65 The other way to do this is to set conky
for command and app_id options in background-view plugin, though it might always end up at top/left.
@soreau I added the following to wayfire.ini but that doesn't change anything. [core] background-view
[background-view] app-id = Conky command = Conky file =
Underscore now with latest git and maybe lowercase for conky:
[core]
....
background-view \
....
[background-view]
app_id = conky
command = conky
wf-info for conky give me this "Conky" App ID: Conky
I changed for underscore but same result. [background-view] app_id = Conky command = Conky file =
$ Conky
bash: Conky: command not found
$ conky
conky: no personal or system-wide config file found, using builtin default
conky: desktop window (3c6) is root window
....
I tried both and my rule is working. rule_21 = on created if app_id is "Conky" then set sticky
I was saying that the command Conky
doesn't exist.
[background-view]
command = conky
app_id = Conky
works here (with latest git for plugins-extra)
@stefonarch You are right, I changed the command as following, but conky it still appear in scale and switcher
[background-view] app_id = Conky command = conky -c $HOME/.conky/grumimosa/Mimosa.conf &> /dev/null & file =
Please discuss background-view issues in the issue tracker of wayfire-plugins-extra @bluebyt65 @stefonarch
@JoaquinDecima Currently, there are no rules to define the layer. However, rather than using window rules, it's best to write a simple plugin to do the job. You should look at the background-view plugin from wayfire-plugins-extra.
https://github.com/WayfireWM/wayfire-plugins-extra/blob/master/src/background-view.cpp#L118
There is the possibility that you give me a hand writing the plugin, or guiding me. I never programmed in C++ and with my little time it is difficult for me to understand the code that you provided me.
Sorry, my english is very bad From already thank you very much
@marcusbritanicus
If you join matrix or IRC, we might be able to help you further.
I think there's already a feature request about stickiness (couldn't find it), but:
If Wayfire had rules under
[window-rules]
for making windows go to bottom(/top) and/or be sticky, it would be possible to use pcmanfm-qt's desktop module — and perhaps other things — with it consistently.More rules might also be useful/needed if possible.
EDIT: Maybe https://github.com/WayfireWM/wayfire/issues/1566 is a special case of this feature request.