feat(darkman): fix config & sync gtk, waybar
This commit is contained in:
parent
9bd186b21f
commit
cc8a463068
2 changed files with 105 additions and 69 deletions
|
@ -7,9 +7,7 @@
|
|||
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||
|
||||
vividBuilder = flavor:
|
||||
pkgs.runCommand "vivid-${flavor}" {
|
||||
nativeBuildInputs = [pkgs.vivid];
|
||||
} ''
|
||||
pkgs.runCommand "vivid-${flavor}" {nativeBuildInputs = [pkgs.vivid];} ''
|
||||
vivid generate ${pkgs.vivid.src}/themes/catppuccin-${flavor}.yml > $out
|
||||
'';
|
||||
vividLatte = vividBuilder "latte";
|
||||
|
@ -19,7 +17,10 @@ in {
|
|||
home.packages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "dark-mode-ternary";
|
||||
runtimeInputs = lib.optionals isLinux [pkgs.dbus pkgs.gnugrep];
|
||||
runtimeInputs = lib.optionals isLinux [
|
||||
pkgs.dbus
|
||||
pkgs.gnugrep
|
||||
];
|
||||
text = let
|
||||
queryCommand =
|
||||
if isLinux
|
||||
|
@ -43,9 +44,21 @@ in {
|
|||
enable = isLinux;
|
||||
settings = {
|
||||
lat = config.location.latitude;
|
||||
lon = config.location.longitude;
|
||||
lng = config.location.longitude;
|
||||
useGeoclue = false;
|
||||
};
|
||||
lightModeScripts = {
|
||||
gtk-theme = ''
|
||||
${pkgs.dconf}/bin/dconf write \
|
||||
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
||||
'';
|
||||
};
|
||||
darkModeScripts = {
|
||||
gtk-theme = ''
|
||||
${pkgs.dconf}/bin/dconf write \
|
||||
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
|
|
|
@ -13,7 +13,12 @@
|
|||
margin = "2";
|
||||
|
||||
modules-center = ["hyprland/window"];
|
||||
modules-right = ["tray" "idle_inhibitor" "pulseaudio" "clock"];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"idle_inhibitor"
|
||||
"pulseaudio"
|
||||
"clock"
|
||||
];
|
||||
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
|
@ -27,41 +32,16 @@
|
|||
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
format-icons.default = ["" "" ""];
|
||||
format-icons.default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
hyprland =
|
||||
commonSettings
|
||||
// {
|
||||
modules-left = ["hyprland/workspaces"];
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
on-click = "activate";
|
||||
format-icons = {
|
||||
"1" = "Ⅰ";
|
||||
"2" = "Ⅱ";
|
||||
"3" = "Ⅲ";
|
||||
"4" = "Ⅳ";
|
||||
"5" = "Ⅴ";
|
||||
"6" = "Ⅵ";
|
||||
"7" = "Ⅶ";
|
||||
"8" = "Ⅷ";
|
||||
"9" = "Ⅸ";
|
||||
"10" = "Ⅹ";
|
||||
};
|
||||
persistent-workspaces."*" = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
darkColors = ''
|
||||
@define-color red #f38ba8;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color crust #11111c;
|
||||
|
@ -69,7 +49,17 @@ in {
|
|||
@define-color text #cdd6f4;
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
'';
|
||||
lightColors = ''
|
||||
@define-color red #d20f39;
|
||||
@define-color pink #ea76cb;
|
||||
@define-color crust #dce0e8;
|
||||
@define-color base #eff1f5;
|
||||
@define-color text #4c4f69;
|
||||
@define-color surface0 #ccd0da;
|
||||
@define-color surface2 #acb0be;
|
||||
'';
|
||||
style = ''
|
||||
* {
|
||||
font-family: Symbols Nerd Font, IBM Plex Sans;
|
||||
font-size: 16px;
|
||||
|
@ -122,6 +112,39 @@ in {
|
|||
padding: 0 10px;
|
||||
}
|
||||
'';
|
||||
in {
|
||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
hyprland =
|
||||
commonSettings
|
||||
// {
|
||||
modules-left = ["hyprland/workspaces"];
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
on-click = "activate";
|
||||
format-icons = {
|
||||
"1" = "Ⅰ";
|
||||
"2" = "Ⅱ";
|
||||
"3" = "Ⅲ";
|
||||
"4" = "Ⅳ";
|
||||
"5" = "Ⅴ";
|
||||
"6" = "Ⅵ";
|
||||
"7" = "Ⅶ";
|
||||
"8" = "Ⅷ";
|
||||
"9" = "Ⅸ";
|
||||
"10" = "Ⅹ";
|
||||
};
|
||||
persistent-workspaces."*" = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.configFile = {
|
||||
"waybar/style-dark.css".text = darkColors + style;
|
||||
"waybar/style-light.css".text = lightColors + style;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue