users.chn.plasma.autostart: add element

This commit is contained in:
陈浩南 2024-02-12 11:09:26 +08:00
parent 02981d242f
commit 40f4d35b62
5 changed files with 21 additions and 41 deletions

View File

@ -4,13 +4,30 @@ inputs:
{
home-manager.users.chn.config.home.file =
let
programs =
{
nheko = "${inputs.pkgs.nheko}/share/applications/nheko.desktop";
kclockd = "${inputs.pkgs.plasma5Packages.kdeGear.kclock}/etc/xdg/autostart/org.kde.kclockd-autostart.desktop";
yakuake = "${inputs.pkgs.yakuake}/share/applications/org.kde.yakuake.desktop";
telegram = ./org.telegram.desktop.desktop;
element =
let
drv = inputs.pkgs.writeTextDir "element-desktop.desktop" (builtins.replaceStrings
[ "Exec=element-desktop %u" ] [ "Exec=element-desktop --hide" ]
(builtins.readFile "${inputs.pkgs.element-desktop.desktopItem}/share/applications/element-desktop.desktop"));
in builtins.trace "${drv}" "${drv}/element-desktop.desktop";
};
devices =
{
pc = [ "nheko" "kclockd" "yakuake" "telegram" ];
surface = [ "kclockd" "yakuake" "telegram" ];
pc = [ "nheko" "kclockd" "yakuake" "telegram" "element" ];
surface = [ "kclockd" "yakuake" "telegram" "element" ];
};
in builtins.listToAttrs (builtins.map
(file: { name = ".config/autostart/${file}.desktop"; value.source = ./. + "/${file}.desktop"; })
(file:
{
name = ".config/autostart/${builtins.baseNameOf "programs.${file}"}";
value.source = programs.${file};
})
(devices.${inputs.config.nixos.system.networking.hostname}));
environment.persistence =
let impermanence = inputs.config.nixos.system.impermanence;

View File

@ -1,6 +0,0 @@
[Desktop Entry]
DBusActivatable=true
Exec=kclockd
Name=org.kde.kclockd-autostart
Type=Application
X-Flatpak=org.kde.kclockd-autostart

View File

@ -1,15 +0,0 @@
[Desktop Entry]
Categories=Network;InstantMessaging;Qt;
Comment=Desktop client for Matrix
Exec=nheko %u
Icon=nheko
Keywords=Matrix;matrix.org;chat;irc;communications;talk;riot;element;fractal;voip;
MimeType=x-scheme-handler/matrix;
Name=nheko
StartupWMClass=nheko
Terminal=false
Type=Application
Version=1.0
X-GNOME-UsesNotifications=true
X-KDE-Keywords=Matrix,matrix.org,chat,irc,communications,talk,riot,element,fractal,voip,
X-Purism-FormFactor=Workstation;Mobile;

View File

@ -2,7 +2,7 @@
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=telegram-desktop
Exec=telegram-desktop -autostart
Exec=bash -c "sleep 5 && telegram-desktop -autostart"
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop

View File

@ -1,16 +0,0 @@
[Desktop Entry]
Categories=Qt;KDE;System;TerminalEmulator;
Comment[zh_CN]=KDE Konsole 仿
Comment=A drop-down terminal emulator based on KDE Konsole technology.
DBusActivatable=true
Exec=yakuake
GenericName[zh_CN]=
GenericName=Drop-down Terminal
Icon=yakuake
Name[zh_CN]=Yakuake
Name=Yakuake
Terminal=false
Type=Application
X-DBUS-ServiceName=org.kde.yakuake
X-DBUS-StartupType=Unique
X-KDE-StartupNotify=false