Improve color system, rofi theme formatting system

inky
Elnu 1 year ago
parent 5efa9a24bb
commit cd0afe0797

@ -1,8 +1,12 @@
let let
theme = import ./everforest; theme = import ./everforest;
colors = {
undefined = "#ff00ff";
fg1 = "#ffffff";
};
in in
{ {
undefined = "#ff00ff";
fg1 = "#ffffff";
css = lib: lib.strings.concatStringsSep "\n" (lib.attrValues (lib.mapAttrs (k: v: " --${k}: ${v};") theme.colors)); css = lib: lib.strings.concatStringsSep "\n" (lib.attrValues (lib.mapAttrs (k: v: " --${k}: ${v};") theme.colors));
} // theme // theme.colors }
// colors // theme.colors # Root colors
// theme // { colors = theme.colors // colors; } # Dedicated color set

@ -1,4 +1,6 @@
{ {
theme = "everforest";
kitty-theme = "Everforest Dark Hard"; kitty-theme = "Everforest Dark Hard";
gtkTheme = pkgs: { gtkTheme = pkgs: {
package = pkgs.callPackage ./gtk.nix {}; package = pkgs.callPackage ./gtk.nix {};

@ -1,4 +1,6 @@
{ {
theme = "nord";
kitty-theme = "Nord"; kitty-theme = "Nord";
wallpaper = "roxynord.png"; wallpaper = "roxynord.png";
gtkTheme = pkgs: { gtkTheme = pkgs: {

@ -1,13 +1,18 @@
{ pkgs, ... }: { pkgs, ... }:
{ let
colors = import ../colors;
theme = colors.theme;
in {
home.packages = with pkgs; [ home.packages = with pkgs; [
(pkgs.callPackage ./power.nix { }) (pkgs.callPackage ./power.nix { })
wmctrl # TODO: add as dependency of rofi-power wmctrl # TODO: add as dependency of rofi-power
]; ];
programs.rofi = { programs.rofi = {
enable = true; enable = true;
theme = "theme"; inherit theme;
}; };
home.file.".config/rofi/theme.rasi".text = import ./theme.nix; home.file.".config/rofi/${theme}.rasi".source = pkgs.substituteAll ({
src = ./theme.rasi;
} // colors.colors);
} }

@ -1,6 +1,4 @@
# Modified from https://github.com/undiabler/nord-rofi-theme /* Modified from https://github.com/undiabler/nord-rofi-theme */
let colors = import ../colors; in
''
configuration { configuration {
font: "Noto Sans Mono 12"; font: "Noto Sans Mono 12";
width: 30; width: 30;
@ -18,7 +16,7 @@ configuration {
* { * {
background-color: transparent; background-color: transparent;
highlight: underline bold ${colors.fg1}; highlight: underline bold @fg1@;
} }
window { window {
@ -40,16 +38,16 @@ mainbox {
} }
message { message {
color: ${colors.bg0}; color: @bg0@;
padding: 5; padding: 5;
border-color: ${colors.fg0}; border-color: @fg0@;
border: 0px 2px 2px 2px; border: 0px 2px 2px 2px;
} }
inputbar { inputbar {
color: ${colors.fg0}; color: @fg0@;
padding: 11px; padding: 11px;
background-color: ${colors.bg1}; background-color: @bg1@;
} }
entry, prompt, case-indicator { entry, prompt, case-indicator {
@ -64,23 +62,22 @@ prompt {
listview { listview {
padding: 8px; padding: 8px;
border: 0; border: 0;
background-color: ${colors.bg0}e5; background-color: @bg0@e5;
dynamic: false; dynamic: false;
} }
element { element {
padding: 3px; padding: 3px;
border-radius: 4px; border-radius: 4px;
text-color: ${colors.fg0}; text-color: @fg0@;
} }
element selected.normal { element selected.normal {
background-color: ${colors.primary}; background-color: @primary@;
text-color: ${colors.bg0}; text-color: @bg0@;
} }
element-text, element-icon { element-text, element-icon {
background-color: inherit; background-color: inherit;
text-color: inherit; text-color: inherit;
} }
''
Loading…
Cancel
Save