From cd70817f4faa986e8df0f484e336a0519333db73 Mon Sep 17 00:00:00 2001 From: duynguyen Date: Wed, 12 Aug 2026 01:26:33 +0700 Subject: [PATCH] feat: add ghostty, wallpaper folder, start walker daemon on login --- home/duynguyen/config/niri/config.kdl | 4 +++- home/duynguyen/default.nix | 21 +++++++++++++++++++-- home/duynguyen/wallpapers/.gitkeep | 0 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 home/duynguyen/wallpapers/.gitkeep diff --git a/home/duynguyen/config/niri/config.kdl b/home/duynguyen/config/niri/config.kdl index 81e70f7..9c323cb 100644 --- a/home/duynguyen/config/niri/config.kdl +++ b/home/duynguyen/config/niri/config.kdl @@ -83,6 +83,8 @@ layout { spawn-at-startup "waybar" spawn-at-startup "xwayland-satellite" spawn-at-startup "mako" +spawn-at-startup "walker" "--gapplication-service" +spawn-at-startup "start-wallpaper" hotkey-overlay { skip-at-startup @@ -130,7 +132,7 @@ binds { Mod+Shift+Slash { show-hotkey-overlay; } Mod+T hotkey-overlay-title="Open a Terminal: kitty" { spawn "kitty"; } - Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } + Mod+D hotkey-overlay-title="Run an Application: walker" { spawn "walker"; } Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; } diff --git a/home/duynguyen/default.nix b/home/duynguyen/default.nix index b422b08..616c8a7 100644 --- a/home/duynguyen/default.nix +++ b/home/duynguyen/default.nix @@ -1,5 +1,16 @@ { config, pkgs, lib, ... }: +let + # Picks the first image from ~/.config/wallpapers and sets it via swaybg. + # Add images to home/duynguyen/wallpapers/ in the config repo and rebuild. + startWallpaper = pkgs.writeShellScriptBin "start-wallpaper" '' + f=$(find "$HOME/.config/wallpapers" -maxdepth 1 -type f \ + \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" \ + -o -name "*.gif" -o -name "*.webp" -o -name "*.avif" \) \ + | sort | head -1) + [ -n "$f" ] && exec ${pkgs.swaybg}/bin/swaybg -i "$f" -m fill + ''; +in { home.username = "duynguyen"; home.homeDirectory = "/home/duynguyen"; @@ -15,19 +26,21 @@ claude-desktop # Terminals + ghostty kitty foot # lightweight, good default for Niri # Niri supporting tools + startWallpaper # picks wallpaper from ~/.config/wallpapers and runs swaybg walker # app launcher - elephant # modular data provider for walker (clipboard, files, niri actions, etc.) + elephant # modular data provider for walker fuzzel # app launcher (alternative) waybar mako # notifications wl-clipboard # copy/paste in Wayland terminal swaylock # screen locker swayidle # idle management - swaybg # wallpaper + swaybg # wallpaper setter xwayland-satellite # X11 app support in Niri xdg-utils # xdg-open, file associations inotify-tools # filesystem event tools @@ -90,6 +103,10 @@ # Wayland natively and work correctly with fcitx5 input home.sessionVariables.NIXOS_OZONE_WL = "1"; + # Wallpapers folder — add images to home/duynguyen/wallpapers/ in the repo + # and rebuild; swaybg will pick the first one alphabetically + xdg.configFile."wallpapers".source = ./wallpapers; + programs.zsh = { enable = true; autosuggestion.enable = true; diff --git a/home/duynguyen/wallpapers/.gitkeep b/home/duynguyen/wallpapers/.gitkeep new file mode 100644 index 0000000..e69de29