Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rofi script to tips #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,44 @@ run = '''
'''
```

## Preview directory with Rofi

**This tip currently requires Yazi nightly version.**

This script lets you preview the current directory's thumbnails using Rofi. Selecting an item reveals it in Yazi.

Save the script in your preferred location, for example, ~/.config/rofi/rofi-gridview.sh.

```bash
#!/bin/bash

rofi \
-theme fullscreen-preview \
-show filebrowser \
-filebrowser-command "ya emit reveal" \
-filebrowser-directory "$(pwd)"
```

Make it executable:

```
chmod +x ~/.config/rofi/rofi-gridview.sh
```

Then add the script as a keybinding.

```toml
# ~/.config/yazi/keymap.toml
[[manager.prepend_keymap]]
on = "<C-s>"
run = '''
shell --confirm '~/.config/rofi/rofi-gridview.sh'
'''
'''
```

Rofi themes: https://davatorium.github.io/rofi/themes/themes

## Make Yazi even faster than fast {#make-yazi-even-faster}

While Yazi is already fast, there is still plenty of room for optimization for specific users or under certain conditions:
Expand Down