summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-12-14 22:45:16 +0100
committertv <tv@krebsco.de>2021-12-14 23:23:28 +0100
commit8fdd9b3a8ff4836ba718278708c1748ff1fff3ee (patch)
tree997a175e95f28737d08f27f4d61a21f1f3399593
parent250fef75330f6681e891044656d4a30b02109f69 (diff)
flameshot-once profile: use toINI
-rw-r--r--krebs/5pkgs/simple/flameshot-once/profile.nix28
1 files changed, 16 insertions, 12 deletions
diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix
index 991b46118..91628c4ff 100644
--- a/krebs/5pkgs/simple/flameshot-once/profile.nix
+++ b/krebs/5pkgs/simple/flameshot-once/profile.nix
@@ -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