From ba2a026d3510f60176e0f95c9cc06b28800d20c7 Mon Sep 17 00:00:00 2001 From: kat witch Date: Fri, 30 Apr 2021 02:41:04 +0100 Subject: [PATCH] profiles/{gui,sway}: Moved to base16-shell fully --- lib/style.nix | 11 ----- lib/witch.nix | 2 - pkgs/default.nix | 2 + profiles/gui/home/kitty.nix | 6 ++- profiles/sway/home/mako.nix | 12 ++++-- profiles/sway/home/sway.nix | 48 ++++++++++++---------- profiles/sway/home/waybar/default.nix | 8 +++- profiles/sway/home/waybar/waybar.css.nix | 51 +++++++++++++----------- 8 files changed, 74 insertions(+), 66 deletions(-) delete mode 100644 lib/style.nix diff --git a/lib/style.nix b/lib/style.nix deleted file mode 100644 index 0903d358..00000000 --- a/lib/style.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs }: - -rec { - base16 = mapAttrs (_: toString) pkgs.base16.shell.shell256; - - font = { - name = "FantasqueSansMono Nerd Font"; - size = "10"; - size_css = "14px"; - }; -} diff --git a/lib/witch.nix b/lib/witch.nix index 431825c8..2f74ffc0 100644 --- a/lib/witch.nix +++ b/lib/witch.nix @@ -1,7 +1,5 @@ { pkgs, lib }: { - style = import ./style.nix { inherit pkgs; }; - colorhelpers = import ./colorhelpers.nix { inherit lib; }; modList = import ./modules.nix; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 83731fdf..7b8b603b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -49,6 +49,8 @@ let obs-studio = super.obs-studio.override { pipewireSupport = true; }; + hextorgba = (import ../lib/colorhelpers.nix { inherit (super) lib; }).hextorgba; + ff-sponsorblock = super.callPackage ./ff-sponsorblock { }; kat-glauca-dns = super.callPackage ./kat-glauca-dns { }; diff --git a/profiles/gui/home/kitty.nix b/profiles/gui/home/kitty.nix index 9d8cde30..0db98535 100644 --- a/profiles/gui/home/kitty.nix +++ b/profiles/gui/home/kitty.nix @@ -1,6 +1,10 @@ { config, lib, pkgs, witch, ... }: -{ +let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { + name = "FantasqueSansMono Nerd Font"; + size = "10"; + size_css = "14px"; + }; in { programs.kitty = { enable = true; font.name = witch.style.font.name; diff --git a/profiles/sway/home/mako.nix b/profiles/sway/home/mako.nix index 0ced127b..47ebaa41 100644 --- a/profiles/sway/home/mako.nix +++ b/profiles/sway/home/mako.nix @@ -1,6 +1,10 @@ { config, pkgs, lib, witch, ... }: -{ +let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { + name = "FantasqueSansMono Nerd Font"; + size = "10"; + size_css = "14px"; + }; in { systemd.user.services = { mako = { Unit = { @@ -19,8 +23,8 @@ programs.mako = { enable = true; defaultTimeout = 3000; - borderColor = witch.style.base16.color7; - backgroundColor = "${witch.style.base16.color0}70"; - textColor = witch.style.base16.color7; + borderColor = witch.style.base16.base07; + backgroundColor = "${witch.style.base16.base00}70"; + textColor = witch.style.base16.base07; }; } diff --git a/profiles/sway/home/sway.nix b/profiles/sway/home/sway.nix index 3431bde4..78e87687 100644 --- a/profiles/sway/home/sway.nix +++ b/profiles/sway/home/sway.nix @@ -1,6 +1,10 @@ { config, pkgs, lib, witch, ... }: -{ +let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { + name = "FantasqueSansMono Nerd Font"; + size = "10"; + size_css = "14px"; + }; in { home.sessionVariables = { MOZ_ENABLE_WAYLAND = 1; XDG_CURRENT_DESKTOP = "sway"; @@ -66,7 +70,7 @@ enable = true; config = let dmenu = - "${pkgs.bemenu}/bin/bemenu --fn '${witch.style.font.name} ${witch.style.font.size}' --nb '${witch.style.base16.color0}' --nf '${witch.style.base16.color7}' --sb '${witch.style.base16.color1}' --sf '${witch.style.base16.color7}' -l 5 -m -1 -i"; + "${pkgs.bemenu}/bin/bemenu --fn '${witch.style.font.name} ${witch.style.font.size}' --nb '${witch.style.base16.base00}' --nf '${witch.style.base16.base07}' --sb '${witch.style.base16.base01}' --sf '${witch.style.base16.base07}' -l 5 -m -1 -i"; lockCommand = "swaylock -i LVDS-1:${ ../../../private/files/wallpapers/main.png }-i eDP-1:${../../../private/files/wallpapers/main.png} -i HDMI-A-1:${ @@ -189,32 +193,32 @@ colors = { focused = { - border = witch.style.base16.color8; - background = witch.style.base16.color3; - text = witch.style.base16.color0; - indicator = witch.style.base16.color2; - childBorder = witch.style.base16.color8; + border = witch.style.base16.base08; + background = witch.style.base16.base0A; + text = witch.style.base16.base00; + indicator = witch.style.base16.base0B; + childBorder = witch.style.base16.base08; }; focusedInactive = { - border = witch.style.base16.color0; - background = witch.style.base16.color15; - text = witch.style.base16.color13; - indicator = witch.style.base16.color2; - childBorder = witch.style.base16.color8; + border = witch.style.base16.base00; + background = witch.style.base16.base07; + text = witch.style.base16.base0E; + indicator = witch.style.base16.base0B; + childBorder = witch.style.base16.base03; }; unfocused = { - border = witch.style.base16.color0; - background = witch.style.base16.color8; - text = witch.style.base16.color7; - indicator = witch.style.base16.color8; - childBorder = witch.style.base16.color8; + border = witch.style.base16.base00; + background = witch.style.base16.base01; + text = witch.style.base16.base04; + indicator = witch.style.base16.base08; + childBorder = witch.style.base16.base08; }; urgent = { - border = witch.style.base16.color0; - background = witch.style.base16.color9; - text = witch.style.base16.color0; - indicator = witch.style.base16.color1; - childBorder = witch.style.base16.color8; + border = witch.style.base16.base00; + background = witch.style.base16.base09; + text = witch.style.base16.base00; + indicator = witch.style.base16.base01; + childBorder = witch.style.base16.base08; }; }; }; diff --git a/profiles/sway/home/waybar/default.nix b/profiles/sway/home/waybar/default.nix index 9b90b44e..a936e8f4 100644 --- a/profiles/sway/home/waybar/default.nix +++ b/profiles/sway/home/waybar/default.nix @@ -1,12 +1,16 @@ { config, lib, pkgs, witch, ... }: -{ +let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { + name = "FantasqueSansMono Nerd Font"; + size = "10"; + size_css = "14px"; + }; in { config = lib.mkIf config.deploy.profile.sway { programs.waybar = { enable = true; style = import ./waybar.css.nix { style = witch.style; - hextorgba = witch.colorhelpers.hextorgba; + hextorgba = pkgs.hextorgba; }; settings = [{ modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ]; diff --git a/profiles/sway/home/waybar/waybar.css.nix b/profiles/sway/home/waybar/waybar.css.nix index 3a4ec906..86e20855 100644 --- a/profiles/sway/home/waybar/waybar.css.nix +++ b/profiles/sway/home/waybar/waybar.css.nix @@ -9,20 +9,24 @@ min-height: 14px } - #clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #custom-gpg-status, #idle_inhibitor, #tray { + #clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #custom-gpg-status, #idle_inhibitor { margin-left: 8px; margin-right: 8px; padding-left: 8px; padding-right: 8px; transition: none; - border-bottom: 2px solid ${style.base16.color7}; - color: ${style.base16.color7} + border-bottom: 2px solid ${style.base16.base00}; + color: ${style.base16.base05} } - window#waybar { background: ${hextorgba style.base16.color0} } + window#waybar { background: ${hextorgba style.base16.base00} } + + #tray { + margin-left: 8px; + } #window { - color: ${style.base16.color7}; + color: ${style.base16.base06}; padding-left: 16px; padding-right: 16px } @@ -30,41 +34,40 @@ #workspaces { padding: 0px 4px 0px 4px } #workspaces button { - color: ${style.base16.color7}; - background: ${hextorgba style.base16.color8}; + color: ${style.base16.base04}; + background: ${hextorgba style.base16.base02}; font-size: 16px; margin: 0px 4px 0px 4px; border-bottom: 2px solid transparent; - border-left: 1px solid ${style.base16.color7}; - border-right: 1px solid ${style.base16.color7} + border-left: 1px solid ${style.base16.base07}; + border-right: 1px solid ${style.base16.base07} } #workspaces button:last-child { margin-right: 0px } #workspaces button.focused { - color: ${style.base16.color5}; - border-bottom-color: ${style.base16.color5} + color: ${style.base16.base0A}; + border-bottom-color: ${style.base16.base0A} } #workspaces button:hover { transition: none; box-shadow: inherit; text-shadow: inherit; - color: ${style.base16.color2}; - border-bottom-color: ${style.base16.color2} + color: ${style.base16.base0F}; + border-bottom-color: ${style.base16.base0F} } #mpd, #idle_inhibitor { border-color: #5af78e } #mpd.disconnected, #mpd.stopped { border-color: #282a36 } - #tray { border-color: ${style.base16.color19} } - #network { border-color: ${style.base16.color3} } - #custom-weather { border-color: ${style.base16.color14} } - #custom-gpg-status { border-color: ${style.base16.color2} } - #pulseaudio { border-color: ${style.base16.color2} } - #temperature { border-color: ${style.base16.color4} } - #battery { border-color: ${style.base16.color6} } - #backlight { border-color: ${style.base16.color9} } - #cpu { border-color: ${style.base16.color5} } - #memory { border-color: ${style.base16.color17} } - #clock { border-color: ${style.base16.color7} } + #network { border-color: ${style.base16.base08} } + #custom-weather { border-color: ${style.base16.base00} } + #custom-gpg-status { border-color: ${style.base16.base09} } + #pulseaudio { border-color: ${style.base16.base0A} } + #temperature { border-color: ${style.base16.base0B} } + #battery { border-color: ${style.base16.base0C} } + #backlight { border-color: ${style.base16.base0D} } + #cpu { border-color: ${style.base16.base0E} } + #memory { border-color: ${style.base16.base0F} } + #clock { border-color: ${style.base16.base06} } ''