На этой неделе я наконец решил написать в своем конфигурационном файле i3. Поскольку я часто использую firefox, я определил для него ярлык (bindsym $mod+Shift+f exec firefox
) и назначил firefox рабочей области (assign [class="Firefox"]$ws2
).
У меня вопрос: что я могу добавить к строке bindsym $mod+Shift+f exec firefox
, чтобы при открытии Firefox фокус переключался на соответствующее рабочее пространство (здесь $ws2
)?
Можно измениться на определенную рабочую область с помощью i3-msg
(в случае):
exec i3-msg "workspace $ws2"
более общий пример с i3 веб-сайта документации:
Документация: https://i3wm.org/docs/userguide.html
# Start iceweasel on workspace 3, then switch back to workspace 1
# (Being a command-line utility, i3-msg does not support startup notifications,
# hence the exec --no-startup-id.)
# (Starting iceweasel with i3’s exec command is important in order to make i3
# create a startup notification context, without which the iceweasel window(s)
# cannot be matched onto the workspace on which the command was started.)
exec --no-startup-id i3-msg 'workspace 3; exec iceweasel; workspace 1'