1
1
Fork 0

Compare commits

..

No commits in common. "5588c3c1baae8b55656bd0f103f3dcf3dbd26008" and "42f491e386e23d9b2e9b9cb1a1fdbdf31ac374bd" have entirely different histories.

2 changed files with 36 additions and 58 deletions

View file

@ -122,6 +122,7 @@ in {
{ {
# Editors # Editors
matches = [ matches = [
{app-id = "^codium$";}
{app-id = "^obsidian$";} {app-id = "^obsidian$";}
{app-id = "^org\.gnome\.TextEditor$";} {app-id = "^org\.gnome\.TextEditor$";}
]; ];
@ -153,20 +154,6 @@ in {
variable-refresh-rate = true; variable-refresh-rate = true;
} }
{
# IDEs
matches = [
{app-id = "^codium$";}
];
default-column-width.proportion =
if config.custom.ultrawide
then 0.4
else 0.8;
open-floating = false;
}
{ {
# Media # Media
matches = [ matches = [
@ -185,7 +172,7 @@ in {
matches = [ matches = [
{app-id = "^draw\.io$";} {app-id = "^draw\.io$";}
{app-id = "^libreoffice.*$";} {app-id = "^libreoffice.*$";}
{app-id = "^ONLYOFFICE$";} {app-id = "^ONLYOFFICE Desktop Editors$";}
{app-id = "^org\.gnome\.Papers$";} {app-id = "^org\.gnome\.Papers$";}
]; ];

View file

@ -5,57 +5,48 @@
... ...
}: }:
with lib; let with lib; let
cfg = config.custom.programs.onlyoffice; hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
onlyoffice-desktopeditors = "${pkgs.onlyoffice-bin}/bin/onlyoffice-desktopeditors --system-title-bar --xdg-desktop-portal";
onlyoffice-desktopeditors = "${getExe pkgs.onlyoffice-bin} --system-title-bar --xdg-desktop-portal"; cfg = config.custom.programs.onlyoffice;
in { in {
options.custom.programs.onlyoffice = { options.custom.programs.onlyoffice.enable = mkOption {default = false;};
enable = mkOption {default = false;};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/ONLYOFFICE/DesktopEditors environment.systemPackages = with pkgs; [onlyoffice-bin];
environment.systemPackages = [pkgs.onlyoffice-bin];
home-manager.sharedModules = [ home-manager.users.${config.custom.username} = {
{ home.file.".local/share/applications/onlyoffice-desktopeditors.desktop".text = ''
xdg.desktopEntries = { [Desktop Entry]
# https://github.com/ONLYOFFICE/desktop-apps/blob/master/win-linux/package/linux/common/desktopeditors.desktop.m4 Version=1.0
onlyoffice-desktopeditors = { Name=ONLYOFFICE Desktop Editors
name = "ONLYOFFICE Desktop Editors"; GenericName=Document Editor
genericName = "Document Editor"; Comment=Edit office documents
comment = "Edit office documents"; Type=Application
type = "Application"; Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} %U"
exec = "${onlyoffice-desktopeditors} %U"; Terminal=false
terminal = false; Icon=onlyoffice-desktopeditors
icon = "onlyoffice-desktopeditors"; Keywords=Text;Document;OpenDocument Text;Microsoft Word;Microsoft Works;odt;doc;docx;rtf;
categories = ["Office" "WordProcessor" "Spreadsheet" "Presentation"]; Categories=Office;WordProcessor;Spreadsheet;Presentation;
mimeType = ["application/vnd.oasis.opendocument.text" "application/vnd.oasis.opendocument.text-template" "application/vnd.oasis.opendocument.text-web" "application/vnd.oasis.opendocument.text-master" "application/vnd.sun.xml.writer" "application/vnd.sun.xml.writer.template" "application/vnd.sun.xml.writer.global" "application/msword" "application/vnd.ms-word" "application/x-doc" "application/rtf" "text/rtf" "application/vnd.wordperfect" "application/wordperfect" "application/vnd.openxmlformats-officedocument.wordprocessingml.document" "application/vnd.ms-word.document.macroenabled.12" "application/vnd.openxmlformats-officedocument.wordprocessingml.template" "application/vnd.ms-word.template.macroenabled.12" "application/vnd.oasis.opendocument.spreadsheet" "application/vnd.oasis.opendocument.spreadsheet-template" "application/vnd.sun.xml.calc" "application/vnd.sun.xml.calc.template" "application/msexcel" "application/vnd.ms-excel" "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" "application/vnd.ms-excel.sheet.macroenabled.12" "application/vnd.openxmlformats-officedocument.spreadsheetml.template" "application/vnd.ms-excel.template.macroenabled.12" "application/vnd.ms-excel.sheet.binary.macroenabled.12" "text/csv" "text/spreadsheet" "application/csv" "application/excel" "application/x-excel" "application/x-msexcel" "application/x-ms-excel" "text/comma-separated-values" "text/tab-separated-values" "text/x-comma-separated-values" "text/x-csv" "application/vnd.oasis.opendocument.presentation" "application/vnd.oasis.opendocument.presentation-template" "application/vnd.sun.xml.impress" "application/vnd.sun.xml.impress.template" "application/mspowerpoint" "application/vnd.ms-powerpoint" "application/vnd.openxmlformats-officedocument.presentationml.presentation" "application/vnd.ms-powerpoint.presentation.macroenabled.12" "application/vnd.openxmlformats-officedocument.presentationml.template" "application/vnd.ms-powerpoint.template.macroenabled.12" "application/vnd.openxmlformats-officedocument.presentationml.slide" "application/vnd.openxmlformats-officedocument.presentationml.slideshow" "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" "x-scheme-handler/oo-office" "text/docxf" "text/oform"]; MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/oo-office;text/docxf;text/oform;
Actions=NewDocument;NewSpreadsheet;NewPresentation;NewForm;
actions = { [Desktop Action NewDocument]
NewDocument = { Name=New document
name = "New document"; Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:word"
exec = "${onlyoffice-desktopeditors} --new:word";
};
NewSpreadsheet = { [Desktop Action NewSpreadsheet]
name = "New spreadsheet"; Name=New spreadsheet
exec = "${onlyoffice-desktopeditors} --new:cell"; Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:cell"
};
NewPresentation = { [Desktop Action NewPresentation]
name = "New presentation"; Name=New presentation
exec = "${onlyoffice-desktopeditors} --new:slide"; Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:slide"
};
NewForm = { [Desktop Action NewForm]
name = "New PDF form"; Name=New PDF form
exec = "${onlyoffice-desktopeditors} --new:form"; Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:form"
'';
}; };
}; };
};
};
}
];
};
} }