From b9aeb8bbd5d57f216f7391a4e021ea3488cffeca Mon Sep 17 00:00:00 2001 From: duynguyen Date: Mon, 17 Aug 2026 00:46:12 +0700 Subject: [PATCH] feat: ghostty module, noctalia dock, sync bar/theme config, global scroll fix --- README.md | 2 +- home/hosts/nixos.nix | 3 +- home/modules/applications/default.nix | 7 +- home/modules/ghostty/default.nix | 17 +++++ home/modules/kitty/default.nix | 2 +- home/modules/niri/config.kdl | 4 +- home/modules/niri/noctalia/default.nix | 98 +++++++++++++++++++------- 7 files changed, 98 insertions(+), 35 deletions(-) create mode 100644 home/modules/ghostty/default.nix diff --git a/README.md b/README.md index 06047d4..2ae4459 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ nixos-config/ | Key | Action | |---|---| -| `Mod+T` | Open kitty terminal | +| `Mod+T` | Open ghostty terminal | | `Mod+Space` | Noctalia launcher | | `Mod+S` | Noctalia control center | | `Super+Alt+L` | Lock screen | diff --git a/home/hosts/nixos.nix b/home/hosts/nixos.nix index 28213f5..da2b07c 100644 --- a/home/hosts/nixos.nix +++ b/home/hosts/nixos.nix @@ -7,6 +7,7 @@ imports = [ ../modules/niri ../modules/kitty + ../modules/ghostty ../modules/cli ../modules/applications ]; @@ -15,7 +16,7 @@ home.activation.zenBrowserUserJs = lib.hm.dag.entryAfter [ "writeBoundary" ] '' for profile in "$HOME/.config/zen/"*.*/; do [[ -d "$profile" ]] || continue - echo 'user_pref("mousewheel.default.delta_multiplier_y", 50);' > "$profile/user.js" + echo 'user_pref("mousewheel.default.delta_multiplier_y", 75);' > "$profile/user.js" done ''; diff --git a/home/modules/applications/default.nix b/home/modules/applications/default.nix index 67e5b0f..55a9b38 100644 --- a/home/modules/applications/default.nix +++ b/home/modules/applications/default.nix @@ -20,9 +20,6 @@ xdg-utils inotify-tools - # Editor - vscodium - # Daily apps mpv imv @@ -106,4 +103,8 @@ LC_PAPER = "en_US.UTF-8"; }; }; + + programs.vscodium = { + enable = true; + }; } diff --git a/home/modules/ghostty/default.nix b/home/modules/ghostty/default.nix new file mode 100644 index 0000000..7ac188b --- /dev/null +++ b/home/modules/ghostty/default.nix @@ -0,0 +1,17 @@ +{ ... }: +{ + programs.ghostty = { + enable = true; + settings = { + font-family = "JetBrainsMono Nerd Font"; + font-size = 11; + + theme = "catppuccin-mocha"; + + window-decoration = false; + + # Disable ligatures + font-feature = [ "-liga" "-dlig" "-calt" ]; + }; + }; +} diff --git a/home/modules/kitty/default.nix b/home/modules/kitty/default.nix index e563220..f74ebc8 100644 --- a/home/modules/kitty/default.nix +++ b/home/modules/kitty/default.nix @@ -2,6 +2,6 @@ { programs.kitty = { enable = true; - settings.wheel_scroll_multiplier = 10; + settings.wheel_scroll_multiplier = 300; }; } diff --git a/home/modules/niri/config.kdl b/home/modules/niri/config.kdl index c681578..0a90d32 100644 --- a/home/modules/niri/config.kdl +++ b/home/modules/niri/config.kdl @@ -38,7 +38,7 @@ input { natural-scroll // accel-speed 0.2 accel-profile "flat" - scroll-factor 1.0 + scroll-factor 0.3 // scroll-method "two-finger" // disabled-on-external-mouse } @@ -364,7 +364,7 @@ binds { Mod+Shift+Slash { show-hotkey-overlay; } // Suggested binds for running programs: terminal, app launcher, screen locker. - Mod+T hotkey-overlay-title="Open a Terminal: kitty" { spawn "kitty"; } + Mod+T hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; } Mod+Space hotkey-overlay-title="Noctalia: Launcher" { spawn "noctalia-ipc" "panel-toggle" "launcher"; } Mod+S hotkey-overlay-title="Noctalia: Control Center" { spawn "noctalia-ipc" "panel-toggle" "control-center"; } Super+Alt+L hotkey-overlay-title="Noctalia: Lock" { spawn "noctalia-ipc" "session" "lock"; } diff --git a/home/modules/niri/noctalia/default.nix b/home/modules/niri/noctalia/default.nix index dac4431..8650ccb 100644 --- a/home/modules/niri/noctalia/default.nix +++ b/home/modules/niri/noctalia/default.nix @@ -1,6 +1,7 @@ { config, inputs, pkgs, ... }: let - wallpaperDir = "${config.home.homeDirectory}/.config/wallpapers"; + # Repo wallpapers are symlinked to ~/.config/wallpapers by xdg.configFile below + wallpaperDir = "${config.home.homeDirectory}/.config/wallpapers"; defaultWallpaper = "${wallpaperDir}/even-in-arcadia.png"; noctaliaIpc = pkgs.writeShellScriptBin "noctalia-ipc" '' @@ -13,24 +14,38 @@ in home.packages = [ noctaliaIpc ]; - # Wallpapers tracked in the repo; linked to ~/.config/wallpapers for noctalia + # Wallpapers tracked in the repo; symlinked to ~/.config/wallpapers for noctalia xdg.configFile."wallpapers".source = ./wallpapers; programs.noctalia = { enable = true; settings = { - bar.default = { - # "group:sysmon" renders as one capsule containing cpu + ram - start = [ "launcher" "clipboard" "group:sysmon" "network" ]; - center = [ "clock" ]; - end = [ "notifications" "volume" "brightness" "battery" "control-center" "session" ]; - thickness = 40; - padding = 10; - radius = 0; - margin_edge = 0; - margin_ends = 0; - widget_spacing = 8; + bar.default = { + start = [ "launcher" "clipboard" "volume" "brightness" "active_window" ]; + center = [ "workspaces" ]; + end = [ "network" "sysmon" "battery" "notifications" "clock" "session" ]; + thickness = 35; + padding = 17; + radius = 17; + margin_edge = 5; + margin_ends = 5; + margin_opposite_edge = 5; + widget_spacing = 15; + background_opacity = 0.9; + border = "outline"; + capsule = true; + capsule_fill = "surface_variant"; + capsule_opacity = 1.0; + capsule_padding = 6.0; + capsule_thickness = 0.76; + contact_shadow = true; + panel_overlap = 1; + shadow = true; + hover_highlight = true; + concave_edge_corners = true; + + # cpu + ram rendered as one capsule labelled "sysmon" capsule_group = [ { id = "sysmon"; @@ -42,18 +57,43 @@ in ]; }; + dock = { + enabled = true; + # Desktop entry IDs (filename without .desktop) + pinned = [ "zen" "codium" "com.mitchellh.ghostty" "thunar" "claude" ]; + position = "bottom"; + smart_auto_hide = true; + icon_size = 20; + radius = 15; + show_dots = true; + show_running = true; + show_instance_count = true; + magnification = true; + magnification_scale = 1.35; + background_opacity = 1.0; + border = "outline"; + concave_edge_corners = true; + shadow = true; + main_axis_padding = 20; + cross_axis_padding = 10; + item_spacing = 5; + inactive_opacity = 0.85; + inactive_scale = 0.85; + }; + idle = { - behavior_order = [ "lock" "screen-off" ]; + # screen turns off first, then locks after + behavior_order = [ "screen-off" "lock" ]; behavior = { - lock = { - action = "lock"; - enabled = true; - timeout = 600; - }; screen-off = { action = "screen_off"; enabled = true; - timeout = 660; + timeout = 300; # 5 min + }; + lock = { + action = "lock"; + enabled = true; + timeout = 600; # 10 min }; }; }; @@ -68,24 +108,28 @@ in font_family = "JetBrainsMono Nerd Font"; polkit_agent = true; corner_radius_scale = 1.0; - animation.speed = 1.5; + animation.speed = 2.0; panel = { - clipboard_placement = "attached"; - launcher_placement = "attached"; - launcher_session_search = true; - panel_overlap = 1; # pull panel flush against bar to hide seam - contact_shadow = true; # gradient at meeting point masks any residual gap + clipboard_placement = "attached"; + launcher_placement = "attached"; }; shadow.alpha = 0.5; }; - theme.builtin = "Kanagawa"; + # Theme follows wallpaper colours (Catppuccin palette, muted scheme, dark mode) + theme = { + builtin = "Catppuccin"; + source = "wallpaper"; + mode = "dark"; + wallpaper_scheme = "muted"; + }; wallpaper = { enabled = true; directory = wallpaperDir; default.path = defaultWallpaper; }; + }; }; }