Rename fluorescence -> alucard
Since it's dracula inspired 'n all...
This commit is contained in:
parent
74a8b35b88
commit
c50a51f987
14
modules/themes/alucard/README.org
Normal file
14
modules/themes/alucard/README.org
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#+TITLE: Alucard
|
||||||
|
#+AUTHOR: Henrik Lissner
|
||||||
|
#+DATE: October 1, 2019
|
||||||
|
|
||||||
|
A regal dracula-inspired theme for piles of miserable secrets.
|
||||||
|
|
||||||
|
* Wallpaper
|
||||||
|
![Alucard wallpaper](config/wallpaper.jpg)
|
||||||
|
|
||||||
|
* Screenshots
|
||||||
|
![My desktop, pretending to look busy, with gaps](/../screenshots/alucard/fakebusy.png?raw=true)
|
||||||
|
![My desktop, unfettered by windows](/../screenshots/alucard/desktop.png?raw=true)
|
||||||
|
![My app launcher, rofi](/../screenshots/alucard/rofi.png?raw=true)
|
||||||
|
![The gapless experience](/../screenshots/alucard/tiling.png?raw=true)
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
99
modules/themes/alucard/default.nix
Normal file
99
modules/themes/alucard/default.nix
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
# modules/themes/alucard/default.nix --- a regal dracula-inspired theme
|
||||||
|
|
||||||
|
{ options, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
with lib.my;
|
||||||
|
let cfg = config.modules.theme;
|
||||||
|
in {
|
||||||
|
config = mkIf (cfg.active == "alucard") (mkMerge [
|
||||||
|
# Desktop-agnostic configuration
|
||||||
|
{
|
||||||
|
modules = {
|
||||||
|
theme = {
|
||||||
|
wallpaper = mkDefault ./config/wallpaper.png;
|
||||||
|
gtk = {
|
||||||
|
theme = "Dracula";
|
||||||
|
iconTheme = "Paper";
|
||||||
|
cursorTheme = "Paper";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
shell.zsh.rcFiles = [ ./config/zsh/prompt.zsh ];
|
||||||
|
shell.tmux.rcFiles = [ ./config/tmux.conf ];
|
||||||
|
desktop.browsers = {
|
||||||
|
firefox.userChrome = concatMapStringsSep "\n" readFile [
|
||||||
|
./config/firefox/userChrome.css
|
||||||
|
];
|
||||||
|
qutebrowser.userStyles = concatMapStringsSep "\n" toCSSFile [
|
||||||
|
./config/qutebrowser/github.scss
|
||||||
|
./config/qutebrowser/monospace-textareas.scss
|
||||||
|
./config/qutebrowser/quora.scss
|
||||||
|
./config/qutebrowser/stackoverflow.scss
|
||||||
|
./config/qutebrowser/xkcd.scss
|
||||||
|
./config/qutebrowser/youtube.scss
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Desktop (X11) theming
|
||||||
|
(mkIf config.services.xserver.enable {
|
||||||
|
user.packages = with pkgs; [
|
||||||
|
unstable.dracula-theme
|
||||||
|
paper-icon-theme # for rofi
|
||||||
|
];
|
||||||
|
fonts.fonts = [ pkgs.jetbrains-mono ];
|
||||||
|
|
||||||
|
# Compositor
|
||||||
|
services.picom = {
|
||||||
|
fade = true;
|
||||||
|
fadeDelta = 1;
|
||||||
|
fadeSteps = [ 0.01 0.012 ];
|
||||||
|
shadow = true;
|
||||||
|
shadowOffsets = [ (-10) (-10) ];
|
||||||
|
shadowOpacity = 0.22;
|
||||||
|
# activeOpacity = "1.00";
|
||||||
|
# inactiveOpacity = "0.92";
|
||||||
|
settings = {
|
||||||
|
shadow-radius = 12;
|
||||||
|
# blur-background = true;
|
||||||
|
# blur-background-frame = true;
|
||||||
|
# blur-background-fixed = true;
|
||||||
|
blur-kern = "7x7box";
|
||||||
|
blur-strength = 320;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Login screen theme
|
||||||
|
services.xserver.displayManager.lightdm.greeters.mini.extraConfig = ''
|
||||||
|
text-color = "#ff79c6"
|
||||||
|
password-background-color = "#1E2029"
|
||||||
|
window-color = "#181a23"
|
||||||
|
border-color = "#181a23"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Other dotfiles
|
||||||
|
home.configFile = mkMerge [
|
||||||
|
{
|
||||||
|
# Sourced from sessionCommands in modules/themes/default.nix
|
||||||
|
"xtheme/90-theme".source = ./config/Xresources;
|
||||||
|
}
|
||||||
|
(mkIf m.desktop.bspwm.enable {
|
||||||
|
"bspwm/rc.d/polybar".source = ./config/polybar/run.sh;
|
||||||
|
"bspwm/rc.d/theme".source = ./config/bspwmrc;
|
||||||
|
})
|
||||||
|
(mkIf m.desktop.apps.rofi.enable {
|
||||||
|
"rofi/theme" = { source = ./config/rofi; recursive = true; };
|
||||||
|
})
|
||||||
|
(mkIf (m.desktop.bspwm.enable || m.desktop.stumpwm.enable) {
|
||||||
|
"polybar" = { source = ./config/polybar; recursive = true; };
|
||||||
|
"dunst/dunstrc".source = ./config/dunstrc;
|
||||||
|
})
|
||||||
|
(mkIf m.desktop.media.graphics.vector.enable {
|
||||||
|
"inkscape/templates/default.svg".source = ./config/inkscape/default-template.svg;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
|
@ -2,14 +2,123 @@
|
||||||
# intertwined with others, and are solely responsible for aesthetics. Disabling
|
# intertwined with others, and are solely responsible for aesthetics. Disabling
|
||||||
# a theme module should never leave a system non-functional.
|
# a theme module should never leave a system non-functional.
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ options, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
with lib.my;
|
with lib.my;
|
||||||
let cfg = config.modules.themes;
|
let cfg = config.modules.theme;
|
||||||
in {
|
in {
|
||||||
assertions = [{
|
options.modules.theme = with types; {
|
||||||
assertion = countAttrs (_: x: x.enable) cfg < 2;
|
active = mkOption {
|
||||||
message = "Can't have more than one theme enabled at a time";
|
type = nullOr str;
|
||||||
}];
|
default = null;
|
||||||
|
apply = v: let theme = builtins.getEnv "THEME"; in
|
||||||
|
if theme != "" then theme else v;
|
||||||
|
description = ''
|
||||||
|
Name of the theme to enable. Can be overridden by the THEME environment
|
||||||
|
variable. Themes can also be hot-swapped with 'hey theme $THEME'.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
wallpaper = mkOpt (either path null) null;
|
||||||
|
|
||||||
|
loginWallpaper = mkOpt (either path null)
|
||||||
|
(if cfg.wallpaper != null
|
||||||
|
then toFilteredImage cfg.wallpaper "-gaussian-blur 0x2 -modulate 70 -level 5%"
|
||||||
|
else null);
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
theme = mkOpt str "";
|
||||||
|
iconTheme = mkOpt str "";
|
||||||
|
cursorTheme = mkOpt str "";
|
||||||
|
};
|
||||||
|
|
||||||
|
onReload = mkOpt (attrsOf lines) {};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (cfg.active != null) (mkMerge [
|
||||||
|
# Read xresources files in ~/.config/xtheme/* to allow modular
|
||||||
|
# configuration of Xresources.
|
||||||
|
(let xrdb = ''xrdb -merge "$XDG_CONFIG_HOME"/xtheme/*'';
|
||||||
|
in {
|
||||||
|
services.xserver.displayManager.sessionCommands = xrdb;
|
||||||
|
modules.theme.onReload.xtheme = xrdb;
|
||||||
|
})
|
||||||
|
|
||||||
|
{
|
||||||
|
home.configFile = {
|
||||||
|
# GTK
|
||||||
|
"gtk-3.0/settings.ini".text = ''
|
||||||
|
[Settings]
|
||||||
|
${optionalString (cfg.gtk.theme != "")
|
||||||
|
''gtk-theme-name="${cfg.gtk.theme}"''}
|
||||||
|
${optionalString (cfg.gtk.iconTheme != "")
|
||||||
|
''gtk-icon-theme-name="${cfg.gtk.iconTheme}"''}
|
||||||
|
${optionalString (cfg.gtk.cursorTheme != "")
|
||||||
|
''gtk-cursor-theme-name="${cfg.gtk.cursorTheme}"''}
|
||||||
|
gtk-fallback-icon-theme=gnome
|
||||||
|
gtk-application-prefer-dark-theme=true
|
||||||
|
gtk-xft-hinting=1
|
||||||
|
gtk-xft-hintstyle=hintfull
|
||||||
|
gtk-xft-rgba=none
|
||||||
|
'';
|
||||||
|
# GTK2 global theme (widget and icon theme)
|
||||||
|
"gtk-2.0/gtkrc".text = ''
|
||||||
|
${optionalString (cfg.gtk.theme != "")
|
||||||
|
''gtk-theme-name="${cfg.gtk.theme}"''}
|
||||||
|
${optionalString (cfg.gtk.iconTheme != "")
|
||||||
|
''gtk-icon-theme-name="${cfg.gtk.iconTheme}"''}
|
||||||
|
gtk-font-name="Sans 10"
|
||||||
|
'';
|
||||||
|
# QT4/5 global theme
|
||||||
|
"Trolltech.conf".text = ''
|
||||||
|
[Qt]
|
||||||
|
${optionalString (cfg.gtk.theme != "")
|
||||||
|
''style="${cfg.gtk.theme}"''}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
(mkIf (cfg.wallpaper != null)
|
||||||
|
(let wCfg = config.services.xserver.desktopManager.wallpaper;
|
||||||
|
command = ''
|
||||||
|
if [ -e "$XDG_DATA_HOME/wallpaper" ]; then
|
||||||
|
${pkgs.feh}/bin/feh --bg-${wCfg.mode} \
|
||||||
|
${optionalString wCfg.combineScreens "--no-xinerama"} \
|
||||||
|
--no-fehbg \
|
||||||
|
$XDG_DATA_HOME/wallpaper
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
# Set the wallpaper ourselves so we don't need .background-image and/or
|
||||||
|
# .fehbg polluting $HOME
|
||||||
|
services.xserver.displayManager.sessionCommands = command;
|
||||||
|
modules.theme.onReload.wallpaper = command;
|
||||||
|
|
||||||
|
home.dataFile = mkIf (cfg.wallpaper != null) {
|
||||||
|
"wallpaper".source = cfg.wallpaper;
|
||||||
|
};
|
||||||
|
}))
|
||||||
|
|
||||||
|
(mkIf (cfg.loginWallpaper != null) {
|
||||||
|
services.xserver.displayManager.lightdm.background = cfg.loginWallpaper;
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkIf (cfg.onReload != {}) {
|
||||||
|
user.packages = [
|
||||||
|
(pkgs.writeScriptBin "reloadTheme" ''
|
||||||
|
#!${stdenv.shell}
|
||||||
|
echo "Reloading current theme: ${cfg.active}"
|
||||||
|
${concatStrings "\n"
|
||||||
|
(mapAttrsToList (name: script: ''
|
||||||
|
echo "[${name}]"
|
||||||
|
${script}
|
||||||
|
'') cfg.onReload)}
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
system.userActivationScripts.reloadTheme = ''
|
||||||
|
[ -z "$NORELOAD" ] && reloadTheme
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#+TITLE: Fluorescence
|
|
||||||
#+AUTHOR: Henrik Lissner
|
|
||||||
#+DATE: October 1, 2019
|
|
||||||
|
|
||||||
A regal dracula-inspired theme.
|
|
||||||
|
|
||||||
* Wallpaper
|
|
||||||
![Fluorescence wallpaper](config/wallpaper.jpg)
|
|
||||||
|
|
||||||
* Screenshots
|
|
||||||
![My desktop, pretending to look busy, with gaps](/../screenshots/fluorescence/fakebusy.png?raw=true)
|
|
||||||
![My desktop, unfettered by windows](/../screenshots/fluorescence/desktop.png?raw=true)
|
|
||||||
![My app launcher, rofi](/../screenshots/fluorescence/rofi.png?raw=true)
|
|
||||||
![The gapless experience](/../screenshots/fluorescence/tiling.png?raw=true)
|
|
|
@ -1,130 +0,0 @@
|
||||||
# modules/themes/fluorescence/default.nix --- a regal dracula-inspired theme
|
|
||||||
|
|
||||||
{ options, config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let m = config.modules;
|
|
||||||
cfg = m.themes.fluorescence;
|
|
||||||
in {
|
|
||||||
options.modules.themes.fluorescence = with types; {
|
|
||||||
enable = mkBoolOpt false;
|
|
||||||
wallpaper = mkOpt (either path null) ./config/wallpaper.png;
|
|
||||||
loginWallpaper = mkOpt (either path null)
|
|
||||||
(toFilteredImage cfg.wallpaper "-gaussian-blur 0x2 -modulate 70 -level 5%");
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
|
||||||
# Desktop-agnostic configuration
|
|
||||||
{
|
|
||||||
home.configFile = mkIf m.shell.tmux.enable {
|
|
||||||
"tmux/theme".source = ./config/tmux.conf;
|
|
||||||
};
|
|
||||||
modules.shell.zsh.rcFiles = [ ./config/zsh/prompt.zsh ];
|
|
||||||
}
|
|
||||||
|
|
||||||
# Desktop (X11) theming
|
|
||||||
(mkIf config.services.xserver.enable {
|
|
||||||
user.packages = with pkgs; [
|
|
||||||
unstable.dracula-theme
|
|
||||||
paper-icon-theme # for rofi
|
|
||||||
];
|
|
||||||
fonts.fonts = [ pkgs.jetbrains-mono ];
|
|
||||||
|
|
||||||
# Compositor
|
|
||||||
services.picom = {
|
|
||||||
fade = true;
|
|
||||||
fadeDelta = 1;
|
|
||||||
fadeSteps = [ 0.01 0.012 ];
|
|
||||||
shadow = true;
|
|
||||||
shadowOffsets = [ (-10) (-10) ];
|
|
||||||
shadowOpacity = 0.22;
|
|
||||||
# activeOpacity = "1.00";
|
|
||||||
# inactiveOpacity = "0.92";
|
|
||||||
settings = {
|
|
||||||
shadow-radius = 12;
|
|
||||||
# blur-background = true;
|
|
||||||
# blur-background-frame = true;
|
|
||||||
# blur-background-fixed = true;
|
|
||||||
blur-kern = "7x7box";
|
|
||||||
blur-strength = 320;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm = mkMerge [
|
|
||||||
# Login screen theme
|
|
||||||
{
|
|
||||||
greeters.mini.extraConfig = ''
|
|
||||||
text-color = "#ff79c6"
|
|
||||||
password-background-color = "#1E2029"
|
|
||||||
window-color = "#181a23"
|
|
||||||
border-color = "#181a23"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
(mkIf (cfg.loginWallpaper != null) {
|
|
||||||
background = cfg.loginWallpaper;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
home.dataFile = mkIf (cfg.wallpaper != null) {
|
|
||||||
"wallpaper".source = cfg.wallpaper;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules.desktop.browsers = {
|
|
||||||
firefox.userChrome = concatMapStringsSep "\n" readFile [
|
|
||||||
./config/firefox/userChrome.css
|
|
||||||
];
|
|
||||||
qutebrowser.userStyles = concatMapStringsSep "\n" toCSSFile [
|
|
||||||
./config/qutebrowser/github.scss
|
|
||||||
./config/qutebrowser/monospace-textareas.scss
|
|
||||||
./config/qutebrowser/quora.scss
|
|
||||||
./config/qutebrowser/stackoverflow.scss
|
|
||||||
./config/qutebrowser/xkcd.scss
|
|
||||||
./config/qutebrowser/youtube.scss
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
home.configFile = mkMerge [
|
|
||||||
{
|
|
||||||
# This is sourced in the displayManager (see
|
|
||||||
# modules/desktop/default.nix) to modularize my Xresources config.
|
|
||||||
"xtheme/90-theme".source = ./config/Xresources;
|
|
||||||
# GTK
|
|
||||||
"gtk-3.0/settings.ini".text = ''
|
|
||||||
[Settings]
|
|
||||||
gtk-theme-name=Dracula
|
|
||||||
gtk-icon-theme-name=Paper
|
|
||||||
gtk-fallback-icon-theme=gnome
|
|
||||||
gtk-application-prefer-dark-theme=true
|
|
||||||
gtk-cursor-theme-name=Paper
|
|
||||||
gtk-xft-hinting=1
|
|
||||||
gtk-xft-hintstyle=hintfull
|
|
||||||
gtk-xft-rgba=none
|
|
||||||
'';
|
|
||||||
# GTK2 global theme (widget and icon theme)
|
|
||||||
"gtk-2.0/gtkrc".text = ''
|
|
||||||
gtk-theme-name="Dracula"
|
|
||||||
gtk-icon-theme-name="Paper-Mono-Dark"
|
|
||||||
gtk-font-name="Sans 10"
|
|
||||||
'';
|
|
||||||
# QT4/5 global theme
|
|
||||||
"Trolltech.conf".text = "[Qt]\nstyle=Dracula";
|
|
||||||
}
|
|
||||||
(mkIf m.desktop.bspwm.enable {
|
|
||||||
"bspwm/rc.d/polybar".source = ./config/polybar/run.sh;
|
|
||||||
"bspwm/rc.d/theme".source = ./config/bspwmrc;
|
|
||||||
})
|
|
||||||
(mkIf m.desktop.apps.rofi.enable {
|
|
||||||
"rofi/theme" = { source = ./config/rofi; recursive = true; };
|
|
||||||
})
|
|
||||||
(mkIf (m.desktop.bspwm.enable || m.desktop.stumpwm.enable) {
|
|
||||||
"polybar" = { source = ./config/polybar; recursive = true; };
|
|
||||||
"dunst/dunstrc".source = ./config/dunstrc;
|
|
||||||
})
|
|
||||||
(mkIf m.desktop.media.graphics.vector.enable {
|
|
||||||
"inkscape/templates/default.svg".source = ./config/inkscape/default-template.svg;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
}
|
|
Loading…
Reference in a new issue