warpdotdev / warpdotdev/warp

Should search for themes in XDG_DATA_DIRS on Linux

Open
#4,251 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:search enhancement os:linux triaged
Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Discord username (optional)

hallettj

Describe the solution you'd like?

On Linux Warp looks for custom themes in $XDG_DATA_HOME/warp_terminal/themes which is good! It should also collect themes from corresponding subdirectories in every directory in $XDG_DATA_DIRS. This would make it easier to use package managers to install themes. (AFAICT this is not currently happening.)

From the XDG Base Directory Specification:

$XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be seperated with a colon ':'.

Is your feature request related to a problem? Please describe.

It would be great to be able to distribute packages for custom themes. Package managers generally do not write to ~/.local/share/. Instead they write to locations such as /usr/share/ or ~/.nix-profile/share/. Whatever location the package manager on a given system writes shared data to, it should be given by the XDG_DATA_DIRS environment variable.

Additional context

Here is an abridged version of XDG_DATA_DIRS in my session:

$ echo $XDG_DATA_DIRS
/home/jesse/.nix-profile/share:/nix/profile/share:/usr/local/share:/usr/share

I would like to be able to create a package that puts symlinks to theme files in /home/jesse/.nix-profile/share/warp-terminal/themes/ corresponding to the first entry in XDG_DATA_DIRS. When I tried it didn't work.

How important is this feature to you?

2

Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Linux theme-discovery path that currently reads $XDG_DATA_HOME/warp_terminal/themes. Check how XDG_DATA_DIRS is parsed and how corresponding warp_terminal/themes directories are searched. Done means themes from each colon-separated XDG_DATA_DIRS entry are discovered in addition to the existing data-home location.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.