theme improvements

This commit is contained in:
Reid 2024-12-01 10:56:03 -08:00
parent 2c5d60b03f
commit 3b2ab08e84
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
8 changed files with 31 additions and 198 deletions

View file

@ -18,6 +18,6 @@ each host should have these files:
- multi architecture configuration ([nix-systems](https://github.com/nix-systems/nix-systems)?) - multi architecture configuration ([nix-systems](https://github.com/nix-systems/nix-systems)?)
- divide steam and gamemode? - divide steam and gamemode?
- hidpi and cursor size option ? mostly auto these days though - hidpi and cursor size option ? mostly auto these days though
- better theming for hyprlock, nwg-drawer, rofi - better theming for hyprlock, rofi
- remove battery ui in hyprlock if user isnt on laptop - remove battery ui in hyprlock if user isnt on laptop
- libinput - libinput

View file

@ -10,9 +10,5 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
modules.desktop.execOnStart = [ "${lib.getExe pkgs.nwg-drawer} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus" ]; modules.desktop.execOnStart = [ "${lib.getExe pkgs.nwg-drawer} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus" ];
hm.xdg.configFile."nwg-drawer/drawer.css".text = builtins.concatStringsSep "\n" [
"@import \"${inputs.waybar-catppuccin}/themes/mocha.css\";"
(lib.readFile ../../config/nwg-drawer.css)
];
}; };
} }

View file

@ -9,23 +9,22 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = [
config.modules.desktop.themes.sddmTheme.package config.modules.desktop.themes.sddmTheme.package
config.modules.desktop.themes.cursorTheme.package config.modules.desktop.themes.cursorTheme.package # system wide is needed for sddm
libsForQt5.qt5.qtsvg
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2
]; ];
# why do we need kwin for working hidpi # why do we need kwin for working hidpi
# huh???? # huh????
services.displayManager.sddm = { services.displayManager.sddm = {
enable = true; enable = true;
package = pkgs.kdePackages.sddm;
wayland.enable = config.modules.desktop.envProto == "wayland"; wayland.enable = config.modules.desktop.envProto == "wayland";
wayland.compositor = "kwin"; wayland.compositor = "kwin";
theme = config.modules.desktop.themes.sddmTheme.name; theme = config.modules.desktop.themes.sddmTheme.name;
settings = { settings = {
Theme = { Theme = {
CursorTheme = config.modules.desktop.themes.cursorTheme.name; CursorTheme = config.modules.desktop.themes.cursorTheme.name;
CursorSize = 24;
}; };
}; };
}; };

View file

@ -43,13 +43,13 @@ in {
}; };
sddmTheme = { sddmTheme = {
name = "catppuccin-sddm-corners"; name = "catppuccin-${variant}";
package = (pkgs.my.catppuccin-sddm-corners.override { package = (pkgs.catppuccin-sddm.override {
config.General = { flavor = variant;
Background = ../../../../assets/lockscreen.png; font = config.modules.desktop.fonts.fonts.sansSerif.family;
GeneralFontSize = toString config.modules.desktop.fonts.fonts.sansSerif.size; fontSize = toString config.modules.desktop.fonts.fonts.sansSerif.size;
Font = config.modules.desktop.fonts.fonts.sansSerif.family; background = ../../../../assets/lockscreen.png;
}; loginBackground = true;
}); });
}; };
@ -115,6 +115,12 @@ in {
wezterm = '' wezterm = ''
config.color_scheme = 'Catppuccin ${pascalCase variant}' config.color_scheme = 'Catppuccin ${pascalCase variant}'
''; '';
nwg-drawer = builtins.concatStringsSep "\n" [
"@import \"${inputs.waybar-catppuccin}/themes/${variant}.css\";"
#"@define-color accent @${accent};" # gtk already does our styling here
(lib.readFile ./nwg-drawer.css)
];
}; };
}; };
} }

View file

@ -1,14 +1,15 @@
window { window {
/*background: @base;*/
background: alpha(@base, 0.3); background: alpha(@base, 0.3);
color: @text; color: @text;
font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', FontAwesome, Noto Sans CJK; font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', "Font Awesome 6 Free", "Noto Sans CJK";
font-size: 14px; font-size: 13px;
font-style: normal; font-style: normal;
} }
/* search entry */ /* search entry */
entry { entry {
/* we don't actually need to specify accent color here */
/* this is a gtk app, remember? */
background-color: alpha(@surface0, 0.5); background-color: alpha(@surface0, 0.5);
color: @text; color: @text;
} }

View file

@ -13,8 +13,8 @@ window#waybar {
/*background: alpha(@base, 0.6);*/ /*background: alpha(@base, 0.6);*/
background: @base; background: @base;
border-radius: 1em; border-radius: 1em;
/*font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', FontAwesome, Noto Sans CJK;*/ /* font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', "Font Awesome 6 Free", "Noto Sans CJK"; */
font-family: CozetteVector, monospace, FontAwesome, Noto Sans CJK; font-family: "CozetteVector", monospace, "FontAwesome 6 Free", "Noto Sans CJK";
font-size: 13px; font-size: 13px;
font-style: normal; font-style: normal;

View file

