Merge remote-tracking branch 'ni/master'
This commit is contained in:
commit
9e2e237af5
|
@ -1,5 +1,6 @@
|
||||||
{ config, pkgs }:
|
{ config, pkgs }:
|
||||||
with pkgs.stockholm.lib;
|
with pkgs.stockholm.lib;
|
||||||
|
with generators;
|
||||||
let
|
let
|
||||||
|
|
||||||
# Refs https://github.com/lupoDharkael/flameshot/blob/master/src/widgets/capture/capturebutton.h
|
# Refs https://github.com/lupoDharkael/flameshot/blob/master/src/widgets/capture/capturebutton.h
|
||||||
|
@ -55,10 +56,19 @@ let
|
||||||
;
|
;
|
||||||
type = types.listOf (types.enum (attrNames ButtonType));
|
type = types.listOf (types.enum (attrNames ButtonType));
|
||||||
};
|
};
|
||||||
|
copyAndCloseAfterUpload = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
disabledTrayIcon = mkOption {
|
disabledTrayIcon = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
drawColor = mkOption {
|
||||||
|
default = "#ff0000";
|
||||||
|
type =
|
||||||
|
types.addCheck types.str (test "#[0-9A-Fa-f]{6}");
|
||||||
|
};
|
||||||
drawThickness = mkOption {
|
drawThickness = mkOption {
|
||||||
default = 8;
|
default = 8;
|
||||||
type = types.positive;
|
type = types.positive;
|
||||||
|
@ -119,6 +129,14 @@ let
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
showSidePanelButton = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
showStartupLaunchMessage = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
timeout = mkOption {
|
timeout = mkOption {
|
||||||
default = 200;
|
default = 200;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -159,18 +177,27 @@ let
|
||||||
"QList<${t}>${le.x4 0}${le.x4 (length xs)}${concatMapStrings le.x4 xs}";
|
"QList<${t}>${le.x4 0}${le.x4 (length xs)}${concatMapStrings le.x4 xs}";
|
||||||
|
|
||||||
XDG_CONFIG_HOME = pkgs.write "flameshot-config" {
|
XDG_CONFIG_HOME = pkgs.write "flameshot-config" {
|
||||||
"/flameshot/flameshot.ini".text = ''
|
"/flameshot/flameshot.ini".text =
|
||||||
[General]
|
toINI {} {
|
||||||
buttons=@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons})
|
General = {
|
||||||
disabledTrayIcon=${toJSON cfg.disabledTrayIcon}
|
buttons = ''@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons})'';
|
||||||
drawThickness=${toJSON cfg.drawThickness}
|
disabledTrayIcon = cfg.disabledTrayIcon;
|
||||||
filenamePattern=${toJSON cfg.filenamePattern}
|
checkForUpdates = false;
|
||||||
savePath=${toJSON cfg.savePath}
|
copyAndCloseAfterUpload = cfg.copyAndCloseAfterUpload;
|
||||||
showDesktopNotification=${toJSON cfg.showDesktopNotification}
|
drawColor = cfg.drawColor;
|
||||||
showHelp=${toJSON cfg.showHelp}
|
drawThickness = cfg.drawThickness;
|
||||||
[Shortcuts]
|
filenamePattern = cfg.filenamePattern;
|
||||||
TYPE_COPY=Return
|
savePath = cfg.savePath;
|
||||||
'';
|
showDesktopNotification = cfg.showDesktopNotification;
|
||||||
|
showHelp = cfg.showHelp;
|
||||||
|
showSidePanelButton = cfg.showSidePanelButton;
|
||||||
|
showStartupLaunchMessage = cfg.showStartupLaunchMessage;
|
||||||
|
startupLaunch = false;
|
||||||
|
};
|
||||||
|
Shortcuts = {
|
||||||
|
TYPE_COPY = "Return";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in New Issue
Block a user