You are not logged in.
i made a script with the purpuse of creating 2 containers calling a json i3 layout, load thunar ~/Music and vlc on the workspace 7
if i launch the script from terminal it works perfeclty
if i bind it in i3 the behaviour is quite odd:
it creates the 2 containers, the thunar container is fully black and vlc is loaded fine. i can see thunar in pgrep tough.
how is this possible?
when i was using pcmanfm it was working fine.
Last edited by difri84 (2022-05-11 21:43:03)
Offline
i made a script ... if i bind it in i3 the behaviour is quite odd ... how is this possible?
If you actually want an answer, shouldn't you post or link to the script? Without all you'll get is riduculously wild guesses - though perhaps the common theme would simply be that the running environment differs.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
i thought it wouldn't be necessary since the script works perfectly fine if called from terminal,
anyway..
Script:
#!/bin/bash
i3-msg "workspace 7:; append_layout ~/.config/i3/music/music.json"
thunar ~/Music &
vlcJson layout file:
{
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"percent": null,
"type": "con",
"nodes": [
{
"border": "pixel",
"floating": "auto_off",
"percent": 0.9,
"swallows": [
{
"class": "^Thunar",
"instance": "^thunar",
"title": "Music"
}
],
"type": "con"
},
{
"border": "pixel",
"floating": "auto_off",
"percent": 0.1,
"swallows": [
{
"class": "^vlc",
"instance": "^vlc",
"title": "*"
}
],
"type": "con"
}
]
}call command in i3 config:
bindsym $mod+Control 7 exec ~/.config/i3/music/music.shLast edited by difri84 (2022-05-11 19:51:19)
Offline
Race?
What if you "sleep 1" after the i3-msg?
Offline
just tried it and nothing different happens ![]()
maybe is there some problem in the way i call the script in i3 config?
i dont understand the race? question
Last edited by difri84 (2022-05-11 21:26:33)
Offline
https://en.wikipedia.org/wiki/Race_condition
The shortcut will cause an active keyboard grab - you could try to sleep *before* the i3-msg to allow yourself to release the key.
Not sure whether that's the cause, though.
Offline
same result again.
thing is the same script was working fine with pcmanfm
the only reason i switched to thunar is the feature about remember specific folder view preference.
can i achieve the same with pcmanfm? it seemed not to me when i looked for it but maybe i missed something
EDIT
solved switching to nemo
CONCLUSION
since the problem happens only using thunar i guess there's something in thunar code causing it
Last edited by difri84 (2022-05-11 21:42:37)
Offline