mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-22 20:55:59 +01:00
Simplify autostarting apps (#283)
This commit is contained in:
parent
a588bcea30
commit
accd8fa14f
1 changed files with 7 additions and 30 deletions
|
@ -145,42 +145,19 @@ Waybar has a set of caveats or settings that you need to be aware of. See
|
||||||
|
|
||||||
# How do I autostart my favorite apps?
|
# How do I autostart my favorite apps?
|
||||||
|
|
||||||
Using the window rules to assign apps to workspace you can setup a session start
|
Using the window rules to assign apps to workspace you can open a bunch of
|
||||||
script to open a bunch of applications on various workspaces. The following
|
applications on various workspaces. The following method will start these apps
|
||||||
method will start these apps silently (i.e. without the flickering from
|
silently (i.e. without the flickering from workspace to workspace).
|
||||||
workspace to workspace) and deassign the rule so that subsequent start of this
|
|
||||||
app will not start it on the initially assigned workspace (which could be a drag
|
|
||||||
if e.g. you want kitty to be started on ws 1 while you need kitty to open on any
|
|
||||||
workspace subsequently).
|
|
||||||
|
|
||||||
Put the following in your `hyprland.conf`: (example)
|
Put the following in your `hyprland.conf`: (example)
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
windowrule=workspace 1 silent,kitty
|
exec-once=[workspace 1 silent] kitty
|
||||||
windowrule=workspace 1 silent,Subl
|
exec-once=[workspace 1 silent] subl
|
||||||
windowrule=workspace 3 silent,Mailspring
|
exec-once=[workspace 3 silent] mailspring
|
||||||
windowrule=workspace 4 silent,firefox
|
exec-once=[workspace 4 silent] firefox
|
||||||
[...]
|
|
||||||
exec-once=kitty
|
|
||||||
exec-once=subl
|
|
||||||
exec-once=mailspring
|
|
||||||
exec-once=firefox
|
|
||||||
[...]
|
|
||||||
exec-once=cleanup_after_start.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
where `cleanup_after_start.sh` script contains:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sleep 10
|
|
||||||
hyprctl keyword windowrule "workspace unset,kitty"
|
|
||||||
hyprctl keyword windowrule "workspace unset,Subl"
|
|
||||||
hyprctl keyword windowrule "workspace unset,Mailspring"
|
|
||||||
hyprctl keyword windowrule "workspace unset,firefox"
|
|
||||||
```
|
|
||||||
|
|
||||||
in `sleep 10`, the 10 seconds is of course only a suggestion.
|
|
||||||
|
|
||||||
# How do I move my favorite workspaces to a new monitor when I plug it in?
|
# How do I move my favorite workspaces to a new monitor when I plug it in?
|
||||||
|
|
||||||
if you want workspaces to automatically go to a monitor upon connection, use the
|
if you want workspaces to automatically go to a monitor upon connection, use the
|
||||||
|
|
Loading…
Reference in a new issue