1

I had this issue and now I know how to solve it. I need to launch applications with i3wm's exec command.

ButI use rofi as launchmenu and I have no idea how to make it lauch applications with i3wm's exec command ?

I have binded rofi menu using this config:

 bindsym $mod+space exec --no-startup-id rofi -show combi -show-icons

How can I chive it ?
Thank you for help

Jan Černý
  • 1,185
  • 2
  • 24
  • 46

2 Answers2

1

To launch rofi using i3, you have to set a key binding with exec in your i3 config:

bindsym $mod+d exec --no-startup-id rofi -show drun

$mod is set to your modifier key (e.g., Alt or Super).

The key binding will open your application list in rofi where you can select and launch your applications.

Snake
  • 1,580
  • 1
  • 5
  • 16
  • I have no problem launching application. The problem is I want them to launch throw i3's exec. I do not think your suggestion does that. – Jan Černý Jan 19 '22 at 23:02
  • It is not clear how you want to launch your applications. If you want to use `rofi` then you would launch applications from `rofi`'s application list. If you want to simply use `exec` in i3 to launch applications directly then `rofi` is not needed. Example to launch Firefox: `bindsym $mod+F1 exec firefox` – Snake Jan 19 '22 at 23:32
  • The point is when I launch application using rofi it is equivalent as running it from terminal. So if I launch `arandr` using rofi it same as runnig `arandr` in terminal. But I want to make it so launching it from rofi would be equivalent to `i3-msg exec arandr` – Jan Černý Jan 19 '22 at 23:36
1

Solution was to change my i3 config rofi call to this:

bindsym $mod+space exec --no-startup-id rofi -show combi -run-command "i3-msg exec '{cmd}'" -show-icons
Jan Černý
  • 1,185
  • 2
  • 24
  • 46