flameshot-once profile: use toINI

This commit is contained in:
tv 2021-12-14 22:45:16 +01:00
parent 250fef7533
commit 8fdd9b3a8f

View File

@ -1,5 +1,6 @@
{ config, pkgs }:
with pkgs.stockholm.lib;
with generators;
let
# Refs https://github.com/lupoDharkael/flameshot/blob/master/src/widgets/capture/capturebutton.h
@ -159,18 +160,21 @@ let
"QList<${t}>${le.x4 0}${le.x4 (length xs)}${concatMapStrings le.x4 xs}";
XDG_CONFIG_HOME = pkgs.write "flameshot-config" {
"/flameshot/flameshot.ini".text = ''
[General]
buttons=@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons})
disabledTrayIcon=${toJSON cfg.disabledTrayIcon}
drawThickness=${toJSON cfg.drawThickness}
filenamePattern=${toJSON cfg.filenamePattern}
savePath=${toJSON cfg.savePath}
showDesktopNotification=${toJSON cfg.showDesktopNotification}
showHelp=${toJSON cfg.showHelp}
[Shortcuts]
TYPE_COPY=Return
'';
"/flameshot/flameshot.ini".text =
toINI {} {
General = {
buttons = ''@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons})'';
disabledTrayIcon = cfg.disabledTrayIcon;
drawThickness = cfg.drawThickness;
filenamePattern = cfg.filenamePattern;
savePath = cfg.savePath;
showDesktopNotification = cfg.showDesktopNotification;
showHelp = cfg.showHelp;
};
Shortcuts = {
TYPE_COPY = "Return";
};
};
};
in