GithubHelp home page GithubHelp logo

pedromfedricci / monocle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imsnif/monocle

0.0 0.0 0.0 80 KB

A Zellij plugin to fuzzy find file names and contents in style ๐Ÿง

License: MIT License

Rust 100.00%

monocle's Introduction

preview

About

This Zellij plugin is a fuzzy finder for file names and their contents.

It can open results in your $EDITOR (scrolled to the correct line), as floating or tiled panes.

It can open a new terminal pane to the location of the file, as a floating or tiled pane.

It will ignore hidden files and respect your .gitignore. If you press ESC or Ctrl c, it will hide itself until you call it again.

Try it out

From inside Zellij:

zellij plugin -- https://github.com/imsnif/monocle/releases/latest/download/monocle.wasm

Permanent Installation

  1. Download the monocle.wasm file from the latest release
  2. Place it in ~/.config/zellij/plugins
  3. From inside Zellij, run zellij plugin [--floating] [--in-place] -- file:~/zellij/plugins/monocle.wasm

Kiosk Mode

Monocle can be stared in "Kiosk Mode" - meaning that it will open files on top of itself instead of in a new pane. This can be especially powerful when combined with opening the monocle plugin itself "in-place".

Example:

zellij plugin --configuration kiosk=true --in-place -- file:~/.config/zellij/plugins/monocle.wasm

How do I invoke monocle with a keybinding?

Add the following to your zellij config somewhere inside the keybinds section:

// bind F1 to open monocle in a new floating pane and open any results in a new tiled/floating pane
bind "F1" {
    LaunchOrFocusPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
        floating true
    };
    SwitchToMode "Normal"
}
// bind "Alt m" to open monocle on top of the current pane and open any results on top of itself
bind "Alt m" {
    LaunchPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
        in_place true
        kiosk true
    };
    SwitchToMode "Normal"
}

Development

Load the dev.kdl layout from inside zellij: zellij action new-tab -l dev.kdl or from outside Zellij with zellij -l dev.kdl

Known issue

Does not like (read: crashes on) device files and other non-file entities. This is an upstream issue with the Zellij version of wasmer. It is recommended not to use it inside system folders.

monocle's People

Contributors

imsnif avatar jengamon avatar hoop33 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.