Skip to main content

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

Release files for xrcat 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xrcat 1.0.0
File Size Uploaded
xrcat-1.0.0.tar.gz 15.0 kB Details

Release files / xrcat-1.0.0.tar.gz

Download URL xrcat-1.0.0.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f8c7fe2d3643fe558ea7c3b120436af34664ecb2ca9379fbcc89b3d981c4300f
BLAKE2b-256 checksum
How to use checksums
03f77a397772ac3651abf5f15d619b63e0b40f5fe7303e82fc500d0cf0e1495a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page