Skip to main content

A small tool for retriving resources from Xresources

Project description

xrcat

This is a small package for getting resources from Xresources. It can be used as a python module or as a CLI tool.

Usage

In the command line:

$ xrcat "dwm.background"
#1d2021

As a python module:

from xrcat import xrcat

# Load current resources into xrcat
xrcat.updateResources()

# Get the resource
print(xrcat.getResource("dwm.background"))
# Output: '#1d2021'

Wildcards

xrcat also supports wildcards matching. This means that if you for example want dwm.background and the value is None, xrcat will match it to *.background. Matches are prioritized based on length so for the example above *.background will be choosen instead of *background even though both are matches. This behavior is implemented to ensure that program specific resources are selected before general resources.

Contributing

I am very new to making packages, so if you know anything that needs polishing or fixing, I am all ears. All help appreciated!

License

This project is under the GNU General Public License v3 (GPLv3) - See LICENSE for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xrcat-1.0.0.tar.gz (15.0 kB view details)

Uploaded Source

File details

Details for the file xrcat-1.0.0.tar.gz.

File metadata

  • Download URL: xrcat-1.0.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for xrcat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f8c7fe2d3643fe558ea7c3b120436af34664ecb2ca9379fbcc89b3d981c4300f
MD5 60f3a1757f8a49200988dd268a51d313
BLAKE2b-256 03f77a397772ac3651abf5f15d619b63e0b40f5fe7303e82fc500d0cf0e1495a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page