Commit graph

23 commits

Author SHA1 Message Date
4e565fad2d
Add experimental css styler
Takes a prepared stylesheet template, inserts the values into it and
puts it into fixed qutebrowser stylesheet directory, calling qutebrowser
to set it automatically.

Much of this is hardcoded and not applicable to different setups!
2020-02-15 19:00:34 +01:00
226b666739
Add experimental dunst support
Added simple support for dunst files. Since files can, similar to
alacritty, not be included in dunstrc, the processor invokes a similarly
invasive replacement method to add the base16 at the end of the config
file.

The procedure is similar to alacritty processor, the danger is also the
same -- it works directly on the config file and will worst case delete
the complete contents of this file. Since the processor is not tested
(other than manually looking that it does what it's supposed to) the
case of this happening is not negligible.
2020-02-15 16:52:14 +01:00
89fa02749c
Alacritty processor remove temporary files
Remember to remove any temporary files at the end of processing.
2020-02-15 16:15:02 +01:00
f4991b11e1
Add experimental alacritty support
Alacritty does not support including other files into
its configuration yet. As such, this processor needs to
change the user's configuration file *itself*.

This will generally not be a problem, though it can lead
to corrupted configurations in exceptional circumstances
(such as every line being preceded by the process control
regex, for whatever reason).

In general, the processor looks for a specific line in the
following format:
'# Base16 [theme name] - alacritty color config'
from which it will delete everything until it finds a line:
'# Base16End [theme name] - alacritty color config'
So, if you don't want to lose anything -
Do NOT put anything important between those two lines.

This processor is very experimental and will probably still
break every now and again!
2020-02-15 15:26:24 +01:00
7ec6dc98c9
Fix utility sourcing
Utilities should always be sourced, even in the case that the processor
is not designated for any of the templates provided.
2020-02-15 15:25:20 +01:00
ea2dc1bd93 Refactor theme_rofi to new default template 2020-01-31 13:07:45 +01:00
613707eb6e Refactor theme_xresources to new deafult template 2020-01-31 13:01:53 +01:00
c193fc7221 Fix theme_vim to only warn when no config dir found
Fixed warning being displayed when either vim or nvim config directory
was found but not both. Now only displays a warning when neither is
found.
2020-01-31 12:46:59 +01:00
36383db479 Refactor theme_shell to new default template 2020-01-31 12:42:15 +01:00
e93ee48632 Fix example template entrypoint calling 2020-01-31 12:40:32 +01:00
0f3b9667b6 Fix qutebrowser entrypoint location 2020-01-31 12:33:58 +01:00
17bca81232 Refactor theme_vim to follow template layout 2020-01-31 12:31:02 +01:00
8106c87633 Add example template for processor 2020-01-31 12:21:41 +01:00
7e709be5a0 Refactor theme_qutebrowser to use utility functions 2020-01-31 12:15:39 +01:00
c29f9528ec Create utility framework for often used functions 2020-01-31 12:14:48 +01:00
d230ae9218 Add initial shell theming processor
Uses ANSI escape sequences to switch all open terminals to desired
theme. Does not yet include capability to permanently set themes, since
this would have to be handled either through xresources or dependent on
the individual terminals color settings (e.g. `.config/alacritty.yml`
for alacritty). Needs further investigation.
2020-01-31 10:19:25 +01:00
7bab853c64 HACK Add initial rofi processor
Follows my personal rofi setup, which is presumably non-default. Puts
the line including colorscheme into `.config/rofi/themes/settings.rasi`,
I don't remember if that is default. TODO

Also uses base16 templates from the `themes` folder of the package,
which set some *layout* properties of rofi not just color changes.
Should probably look at rofi and create a 'nullifying' rofi rasi file
similar to css plate cleansers and build a default layout from that.

Other way is to use `colors` subfolder of the package, but this does not
connect the colors to uses in the themes, so would be more work to
include.
2020-01-31 10:15:53 +01:00
b64529c535 Fix xresources theme switch
Will now correctly add theme colors, even if not applying permanently.
Will also quietly restart polybar instead of polluting terminal output.
2020-01-31 01:00:48 +01:00
69e0be77d5 Attach polybar restart script to xresources 2020-01-31 00:54:10 +01:00
14c69c674b Add xresources theming
Xresources processor is very customized and not useable for default
Xresources deployment. It depends on Xresources being available as an
XDG-compliant directory in $XDG_CONFIG_HOME/xresources.

Future work on this processor should start from the default xresources
deployment and allow customization to change it (e.g. through stylerrc
file, setting custom options and paths per processor)
2020-01-31 00:24:21 +01:00
ae34a9c94d Add qutebrowser processor
Will switch colors for running qutebrowser instance.

Will add `colorscheme.py` into default qutebrowser config directory and
make sure the file is sourced from default qutebrowser config file
`config.py`. This makes the theme change permanent.
2020-01-30 23:14:07 +01:00
eaba8f550e Fix calling local var outside function 2020-01-30 23:13:46 +01:00
2c4fe1397a Add vim theming processor
Will theme vim on-the-fly when it is running within tmux.

When permanently setting a theme, will add a
colorscheme.vim file into the vim config directory (or nvim) for which a
source statement is added to vimrc/init.vim.
2020-01-30 22:46:30 +01:00