[i3king] unable to get rules working #214
Labels
No labels
Arch PKGBUILD
bug
build
commandline
duplicate
enhancement
font
good first issue
help wanted
implemented
is-it-really-a-bug?
necromancy
not-reproducable
question
reproducable
rofi
solved?
stalled
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bud/i3ass#214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, thanks for the amazing i3 toolset. They are all working great for me except i3king which I am having some issue with. Probably user error, but hoping I can get some guidance.
I am on void linux/runit. i3king --version reports version: 0.4.3 updated: 2023-08-04
I am starting i3king in my i3 startup script as 'i3king &'. After boot I see two PIDs running as i3king and the pid file at /run/user/1000/i3ass/i3king.pid so all is well there.
I edited the default ~/.config/i3king/rules file to just contain:
GLOBAL
exec --no-startup-id notify-send a-new-window-was-created
So I expect every new window to pop up a notification as a test, but this is not happening. If I just run 'notify-send hello' at the terminal the mesage pops up ok so I see my notify-send is working.
If I run i3king at the terminal like this: 'i3king --dryrun' I get a warning with the rules file above.
[WARNING] 'GLOBAL'
Expected criteria, got ('') A missplaced command? maybe.
Could you suggest something I could try or change to get this working? Thank you.
Some follow-up...Using the default rules file that i3king creates on first start and running 'i3king --verbose --dryrun' results in this output:
% i3king --verbose --dryrun
i3king start
class:.:instance:firefox:title:a:space:window:space:title|tab:window_type:.:window_role:.:
[WARNING] 'GLOBAL'
Expected criteria, got ('') A missplaced command? maybe.
[WARNING] 'DEFAULT'
Expected criteria, got ('') A missplaced command? maybe.
class:URxvt:instance:.:title:.:window_type:.:window_role:.:
class:URxvt:instance:.:title:.:window_type:.:window_role:.:
class:.:instance:firefox:title:.:window_type:.:window_role:.:
class:URxvt:instance:.:title:.:window_type:.:window_role:.:
class:.:instance:firefox:title:.:window_type:.:window_role:.:
class:URxvt:instance:.:title:.:window_type:.:window_role:.:
class:.:instance:firefox:title:.:window_type:.:window_role:.:
class:.:instance:firefox:title:.:window_type:.:window_role:.:
class:URxvt:instance:.:title:.:window_type:.:window_role:.*:
So it looks like the GLOBAL and DEFAULT lines with no blacklist criteria are throwing warnings and not getting parsed even with the default rules file. Maybe something related to the regex changes from the last update?
Yes, there appears to be a bug with GLOBAL and DEFAULT rules without blacklist criteria.
I modified my simplified example rules file from this:
GLOBAL
exec --no-startup-id notify-send a-new-window-was-created
to this:
GLOBAL class=foobar
exec --no-startup-id notify-send a-new-window-was-created
and now running 'i3king --verbose --dryrun' doesn't produce any warnings:
i3king start
class:foobar:instance:.:title:.:window_type:.:window_role:.:
So now, the rule is triggered when a new window is opened. However, with the GLOBAL rule above, opening a new window produces an entire screen full of notification chicklets, then they expire, then a another full screen of notifications is drawn, and this goes on until I kill the i3king process. Might be something to do with not having systemd?
If I change the rule to use 'wall' instead of 'notify-send' then all works good and the terminals get the message:
GLOBAL class=foobar
exec --no-startup-id wall a-new-window-was-created
i3kings config file is (among other things) depending on some of the i3 config syntax, make sure you get the indentation right and escape \n newlines in the right places. Indent the second line with two spaces:
The difference in between notify-send and wall, does imply another probable cause though..
Maybe they differ in how they eventually assign winid's to the processes spawning a single winid to the notifications, or a new winid for every single notification pop-up.
Can't help you with that, systemd, notify-send and definitely wall are out of my league to understand thoroughly.
Hi, yes I have the spacing and format correct. As I mentioned, this error occurs on the default config file example from i3ass itself, not just my specific config file.
@TimRegeant I noticed you edited your comment.. I saw you looked into my write-up..
if I use:
i3king throws this error
Using the previous setting below, makes i3king initialize and run perfectly, w/o throuing any errors.
... I am not saying you are wrong, perhaps there are issues/errors in the bash scripting and/or the manpage/--help pages are incorrect. Unfortunately, I cannot just help you with that
I edited my comment because I was wrong about what I said :).
@TimRegeant ok, no problem!\
I will look into this. Without testing anything, it sounds like there is a bug when DEFAULT not having a blacklist . Is there a GLOBAL rule, i don't remember that.
@TimRegeant thanks for testing and good bug report!
@1ntronaut great support, means a lot, really, thanks :)
I think i fixed it. @TimRegeant can you test it to confirm?
Yes, seems fixed, no errors thrown on DEFAULT keyword with no blacklist. Thanks so much!