Print specified values from desktop files to stdout.

dprint

Print specified values from desktop files to stdout.

Look, it’s hard to describe okay? Here’s a picture of me using it with dmenu.

1

My launcher script pipes the output of dprint into dmenu to get a selection. Then it passes that selection into dprint – with some options – and then the output of that gets executed by your shell (to launch the program).

#!/bin/sh
SELECTION=$(dprint -p | dmenu -i -l 8 "$@")
echo "Name:$SELECTION" | dprint -p -i - -o "StripExec" | ${SHELL:-"/bin/sh"} &

I wrote dprint because the default dmenu_run script just lists all the programs in your $PATH exactly as they’re named. There’s no easy way to rename them or tweak launch options. For example, that “calculator” program in the screenshot runs st -t st-float -g 76x30 -e python, and I renamed “ncmpcpp” to just “music.”

Usage

dprint [-v] [-p] [-d path] [-i key:val] [-o key]

-v: Prints the version and exits.

-p: Keep track of desktop file popularity each time an Exec or StripExec is selected as output. Additionally, output is sorted by popularity when using this option.

-d path: Look for desktop files in provided path.

-i key:val: Filter desktop files with a specific key:value pair.

-o key: Output the value associated with a specific key for each selected desktop file.

Building

Install the dependencies:

  • go (>=1.13)
  • scdoc

Then compile dprint:

$ make

Installation

# make install

License

GPL3 - See License for details.

Copyright 2021 Dakota Walsh

Resources

dprint uses a public mailing list for contributions and discussion. You can browse the list here and email patches or questions to ~kota/[email protected].

If you're reporting an bug/feature request our issue tracker is here: ~kota/dprint

Owner
kota
Mostly a mirror/outdated version of https://sr.ht/~kota/
kota
Similar Resources

Copy files and artifacts via SSH using a binary, docker or Drone CI.

drone-scp Copy files and artifacts via SSH using a binary, docker or Drone CI. Feature Support routines. Support wildcard pattern on source list. Supp

Dec 6, 2022

Extract text from plaintext, .docx, .odt and .rtf files. Pure go.

cat This is a simple libary to extract text from plaintext, .docx, .odt, .pdf and .rtf files. Install go get -u github.com/lu4p/cat Basic Usage packag

Nov 18, 2022

Faster way to switch between kubeconfig files.

Faster way to switch between kubeconfig files.

kubectl-cf Faster way to switch between kubeconfig files (not contexts). Usage of kubectl-cf: cf Select kubeconfig interactively cf [co

Oct 14, 2022

How you can use Go to replace YAML files with Kubernetes.

YamYams A small project that is free to use. 🎉 I wanted to offer a starting point for anyone interested in replacing YAML with Go. You can read more

Jan 6, 2023

kubectl plugin for signing Kubernetes manifest YAML files with sigstore

kubectl plugin for signing Kubernetes manifest YAML files with sigstore

k8s-manifest-sigstore kubectl plugin for signing Kubernetes manifest YAML files with sigstore ⚠️ Still under developement, not ready for production us

Nov 28, 2022

Drone plugin to skip pipelines based on changed files

drone-skip-pipeline Drone plugin to skip pipelines based on changed files. Build Build the binary with the following command: export GOOS=linux export

Aug 7, 2022

Terraform Provider for the GitLab Repository Files API

Terraform Provider GitLab Repository Files API Requirements Terraform = 0.13.x Go = 1.15 Building The Provider Clone the repository Enter the reposi

Jun 14, 2022

Mesos Framework to use docker-compose files.

Mesos Framework to use docker-compose files.

mesos-compose Mesos Framework to use docker-compose files. Requirements Apache Mesos min 1.6.0 Mesos with SSL and Authentication is optional Redis Dat

Dec 14, 2022
Related tags
betterbattery prints the battery percentage, status, and can run a command if the percentage fell below a specified value since it was last ran.

betterbattery betterbattery prints the battery percentage, status, and can run a command if the percentage fell below a specified value since it was l

Dec 22, 2021
Render helm values-files from others

helm-plugin-render-values The Helm downloader plugin with rendering templated values files Install Use helm CLI to install this plugin: $ helm plugin

Aug 1, 2022
Watch and print changes in k8s

Watch kubernetes resources and print the delta in changes.

Jan 8, 2023
simple web app that print its environment variable, useful for testing on k8s

Index Sample web app that pints environment variables. Start it: docker-compose up Use it: > curl localhost:8080 PATH=/usr/local/sbin:/usr/local/bin:/

Jan 10, 2022
This script search print debug from PHP code.

go-php-print-debug This script search print debug from PHP code. Checking "print", "print_r", "var_dump", "var_export", "echo" as print debug. Exclude

Jan 15, 2022
A helm v3 plugin to get values from a previous release

helm-val helm-val is a helm plugin to fetch values from a previous release. Getting started Installation To install the plugin: $ helm plugin install

Dec 11, 2022
Drone conversion for platform values

drocopla A drone.io conversion extension to set host platform as drone pipeline platform. Default drone.io behaviour: If os/arch is not set in .drone.

Dec 1, 2021
A handy utility to generate configmap and values.yaml of your application for helmifying them

Helmfig Are you tired of writing values.yaml for configmap of your project when you are helmifying them? Helmfig is a handy tool that can generate the

Dec 14, 2022
Package create provides a generic option pattern for creating new values of any type

create Package create provides a generic option pattern for creating new values

Dec 30, 2021
A Go package providing a generic data type to track maximum and minimum peak values.

go-peak Overview go-peak is a Go package providing a generic data type that tracks the maximum and minimum peak values within a specific period of tim

Mar 26, 2022