From abb8b2c9dd9a6c76a10d2359546804980cd76b50 Mon Sep 17 00:00:00 2001 From: Zephrynis Date: Wed, 5 Nov 2025 21:05:43 +0000 Subject: [PATCH] feat: add custom alacritty package and update desktop entry configuration --- .gitignore | 2 ++ home/ags-config/window/bar/index.tsx | 3 +-- home/home.nix | 38 +++++++++++++++++++++++++--- package-lock.json | 29 +++++++++++++++++++++ package.json | 5 ++++ system/common.nix | 3 +++ 6 files changed, 75 insertions(+), 5 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index efb653b..aa98a39 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ result-* # Hardware configuration (may contain sensitive info) # Uncomment if you don't want to commit hardware configs # hosts/*/hardware-configuration.nix + +node_modules \ No newline at end of file diff --git a/home/ags-config/window/bar/index.tsx b/home/ags-config/window/bar/index.tsx index b103004..60c6862 100644 --- a/home/ags-config/window/bar/index.tsx +++ b/home/ags-config/window/bar/index.tsx @@ -2,7 +2,7 @@ import { Astal, Gtk } from "ags/gtk4"; import { Tray } from "./widgets/Tray"; import { Workspaces } from "./widgets/Workspaces"; import { FocusedClient } from "./widgets/FocusedClient"; -import { Apps } from "./widgets/Apps"; +// import { Apps } from "./widgets/Apps"; import { Clock } from "./widgets/Clock"; import { Status } from "./widgets/Status"; import { Media } from "./widgets/Media"; @@ -21,7 +21,6 @@ export const Bar = (mon: number) => { halign={Gtk.Align.START} spacing={widgetSpacing} $type="start"> - diff --git a/home/home.nix b/home/home.nix index 18977d0..51d16c2 100644 --- a/home/home.nix +++ b/home/home.nix @@ -31,7 +31,29 @@ # chromium # Terminal emulators - alacritty + (pkgs.runCommand "alacritty-no-desktop" { + buildInputs = [ pkgs.alacritty ]; + } '' + mkdir -p $out/bin + ln -s ${pkgs.alacritty}/bin/* $out/bin/ + + # Copy all other directories except share/applications + for dir in ${pkgs.alacritty}/*; do + if [[ "$dir" != "${pkgs.alacritty}/bin" && "$dir" != "${pkgs.alacritty}/share" ]]; then + ln -s "$dir" $out/$(basename "$dir") + fi + done + + # Copy share but exclude applications + if [ -d ${pkgs.alacritty}/share ]; then + mkdir -p $out/share + for item in ${pkgs.alacritty}/share/*; do + if [[ "$(basename $item)" != "applications" ]]; then + ln -s "$item" $out/share/$(basename "$item") + fi + done + fi + '') # kitty # wezterm @@ -135,7 +157,7 @@ # Alacritty terminal emulator programs.alacritty = { - enable = true; + enable = false; # Disabled to avoid duplicate desktop file, using custom package in home.packages instead settings = { window = { opacity = 0.9; @@ -206,8 +228,18 @@ x11.enable = true; }; - # Override desktop entries to use Wayland flags for Electron apps + # Override desktop entries xdg.desktopEntries = { + # Add "cmd" to alacritty's comment so it shows up when searching "cmd" + alacritty = { + name = "Alacritty"; + genericName = "Terminal cmd"; + comment = "A fast, cross-platform, OpenGL terminal emulator"; + exec = "alacritty"; + icon = "Alacritty"; + type = "Application"; + categories = [ "System" "TerminalEmulator" ]; + }; legcord = { name = "Discord"; exec = "${pkgs.legcord}/bin/legcord --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland %U"; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..d5fe93e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,29 @@ +{ + "name": "nix-flake", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "@types/node": "^24.10.0" + } + }, + "node_modules/@types/node": { + "version": "24.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz", + "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..1a263e7 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "@types/node": "^24.10.0" + } +} diff --git a/system/common.nix b/system/common.nix index a5e61e7..048ffec 100644 --- a/system/common.nix +++ b/system/common.nix @@ -28,6 +28,9 @@ # Enable X11 for XWayland support services.xserver.enable = true; + # Exclude xterm (we use alacritty instead) + services.xserver.excludePackages = [ pkgs.xterm ]; + # Display manager - SDDM with Wayland support services.displayManager.sddm = { enable = true;