add logseq wrapped for wayland

This commit is contained in:
Moritz Böhme 2022-12-23 12:37:57 +01:00
parent 1b536e52b5
commit 6b925636cc
Signed by: moritz
GPG key ID: 970C6E89EB0547A9
2 changed files with 12 additions and 1 deletions

View file

@ -13,7 +13,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
users.users.moritz.packages = with pkgs; [ users.users.moritz.packages = with pkgs; [
logseq logseq-wayland
]; ];
xdg.mime.defaultApplications."x-scheme-handler/logseq" = "logseq.desktop"; xdg.mime.defaultApplications."x-scheme-handler/logseq" = "logseq.desktop";
}; };

View file

@ -1,6 +1,17 @@
{ inputs }: final: prev: { { inputs }: final: prev: {
nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}"; nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}";
agenix = inputs.agenix.defaultPackage."${prev.system}"; agenix = inputs.agenix.defaultPackage."${prev.system}";
logseq-wayland = prev.symlinkJoin {
name = "logseq";
paths = [ prev.logseq ];
nativeBuildInputs = [ prev.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/logseq \
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
};
waybar-hyprland = prev.waybar.overrideAttrs (old: { waybar-hyprland = prev.waybar.overrideAttrs (old: {
postPatch = old.postPatch or "" + '' postPatch = old.postPatch or "" + ''
sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp