-
Notifications
You must be signed in to change notification settings - Fork 48
Templates
- What are Templates
- Default Keywords
- Adding a Template
- Removing a Template
- Restore a Template
- Ignore a Template
In wpgtk
templates are textfiles with .base
extension which gets read
parsed and has special keywords in it replaced, then copied over to a file
that is sym-linked to the original config file, this way it is ensured that
the original file only receives already processed information and is updated
on the fly, the base files created are stored under $HOME/.config/wpg/templates
.
A tipical template will look like this rofi.base
rofi.columns: 1
rofi.font: roboto mono 10
rofi.color-normal: #COLOR0, #COLORX15, #COLOR0, #COLORACT, #COLORX15
rofi.color-urgent: #COLOR0, #d6b48d, #22231D, #d6b48d, #COLORX15
rofi.color-active: #COLOR0, #COLORX14, #COLOR0, #COLORX14, #COLOR0
rofi.color-window: #COLOR0, #COLORACT, #COLORIN
You can install a set of default templates with a script included with wpgtk
just follow this steps
Here are the default keywords included with wpgtk
, these might change with
the passage of time.
COLOR0 through COLOR9
COLORX10 through COLORX15
COLORACT # for active color
COLORIN # for inactive color
COLORBG
COLORTOOL # for tooltips (needed in old templates)
This will create a backup in the location specified under filename.bak
to avoid losing any precious data if you regret adding the file later,
it also creates a copy of that file under $HOME/.config/wpg/templates
with the .base
extension, in which you can edit and place keywords
for wpgtk
to replace.
wpg -xa ./path/to/file
Using the Add
button under the Templates tab
This will remove the .base
file from your templates
folder, it will not
restore your backup, you'll have to do that yourself if you wish to, the config
file that remains will have the latest colorscheme applied.
wpg -xd basefilename.base
# you can get a list of these names with
wpg -xl
After selecting the Template you wish to remove, click the Remove
button under the Templates tab
If you're coming from a fresh install and keep your .base
files somewhere
you are probably gonna want them back without going through the hassle of re-adding them
so here's an easy way to re-attach this base files to their respective configuration files
wpg -y ./path/to/config ./path/to/basefile.base
If you don't want to delete a template but don't want to apply a new colorscheme to it
simply add a coment in the first line of the .base
that says wpgtk-ignore
, this way
the template remains in your added templates but is ignored in each colorscheme change,
use a format that is ignored by that configuration or text file.