From b568758a85a08be2c0e635b995a1ffe1a05db4d4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 24 Jan 2021 15:16:22 +0100 Subject: gkleen@sif: emacsclient desktop item --- accounts/gkleen@sif/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'accounts/gkleen@sif') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 611ae8a7..79824844 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -2,6 +2,14 @@ let cfg = config.home-manager.users.${userName}; xmonad = import ./xmonad pkgs.haskellPackages; + emacsclientDesktopItem = pkgs.makeDesktopItem { + name = "emacsclient"; + genericName = "Text Editor"; + desktopName = "emacsclient"; + icon = "emacs"; + mimeType = "text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;"; + exec = "${config.home-manager.users.${userName}.programs.emacs.package}/bin/emacsclient -a \"\" %F"; + }; in { imports = with flake.nixosModules.userProfiles.${userName}; [ mpv @@ -170,7 +178,7 @@ in { google-play-music-desktop-player qt5ct playerctl evince thunderbird zulip zoom-us steam steam-run wireshark skype virt-manager rclone cached-nix-shell xournal discord xmonad - worktime fira-code-symbols + worktime fira-code-symbols emacsclientDesktopItem ]; file = { @@ -182,11 +190,14 @@ in { sessionVariables = { GDK_SCALE = 96.0 / 282.0; - XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS"; QT_AUTO_SCREEN_SCALE_FACTOR = 1; QT_QPA_PLATFORMTHEME = "qt5ct"; }; + extraProfileCommands = '' + export XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}''${XDG_DATA_DIRS:+:''${XDG_DATA_DIRS}}" + ''; + stateVersion = "20.03"; }; -- cgit v1.2.3