Coder Social home page Coder Social logo

pikeru's Introduction

File Picker with Good Thumbnails and Search

Pikeru is a file picker, file searcher, and image viewer for linux that works on any desktop environment or window manager. It has an xdg-desktop-portal backend that makes it useable with web browsers and anything else that uses portal for file selection.

Screenshot_20240720_171747

Special features other filepickers don't have

  • Recursive fuzzy semantic file search can search images by visual content in addition to file name.
  • Select multiple directories with ctrl, shift, middle-click, or right-click and click Open to view the contents of all of them at the same time.
  • Right click an image to view it. Scroll the image to view the next and previous images.
  • Cmd menu shows commands specified in the config. Click one to run it on the selected files.
  • Set a postprocessor script to convert, resize, compress or do anything else with selected files automatically.

Installation and Usage

First install the dependencies at the bottom of the readme

Install the filepicker and make applications use it

  • Run ./install.sh to build and install the filepicker and xdg portal.
  • To make firefox use the portal, open about:config and set widget.use-xdg-desktop-portal.file-picker to 1. Chromium-based browsers should use it by default.

What if I want my old filepicker back?

  • Run pikeru -d to disable pikeru and restore your old filepicker, and pikeru -e to re-enable pikeru.
  • If your xdg-desktop-portal version is older than 1.18, you'll have to delete /usr/share/xdg-desktop-portal/portals/pikeru.portal or remove your $XDG_CURRENT_DESKTOP from that file to disable it.

How to enable semantic search

  • This is configured in ~/.config/xdg-desktop-portal-pikeru/config in the indexer section.
  • The config requires 3 things in addition to enable = true:
    • a command that prints text associated with a file, like a description or tags
    • a command that checks if the above command can be used, for example checking if an API is online
    • a list of file extensions the above command can handle
  • An example configuration using stable diffusioni webui's interrogate API to index your images is included, which uses the indexer/img_indexer.py script in this repo.
  • Pikeru's xdg portal daemon uses the provided command to build a semantic search index of any directory opened or searched by the filepicker so that next time you search that directory, you can search files by semantic content instead of just file name.
  • You can pause the indexer with pikeru -c and resume it with pikeru -b.
  • More details are in the man page for xdg-desktop-portal-pikeru.

What's configured where

The filepicker and the portal that launches the filepicker each have their own config files.

  • ~/.config/pikeru.conf:
    • Anything related to the GUI, like dpi-scale
    • Patterns to ignore when searching
    • Bookmarks saved by drag-and-drop
    • Commands you can run on files
  • ~/.config/xdg-desktop-portal-pikeru/config:
    • Location of filepicker (you probably don't need to touch this part)
    • Postprocessor for selected files
    • Semantic search indexer

Install Dependencies

Ubuntu:

sudo apt install build-essential scdoc pkg-config libavutil-dev libavformat-dev libavfilter-dev libavdevice-dev libclang-dev

Arch:

sudo pacman -S scdoc xdg-desktop-portal ffmpeg clang

License

MIT License

pikeru's People

Contributors

dvhar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pikeru's Issues

Flatpak package

Would be helpful for automatic updates and wider recognition.

Request: add samba support

Hey, I love this project! I'm currently running Ubuntu 23.10 with GNOME 45.2 and can't generate thumbnails for videos, so having this tool to use is awesome. Thank you for your hard work.

Could you add Samba support?

Entering /run/user/1000/gvfs/smb-share:server=192.168.0.11,share=smb_home/ in a browser, or VSCode, takes me to a file directory listing. Using that syntax, or smb://192.168.0.11/smb_home/ would be awesome. Authentication support would be appreciated so it doesn't have to be a "public" share.

Why?

Currently, I can't upload files from a Samba share with my browser (FireFox), let alone see their thumbnails. I have to copy a file to my Desktop, then navigate to the file.

tkinter struggles with big directories

Tkinter has trouble scrolling past 34000 pixels on my computer. This video is 4k scaled down to 1080, but it also fails at 34000 pixels when not using high-dpi, which gets it to 1716 items. Does anyone know of solutions aside from using a better toolkit? Are there any example projects where thumbnails are drawn on a single pixel buffer instead of using individual widgets?
Screencast_20240403_210001_1080.webm

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.