Add qalculate config write patch

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-07-08 01:47:13 +03:00
parent 756a112b80
commit 47325206d0
2 changed files with 17 additions and 2 deletions

View File

@@ -2,11 +2,14 @@
let
hmConfig = config.home-manager.users.${user.name};
qalculate-gtk = pkgs.qalculate-gtk.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [ ./skip-save-prefs.patch ];
});
in
{
home-manager.users.${user.name} = {
home = {
packages = with pkgs; [ qalculate-gtk ];
packages = [ qalculate-gtk ];
persistence."/cache${user.home}".files = [ "${hmConfig.xdg.relativeConfigHome}/qalculate/qalculate-gtk.history" ];
};
@@ -29,7 +32,7 @@ in
};
wayland.windowManager.hyprland.settings = {
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe pkgs.qalculate-gtk}" ];
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe qalculate-gtk}" ];
windowrulev2 = [ "float, class:(qalculate-gtk)" ];
};
};

View File

@@ -0,0 +1,12 @@
diff --git a/src/callbacks.cc b/src/callbacks.cc
index 14ab38a..5f73451 100644
--- a/src/callbacks.cc
+++ b/src/callbacks.cc
@@ -23405,6 +23405,7 @@ bool save_history(bool allow_cancel) {
*/
bool save_preferences(bool mode, bool allow_cancel) {
+ return true;
FILE *file = NULL;
string homedir = getLocalDir();