From 5e78b1dbe2a879104cfaacda3e5d341b6ce482f2 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 24 Jul 2022 12:58:17 +0100 Subject: Update readme with drun info. --- README.md | 15 +++++++++++++++ meson.build | 12 ++++++++++++ 2 files changed, 27 insertions(+) diff --git a/README.md b/README.md index 2cbfe96..b16bdcc 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ By default, running `tofi` causes it to act like dmenu, accepting options on `tofi-run` is a symlink to `tofi`, which will cause tofi to display a list of executables under the user's `$PATH`. +`tofi-drun` is also a symlink to `tofi`, which will cause tofi to display a +list of applications found in desktop files as described by the [Desktop Entry +Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html). + To use as a launcher for Sway, add something similar to the following to your Sway config file: ``` @@ -60,6 +64,17 @@ set $menu tofi-run | xargs swaymsg exec -- bindsym $mod+d exec $menu ``` +For `tofi-drun`, there are two possible methods: +``` +# Launch via Sway +set $drun tofi-drun | xargs swaymsg exec gio launch +bindsym $mod+Shift+d exec $drun + +# Launch directly +set $drun tofi-drun --drun-launch=true +bindsym $mod+Shift+d exec $drun +``` + See the main [manpage](doc/tofi.1.md) for more info. ### Theming diff --git a/meson.build b/meson.build index 617e9ef..32611a7 100644 --- a/meson.build +++ b/meson.build @@ -38,6 +38,18 @@ install_data( install_dir: completion_location ) +install_symlink( + 'tofi-run', + install_dir: completion_location, + pointing_to: 'tofi', +) + +install_symlink( + 'tofi-drun', + install_dir: completion_location, + pointing_to: 'tofi', +) + install_symlink( 'tofi-run', install_dir: get_option('bindir'), -- cgit v1.2.3