mirror of
https://github.com/larstvei/nix-config.git
synced 2025-09-15 11:30:13 +00:00
Make hyprland theme light/dark togglable
This commit is contained in:
parent
11ada196c2
commit
e1ded294f3
@ -12,22 +12,9 @@
|
|||||||
imports = [
|
imports = [
|
||||||
zen-browser.homeModules.beta
|
zen-browser.homeModules.beta
|
||||||
./hyprland
|
./hyprland
|
||||||
|
./theme
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
config.hyprland."org.freedesktop.impl.portal.Settings" = "darkman";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.darkman = {
|
|
||||||
enable = true;
|
|
||||||
settings.portal = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zen-browser = {
|
programs.zen-browser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
policies = {
|
policies = {
|
||||||
|
@ -8,13 +8,10 @@
|
|||||||
|
|
||||||
misc = {
|
misc = {
|
||||||
disable_hyprland_logo = true;
|
disable_hyprland_logo = true;
|
||||||
background_color = "0x1A1D23";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
border_size = 2;
|
border_size = 2;
|
||||||
"col.active_border" = "0xFF81A1C1";
|
|
||||||
"col.inactive_border" = "0xFF677691";
|
|
||||||
layout = "master";
|
layout = "master";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -119,6 +116,8 @@
|
|||||||
"$mod, =, resizeactive, +10"
|
"$mod, =, resizeactive, +10"
|
||||||
"$mod, -, resizeactive, -10"
|
"$mod, -, resizeactive, -10"
|
||||||
|
|
||||||
|
"$mod, D, exec, darkman toggle"
|
||||||
|
|
||||||
# Text input (macOS-like way of producing Norwegian characters)
|
# Text input (macOS-like way of producing Norwegian characters)
|
||||||
"$mod, A, exec, wtype 'å'"
|
"$mod, A, exec, wtype 'å'"
|
||||||
"$mod, O, exec, wtype 'ø'"
|
"$mod, O, exec, wtype 'ø'"
|
||||||
|
44
home/desktop/theme/default.nix
Normal file
44
home/desktop/theme/default.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
bg = {
|
||||||
|
light = "FAFAFA";
|
||||||
|
dark = "2E3440";
|
||||||
|
};
|
||||||
|
fg = {
|
||||||
|
light = "37474F";
|
||||||
|
dark = "ECEFF4";
|
||||||
|
};
|
||||||
|
primary = {
|
||||||
|
light = "673AB7";
|
||||||
|
dark = "81A1C1";
|
||||||
|
};
|
||||||
|
secondary = {
|
||||||
|
light = "90A4AE";
|
||||||
|
dark = "677691";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
config.hyprland."org.freedesktop.impl.portal.Settings" = "darkman";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.darkman = {
|
||||||
|
enable = true;
|
||||||
|
settings.portal = true;
|
||||||
|
lightModeScripts.hyprland-light = ''
|
||||||
|
hyprctl keyword misc:background_color 0x${bg.light}
|
||||||
|
hyprctl keyword general:col.active_border 0xFF${primary.light}
|
||||||
|
hyprctl keyword general:col.inactive_border 0xFF${secondary.light}
|
||||||
|
'';
|
||||||
|
darkModeScripts.hyprland-dark = ''
|
||||||
|
hyprctl keyword misc:background_color 0x${bg.dark}
|
||||||
|
hyprctl keyword general:col.active_border 0xFF${primary.dark}
|
||||||
|
hyprctl keyword general:col.inactive_border 0xFF${secondary.dark}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user