mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 03:26:17 +00:00
update system
This commit is contained in:
@@ -24,7 +24,7 @@ in
|
||||
":AerialNext<CR>";
|
||||
}
|
||||
{
|
||||
key = "fs";
|
||||
key = "<leader>fs";
|
||||
mode = "n";
|
||||
action = # vim
|
||||
":Telescope aerial<CR>";
|
||||
@@ -54,7 +54,7 @@ in
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "fs";
|
||||
__unkeyed-1 = "<leader>fs";
|
||||
group = "Symbols";
|
||||
icon = "";
|
||||
}
|
||||
|
||||
@@ -13,19 +13,19 @@ in
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"ff" = {
|
||||
"<leader>ff" = {
|
||||
action = "git_files";
|
||||
mode = "n";
|
||||
};
|
||||
"fa" = {
|
||||
"<leader>fa" = {
|
||||
action = "find_files";
|
||||
mode = "n";
|
||||
};
|
||||
"fg" = {
|
||||
"<leader>fg" = {
|
||||
action = "live_grep";
|
||||
mode = "n";
|
||||
};
|
||||
"fc" = {
|
||||
"<leader>fc" = {
|
||||
action = "buffers";
|
||||
mode = "n";
|
||||
};
|
||||
@@ -33,27 +33,27 @@ in
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "f";
|
||||
__unkeyed-1 = "<leader>f";
|
||||
group = "Find";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "ff";
|
||||
__unkeyed-1 = "<leader>ff";
|
||||
desc = "File";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "fa";
|
||||
__unkeyed-1 = "<leader>fa";
|
||||
desc = "All Files";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "fg";
|
||||
__unkeyed-1 = "<leader>fg";
|
||||
desc = "Grep";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "fc";
|
||||
__unkeyed-1 = "<leader>fc";
|
||||
desc = "Current";
|
||||
icon = "";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
keymaps = [
|
||||
{
|
||||
key = "ft";
|
||||
key = "<leader>t";
|
||||
mode = "n";
|
||||
action = # vim
|
||||
"<cmd>:Neotree toggle<CR>";
|
||||
@@ -20,24 +20,28 @@ in
|
||||
web-devicons.enable = true;
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
filesystem = {
|
||||
useLibuvFileWatcher = true;
|
||||
followCurrentFile.enabled = true;
|
||||
filteredItems.visible = true;
|
||||
settings = {
|
||||
event_handlers = [
|
||||
{
|
||||
event = "neo_tree_buffer_leave";
|
||||
handler.__raw = ''
|
||||
function()
|
||||
require('neo-tree').close_all()
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
filesystem = {
|
||||
use_libuv_file_watcher = true;
|
||||
follow_current_file.enabled = true;
|
||||
filtered_items.visible = true;
|
||||
};
|
||||
popupBorderStyle = "rounded";
|
||||
};
|
||||
popupBorderStyle = "rounded";
|
||||
filesystem.window.mappings.f = "noop";
|
||||
window.mappings.f = "noop";
|
||||
eventHandlers.neo_tree_buffer_leave = # lua
|
||||
''
|
||||
function()
|
||||
require('neo-tree').close_all()
|
||||
end
|
||||
'';
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "ft";
|
||||
__unkeyed-1 = "<leader>t";
|
||||
desc = "Tree";
|
||||
icon = "";
|
||||
}
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Thea Schöbl";
|
||||
userEmail = "dev@theaninova.de";
|
||||
signing = {
|
||||
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
user = {
|
||||
email = "dev@theaninova.de";
|
||||
name = "Thea Schöbl";
|
||||
};
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "main";
|
||||
merge = {
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
tree.enable = true;
|
||||
};
|
||||
languages = {
|
||||
angular.enable = true;
|
||||
c.enable = true;
|
||||
css = {
|
||||
enable = true;
|
||||
|
||||
@@ -2,27 +2,36 @@ let
|
||||
transparent = color: "alpha(${color}, {{custom.transparency}})";
|
||||
mkBgColor = color: {
|
||||
${color} = {
|
||||
background = "{{colors.${color}.default.hex}}";
|
||||
background_lift = "{{colors.${color}_dim.default.hex}}";
|
||||
background = "{{colors.${color}_dim.default.hex}}";
|
||||
foreground = "{{colors.on_${color}.default.hex}}";
|
||||
};
|
||||
};
|
||||
mkColor = color: {
|
||||
${color} = {
|
||||
standalone = "{{colors.${color}_fixed_dim.default.hex}}";
|
||||
background = "{{colors.${color}_fixed.default.hex}}";
|
||||
foreground = "{{colors.on_${color}_fixed.default.hex}}";
|
||||
};
|
||||
};
|
||||
mkSemantic = color: {
|
||||
${color} = {
|
||||
standalone = "{{colors.${color}.default.hex}}";
|
||||
background = "{{colors.${color}_container.default.hex}}";
|
||||
foreground = "{{colors.on_${color}_container.default.hex}}";
|
||||
background = "{{colors.${color}.default.hex}}";
|
||||
foreground = "{{colors.on_${color}.default.hex}}";
|
||||
};
|
||||
};
|
||||
colors =
|
||||
(mkColor "primary")
|
||||
// (mkColor "secondary")
|
||||
// (mkColor "tertiary")
|
||||
// (mkColor "danger")
|
||||
// (mkColor "warning")
|
||||
// (mkColor "success")
|
||||
// (mkColor "error")
|
||||
// (mkColor "info")
|
||||
// (mkSemantic "danger")
|
||||
// (mkSemantic "warning")
|
||||
// (mkSemantic "success")
|
||||
// (mkSemantic "error")
|
||||
// (mkSemantic "info")
|
||||
// (mkBgColor "background")
|
||||
// (mkBgColor "surface")
|
||||
// (mkBgColor "surface_variant")
|
||||
// {
|
||||
outline = "{{colors.outline.default.hex}}";
|
||||
@@ -40,11 +49,33 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
# https://github.com/AvengeMedia/DankMaterialShell/blob/master/matugen/templates/gtk-colors.css
|
||||
gtk = rec {
|
||||
accent_color = colors.primary.standalone;
|
||||
accent_bg_color = colors.primary.background;
|
||||
accent_fg_color = colors.primary.foreground;
|
||||
|
||||
window_bg_color = transparent colors.surface.background;
|
||||
window_fg_color = colors.surface.foreground;
|
||||
|
||||
popover_bg_color = transparent colors.surface.background;
|
||||
popover_fg_color = colors.surface.foreground;
|
||||
|
||||
headerbar_bg_color = transparent colors.surface.background;
|
||||
headerbar_fg_color = colors.surface.foreground;
|
||||
|
||||
view_bg_color = transparent colors.surface.background_lift;
|
||||
view_fg_color = colors.surface.foreground;
|
||||
|
||||
card_bg_color = colors.surface.background_lift;
|
||||
card_fg_color = colors.surface.foreground;
|
||||
|
||||
sidebar_bg_color = window_bg_color;
|
||||
sidebar_fg_color = window_fg_color;
|
||||
|
||||
sidebar_border_color = colors.surface.background;
|
||||
sidebar_backdrop_color = window_bg_color;
|
||||
|
||||
destructive_color = colors.danger.standalone;
|
||||
destructive_bg_color = colors.danger.background;
|
||||
destructive_fg_color = colors.danger.foreground;
|
||||
@@ -61,45 +92,31 @@ let
|
||||
error_bg_color = colors.error.background;
|
||||
error_fg_color = colors.error.foreground;
|
||||
|
||||
window_bg_color = transparent colors.background.background;
|
||||
window_fg_color = colors.background.foreground;
|
||||
/*
|
||||
headerbar_border_color = colors.outline;
|
||||
headerbar_backdrop_color = transparent colors.background.background;
|
||||
headerbar_shade_color = colors.shade.default;
|
||||
headerbar_darker_shade_color = colors.shade.darker;
|
||||
|
||||
view_bg_color = transparent colors.background.background;
|
||||
view_fg_color = colors.background.foreground;
|
||||
card_shade_color = colors.shade.default;
|
||||
|
||||
headerbar_bg_color = transparent colors.background.background;
|
||||
headerbar_fg_color = colors.background.foreground;
|
||||
headerbar_border_color = colors.outline;
|
||||
headerbar_backdrop_color = transparent colors.background.background;
|
||||
headerbar_shade_color = colors.shade.default;
|
||||
headerbar_darker_shade_color = colors.shade.darker;
|
||||
dialog_bg_color = transparent colors.background.background;
|
||||
dialog_fg_color = colors.background.foreground;
|
||||
popover_shade_color = colors.shade.default;
|
||||
|
||||
card_bg_color = colors.container.default;
|
||||
card_fg_color = colors.container.foreground;
|
||||
card_shade_color = colors.shade.default;
|
||||
shade_color = colors.shade.default;
|
||||
scrollbar_outline_color = colors.outline;
|
||||
|
||||
dialog_bg_color = transparent colors.background.background;
|
||||
dialog_fg_color = colors.background.foreground;
|
||||
thumbnail_bg_color = colors.secondary.background;
|
||||
thumbnail_fg_color = colors.secondary.foreground;
|
||||
|
||||
popover_bg_color = transparent colors.background.background;
|
||||
popover_fg_color = colors.background.foreground;
|
||||
popover_shade_color = colors.shade.default;
|
||||
sidebar_shade_color = colors.shade.default;
|
||||
|
||||
shade_color = colors.shade.default;
|
||||
scrollbar_outline_color = colors.outline;
|
||||
|
||||
thumbnail_bg_color = colors.secondary.background;
|
||||
thumbnail_fg_color = colors.secondary.foreground;
|
||||
|
||||
sidebar_bg_color = transparent colors.background.background;
|
||||
sidebar_fg_color = colors.background.foreground;
|
||||
sidebar_backdrop_color = transparent colors.background.background;
|
||||
sidebar_shade_color = colors.shade.default;
|
||||
|
||||
secondary_sidebar_bg_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_fg_color = colors.surface_variant.foreground;
|
||||
secondary_sidebar_backdrop_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_shade_color = colors.shade.default;
|
||||
secondary_sidebar_bg_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_fg_color = colors.surface_variant.foreground;
|
||||
secondary_sidebar_backdrop_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_shade_color = colors.shade.default;
|
||||
*/
|
||||
};
|
||||
in
|
||||
builtins.concatStringsSep "\n" (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
@@ -241,7 +242,6 @@ in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
THEME_SERVICE_PATH="${config.xdg.configHome}/systemd/user/theme-init.timer"
|
||||
if [ "$MODE" = "auto" ]; then
|
||||
TIME=$(sunwait poll ${builtins.toString cfg.auto-dark.lat}N ${builtins.toString cfg.auto-dark.lon}E || :)
|
||||
@@ -270,29 +270,21 @@ in
|
||||
systemctl --user daemon-reload &> /dev/null || :
|
||||
systemctl --user restart theme-init.timer &> /dev/null || :
|
||||
|
||||
if command -v niri &> /dev/null; then
|
||||
niri msg action do-screen-transition --delay-ms 500
|
||||
fi
|
||||
|
||||
if [ "$MODE" = "light" ]; then
|
||||
GTK_THEME="adw-gtk3"
|
||||
GTK_THEME="adw-gtk3"
|
||||
else
|
||||
GTK_THEME="adw-gtk3-dark"
|
||||
GTK_THEME="adw-gtk3-dark"
|
||||
fi
|
||||
|
||||
matugen image "$WALLPAPER" --type scheme-${cfg.flavour} --contrast ${builtins.toString cfg.contrast} --mode "$MODE"
|
||||
sed -i "s/set background=dark/set background=$MODE/g" ${config.xdg.configHome}/nvim/colors/md3-evo.vim
|
||||
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'"
|
||||
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'"
|
||||
|
||||
if command -v hyprctl &> /dev/null; then
|
||||
hyprctl reload
|
||||
fi
|
||||
|
||||
if which swaync-client; then
|
||||
swaync-client --reload-css
|
||||
fi
|
||||
|
||||
for i in $(pgrep -u "$USER" -x nvim); do
|
||||
kill -USR1 "$i"
|
||||
done
|
||||
dconf write /org/gnome/desktop/interface/icon-theme "'Adwaita'"
|
||||
'';
|
||||
}
|
||||
);
|
||||
@@ -309,6 +301,9 @@ in
|
||||
"@import './theme.css';";
|
||||
gtk4.extraCss = # css
|
||||
"@import './theme.css';";
|
||||
theme = {
|
||||
name = "Adwaita";
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Tela";
|
||||
package = pkgs.tela-icon-theme;
|
||||
@@ -379,12 +374,23 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
programs = {
|
||||
kitty = {
|
||||
extraConfig = ''
|
||||
include ${config.xdg.configHome}/kitty/theme.conf
|
||||
# TODO: include is coming in the next release
|
||||
/*
|
||||
xdg.configFile.niri-config = {
|
||||
enable = osConfig.programs.niri.enable;
|
||||
target = "niri/override.kdl";
|
||||
text = ''
|
||||
include "${config.xdg.configHome}/niri/config.kdl"
|
||||
include "${config.programs.matugen.settings.templates.niri.output_path}"
|
||||
'';
|
||||
};
|
||||
home.sessionVariables.NIRI_CONFIG = "${config.xdg.configHome}/niri/override.kdl";
|
||||
*/
|
||||
|
||||
programs = {
|
||||
kitty.extraConfig = ''
|
||||
include ${config.programs.matugen.settings.templates.kitty.output_path}
|
||||
'';
|
||||
|
||||
nixvim = {
|
||||
opts.termguicolors = true;
|
||||
@@ -405,15 +411,14 @@ in
|
||||
enable = true;
|
||||
settings = {
|
||||
config = {
|
||||
reload_apps = true;
|
||||
version_check = false;
|
||||
|
||||
reload_apps_list = {
|
||||
kitty = config.programs.kitty.enable;
|
||||
waybar = config.programs.waybar.enable;
|
||||
dunst = config.services.dunst.enable;
|
||||
};
|
||||
|
||||
set_wallpaper = true;
|
||||
wallpaper_tool = "Swww";
|
||||
wallpaper.command = lib.getExe pkgs.swww;
|
||||
|
||||
custom_colors =
|
||||
let
|
||||
@@ -465,23 +470,17 @@ in
|
||||
templates =
|
||||
let
|
||||
gtk = pkgs.writeText "gtk4.css" (import ./gtk.nix);
|
||||
signal =
|
||||
name: signal:
|
||||
(pkgs.writeShellScript "kill-${name}" ''
|
||||
pkill -${signal} -u "$USER" -x ${name} || :
|
||||
'');
|
||||
in
|
||||
{
|
||||
kitty = {
|
||||
input_path = ./kitty.conf;
|
||||
output_path = "${config.xdg.configHome}/kitty/theme.conf";
|
||||
};
|
||||
nvim = {
|
||||
input_path = ./nvim.vim;
|
||||
output_path = "${config.xdg.configHome}/nvim/colors/md3-evo.vim";
|
||||
};
|
||||
hyprland = {
|
||||
input_path = ./hyprland.conf;
|
||||
output_path = "${config.xdg.configHome}/hypr/theme.conf";
|
||||
};
|
||||
anyrun = {
|
||||
input_path = ./anyrun.css;
|
||||
output_path = "${config.xdg.configHome}/anyrun/theme.css";
|
||||
post_hook = signal "nvim" "USR1";
|
||||
};
|
||||
gtk3 = {
|
||||
input_path = gtk;
|
||||
@@ -495,15 +494,49 @@ in
|
||||
input_path = ./discord.css;
|
||||
output_path = "${config.xdg.configHome}/vesktop/themes/matugen.theme.css";
|
||||
};
|
||||
}
|
||||
// (lib.optionalAttrs osConfig.programs.niri.enable {
|
||||
niri = {
|
||||
input_path = ./niri.kdl;
|
||||
output_path = "${config.xdg.configHome}/niri/md3-evo.kdl";
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs config.programs.kitty.enable {
|
||||
kitty = {
|
||||
input_path = ./kitty.conf;
|
||||
output_path = "${config.xdg.configHome}/kitty/theme.conf";
|
||||
post_hook = signal ".kitty-wrapped" "USR1";
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs osConfig.programs.hyprland.enable {
|
||||
hyprland = {
|
||||
input_path = ./hyprland.conf;
|
||||
output_path = "${config.xdg.configHome}/hypr/theme.conf";
|
||||
post_hook = pkgs.writeShellScript "reload-hyprland-theme" ''
|
||||
if command -v hyprctl &> /dev/null; then
|
||||
hyprctl reload
|
||||
fi
|
||||
'';
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs config.programs.waybar.enable {
|
||||
waybar = {
|
||||
input_path = ./waybar.css;
|
||||
output_path = "${config.xdg.configHome}/waybar/style.css";
|
||||
post_hook = signal "waybar" "USR2";
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs config.services.swaync.enable {
|
||||
swaync = {
|
||||
input_path = ./swaync.css;
|
||||
output_path = "${config.xdg.configHome}/swaync/style.css";
|
||||
post_hook = pkgs.writeShellScript "reload-swaync" ''
|
||||
if which swaync-client; then
|
||||
swaync-client --reload-css
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
12
modules/home-manager/theme/niri.kdl
Normal file
12
modules/home-manager/theme/niri.kdl
Normal file
@@ -0,0 +1,12 @@
|
||||
layout {
|
||||
gaps {{custom.padding}}
|
||||
struts {{custom.double_padding}}
|
||||
}
|
||||
|
||||
overview {
|
||||
backdrop-color "{{colors.surface.default.hex}}"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius {{custom.radius}}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ let g:terminal_color_14 = "{{colors.cyan.default.hex}}"
|
||||
let g:terminal_color_15 = "{{colors.on_surface_variant.default.hex}}"
|
||||
set termguicolors
|
||||
|
||||
set background=dark
|
||||
set background={{mode | to_lower}}
|
||||
|
||||
if exists("g:neovide")
|
||||
hi! Normal guibg={{colors.surface.default.hex}} guifg={{colors.on_surface.default.hex}}
|
||||
|
||||
Reference in New Issue
Block a user