Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A global theme switcher using config templates.

License

NotificationsYou must be signed in to change notification settings

fhennig/tint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A theme switcher.

tint allows fast and convenient theme switching for all yourapplications such asi3,rofi andurxvt.

It works by by processing configtemplates in which the actual colorcodes are filled in.

A theme is defined in ayaml file (seeleuven.yaml for anexample). In there properties and colors are defined. A configtemplate could then look like this:

rofi.color-normal: {{rofi.bg}}, {{rofi.fg}}, {{rofi.bgalt}}, {{rofi.hlbg}}, {{rofi.hlfg}}rofi.color-window: {{rofi.background}}, {{rofi.border}}rofi.width: 20rofi.font: inconsolata 14

The{{...}} syntax is part of the templating engine. It is replacedby a property defined in the theme.

The template defines which config files to process in apathssection:

paths:  - ~/.config/i3/config  - ~/.config/rofi/config  - ~/.Xdefaults

for every<path> it expects the file<path>.template to bepresent. If present, it will generate the config file from thetemplate.

Base themes

config files can specify a base theme inmeta.base. The base thememust be another theme in the themes directory. Before the config isapplied, the base theme is loaded. Properties defined in the themeitself take precedence over properties defined in the base.

Dependencies

Dependencies are in therequirements.txt

  • PyYAML: For reading the yaml files
  • jinja2: For handling the templating

Some more things

Uses jinja for templating.

This project was inspired by(i3-style)[https://github.com/altdesktop/i3-style], from which theidea of using ayaml configuration file was taken.

The idea to use templating was also inspired by(j4-make-config)[https://github.com/okraits/j4-make-config].

Add variable expansion in the paths.

Works well withurxvt and(urxvt-config-reload)[https://github.com/regnarg/urxvt-config-reload],which allows to trigger reloading of urxvt config in urxvt instances.For example:

xrdb -merge ~/.Xdefaultspids=$(ps axo pid,comm | grep "^[ 0-9]* urxvt\$" | awk "{print \$1}")for pid in $pidsdo    kill -1 $pid  # send SIGHUP    echo "TEST $pid"done

About

A global theme switcher using config templates.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp