Some fixes for helix

This commit is contained in:
Alexander Bantyev 2023-01-20 20:09:41 +04:00
parent 8e68fdc41f
commit 9bf4aab609
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
5 changed files with 40 additions and 4 deletions

View File

@ -41,8 +41,8 @@
"application/vnd.oasis.opendocument.text" = text_processor;
"text/csv" = spreadsheet;
"application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
"text/plain" =
editor; # This actually makes Emacs an editor for everything... XDG is wierd
"text/plain" = editor;
"text/*" = editor;
};
};
};

View File

@ -1,9 +1,40 @@
{ config, pkgs, ... }: {
defaultApplications.editor = {
cmd = "${pkgs.helix}/bin/helix";
cmd = "${pkgs.helix}/bin/hx";
desktop = "helix";
};
home-manager.users.balsoft = {
home.packages = [
(pkgs.makeDesktopItem {
name = "helix";
desktopName = "Helix editor";
terminal = true;
categories = [ "Utility" "TextEditor" "Development" "IDE" ];
mimeTypes = [
"inode/directory"
"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"
"application/json"
"application/xml"
"text/xml"
"text/x-c"
"text/x-c++"
];
exec = "${pkgs.helix}/bin/hx %F";
icon = "helix";
})
];
xdg.configFile."helix/languages.toml".text = ''
[[language]]
name = "nix"
@ -100,7 +131,7 @@
};
"ui.cursor.match" = { bg = base01; };
"string" = base0B;
"variable.other.member" = base0B;
# "variable.other.member" = base0B;
"constant.character.escape" = base0E;
"function" = base05;
"constructor" = base0A;

View File

@ -15,6 +15,9 @@
};
environment.systemPackages = [ pkgs.pass-secret-service ];
environment.gnome.excludePackages = [ pkgs.gnome-console ];
services.dbus.packages = [ pkgs.pass-secret-service ];
xdg.portal.extraPortals = [ pkgs.pass-secret-service ];

View File

@ -116,6 +116,7 @@ with pkgs.my-lib; {
smallestReadableFont =
"${fonts.main.family},${toString fonts.main.size},-1,5,57,0,0,0,0,0,Medium";
toolBarFont = "${fonts.main.family},${toString fonts.main.size},-1,5,50,0,0,0,0,0";
TerminalApplication = "alacritty";
};
KDE = {
DoubleClickInterval = 400;

View File

@ -23,6 +23,7 @@
maxIconSize = 24;
extraConfig = let
play = sound:
pkgs.writeShellScript "play-${sound}"
"${pkgs.mpv}/bin/mpv ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/${sound}.oga";
in ''
on-notify=exec ${play "message"}