documentation/docs/void-desktop-setup/graphical-session/application-launcher.md

97 lines
2.4 KiB
Markdown
Raw Normal View History

2023-08-25 17:44:30 +02:00
# Application launcher
2023-08-16 22:09:10 +02:00
An application launcher may be used to easily start applications in Wayfire.
2023-08-25 17:44:30 +02:00
## Tofi
2023-08-16 22:09:10 +02:00
For a fast and lightweight application launcher it's recommended to use `tofi` which starts in a few miliseconds if configured correctly. To install it:
```
# xbps-install -Sy tofi
```
Tofi can be configured by editing `.config/tofi/config`.
```
cp -r {config-files-repo}/tofi .config/
```
To launch tofi through a keybind it has to be bound in `.config/wayfire.ini`.
```
[command]
binding_launcher = <super> KEY_S
command_launcher = tofi-drun | xargs /bin/bash -c -- & exit
```
2023-08-25 17:44:30 +02:00
## Wofi
2023-08-16 22:09:10 +02:00
Although the `wofi` package is no longer maintained and is generally less optimised compared to `tofi` it does have some important features that `tofi` does not have. Such as, a better positioning protocol.
To install the `wofi` package.
```
# xbps-install -Sy wofi
```
Wofi may be configured by editing `.config/wofi/config`.
```
$ cp -r {config-files-repo}/wofi .config/
```
Wofi may be launched with a keybind, thereby edit `.config/wayfire.ini`.
```
[command]
binding_launcher = <super> KEY_S
command_launcher = wofi --show drun
```
2023-08-25 17:44:30 +02:00
## Wlogout
2023-08-16 22:09:10 +02:00
Wlogout may be used as a specific launcher for power management options. Such as, reboot, suspend and to power off the system.
To install the `wlogout` package.
```
# xbps-install -Sy wlogout
```
Wlogout can be configured by editing `.config/wlogout/layout`.
```
$ cp -r {config-files-repo}/wlogout .config/
# cp {config-files-repo}/extra/wlogout-icons/* /usr/share/wlogout/icons/
```
Wlogout can be launched with a keybind, thereby edit `.config/wayfire.ini`.
```
[command]
binding_wlogout = <super> KEY_P
command_wlogout = wlogout
```
Wlogout needs permission to shutdown the system. This permission can be given by creating `/etc/polkit-1/rules.d/00-power-management.rules` and inserting.
```
polkit.addRule(function(action, subject)
{
if (action.id == "org.freedesktop.policykit.exec" && action.lookup("program") == "/bin/shutdown" && subject.isInGroup("wheel"))
return polkit.Result.YES;
});
polkit.addRule(function(action, subject)
{
if (action.id == "org.freedesktop.policykit.exec" && action.lookup("program") == "/bin/zzz" && subject.isInGroup("wheel"))
return polkit.Result.YES;
});
```
or
```
# cp {config-files-repo}/polkit/00-power-management.rules /etc/polkit-1/rules.d/
2023-08-16 23:26:07 +02:00
```