Skip to content

Simple cross-platform utility to output what appearance style is used

Notifications You must be signed in to change notification settings

qdentity/darklight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

darklight

Simple cross-platform utility to output what appearance style is used.

Build the tool using cargo build --release and copy it into a location on your $PATH using cp target/release/darklight /usr/local/bin/.

An example of using this to set the theme of the Helix editor dynamically:

if [[ "$(darklight)" == *"Dark"* ]]; then
    CATPPUCCINO="mocha"
else
    CATPPUCCINO="latte"
fi

CATPPUCCINO_TARGET="${HOME}/.config/helix/themes/catppuccin_${CATPPUCCINO}.toml"
CATPPUCCINO_LINK="${HOME}/.config/helix/themes/catppuccin.toml"

ln -sf $CATPPUCCINO_TARGET $CATPPUCCINO_LINK

About

Simple cross-platform utility to output what appearance style is used

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages