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;
|
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||||
|
|
||||||
vividBuilder = flavor:
|
vividBuilder = flavor:
|
||||||
pkgs.runCommand "vivid-${flavor}" {
|
pkgs.runCommand "vivid-${flavor}" {nativeBuildInputs = [pkgs.vivid];} ''
|
||||||
nativeBuildInputs = [pkgs.vivid];
|
|
||||||
} ''
|
|
||||||
vivid generate ${pkgs.vivid.src}/themes/catppuccin-${flavor}.yml > $out
|
vivid generate ${pkgs.vivid.src}/themes/catppuccin-${flavor}.yml > $out
|
||||||
'';
|
'';
|
||||||
vividLatte = vividBuilder "latte";
|
vividLatte = vividBuilder "latte";
|
||||||
|
@ -19,7 +17,10 @@ in {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
name = "dark-mode-ternary";
|
name = "dark-mode-ternary";
|
||||||
runtimeInputs = lib.optionals isLinux [pkgs.dbus pkgs.gnugrep];
|
runtimeInputs = lib.optionals isLinux [
|
||||||
|
pkgs.dbus
|
||||||
|
pkgs.gnugrep
|
||||||
|
];
|
||||||
text = let
|
text = let
|
||||||
queryCommand =
|
queryCommand =
|
||||||
if isLinux
|
if isLinux
|
||||||
|
@ -43,9 +44,21 @@ in {
|
||||||
enable = isLinux;
|
enable = isLinux;
|
||||||
settings = {
|
settings = {
|
||||||
lat = config.location.latitude;
|
lat = config.location.latitude;
|
||||||
lon = config.location.longitude;
|
lng = config.location.longitude;
|
||||||
useGeoclue = false;
|
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 = {
|
programs.zsh = {
|
||||||
|
|
|
@ -13,7 +13,12 @@
|
||||||
margin = "2";
|
margin = "2";
|
||||||
|
|
||||||
modules-center = ["hyprland/window"];
|
modules-center = ["hyprland/window"];
|
||||||
modules-right = ["tray" "idle_inhibitor" "pulseaudio" "clock"];
|
modules-right = [
|
||||||
|
"tray"
|
||||||
|
"idle_inhibitor"
|
||||||
|
"pulseaudio"
|
||||||
|
"clock"
|
||||||
|
];
|
||||||
|
|
||||||
idle_inhibitor = {
|
idle_inhibitor = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
|
@ -27,10 +32,86 @@
|
||||||
|
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
format = "{icon} {volume}%";
|
format = "{icon} {volume}%";
|
||||||
format-icons.default = ["" "" ""];
|
format-icons.default = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
on-click = "pavucontrol";
|
on-click = "pavucontrol";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
darkColors = ''
|
||||||
|
@define-color red #f38ba8;
|
||||||
|
@define-color pink #f5c2e7;
|
||||||
|
@define-color crust #11111c;
|
||||||
|
@define-color base #1e1e2e;
|
||||||
|
@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;
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: @base;
|
||||||
|
border: 2px solid @crust;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:first-child {
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 5px 0 0 5px;
|
||||||
|
border-left: 2px solid @crust;
|
||||||
|
}
|
||||||
|
#workspaces button.active:first-child {
|
||||||
|
padding: 0 5px;
|
||||||
|
box-shadow: unset;
|
||||||
|
border-radius: 5px 0 0 5px;
|
||||||
|
border-left: 2px solid @pink;
|
||||||
|
border-top: 2px solid @pink;
|
||||||
|
border-bottom: 2px solid @pink;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 0;
|
||||||
|
border-top: 2px solid @crust;
|
||||||
|
border-bottom: 2px solid @crust;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: @surface2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: @pink;
|
||||||
|
background: @surface0;
|
||||||
|
border-top: 2px solid @pink;
|
||||||
|
border-bottom: 2px solid @pink;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: @red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #network, #pulseaudio, #tray, #idle_inhibitor {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
|
@ -60,68 +141,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
style = ''
|
xdg.configFile = {
|
||||||
@define-color red #f38ba8;
|
"waybar/style-dark.css".text = darkColors + style;
|
||||||
@define-color pink #f5c2e7;
|
"waybar/style-light.css".text = lightColors + style;
|
||||||
@define-color crust #11111c;
|
|
||||||
@define-color base #1e1e2e;
|
|
||||||
@define-color text #cdd6f4;
|
|
||||||
@define-color surface0 #313244;
|
|
||||||
@define-color surface2 #585b70;
|
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: Symbols Nerd Font, IBM Plex Sans;
|
|
||||||
font-size: 16px;
|
|
||||||
color: @text;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background-color: @base;
|
|
||||||
border: 2px solid @crust;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:first-child {
|
|
||||||
padding: 0 5px;
|
|
||||||
border-radius: 5px 0 0 5px;
|
|
||||||
border-left: 2px solid @crust;
|
|
||||||
}
|
|
||||||
#workspaces button.active:first-child {
|
|
||||||
padding: 0 5px;
|
|
||||||
box-shadow: unset;
|
|
||||||
border-radius: 5px 0 0 5px;
|
|
||||||
border-left: 2px solid @pink;
|
|
||||||
border-top: 2px solid @pink;
|
|
||||||
border-bottom: 2px solid @pink;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 0 5px;
|
|
||||||
border-radius: 0;
|
|
||||||
border-top: 2px solid @crust;
|
|
||||||
border-bottom: 2px solid @crust;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: @surface2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.active {
|
|
||||||
color: @pink;
|
|
||||||
background: @surface0;
|
|
||||||
border-top: 2px solid @pink;
|
|
||||||
border-bottom: 2px solid @pink;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
background-color: @red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock, #network, #pulseaudio, #tray, #idle_inhibitor {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue