From ded12ad5f56d5441bd13139d026d47cd3ae42212 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 15 Jan 2025 12:07:28 +0300 Subject: [PATCH] Homer: Improve styling. --- config/Sway.nix | 6 +-- home/program/thunderbird/default.nix | 59 ++++++++++++++-------------- package/homer/Config.nix | 4 +- package/homer/Custom.css | 4 ++ package/homer/default.nix | 2 + 5 files changed, 40 insertions(+), 35 deletions(-) create mode 100644 package/homer/Custom.css diff --git a/config/Sway.nix b/config/Sway.nix index c2dc225..672b96d 100644 --- a/config/Sway.nix +++ b/config/Sway.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: +{ config, lib, ... }: let cfg = config.module.sway; in diff --git a/home/program/thunderbird/default.nix b/home/program/thunderbird/default.nix index 98c6578..d4b14a9 100644 --- a/home/program/thunderbird/default.nix +++ b/home/program/thunderbird/default.nix @@ -12,35 +12,36 @@ isDefault = true; withExternalGnupg = true; }; - settings = let - dayEnd = 19; - dayStart = 10; - fontSize = config.module.style.font.size.application; - reminderMinutes = 10; - snoozeMinutes = 10; - in - { - "browser.download.useDownloadDir" = true; - "calendar.alarms.defaultsnoozelength" = snoozeMinutes; - "calendar.alarms.eventalarmlen" = reminderMinutes; - "calendar.alarms.onforevents" = 0; - "calendar.alarms.onfortodos" = 0; - "calendar.alarms.show" = true; - "calendar.alarms.soundType" = 1; - "calendar.alarms.soundURL" = "file://${}"; - "calendar.alarms.todoalarmlen" = reminderMinutes; - "calendar.item.editInTab" = true; - "calendar.notifications.times" = "-PT${toString reminderMinutes}M"; - "calendar.view-minimonth.showWeekNumber" = false; - "calendar.view.dayendhour" = dayEnd; - "calendar.view.daystarthour" = dayStart; - "font.minimum-size.x-western" = fontSize; - "font.size.monospace.x-western" = fontSize; - "font.size.variable.x-western" = fontSize; - "mail.biff.use_system_alert" = true; - "mailnews.start_page.enabled" = false; - "pdfjs.enabledCache.state" = false; - }; + settings = + let + dayEnd = 19; + dayStart = 10; + fontSize = config.module.style.font.size.application; + reminderMinutes = 10; + snoozeMinutes = 10; + in + { + "browser.download.useDownloadDir" = true; + "calendar.alarms.defaultsnoozelength" = snoozeMinutes; + "calendar.alarms.eventalarmlen" = reminderMinutes; + "calendar.alarms.onforevents" = 0; + "calendar.alarms.onfortodos" = 0; + "calendar.alarms.show" = true; + "calendar.alarms.soundType" = 1; + "calendar.alarms.soundURL" = "file://${}"; + "calendar.alarms.todoalarmlen" = reminderMinutes; + "calendar.item.editInTab" = true; + "calendar.notifications.times" = "-PT${toString reminderMinutes}M"; + "calendar.view-minimonth.showWeekNumber" = false; + "calendar.view.dayendhour" = dayEnd; + "calendar.view.daystarthour" = dayStart; + "font.minimum-size.x-western" = fontSize; + "font.size.monospace.x-western" = fontSize; + "font.size.variable.x-western" = fontSize; + "mail.biff.use_system_alert" = true; + "mailnews.start_page.enabled" = false; + "pdfjs.enabledCache.state" = false; + }; # ISSUE: https://github.com/nix-community/home-manager/issues/5775 # ISSUE: https://github.com/nix-community/home-manager/issues/5933 diff --git a/package/homer/Config.nix b/package/homer/Config.nix index e2cdb18..a32d6b0 100644 --- a/package/homer/Config.nix +++ b/package/homer/Config.nix @@ -62,7 +62,8 @@ let (mkVideoLink "LiveWallpaperPc" "https://livewallpaperpc.com") (mkVideoLink "MoeWalls" "https://moewalls.com") (mkVideoLink "Motion Backgrounds" "https://motionbgs.com") - ] ++ [ + ] + ++ [ (mkImageLink "Unsplash" "https://unsplash.com") (mkImageLink "Wallhaven" "https://wallhaven.cc") ] @@ -102,6 +103,7 @@ let theme = "default"; title = "Dashboard"; columns = "auto"; # 1, 2, 3, 4, 6, 12 or auto. + stylesheet = [ "assets/custom.css" ]; defaults = { colorTheme = "dark"; layout = "columns"; # columns or list. diff --git a/package/homer/Custom.css b/package/homer/Custom.css new file mode 100644 index 0000000..8ced87c --- /dev/null +++ b/package/homer/Custom.css @@ -0,0 +1,4 @@ +.search-label { + display: none; + visibility: hidden; +} diff --git a/package/homer/default.nix b/package/homer/default.nix index dae6a27..d659616 100644 --- a/package/homer/default.nix +++ b/package/homer/default.nix @@ -6,6 +6,7 @@ }@args: let cfg = (import ./Config.nix args).file; + css = ./Custom.css; in stdenv.mkDerivation (finalAttrs: { dontUnpack = true; @@ -23,6 +24,7 @@ stdenv.mkDerivation (finalAttrs: { pushd $out unzip $src cp ${cfg} $out/assets/config.yml + cp ${css} $out/assets/custom.css runHook postInstall '';