feat: add custom alacritty package and update desktop entry configuration

This commit is contained in:
2025-11-05 21:05:43 +00:00
parent b1f071d92b
commit abb8b2c9dd
6 changed files with 75 additions and 5 deletions

View File

@@ -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">
<Apps />
<Workspaces />
<FocusedClient />
</Gtk.Box>

View File

@@ -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";