onlyoffice: workaround for static window props
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
160ee8dfff
commit
dc01774ad2
3 changed files with 53 additions and 1 deletions
|
@ -60,6 +60,7 @@ with lib; {
|
||||||
#// nheko.enable = true;
|
#// nheko.enable = true;
|
||||||
nix-ld.enable = true;
|
nix-ld.enable = true;
|
||||||
obs-studio.enable = true;
|
obs-studio.enable = true;
|
||||||
|
onlyoffice.enable = true;
|
||||||
#// onedrive.enable = true;
|
#// onedrive.enable = true;
|
||||||
path-of-building.enable = true;
|
path-of-building.enable = true;
|
||||||
rbw.enable = true;
|
rbw.enable = true;
|
||||||
|
|
52
options/custom/programs/onlyoffice.nix
Normal file
52
options/custom/programs/onlyoffice.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||||
|
onlyoffice-desktopeditors = "${pkgs.onlyoffice-bin}/bin/onlyoffice-desktopeditors";
|
||||||
|
|
||||||
|
cfg = config.custom.programs.onlyoffice;
|
||||||
|
in {
|
||||||
|
options.custom.programs.onlyoffice.enable = mkOption {default = false;};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [onlyoffice-bin];
|
||||||
|
|
||||||
|
home-manager.users.${config.custom.username} = {
|
||||||
|
home.file.".local/share/applications/onlyoffice-desktopeditors.desktop".text = ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=ONLYOFFICE Desktop Editors
|
||||||
|
GenericName=Document Editor
|
||||||
|
Comment=Edit office documents
|
||||||
|
Type=Application
|
||||||
|
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} %U"
|
||||||
|
Terminal=false
|
||||||
|
Icon=onlyoffice-desktopeditors
|
||||||
|
Keywords=Text;Document;OpenDocument Text;Microsoft Word;Microsoft Works;odt;doc;docx;rtf;
|
||||||
|
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;
|
||||||
|
Actions=NewDocument;NewSpreadsheet;NewPresentation;NewForm;
|
||||||
|
|
||||||
|
[Desktop Action NewDocument]
|
||||||
|
Name=New document
|
||||||
|
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:word"
|
||||||
|
|
||||||
|
[Desktop Action NewSpreadsheet]
|
||||||
|
Name=New spreadsheet
|
||||||
|
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:cell"
|
||||||
|
|
||||||
|
[Desktop Action NewPresentation]
|
||||||
|
Name=New presentation
|
||||||
|
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:slide"
|
||||||
|
|
||||||
|
[Desktop Action NewForm]
|
||||||
|
Name=New PDF form
|
||||||
|
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:form"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -113,7 +113,6 @@ in {
|
||||||
newsflash # RSS feed
|
newsflash # RSS feed
|
||||||
nheko # Matrix client
|
nheko # Matrix client
|
||||||
obsidian # Knowledge base
|
obsidian # Knowledge base
|
||||||
onlyoffice-bin # Document editor
|
|
||||||
papers # Document viewer
|
papers # Document viewer
|
||||||
path-of-building # Path of Exile planner
|
path-of-building # Path of Exile planner
|
||||||
pika-backup # Borg backup manager
|
pika-backup # Borg backup manager
|
||||||
|
|
Loading…
Reference in a new issue