configuration/common/components/desktop.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

{ config, pkgs, ... }:
let
host = config.host;
in
{
# Input
home.file.".XCompose" = {
onChange = "rm -rfv /home/ak/.cache/gtk-3.0/compose";
text =
(builtins.readFile ../resources/Compose) +
(builtins.readFile (host.local + "/resources/Compose"));
};
# Packages
home.packages = with pkgs; [
gnome.gnome-tweaks
gnomeExtensions.appindicator
gnomeExtensions.system-monitor
gnomeExtensions.tiling-assistant
yaru-theme
];
# Disabled extensions notification
home.file."${config.xdg.configHome}/autostart/disabled-extensions-notification.desktop".text = with pkgs; ''
[Desktop Entry]
Type=Application
Name=Disabled Extensions Notification
NoDisplay=true
Exec=${writeShellScript "disabled-extensions-notification" ''
[[ "$(gsettings get org.gnome.shell disable-user-extensions)" == 'true' ]] || exit
case "$(${libnotify}/bin/notify-send --urgency 'critical' --icon 'extensions' \
'Extensions have been automatically disabled.' \
--action 'enable=Re-Enable' \
--action 'settings=Settings')" \
in
'enable') gsettings set org.gnome.shell disable-user-extensions 'false';;
'settings') gnome-extensions-app & disown;;
esac
''}
'';
}