Add qalculate config write patch
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -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)" ];
|
||||
};
|
||||
};
|
||||
|
12
users/configs/qalculate/skip-save-prefs.patch
Normal file
12
users/configs/qalculate/skip-save-prefs.patch
Normal 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();
|
Reference in New Issue
Block a user