commit aaa582aa4047c03723c2ecab7bd95579d89a0d76 Author: Alistair Potts Date: Sun Feb 17 10:29:11 2019 +0000 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f9faa6 --- /dev/null +++ b/README.md @@ -0,0 +1,117 @@ +# Base16 themes for home manager + +This is a messy, personal set of scripts for managing colour schemes within +hame manager. I am yet to share it because there are some unprincipled +components likely to break (e.g. using `sed` to read yaml files), and because +the build functions it introduces use sizable external dependencies. + +I have found aspects of this very nice to use, and have tried to clean it up +enough to be suitable for others to adapt. YMMV however. + +## Usage + +N.b. this example roughly reflects y usage, but I haven't tried to use it +directly, so there may be typos / bugs + +```nix +{pkgs, lib, config, ...}: +{ + imports = [ ./base16.nix ]; + config = { + + # Choose your themee + themes.base16 = { + enable = true; + scheme = "solarized"; + variant = "solarized-dark"; + + # Add extra variables for inclusion in custom templates + extraParams = { + fontname = mkDefault "Inconsolata LGC for Powerline"; + headerfontname = mkDefault "Cabin"; + bodysize = mkDefault "10"; + headersize = mkDefault "12"; + xdpi= mkDefault '' + Xft.hintstyle: hintfull + ''; + }; + }; + + # 1. Use pre-provided templates + ############################### + + programs.bash.initExtra = '' + source ${config.lib.base16.base16template "shell"} + ''; + home.file.".vim/colors/mycolorscheme.vim".source = + config.lib.base16.base16template "vim"; + + # 2. Use your own templates + ########################### + + home.file.".Xresources".source = config.lib.base16.template { + src = ./examples/Xresources; + }; + home.file.".xmonad/xmobarrc".source = config.lib.base16.template { + src = ./examples/xmobarrc; + }; + + # 3. Template strings directly into other home-manager configuration + #################################################################### + + services.dunst = { + enable = true; + settings = with config.lib.base16.theme; + { + global = { + geometry = "600x1-800+-3"; + font = "${headerfontname} ${headersize}"; + icon_path = + config.services.dunst.settings.global.icon_folders; + alignment = "right"; + frame_width = 0; + separator_height = 0; + sort = true; + }; + urgency_low = { + background = "#${base01-hex}"; + foreground = "#${base03-hex}"; + }; + urgency_normal = { + background = "#${base01-hex}"; + foreground = "#${base05-hex}"; + }; + urgency_critical = { + msg_urgency = "CRITICAL"; + background = "#${base01-hex}"; + foreground = "#${base08-hex}"; + }; + }; + }; + + + }; +} +``` + +## Reloading + +Changing themes involves switching the theme definitoin and typing +`home-manager switch`. There is no attempt in general to force programs to +reload, and not all are able to reload their configs, although I have found +that reloading xmonad and occasionally restarting applications has been +enough. + +You are unlikely to achieve a complet switch without logging out and logging back +in again. + +## Todo + +Provide better support for custom schemes (currently this assumes you'll +want to use something in the base16 repositories, but there is no reason +for this). + +## Updating Sources + +`cd` into the directory in which the templates.yaml and schemes.yaml are +located, and run update_sources.sh diff --git a/base16.nix b/base16.nix new file mode 100644 index 0000000..426eb79 --- /dev/null +++ b/base16.nix @@ -0,0 +1,67 @@ +{config,lib,pkgs,...}: +with lib; +let + cfg = config.themes.base16; + templates = importJSON ./templates.json; + schemes = importJSON ./schemes.json; + + # pure bash mustache engine + mustache = template-attrs: name: src: + pkgs.stdenv.mkDerivation ( + { + name="${name}-${template-attrs.scheme-slug}"; + inherit src; + data = pkgs.writeText "${name}-data" (builtins.toJSON template-attrs); + phases = [ "buildPhase" ]; + buildPhase ="${pkgs.mustache-go}/bin/mustache $data $src > $out"; + allowSubstitutes = false; # will never be in cache + }); + + # nasty python script for dealing with yaml + different output types + python = pkgs.python.withPackages (ps: with ps; [ pyyaml ]); + loadyaml = {src, name ? "yaml"}: + importJSON (pkgs.stdenv.mkDerivation { + inherit name src; + builder = pkgs.writeText "builder.sh" '' + slug_all=$(${pkgs.coreutils}/bin/basename $src) + slug=''${slug_all%.*} + ${python}/bin/python ${./base16writer.py} $slug < ${src} > $out + ''; + allowSubstitutes = false; # will never be in cache + }); + + theme = loadyaml { + src="${pkgs.fetchgit (schemes."${cfg.scheme}")}/${cfg.variant}.yaml"; + }; + +in +{ + options = { + themes.base16.enable = mkEnableOption "Base 16 Color Schemes"; + themes.base16.scheme = mkOption { + type=types.str; + default="solarized"; + }; + themes.base16.variant = mkOption { + type=types.str; + default="solarized-dark"; + }; + themes.base16.extraParams = mkOption { + type = types.attrsOf types.string; default = {}; + }; + }; + + config = { + lib.base16.theme = theme // cfg.extraParams; + lib.base16.base16template = repo: + mustache (theme // cfg.extraParams) repo + "${pkgs.fetchgit (templates."${repo}")}/templates/default.mustache"; + lib.base16.template = attrs@{name ? "unknown-template", src , ...}: + mustache (theme // cfg.extraParams // attrs) name src; + }; + + +} + + + diff --git a/base16writer.py b/base16writer.py new file mode 100644 index 0000000..95e9011 --- /dev/null +++ b/base16writer.py @@ -0,0 +1,34 @@ +import yaml +import json +import sys +input = yaml.load(sys.stdin) +input["colors"] = {} +for (k,v) in input.copy().items(): + if k[0:4] == "base": + col = k[4:] + input["colors"][k[4:]] = { + "hex" : v, + "red" : v[0:2], + "green" : v[2:4], + "blue" : v[4:6], + "red-rgb" : int(v[0:2],16), + "green-rgb" : int(v[2:4],16), + "blue-rgb" : int(v[4:6],16), + } + input["base"+col+"-hex"] = input["colors"][col]["hex"] + input["base"+col+"-hex-r"] = input["colors"][col]["red"] + input["base"+col+"-hex-g"] = input["colors"][col]["green"] + input["base"+col+"-hex-b"] = input["colors"][col]["blue"] + input["base"+col+"-rgb-r"] = str(input["colors"][col]["red-rgb"]) + input["base"+col+"-rgb-g"] = str(input["colors"][col]["green-rgb"]) + input["base"+col+"-rgb-b"] = str(input["colors"][col]["blue-rgb"]) + input["base"+col+"-dec-r"] = str(input["colors"][col]["red-rgb"]/255.0) + input["base"+col+"-dec-g"] = str(input["colors"][col]["green-rgb"]/255.0) + input["base"+col+"-dec-b"] = str(input["colors"][col]["blue-rgb"]/255.0) + elif k == "scheme": + input["scheme-name"] = v + else: + input["scheme-"+k] = v +input["scheme-slug"]=sys.argv[1] +json.dump(input, sys.stdout) + diff --git a/examples/Xresources b/examples/Xresources new file mode 100755 index 0000000..8be7e0d --- /dev/null +++ b/examples/Xresources @@ -0,0 +1,50 @@ +{{xdpi}} +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +Xft.font: xft:{{headerfontname}}:size={{headersize}},xft:Symbola:size={{headersize}} +#define All_font xft:{{fontname}}:size={{bodysize}},xft:Symbola:size={{bodysize}} +URxvt.font: All_font +URxvt.scrollBar: false +URxvt.transparent: false +URxvt.borderLess: false +URxvt.saveLines: 2000 + +*color0: #{{base00}} +*color1: #{{base08}} +*color2: #{{base0B}} +*color3: #{{base0A}} +*color4: #{{base0D}} +*color5: #{{base0E}} +*color6: #{{base0C}} +*color7: #{{base05}} +*color8: #{{base03}} + +*color9: #{{base08}} +*color10: #{{base0B}} +*color11: #{{base0A}} +*color12: #{{base0D}} +*color13: #{{base0E}} +*color14: #{{base0C}} + +*color15: #{{base07}} +*color16: #{{base09}} +*color17: #{{base0F}} +*color18: #{{base01}} +*color19: #{{base02}} +*color20: #{{base04}} +*color21: #{{base06}} + +*foreground: #{{base05}} +*background: #{{base00}} +*fadeColor: #{{base07}} +*cursorColor: #{{base01}} +*pointerColorBackground: #{{base01}} +*pointerColorForeground: #{{base06}} + +dzen2.font : All_font +dzen2.foreground: S_base3 +dzen2.background: S_base01 diff --git a/examples/xmobarrc b/examples/xmobarrc new file mode 100755 index 0000000..8492ad7 --- /dev/null +++ b/examples/xmobarrc @@ -0,0 +1,28 @@ +Config + { font = "xft:{{headerfontname}}:size={{headersize}},Meslo LG L DZ:size={{headersize}}" + , bgColor = "#{{base01}}" + , fgColor = "#{{base03}}" + , position = Top L 100 + , commands = [ Run Cpu ["-t","⚙","-L","30","-H","70","--low","#{{base05}}","--normal","#{{base0A}}","--high","#cb4b16"] 10 + , Run Memory ["-t","Ξ"] 10 + , Run Battery ["-t"," ", + "-L","30", + "-H","80", + "--low","#{{base08}},#{{base00}}", + "--normal","#{{base0A}},#{{base00}}", + "--high","#{{base05}},#{{base00}}", + "--", + "-O","↑", + "-o","↓", + "-i","~" + ] 100 + , Run Date "%a %b %_d %Y %H:%M" "date" 100 + , Run StdinReader + ] + , sepChar = "%" + , alignSep = "}{" + , template = "%StdinReader% }{ %cpu% %memory% %battery% %date% %EGLC% " + , persistent = True + , lowerOnStart = True + , hideOnStart = False + } diff --git a/schemes.json b/schemes.json new file mode 100644 index 0000000..9abbee1 --- /dev/null +++ b/schemes.json @@ -0,0 +1,248 @@ +{ + "atelier": { + "url": "https://github.com/atelierbram/base16-atelier-schemes", + "rev": "212179fded98ecfa7d88ad7a756d81297a3371c2", + "sha256": "0r7m6iwgpv96jy5li47j5yk69nif1rxznnhhxc6g3dcjidbqz8xl", + "fetchSubmodules": false + }, + "atlas": { + "url": "https://github.com/ajlende/base16-atlas-scheme", + "rev": "55fe308a8d93a31c1bd55e80ff573b11511b6cf3", + "sha256": "09ghwai272lvjc4vyaigaiyng0jy6g9q2p2cz05hnbmg8i6v6icp", + "fetchSubmodules": false + }, + "black-metal": { + "url": "https://github.com/metalelf0/base16-black-metal-scheme", + "rev": "cdfb3d2f3020648338253587917244eff4034781", + "sha256": "13pm3r2k9dvjszg2lsxw9qb3s0379dn0ypi2n0mz309zfcdkjznr", + "fetchSubmodules": false + }, + "brogrammer": { + "url": "https://github.com/piggyslasher/base16-brogrammer-scheme", + "rev": "e2f190582e8bb70e507ae710ac1d74a0776643f8", + "sha256": "0ihd3pymd9z9yyw6v6zry2v6hh9xmlzpjkp31pj3f59kf6r1rk2x", + "fetchSubmodules": false + }, + "brushtrees": { + "url": "https://github.com/WhiteAbeLincoln/base16-brushtrees-scheme", + "rev": "0b8ae8c74aaffb2f521e494f4d72dd461c1aa836", + "sha256": "0xn9faj5pnalfdjrzgsm0hj6h6d7g2k4ri7pmbl20s74c4kh38m6", + "fetchSubmodules": false + }, + "circus": { + "url": "https://github.com/stepchowfun/base16-circus-scheme", + "rev": "f0e81490e4f1fd984f7ec3b5ee6aaa0c9af9868b", + "sha256": "1dsscr04hrvzs3n4m02b136qpqffa2djpvmdv24xicbz19fppr5w", + "fetchSubmodules": false + }, + "classic": { + "url": "https://github.com/detly/base16-classic-scheme", + "rev": "532c8b4eb1e9507c51ed467a158f91f11c6b52cb", + "sha256": "1k7nb9p6vym1dk6fgbis9q88hs9filj4437rh7w126ymppjpd0si", + "fetchSubmodules": false + }, + "codeschool": { + "url": "https://github.com/blockloop/base16-codeschool-scheme", + "rev": "766cd0fdb564191152c90872b143a14e8a43b78c", + "sha256": "0vlr9sxn8xx0n41fflaw1xw5s4hd6cfn7mdvlbs1hldlrd86ysir", + "fetchSubmodules": false + }, + "cupertino": { + "url": "https://github.com/Defman21/base16-cupertino", + "rev": "8df41b787a16640dd29f88251e95beed4bf9a5c5", + "sha256": "1w8j48rf7f0zp4jjwp9n0ml0m4b7wscf3nib1bs9kcdlnm3rnbq1", + "fetchSubmodules": false + }, + "default": { + "url": "https://github.com/chriskempson/base16-default-schemes", + "rev": "5fb151a7b83d02aab77128cec5610d38df61fa24", + "sha256": "0ivsldndf6k07y8l7y94h2v2sarklczqjdcpbdd52117xyj2s5lx", + "fetchSubmodules": false + }, + "dracula": { + "url": "https://github.com/dracula/base16-dracula-scheme", + "rev": "be9d14c40027bc0981855ae4f819c84bb325be93", + "sha256": "1x0r44cm06kwsr59gpm37qj4mwpk1mmvjw59hxdvjlbzqvnkj5pd", + "fetchSubmodules": false + }, + "fruit-soda": { + "url": "https://github.com/jozip/base16-fruit-soda-scheme", + "rev": "38144b1a06466c341ddffc45f8b592f211fdcc06", + "sha256": "09vrayyg82fjja0wkmlfaz7h4j28sibz4nc2hzyinaks5b9ja0wi", + "fetchSubmodules": false + }, + "github": { + "url": "https://github.com/Defman21/base16-github-scheme", + "rev": "2daf39a4a02185637fbcc0d2cb239517c2ac6800", + "sha256": "0bq42yqhg5hrjdpbfx1f3pips2y97a4knhlzgclfvdps71k8maph", + "fetchSubmodules": false + }, + "gruvbox": { + "url": "https://github.com/dawikur/base16-gruvbox-scheme", + "rev": "2def6ef77c1f562ff298d61da6845289bfd9f569", + "sha256": "01pgi0w571kk0x3qgr9zwb400xvjgvk9pvm34631vdvh751wf6mp", + "fetchSubmodules": false + }, + "heetch": { + "url": "https://github.com/tealeg/base16-heetch-scheme", + "rev": "b93f17adf1f35cfd17d730788311db5f84c0b3ce", + "sha256": "1gjlyk1nm87p5wz2gqavxcq6v78mp6q6b7p45rs2ky5c545lawi3", + "fetchSubmodules": false + }, + "ia": { + "url": "https://github.com/aramisgithub/base16-ia-scheme", + "rev": "f7dc5c3244a1207f1bc23d402fdf86ace1c9abcd", + "sha256": "05zsdafnxpaq6yzc75x4wyy6617vn6hfjyjwcq2q9845nans0iw4", + "fetchSubmodules": false + }, + "icy": { + "url": "https://github.com/icyphox/base16-icy-scheme", + "rev": "26ab637eab7a9ef1c697bb81f8dbf376f3a0f99b", + "sha256": "0s3cr9mwyf12z7hk4p7vahrvrpcjfhw04k6gi3f8i3ircpcbys0f", + "fetchSubmodules": false + }, + "materia": { + "url": "https://github.com/Defman21/base16-materia", + "rev": "9c0952eda648246e9b9725e45e2f15b5065bcb61", + "sha256": "17rppka5svypl6s7q6hwwpfzxh84bxamvy2qyamxc89qy5czpsgp", + "fetchSubmodules": false + }, + "materialtheme": { + "url": "https://github.com/ntpeters/base16-materialtheme-scheme", + "rev": "cbbc47444208fb8f28dbc48ea986c9dc81843e9a", + "sha256": "0ic2wcr08s3bpz0adrqfdpzjyccy8b9lkcar55n8hd2d6iy0ba8a", + "fetchSubmodules": false + }, + "material-vivid": { + "url": "https://github.com/joshyrobot/base16-material-vivid-scheme", + "rev": "1e8f5962f19d7b76a9f6d807868096cb41c442ea", + "sha256": "10s3a50bx8m22d0zlisxnznvrcq57y9vqcbk86446q76gpf1bisk", + "fetchSubmodules": false + }, + "mellow": { + "url": "https://github.com/gidsi/base16-mellow-scheme", + "rev": "3822819f1621a8de385bbdef5d2d9c2d6ae73212", + "sha256": "1wl93yq0d865j78fhwl9xym1vj05yz75k3gwp0pc7ms289jaa3j6", + "fetchSubmodules": false + }, + "mexico-light": { + "url": "https://github.com/drzel/base16-mexico-light-scheme", + "rev": "b287a29afc299d16667cf497325981068f89f749", + "sha256": "0qsmixipxb12lalfpxxp2ni5k3byy67gnrdr2frryny9iwglw742", + "fetchSubmodules": false + }, + "nord": { + "url": "https://github.com/8-uh/base16-nord-scheme", + "rev": "2c19622fe9c346d27989d3db2ffb876875d1209a", + "sha256": "0yzlgvjka2pg1q0mbfq72i8xr8pcmmv0p9xw7rk5amxxq4ljhkpi", + "fetchSubmodules": false + }, + "one-light": { + "url": "https://github.com/purpleKarrot/base16-one-light-scheme", + "rev": "be2ca48d1abc87f9d9eb61f48f64891469ce9f0f", + "sha256": "199zjydr082krdpidqadidddpy2j8w8qiacl427sdf2w5zv0s33v", + "fetchSubmodules": false + }, + "onedark": { + "url": "https://github.com/tilal6991/base16-onedark-scheme", + "rev": "2e863b1e18d5b67495506dde493d416d45caf823", + "sha256": "17cgimrpfb27vbj0qh146j60pqanc2dc496pp67rxgjjqf8il973", + "fetchSubmodules": false + }, + "outrun": { + "url": "https://github.com/hugodelahousse/base16-outrun-schemes", + "rev": "fc9a4fdc95e7775c72765848d6a9a69b0f6e9999", + "sha256": "0g1vj34fm0z9afrfrvfirmmic9bs697qhi76lx4y2b2yik376d79", + "fetchSubmodules": false + }, + "papercolor": { + "url": "https://github.com/jonleopard/base16-papercolor-scheme", + "rev": "edf26990ba703787373d38f8cb8103a807ee6572", + "sha256": "0x7264p9y98nrjnvn38h0wyc3lkl0rkcyqb4w5lphjc77pypd0b7", + "fetchSubmodules": false + }, + "porple": { + "url": "https://github.com/AuditeMarlow/base16-porple-scheme", + "rev": "d4dadc2a500a657b4e8e16fb9baf159e4311f3dc", + "sha256": "0xbmvdj8r18vkavd4rrcp82k4pgjgx688jrkdbb28wcw57b2fwar", + "fetchSubmodules": false + }, + "purpledream": { + "url": "https://github.com/archmalet/base16-purpledream-scheme", + "rev": "5a324665fb2425bedab38cdb5b63d38d13e71d78", + "sha256": "0mwz4am21gg965h2h8a4bb2chi31gcjznycga1r6mkn9hv0x74cd", + "fetchSubmodules": false + }, + "rebecca": { + "url": "https://github.com/vic/base16-rebecca", + "rev": "001830703bb361317585c9c97a53b25230173915", + "sha256": "1ngkrdr4z5j8swb4z3dnkghn3q4sc5a3dhfs00g7idc4jl1n7z4i", + "fetchSubmodules": false + }, + "snazzy": { + "url": "https://github.com/h404bi/base16-snazzy-scheme", + "rev": "52414ad70600daad1818d9d47368281129c5c286", + "sha256": "0kid03f0a9q672h7karj6wvmp89cpan9xi1ri6m7lghjy3pzvvg8", + "fetchSubmodules": false + }, + "solarflare": { + "url": "https://github.com/mnussbaum/base16-solarflare-scheme", + "rev": "da0029ace2b3b799549851c567705d579a8b30f8", + "sha256": "023acl7l58bl8m4hgcmkr3ag0lbnf8x3mdakhci5miyz31nr2rgc", + "fetchSubmodules": false + }, + "solarized": { + "url": "https://github.com/aramisgithub/base16-solarized-scheme", + "rev": "02d992b6638cab4f96b441d3bcf7b6354ec28799", + "sha256": "0kp95dcrxbq96cwyla04vca0cb4cnzv3v8cv9n4f0k76z0z0ygcw", + "fetchSubmodules": false + }, + "summerfruit": { + "url": "https://github.com/cscorley/base16-summerfruit-scheme", + "rev": "f90e53358fd0d6ba1526bd790f26b0195b6debf7", + "sha256": "0jdshmrhciq2jldpi3fvq1rsccidqh60jdv7f515l8rqdl4rciy0", + "fetchSubmodules": false + }, + "tomorrow": { + "url": "https://github.com/chriskempson/base16-tomorrow-scheme", + "rev": "5ac98ea119504f3f156a6240528a0530c79c9e9e", + "sha256": "1cd009sxmkjhc453sv9namm58wvkd9n7kz7j6vn674ikpffs2jjm", + "fetchSubmodules": false + }, + "twilight": { + "url": "https://github.com/hartbit/base16-twilight-scheme", + "rev": "c3ea75b94fd1be21af7b222c41a96f38b31032aa", + "sha256": "00xy00d50h8fm8dkx6l2ada29njl9vkyh2m0bmrrp54ikvnpiz41", + "fetchSubmodules": false + }, + "unikitty": { + "url": "https://github.com/joshwlewis/base16-unikitty", + "rev": "28362f3a37a0e81b04d844aa5b2923ad63140734", + "sha256": "09mg23rni68plamizmdhwq05k6w64l77m2h4sc65xjpcqaap74x5", + "fetchSubmodules": false + }, + "woodland": { + "url": "https://github.com/jcornwall/base16-woodland-scheme", + "rev": "0278e12a49f4cf38ecf3026a1e35f4307e928d33", + "sha256": "171l9x4varqh1q99fvabvqfdaczn862wqq675rhxhjmzqni9d1gf", + "fetchSubmodules": false + }, + "zenburn": { + "url": "https://github.com/elnawe/base16-zenburn-scheme", + "rev": "e0b00a2675feed5f50ba7c07a09fc3d4ac68982d", + "sha256": "1hnlixvq0czf1day80jzf0hs1h1wbzkjhg3s1p5aacbgk71y2gyb", + "fetchSubmodules": false + }, + "xcode-dusk": { + "url": "https://github.com/gonsie/base16-xcode-dusk-scheme", + "rev": "921bdb002bb8f529c7a1bc8e847c73e188ed9682", + "sha256": "1lypfck3wjl2j3470mm39vvsiycwkmi2572fvksd6qwk5rp7kfgg", + "fetchSubmodules": false + }, + "unclaimed": { + "url": "https://github.com/chriskempson/base16-unclaimed-schemes", + "rev": "d6b93456dc1012628faec572387814f59e0b854a", + "sha256": "043ny56snl4w2ri1i0zzfh00zm2gf2h5jz57kgmf5jb9xj0sspb1", + "fetchSubmodules": false + } +} diff --git a/templates.json b/templates.json new file mode 100644 index 0000000..2225193 --- /dev/null +++ b/templates.json @@ -0,0 +1,332 @@ +{ + "alacritty": { + "url": "https://github.com/aaron-williamson/base16-alacritty", + "rev": "5207507442744ac45ca8e0787cafbe07d5c1a79d", + "sha256": "1bww0dw0jk1rpzpl08hzg5r4hcr17p8fdg40vv6a8xj2svsscnxr", + "fetchSubmodules": false + }, + "binary-ninja": { + "url": "https://github.com/evanrichter/base16-binary-ninja", + "rev": "dce2a66ade818b412bceff250930927b034c4c8b", + "sha256": "0mgsffd57vf8rx208d71nmy8nwi8g4v4d774vglkj76l7azsqmwr", + "fetchSubmodules": false + }, + "blink": { + "url": "https://github.com/niklaas/base16-blink.git", + "rev": "e9da92d2ab4aa947674158e27132974e92470b60", + "sha256": "1dfib39nwsmxs0nqpg1qlf7f1vhm9v6ybh4lqyml0rvhz3x83ssm", + "fetchSubmodules": false + }, + "c_header": { + "url": "https://github.com/m1sports20/base16-c_header", + "rev": "d03a6131bfdc89fd0e6149b58cfa799a8e90c5e2", + "sha256": "01084n3jm8vcaqbkhf70fwiaqqjc6kkjzjr6y5lgb27zghw1cif5", + "fetchSubmodules": false + }, + "concfg": { + "url": "https://github.com/h404bi/base16-concfg", + "rev": "f405ea3069744bf6e6318e237b59385f21c7999e", + "sha256": "091rirdjk237jk9dq8hdh8bzdmkf02bqnb2ryzkrnh3921vkl85f", + "fetchSubmodules": false + }, + "conemu": { + "url": "https://github.com/martinlindhe/base16-conemu", + "rev": "2618733bd41e0b88456df39c30e8a6f19bc23105", + "sha256": "128r8z0g9qq2r10052m0pr4n480dgsmx2j7g5l0cl7dkbmmrs0xx", + "fetchSubmodules": false + }, + "console2": { + "url": "https://github.com/AFulgens/base16-console2", + "rev": "4d2821b0eae717c0c677b2fb3467678365f1471c", + "sha256": "0pxmx18bdv0d2v8zh9qfiimiqv7p3fm4j4bcx4sswcn6s00476l1", + "fetchSubmodules": false + }, + "crosh": { + "url": "https://github.com/philj56/base16-crosh", + "rev": "a8045750be32061dcb537895ebb57e053d1a626d", + "sha256": "1qgsk17kndbcxrhq6dp2rlh91f3zh3zis1i9lbac1p31wk30rdzk", + "fetchSubmodules": false + }, + "dunst": { + "url": "https://github.com/khamer/base16-dunst", + "rev": "e3194d6dad0b12e0f6dfe01b9649768a8ffb2cbb", + "sha256": "0z6d7k6mk74wfm1cm7a94hzd9cq8i9kd48jbg1razhacsqh3hk12", + "fetchSubmodules": false + }, + "emacs": { + "url": "https://github.com/belak/base16-emacs", + "rev": "33d57fbc3be6d91ccea150cf511ac3294f93d979", + "sha256": "11adi70cxbkp087hfhypx9ddhh2zcv9axv10ccj0vgsjmbqancxd", + "fetchSubmodules": false + }, + "fzf": { + "url": "https://github.com/nicodebo/base16-fzf", + "rev": "6d40da6cc12265911c688b48d986dda0f9bded93", + "sha256": "017ncsidsqfhz9zh3jg3mn89z6k8g7l5l5h6as34p6hzfaddfgjg", + "fetchSubmodules": false + }, + "gnome-terminal": { + "url": "https://github.com/aaron-williamson/base16-gnome-terminal", + "rev": "abc6f5d13e24cc45a93c5cbf0104b544509f7f25", + "sha256": "14q749ng5sw22l7qa67f7kgc2qxbkh4fh9k9wy9k3s86krzj3r2w", + "fetchSubmodules": false + }, + "godot": { + "url": "https://github.com/Calinou/base16-godot", + "rev": "72af0d32c6944ce1030139cdba2f25a708c37382", + "sha256": "0hzhdhn960m5916hg1yb6vw9mwwq7za9wqkyd32z2c67p4hmcdrq", + "fetchSubmodules": false + }, + "gtk2": { + "url": "https://github.com/dawikur/base16-gtk2", + "rev": "8a1a71bde8efb42498be26465b3f81faf564e3b7", + "sha256": "110l9qy5ygi1fwz5fi5rldsbziwgm0k3jb1d63ias5whgw21kfa1", + "fetchSubmodules": false + }, + "highlight": { + "url": "https://github.com/bezhermoso/base16-highlight", + "rev": "a07d0c99b4ff1144344010aa06bc14460c5618c8", + "sha256": "18y67j4x0lvlxsgnh1wwaqlw3a1xvk9nld61yq271nkqda9gdf3j", + "fetchSubmodules": false + }, + "html-preview": { + "url": "https://github.com/chriskempson/base16-html-preview", + "rev": "229dca1455f9fe8d6ce491148aa294d375547be2", + "sha256": "0vbw97cfrmkrlw17d5nn0wyigigwzr3ypirg23i2i9w19pdlkwlm", + "fetchSubmodules": false + }, + "i3": { + "url": "https://github.com/khamer/base16-i3", + "rev": "b56bab56d69c2691449a201ba28c46bc93da62d1", + "sha256": "13y4jxajmq7bmih8jr079ay7nqycgpjnv81145pf8s5fsa6fw7c1", + "fetchSubmodules": false + }, + "i3status-rust": { + "url": "https://github.com/mystfox/base16-i3status-rust", + "rev": "b761342deb520a59b487749c35e5f0fc14db0ee0", + "sha256": "0ab9pkb6c2zb802ac1bli0iii0r499lviivw5bi54lg2mv3blpgv", + "fetchSubmodules": false + }, + "iterm2": { + "url": "https://github.com/martinlindhe/base16-iterm2", + "rev": "7f9c3d60b03ff8e74635df2cce9e9442e03190e1", + "sha256": "055ii5mcvrqfvc81v0a32y01mh80w3xxidxfzfz2gkw0lj8b6l2j", + "fetchSubmodules": false + }, + "jetbrains": { + "url": "https://github.com/adilosa/base16-jetbrains", + "rev": "816c329c77310ef10c326164b88a46ca08417fdd", + "sha256": "1gdb42r81avyavmgg5nlx0yhc1vbx05yhv0m4b28wwh2gq09kfba", + "fetchSubmodules": false + }, + "joe": { + "url": "https://github.com/jjjordan/base16-joe", + "rev": "cf3cb8b01b824712a7876f5db4c3be01fc4ece62", + "sha256": "11iwrf1f0c78sjblsr4yxsdyi1mym3fqlpiqsacyi5qdmsxh8ivi", + "fetchSubmodules": false + }, + "kakoune": { + "url": "https://github.com/leira/base16-kakoune", + "rev": "2f93127b420328d9c11ffa1ffa1837ac009a6f7d", + "sha256": "0z6vyvygb7mw3pj0r4xsjzzb8hnf5kz01gmzjhlwyx34lcybwj9w", + "fetchSubmodules": false + }, + "kitty": { + "url": "https://github.com/kdrag0n/base16-kitty", + "rev": "858b3e36549e0415623218caa6f0a8d7a1f5edab", + "sha256": "0x449q9b75fql1hp9ryak7jd63x47480x1k9fgvasdgg0bpdm03k", + "fetchSubmodules": false + }, + "konsole": { + "url": "https://github.com/cskeeters/base16-konsole", + "rev": "b30e0b26e766cf8a3d12afb18ac2773f53af5a87", + "sha256": "0a8pjah1nkimnj3b59mvfj53zmjd4252s7zb7drvv45ik4n4cjj9", + "fetchSubmodules": false + }, + "mintty": { + "url": "https://github.com/iamthad/base16-mintty", + "rev": "36516490c83312da74d1477512c9ce25bd71efce", + "sha256": "03jk9jslsgdkp8scd8zrakjwi8fzgvw8k10nqryvzp449285y89l", + "fetchSubmodules": false + }, + "monodevelop": { + "url": "https://github.com/netpyoung/base16-monodevelop", + "rev": "c6482ae507086ae0b2d7bdd5ef5310abea5e3509", + "sha256": "0zhfs22lmbmn2xn10mbdznzkk0ns8mx3jkg8apbmmqlwxlxzarw3", + "fetchSubmodules": false + }, + "prism": { + "url": "https://github.com/atelierbram/base16-prism", + "rev": "8654bd3dec78559a1175170db340d9d9ffadf6e6", + "sha256": "1qjqcn8x6vhq3g7w53v70jd4wpdnhmx8xdj34mll8yn7kh3k9fwm", + "fetchSubmodules": false + }, + "prompt-toolkit": { + "url": "https://github.com/memeplex/base16-prompt-toolkit", + "rev": "1d20bfbc4df1945edf630a057acdf90d10899fad", + "sha256": "0ynak1x4r18r6awcxpaxanrkysji8mwssjaaq9zhwlryv6z3g810", + "fetchSubmodules": false + }, + "putty": { + "url": "https://github.com/abravalheri/base16-putty", + "rev": "119e0788413fb76d02789703e28abd0939079d3e", + "sha256": "14zlfm7wxqzm5g2sj398f075fpzn4h67gxdplb6nc1iy14qxqb7p", + "fetchSubmodules": false + }, + "pygments": { + "url": "https://github.com/mohd-akram/base16-pygments", + "rev": "de39f100a46df33d63428fef36b203979f85a588", + "sha256": "0iclmdhfkwafip4rwgk231nrgvc8gpd2zdbmbqs6lgw0iyalkd44", + "fetchSubmodules": false + }, + "pywal": { + "url": "https://github.com/metalelf0/base16-pywal", + "rev": "7a8ba6c794386261172f0f62536ad70edb2db62a", + "sha256": "1yaipwqc64zzpdz914279kx6i3gniizkbh5g1zaxk7avzkcf7hla", + "fetchSubmodules": false + }, + "qtcreator": { + "url": "https://github.com/ilpianista/base16-qtcreator", + "rev": "0415c80f789bd758c611553975805c235cf02a35", + "sha256": "07m3rqb4qs6ggl14q9mdsj08qz0g0nxyi6cyapj785jkqdzkyv3a", + "fetchSubmodules": false + }, + "qutebrowser": { + "url": "https://github.com/theova/base16-qutebrowser", + "rev": "4dfec0ac6c0dcbf12923733141cd95a046c57527", + "sha256": "16h55s6y4sh6lh43yxbyr0znm26a409xr48rv0hhklv3h7wp78bl", + "fetchSubmodules": false + }, + "radare2": { + "url": "https://github.com/jtalowell/base16-radare2", + "rev": "3f3ebd7b70bf013cb715a922259e78771db1187d", + "sha256": "0ln4dpb4iirvmgg2lqzq2vk64add37hs650rwp649ilh87mb6lr5", + "fetchSubmodules": false + }, + "rofi": { + "url": "https://gitlab.com/0xdec/base16-rofi", + "rev": "0efb1185eb530c4ee7a33755b399d16b527af706", + "sha256": "04z8xhlx1dd0d4iacdx1i2wz3wdw5y0rz3xiznfwiz90azlv8pgd", + "fetchSubmodules": false + }, + "shell": { + "url": "https://github.com/chriskempson/base16-shell", + "rev": "cd19a7bc5c57e5dccc95f1493a2a0ff3b15f4499", + "sha256": "01rc78c0fng3p2lray5hz23n8irgcvmq7s5d7mwl9pb8ajclhfw2", + "fetchSubmodules": false + }, + "scide": { + "url": "https://github.com/brunoro/base16-scide", + "rev": "a1bb97088722c53e727e88f739f81d4359c43818", + "sha256": "1vzj4knrq506k1njym0j0zrrn42c4kv2i3lwnaj3bb16nlmd71d1", + "fetchSubmodules": false + }, + "st": { + "url": "https://github.com/honza/base16-st", + "rev": "b3d0d4fbdf86d9b3eda06f42a5bdf261b1f7d1d1", + "sha256": "1z08abn9g01nnr1v4m4p8gp1j8cwlvcadgpjb7ngjy8ghrk8g0sh", + "fetchSubmodules": false + }, + "stumpwm": { + "url": "https://github.com/tpine/base16-stumpwm", + "rev": "df0a85f2f03d7af06dbafc524f45f97fdea2d21a", + "sha256": "0ql65yngr3mrg463lgkhjdqr1vfw2x4p3nkrjdgjzxm9z211m5pm", + "fetchSubmodules": false + }, + "styles": { + "url": "https://github.com/samme/base16-styles", + "rev": "8db4f00ca9e5575ba52d98a204ee44a53e13d546", + "sha256": "1psjkzjzl3im5gyl5jri9f7bfpmr957lapknqzpj2z98hm9v6rvh", + "fetchSubmodules": false + }, + "telegram-desktop": { + "url": "https://gitlab.com/theova/base16-telegram-desktop", + "rev": "c7b91e019a9df06ba869efa02bbedb1670d6bd92", + "sha256": "02knn16d7xl5p3622bxppl5q2raqnxvgb3ah2mgndixqfbc7b1fg", + "fetchSubmodules": false + }, + "termite": { + "url": "https://github.com/khamer/base16-termite", + "rev": "2c01e32db3ed5e9015d951c39e77373d12022f6a", + "sha256": "1zkvsmcf7cg0a438hfrfpj8q657lq89mi8650x4p5scknkk6bd9s", + "fetchSubmodules": false + }, + "termux": { + "url": "https://github.com/kdrag0n/base16-termux", + "rev": "64dd13d70969b4280cdd00b6861f7942496fdbc3", + "sha256": "10bjn1kgjs8qiyqg4cxrpwfnfx0lzqgvaid7dg44dwplf9slvznz", + "fetchSubmodules": false + }, + "textmate": { + "url": "https://github.com/chriskempson/base16-textmate", + "rev": "1d9e52afb74e03f5a2fdc53d9327428fe00c70c7", + "sha256": "1h10ynqdrnh9xh9pxjzrd2yk85zavmmqs9mx6hb2v0dq4m81hkmr", + "fetchSubmodules": false + }, + "tmux": { + "url": "https://github.com/mattdavis90/base16-tmux", + "rev": "144e048c1fa9c886e34667bc2d74c677b36d8604", + "sha256": "1g6pxxc94niaq1hpaadzqqadskwln4drl2rklz35rars54c26qxz", + "fetchSubmodules": false + }, + "tilix": { + "url": "https://github.com/karlding/base16-tilix", + "rev": "4a6dad0ae07f3a8fb3ca29eac71d02a70883e23f", + "sha256": "1f8j30c8rsim1wzb9la7wcfirawwdcn07wlqfg5n79svamq2mch0", + "fetchSubmodules": false + }, + "vim": { + "url": "https://github.com/chriskempson/base16-vim", + "rev": "2073e2dd9fa0172ccdba92b3f0df25642a69f7db", + "sha256": "1d6d2aca73rvhz7gpi2d1g2il9qy45pfw1kbrrqgvmik016i6l1y", + "fetchSubmodules": false + }, + "vis": { + "url": "https://github.com/pshevtsov/base16-vis", + "rev": "05dae61a524edf21632fc45b473ec8c3e0f553ab", + "sha256": "15jd45565v8agzqhaklnsv06mmrzznkqmw8n5bs2c2fqi6228jca", + "fetchSubmodules": false + }, + "vscode": { + "url": "https://github.com/golf1052/base16-vscode", + "rev": "7eb40ddf1505673ee0fb5fdbf7e6a9409440fa58", + "sha256": "1b9cjhv2vfxzq702c2hha9jv0hxg7fcgbmbqapkldhdh3c7xzxrh", + "fetchSubmodules": false + }, + "windows-command-prompt": { + "url": "https://github.com/iamthad/base16-windows-command-prompt", + "rev": "dd1a21edf83c2f66b8d6267bb096fd73d1fd0b46", + "sha256": "09cl5jq5l6hv6jscc45pdjkfshxw88bqp7igqrhscnf028q81jb6", + "fetchSubmodules": false + }, + "xcode": { + "url": "https://github.com/kreeger/base16-xcode", + "rev": "7a6307cb629c81f8595621614e2a54433e57f6c9", + "sha256": "1n8da5xplw93qf7prvz6jpbcghyvm7iv5bq8dkxkk5qykikcpnr7", + "fetchSubmodules": false + }, + "xfce4-terminal": { + "url": "https://github.com/afg984/base16-xfce4-terminal", + "rev": "dce5e482e142abab4811fdd22532a6649e30e96e", + "sha256": "1jrq6049yxda9l6hikz1dlkf8cllzljjpygwj03i8g5mv5vgrvvq", + "fetchSubmodules": false + }, + "xresources": { + "url": "https://github.com/chriskempson/base16-xresources", + "rev": "79e6e1de591f7444793fd8ed38b67ce7fce25ab6", + "sha256": "1nnj5py5n0m8rkq3ic01wzyzkgl3g9a8q5dc5pcgj3qr47hhddbw", + "fetchSubmodules": false + }, + "xshell": { + "url": "https://github.com/h404bi/base16-xshell", + "rev": "0eda8dbccdec9737fbcc4810bfd2676ea7243c08", + "sha256": "1n1j80zab3rs43p20k5mgbnwf8yy7y4wg9rpa1lz6s5din5d9l3k", + "fetchSubmodules": false + }, + "zathura": { + "url": "https://github.com/nicodebo/base16-zathura", + "rev": "d3eec6ed9c83725b6044b001d587cd42507c5496", + "sha256": "0b29npil6hsr4cld1g6cz8i9412fvqx2c25ls2v71bajirads1yl", + "fetchSubmodules": false + } +} diff --git a/update_sources.sh b/update_sources.sh new file mode 100755 index 0000000..5feb652 --- /dev/null +++ b/update_sources.sh @@ -0,0 +1,24 @@ +#! /usr/bin/env nix-shell +#! nix-shell --pure -i bash -p bash curl nix-prefetch-git gnused jq + +# Run from within the directory which needs the templates.json/schemes.json + +# Not very safe - should be cleaner & could be more parallel +# should always be permitted to run to completion + +generate_sources () { + out=$1 + curl "https://raw.githubusercontent.com/chriskempson/base16-${out}-source/master/list.yaml"\ + | sed -nE "s~(\w*): *(.*)~\1 \2~p"\ + | while read name src; do + echo "{\"key\":\"$name\",\"value\":" + nix-prefetch-git $src + echo "}" + done\ + | jq -s ".|del(.[].value.date)|from_entries"\ + > $out.json +} + +generate_sources templates & +generate_sources schemes & +wait