From 8fdd9b3a8ff4836ba718278708c1748ff1fff3ee Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Dec 2021 22:45:16 +0100 Subject: flameshot-once profile: use toINI --- krebs/5pkgs/simple/flameshot-once/profile.nix | 28 +++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'krebs/5pkgs') 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 -- cgit v1.2.3 From 0f764d9199c9e45e00c6232f97bf535df44dd656 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Dec 2021 22:49:16 +0100 Subject: flameshot-once profile: don't check for updates --- krebs/5pkgs/simple/flameshot-once/profile.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index 91628c4ff..b19229327 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -165,6 +165,7 @@ let General = { buttons = ''@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons})''; disabledTrayIcon = cfg.disabledTrayIcon; + checkForUpdates = false; drawThickness = cfg.drawThickness; filenamePattern = cfg.filenamePattern; savePath = cfg.savePath; -- cgit v1.2.3 From 0dc6bc199a24d124d54541b94cd7baffb8b15d16 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Dec 2021 22:49:54 +0100 Subject: flameshot-once profile: +copyAndCloseAfterUpload --- krebs/5pkgs/simple/flameshot-once/profile.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index b19229327..8b54f1bcd 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -56,6 +56,10 @@ let ; type = types.listOf (types.enum (attrNames ButtonType)); }; + copyAndCloseAfterUpload = mkOption { + default = false; + type = types.bool; + }; disabledTrayIcon = mkOption { default = true; type = types.bool; @@ -166,6 +170,7 @@ let buttons = ''@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons})''; disabledTrayIcon = cfg.disabledTrayIcon; checkForUpdates = false; + copyAndCloseAfterUpload = cfg.copyAndCloseAfterUpload; drawThickness = cfg.drawThickness; filenamePattern = cfg.filenamePattern; savePath = cfg.savePath; -- cgit v1.2.3 From 329aadc66be829dd44d537c2a731481ed631074e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Dec 2021 22:52:34 +0100 Subject: flameshot-once profile: +showSidePanelButton --- krebs/5pkgs/simple/flameshot-once/profile.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index 8b54f1bcd..618b50353 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -124,6 +124,10 @@ let default = false; type = types.bool; }; + showSidePanelButton = mkOption { + default = false; + type = types.bool; + }; timeout = mkOption { default = 200; description = '' @@ -176,6 +180,7 @@ let savePath = cfg.savePath; showDesktopNotification = cfg.showDesktopNotification; showHelp = cfg.showHelp; + showSidePanelButton = cfg.showSidePanelButton; }; Shortcuts = { TYPE_COPY = "Return"; -- cgit v1.2.3 From e655784c49f24301fe021340065f47eef1cc87f4 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Dec 2021 22:52:52 +0100 Subject: flameshot-once profile: +showStartupLaunchMessage --- krebs/5pkgs/simple/flameshot-once/profile.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index 618b50353..7bde39c3a 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -128,6 +128,10 @@ let default = false; type = types.bool; }; + showStartupLaunchMessage = mkOption { + default = false; + type = types.bool; + }; timeout = mkOption { default = 200; description = '' @@ -181,6 +185,7 @@ let showDesktopNotification = cfg.showDesktopNotification; showHelp = cfg.showHelp; showSidePanelButton = cfg.showSidePanelButton; + showStartupLaunchMessage = cfg.showStartupLaunchMessage; }; Shortcuts = { TYPE_COPY = "Return"; -- cgit v1.2.3 From 657aa2b1d802986b9f161fc50bb5c128bb669ef1 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Dec 2021 22:53:15 +0100 Subject: flameshot-once profile: don't startup on launch --- krebs/5pkgs/simple/flameshot-once/profile.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index 7bde39c3a..cdc50ea84 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -186,6 +186,7 @@ let showHelp = cfg.showHelp; showSidePanelButton = cfg.showSidePanelButton; showStartupLaunchMessage = cfg.showStartupLaunchMessage; + startupLaunch = false; }; Shortcuts = { TYPE_COPY = "Return"; -- cgit v1.2.3 From c2ee57472919ee0052f7688a51f91d012a2a4327 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 Dec 2021 23:11:14 +0100 Subject: flameshot-once profile: +drawColor --- krebs/5pkgs/simple/flameshot-once/profile.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index cdc50ea84..269f13a66 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -64,6 +64,11 @@ let default = true; type = types.bool; }; + drawColor = mkOption { + default = "#ff0000"; + type = + types.addCheck types.str (test "#[0-9A-Fa-f]{6}"); + }; drawThickness = mkOption { default = 8; type = types.positive; @@ -179,6 +184,7 @@ let disabledTrayIcon = cfg.disabledTrayIcon; checkForUpdates = false; copyAndCloseAfterUpload = cfg.copyAndCloseAfterUpload; + drawColor = cfg.drawColor; drawThickness = cfg.drawThickness; filenamePattern = cfg.filenamePattern; savePath = cfg.savePath; -- cgit v1.2.3