From ad90787d1164bc151b22e6bb4798fbde2a3b92f2 Mon Sep 17 00:00:00 2001 From: moons14 Date: Thu, 30 Oct 2025 03:39:22 +0900 Subject: [PATCH] noctalia --- modules/home/noctalia.nix | 82 +++++++++++++++++++++--------- modules/home/wallpaper.nix | 14 +++++ modules/home/wallpaper/default.nix | 75 --------------------------- modules/home/wallpaper/swww.sh | 12 ----- profiles/gui.nix | 2 +- 5 files changed, 73 insertions(+), 112 deletions(-) create mode 100644 modules/home/wallpaper.nix delete mode 100644 modules/home/wallpaper/default.nix delete mode 100644 modules/home/wallpaper/swww.sh diff --git a/modules/home/noctalia.nix b/modules/home/noctalia.nix index a937997..ab09fc9 100644 --- a/modules/home/noctalia.nix +++ b/modules/home/noctalia.nix @@ -8,36 +8,17 @@ # configure options programs.noctalia-shell = { enable = true; - colors = { - # you must set ALL of these - mError = "#dddddd"; - mOnError = "#111111"; - mOnPrimary = "#111111"; - mOnSecondary = "#111111"; - mOnSurface = "#828282"; - mOnSurfaceVariant = "#5d5d5d"; - mOnTertiary = "#111111"; - mOutline = "#3c3c3c"; - mPrimary = "#aaaaaa"; - mSecondary = "#a7a7a7"; - mShadow = "#000000"; - mSurface = "#111111"; - mSurfaceVariant = "#191919"; - mTertiary = "#cccccc"; - }; settings = { # configure noctalia here; defaults will # be deep merged with these attributes. bar = { - density = "compact"; + density = "default"; position = "top"; showCapsule = true; + backgroundOpacity = 0.8; + floating = true; widgets = { left = [ - { - id = "SidePanelToggle"; - useDistroLogo = true; - } { id = "WiFi"; } @@ -71,9 +52,11 @@ warningThreshold = 30; } { + displayMode = "alwaysShow"; id = "Volume"; } { + displayMode = "alwaysShow"; id = "Brightness"; } { @@ -85,22 +68,73 @@ } { id = "ControlCenter"; + useDistroLogo = true; } ]; }; }; - colorSchemes.predefinedScheme = "Monochrome"; + colorSchemes.predefinedScheme = "dracula"; general = { avatarImage = "~/.face"; radiusRatio = 0.2; }; location = { monthBeforeDay = true; + weatherEnabled = false; name = "Tokyo"; }; wallpaper = { - enabled = false; + enabled = true; + directory = "~/.wallpapers/"; + randomEnabled = false; + randomIntervalSec = 60; + transitionDuration = 1500; }; + controlCenter = { + position = "close_to_bar_button"; + shortcuts = { + left = [ + { + id = "WiFi"; + } + { + id = "Bluetooth"; + } + { + id = "ScreenRecorder"; + } + { + id = "WallpaperSelector"; + } + ]; + right = [ + { + id = "Notifications"; + } + { + id = "NightLight"; + } + ]; + }; + cards = [ + { + enabled = true; + id = "profile-card"; + } + { + enabled = true; + id = "shortcuts-card"; + } + { + enabled = true; + id = "audio-card"; + } + { + enabled = true; + id = "media-sysmon-card"; + } + ]; + }; }; # this may also be a string or a path to a JSON file, # but in this case must include *all* settings. diff --git a/modules/home/wallpaper.nix b/modules/home/wallpaper.nix new file mode 100644 index 0000000..7bbcc42 --- /dev/null +++ b/modules/home/wallpaper.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, ... }: +let + walls = pkgs.fetchFromGitHub { + owner = "orangci"; + repo = "walls-catppuccin-mocha"; + rev = "40912e6418737e93b59a38bcf189270cbf26656d"; + hash = "sha256-1QR3J+wgLVNjucPSVELv0FicNt+jM2KPLU5ubBfxjHI="; + }; +in { + home.file.".wallpapers" = { + source = walls; + recursive = true; + }; +} diff --git a/modules/home/wallpaper/default.nix b/modules/home/wallpaper/default.nix deleted file mode 100644 index dead343..0000000 --- a/modules/home/wallpaper/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ pkgs, lib, ... }: -let - walls = pkgs.fetchFromGitHub { - owner = "orangci"; - repo = "walls-catppuccin-mocha"; - rev = "40912e6418737e93b59a38bcf189270cbf26656d"; - hash = "sha256-1QR3J+wgLVNjucPSVELv0FicNt+jM2KPLU5ubBfxjHI="; - }; - - swwwScript = ./swww.sh; -in { - home.file."wallpapers" = { - source = walls; - recursive = true; - }; - - home.packages = with pkgs; [ - swww - ]; - - home.file.".config/swww/swww.sh" = { - source = swwwScript; - executable = true; - }; - - systemd.user.services."swww-daemon" = { - Unit = { - Description = "SWWW daemon"; - After = [ "graphical-session.target" ]; - PartOf = [ "graphical-session.target" ]; - }; - Service = { - Type = "simple"; - Environment = [ - "PATH=${lib.makeBinPath [ pkgs.swww pkgs.coreutils pkgs.findutils pkgs.bash ]}:$PATH" - ]; - ExecStart = "${pkgs.bash}/bin/bash -lc 'if swww query >/dev/null 2>&1; then exit 0; else exec swww-daemon -f xrgb; fi'"; - Restart = "on-failure"; - RestartSec = 2; - }; - Install = { - WantedBy = [ "graphical-session.target" ]; - }; - }; - - systemd.user.services."change-wallpaper" = { - Unit = { - Description = "Set/rotate wallpaper via swww"; - After = [ "swww-daemon.service" "graphical-session.target" ]; - }; - Service = { - Type = "oneshot"; - Environment = [ - "PATH=${lib.makeBinPath [ pkgs.swww pkgs.coreutils pkgs.findutils pkgs.bash ]}:$PATH" - ]; - ExecStart = "${pkgs.bash}/bin/bash -lc '$HOME/.config/swww/swww.sh'"; - }; - Install = { - WantedBy = [ "graphical-session.target" ]; - }; - }; - - systemd.user.timers."change-wallpaper" = { - Unit = { - Description = "Timer to change wallpapers every hour"; - }; - Timer = { - OnCalendar = "hourly"; - Persistent = true; - }; - Install = { - WantedBy = [ "timers.target" ]; - }; - }; -} diff --git a/modules/home/wallpaper/swww.sh b/modules/home/wallpaper/swww.sh deleted file mode 100644 index 0ff944e..0000000 --- a/modules/home/wallpaper/swww.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -WALLPAPERS_DIR="${HOME}/wallpapers" - -mapfile -t files < <(find "$WALLPAPERS_DIR" -type f 2>/dev/null) -[ "${#files[@]}" -eq 0 ] && exit 0 - -file="$(printf '%s\n' "${files[@]}" | shuf -n 1)" - -echo file: "$file" - -exec swww img "$file" --transition-type grow --transition-step 90 diff --git a/profiles/gui.nix b/profiles/gui.nix index b54e283..f3ef404 100644 --- a/profiles/gui.nix +++ b/profiles/gui.nix @@ -16,6 +16,6 @@ ./../modules/home/noctalia.nix ./../modules/home/avatar.nix ./../modules/home/ghostty - ./../modules/home/wallpaper + ./../modules/home/wallpaper.nix ]; } \ No newline at end of file