@ -68,6 +68,8 @@ in {
rofi = mkOpt (nullOr path) null; rofi = mkOpt (nullOr path) null;
wezterm = mkOpt (nullOr str) null; wezterm = mkOpt (nullOr str) null;
nwg-drawer = mkOpt (nullOr str) null;
}; };
config = mkIf (cfg.active != null) { config = mkIf (cfg.active != null) {
@ -136,7 +138,8 @@ in {
hm.programs.rofi.theme = cfg.rofi; hm.programs.rofi.theme = cfg.rofi;
hm.xdg.configFile ={ hm.xdg.configFile = {
# kvantum
"Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}"; "Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}";
"Kvantum/kvantum.kvconfig" = { "Kvantum/kvantum.kvconfig" = {
text = '' text = ''
@ -144,6 +147,9 @@ in {
theme=${cfg.kvantumTheme.name} theme=${cfg.kvantumTheme.name}
''; '';
}; };
# nwg-drawer
"nwg-drawer/drawer.css".text = cfg.nwg-drawer;
}; };
}; };
} }

View file

@ -1,175 +0,0 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, writeText
, config ? {}
}:
let
defaultConfig = {
General = {
### GENERAL
# path to the wallpaper. you can drop files in backgrounds/ to use a relative path, or you can just use an absolute path.
Background="backgrounds/flatppuccin_macchiato.png";
# the font to use throughout the theme. use the name of the font family.
Font="Liga SFMono Nerd Font";
# the distance that stuff should be from the screen edge.
Padding="50";
# specify how round corners should be, or set to 0 to disable rounded corners.
CornerRadius="5";
# the font size used for everything excluding the date and time.
GeneralFontSize="9";
# this allows you to adjust the relative scale of UI elements. you should probably keep the value below 1.
LoginScale="0.175";
### USER PICTURE
# the width of the outline around the user avatar. set to 0 to disable.
UserPictureBorderWidth="5";
# the color of the outline around the user avatar.
UserPictureBorderColor="#c0caf5";
# the color of the default, blank avatar. note that this isonly visible when you don't have a custom picture set.
UserPictureColor="#414868";
### TEXT FIELD (USER AND PASSWORD)
# the color of the text field background for the user and password fields.
TextFieldColor="#414868";
# the color of the text inside the user and password fields.
TextFieldTextColor="#c0caf5";
# the color of the border around the currently selected text field.
TextFieldHighlightColor="#c0caf5";
# the border width of the currently selected text field. set to 0 to disable the border.
TextFieldHighlightWidth="3";
# the placeholder text shown in the user field when nothing is typed.
UserFieldBgText="User";
# the placeholder text shown in the password field when nothing is typed.
PasswordFieldBgText="Password";
### LOGIN BUTTON
# the color of the login button text.
LoginButtonTextColor="#414868";
# the color of the login button background.
LoginButtonBgColor="#c0caf5";
# the text to be displayed on the login button.
LoginButtonText="Login";
### POPUP (POWER, SESSION, AND USER)
# the background color of the popup. this applies to the power panel, session panel, and user panel.
PopupBgColor="#c0caf5";
# the color of the currently selected entry in the popup. this applies to the power panel, session panel, and user panel.
PopupHighlightColor="#414868";
# the color of the text for the currently selectedoption. only applies to session and user popups.
PopupHighlightedTextColor="#c0caf5";
### SESSION BUTTON
# the color of the session button background.
SessionButtonColor="#c0caf5";
# the color of the icon inside the session button.
SessionIconColor="#414868";
### POWER BUTTON
# the color of the power button background.
PowerButtonColor="#c0caf5";
# the color of the power button background.
PowerIconColor="#414868";
### DATE
# the text color of the date.
DateColor="#c0caf5";
# the font size of the date.
DateSize="36";
# whether the date is bolded. accepts either `true` or `false`.
DateIsBold="false";
# whether the date is bolded. accepts either `true` or `false`.
DateOpacity="0.8";
# specify the formatting of the date.
DateFormat="dddd, MMMM d";
### TIME
# the text color of the time.
TimeColor="#c0caf5";
# the font size of the time.
TimeSize="48";
# whether the time is bolded. accepts either `true` or `false`.
TimeIsBold="true";
# the opacity of the time text. set to 1 to disable transparency.
TimeOpacity="0.8";
# specify the formatting of the time.
TimeFormat="hh:mm AP";
};
};
mergedConfig = lib.attrsets.recursiveUpdate defaultConfig config;
in stdenvNoCC.mkDerivation {
pname = "catppuccin-sddm-corners";
version = "unstable-2023-02-17";
src = fetchFromGitHub {
owner = "khaneliman";
repo = "catppuccin-sddm-corners";
rev = "7b7a86ee9a5a2905e7e6623d2af5922ce890ef79";
hash = "sha256-sTnt8RarNXz3RmYfmx4rD+nMlY8rr2n0EN3ntPzOurw=";
};
dontConfigure = true;
dontBuild = true;
installPhase = let
configFile = writeText "catppuccin-sddm-corners-theme-conf" (lib.generators.toINI {
# specifies how to format a key/value pair
mkKeyValue = lib.generators.mkKeyValueDefault {
mkValueString = v: ''"${builtins.toString v}"'';
} " = ";
} mergedConfig);
in ''
runHook preInstall
cp ${configFile} catppuccin/theme.conf
mkdir -p "$out/share/sddm/themes/"
cp -r catppuccin/ "$out/share/sddm/themes/catppuccin-sddm-corners"
runHook postInstall
'';
meta = {
description = "Soothing pastel theme for SDDM based on corners theme.";
homepage = "https://github.com/khaneliman/sddm-catppuccin-corners";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ khaneliman ];
platforms = lib.platforms.linux;
};
}