All Projects → chmln → Handlr

chmln / Handlr

A better xdg-utils

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Handlr

Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+8600.66%)
Mutual labels:  cli, command-line
Check It Out
A command line interface for Git Checkout. See branches available for checkout.
Stars: ✭ 127 (-15.89%)
Mutual labels:  cli, command-line
Dynein
DynamoDB CLI written in Rust.
Stars: ✭ 126 (-16.56%)
Mutual labels:  cli, command-line
Chest
Bash glue to encrypt and hide files
Stars: ✭ 123 (-18.54%)
Mutual labels:  cli, command-line
Brotab
Control your browser's tabs from the command line
Stars: ✭ 137 (-9.27%)
Mutual labels:  cli, command-line
Flow Cli
The Flow CLI is a command-line interface that provides useful utilities for building Flow applications
Stars: ✭ 123 (-18.54%)
Mutual labels:  cli, command-line
Grmon
Command line monitoring for goroutines
Stars: ✭ 1,703 (+1027.81%)
Mutual labels:  cli, command-line
Coinmon
💰 The cryptocurrency price tool on CLI. 🖥
Stars: ✭ 1,581 (+947.02%)
Mutual labels:  cli, command-line
Git Tidy
Tidy up stale git branches.
Stars: ✭ 137 (-9.27%)
Mutual labels:  cli, command-line
Entrypoint
Composable CLI Argument Parser for all modern .Net platforms.
Stars: ✭ 136 (-9.93%)
Mutual labels:  cli, command-line
Deno Cliffy
Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Stars: ✭ 149 (-1.32%)
Mutual labels:  cli, command-line
Swift For Scripting
📋A hand-curated collection of useful and informative Swift Scripting materials.
Stars: ✭ 142 (-5.96%)
Mutual labels:  cli, command-line
Spectre.cli
An extremely opinionated command-line parser.
Stars: ✭ 121 (-19.87%)
Mutual labels:  cli, command-line
Clrcli
CLRCLI is an event-driven library for building line-art user interfaces in C#/.Net command-line applications.
Stars: ✭ 124 (-17.88%)
Mutual labels:  cli, command-line
Bull Repl
Bull / BullMQ queue command line REPL
Stars: ✭ 121 (-19.87%)
Mutual labels:  cli, command-line
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-16.56%)
Mutual labels:  cli, command-line
Nodejs Cli Apps Best Practices
The largest Node.js CLI Apps best practices list ✨
Stars: ✭ 2,144 (+1319.87%)
Mutual labels:  cli, command-line
Cum
comic updater, mangafied
Stars: ✭ 117 (-22.52%)
Mutual labels:  cli, command-line
The Way
A command line code snippets manager
Stars: ✭ 132 (-12.58%)
Mutual labels:  cli, command-line
Node Promptly
Simple command line prompting utility for nodejs
Stars: ✭ 140 (-7.28%)
Mutual labels:  cli, command-line


handlr

Manage your default applications with ease using handlr!

Features

  • Set default handler by extension or mime-type
  • Intelligent mime type detection from files based on extension and content
  • Open multiple files at once
  • Set multiple handlers for mime/extension and use rofi/dmenu to pick one
  • List default associations
  • Automatically removes invalid/wrong .desktop entries from mimeapps.list
  • Helper commands like launch, get --json for your scripting needs
  • Unnecessarily fast (written in Rust)
  • Single compiled binary with no dependencies

Usage

# Open a file/URL
handlr open ~/.dotfiles/pacman/packages.txt
handlr open https://google.ca

# Set default handler for png files
handlr set .png feh.desktop

# Set default handler based on mime
handlr set application/pdf evince.desktop

# List default apps
handlr list

# Get the handler for a mime/extension
$ handlr get .png
feh.desktop

# Launch a handler with given path/URL
handlr launch x-scheme-handler/https -- https://google.ca

Compared to xdg-utils

  • Can open multiple files/URLs at once
  • Can have multiple handlers and use rofi/dmenu to pick one at runtime
  • Far easier to use with simple commands like get, set, list
  • Can operate on extensions, no need to look up or remember mime types
    • useful for common tasks like setting a handler for png/docx/etc files
  • Superb autocomplete (currently just fish), including mimes, extensions, and .desktop files
  • Optional json output for commands like get

Setting multiple handlers

  1. Open ~/.config/handlr/handlr.toml and set enable_selector = true. Optionally, you can also tweak the selector to your selector command (using e.g. rofi or dmenu).

  2. Add a second/third/whatever handler using handlr add, for example

handlr add x-scheme-handler/https firefox-developer-edition.desktop
  1. Now in this example when you open a URL, you will be prompted to select the desired application.

Screenshots

Installation

Arch Linux

yay -S handlr-bin

Optionally you can also install xdg-utils-handlr to replace xdg-open:

yay -S xdg-utils-handlr

Rust/Cargo

cargo install handlr

Binaries

  1. Download the latest release binary and put it somewhere in $PATH
  2. Download completions:
curl https://raw.githubusercontent.com/chmln/handlr/master/completions/handlr.fish --create-dirs -o ~/.config/fish/completions/handlr.fish

Attribution

Icons made by Eucalyp from www.flaticon.com

Cover photo by creativebloq.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].