forked from Shinonome/dots-hyprland
Feat: Add option to enforce dark mode for the terminal (#1945)
This commit is contained in:
@@ -95,6 +95,7 @@ Singleton {
|
|||||||
property real harmony: 0.8
|
property real harmony: 0.8
|
||||||
property real harmonizeThreshold: 100
|
property real harmonizeThreshold: 100
|
||||||
property real termFgBoost: 0.35
|
property real termFgBoost: 0.35
|
||||||
|
property bool forceDarkMode: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
property JsonObject palette: JsonObject {
|
property JsonObject palette: JsonObject {
|
||||||
|
|||||||
@@ -41,6 +41,20 @@ ContentPage {
|
|||||||
content: Translation.tr("Shell & utilities theming must also be enabled")
|
content: Translation.tr("Shell & utilities theming must also be enabled")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ConfigRow {
|
||||||
|
uniform: true
|
||||||
|
ConfigSwitch {
|
||||||
|
buttonIcon: "dark_mode"
|
||||||
|
text: Translation.tr("Force dark mode in terminal")
|
||||||
|
checked: Config.options.appearance.wallpaperTheming.terminalGenerationProps.forceDarkMode
|
||||||
|
onCheckedChanged: {
|
||||||
|
Config.options.appearance.wallpaperTheming.terminalGenerationProps.forceDarkMode= checked;
|
||||||
|
}
|
||||||
|
StyledToolTip {
|
||||||
|
content: Translation.tr("Ignored if terminal theming is not enabled")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ConfigSpinBox {
|
ConfigSpinBox {
|
||||||
icon: "invert_colors"
|
icon: "invert_colors"
|
||||||
|
|||||||
@@ -264,7 +264,15 @@ switch() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -n "$mode_flag" ]] && matugen_args+=(--mode "$mode_flag") && generate_colors_material_args+=(--mode "$mode_flag")
|
# enforce dark mode for terminal
|
||||||
|
if [[ -n "$mode_flag" ]]; then
|
||||||
|
matugen_args+=(--mode "$mode_flag")
|
||||||
|
if [[ $(jq -r '.appearance.wallpaperTheming.terminalGenerationProps.forceDarkMode' "$SHELL_CONFIG_FILE") == "true" ]]; then
|
||||||
|
generate_colors_material_args+=(--mode "dark")
|
||||||
|
else
|
||||||
|
generate_colors_material_args+=(--mode "$mode_flag")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
[[ -n "$type_flag" ]] && matugen_args+=(--type "$type_flag") && generate_colors_material_args+=(--scheme "$type_flag")
|
[[ -n "$type_flag" ]] && matugen_args+=(--type "$type_flag") && generate_colors_material_args+=(--scheme "$type_flag")
|
||||||
generate_colors_material_args+=(--termscheme "$terminalscheme" --blend_bg_fg)
|
generate_colors_material_args+=(--termscheme "$terminalscheme" --blend_bg_fg)
|
||||||
generate_colors_material_args+=(--cache "$STATE_DIR/user/generated/color.txt")
|
generate_colors_material_args+=(--cache "$STATE_DIR/user/generated/color.txt")
|
||||||
|
|||||||
@@ -238,11 +238,13 @@
|
|||||||
"Privacy Policy": "Privacy Policy",
|
"Privacy Policy": "Privacy Policy",
|
||||||
"Documentation": "Documentation",
|
"Documentation": "Documentation",
|
||||||
"Shell & utilities theming must also be enabled": "Shell & utilities theming must also be enabled",
|
"Shell & utilities theming must also be enabled": "Shell & utilities theming must also be enabled",
|
||||||
|
"Ignored if terminal theming is not enabled": "Ignored if terminal theming is not enabled",
|
||||||
"illogical-impulse": "illogical-impulse",
|
"illogical-impulse": "illogical-impulse",
|
||||||
"Donate": "Donate",
|
"Donate": "Donate",
|
||||||
"Terminal": "Terminal",
|
"Terminal": "Terminal",
|
||||||
"Shell & utilities": "Shell & utilities",
|
"Shell & utilities": "Shell & utilities",
|
||||||
"Qt apps": "Qt apps",
|
"Qt apps": "Qt apps",
|
||||||
|
"Force dark mode in terminal": "Force dark mode in terminal",
|
||||||
"Report a Bug": "Report a Bug",
|
"Report a Bug": "Report a Bug",
|
||||||
"Issues": "Issues",
|
"Issues": "Issues",
|
||||||
"Drag or click a region • LMB: Copy • RMB: Edit": "Drag or click a region • LMB: Copy • RMB: Edit",
|
"Drag or click a region • LMB: Copy • RMB: Edit": "Drag or click a region • LMB: Copy • RMB: Edit",
|
||||||
|
|||||||
@@ -254,11 +254,13 @@
|
|||||||
"Privacy Policy": "隐私政策",
|
"Privacy Policy": "隐私政策",
|
||||||
"Documentation": "文档",
|
"Documentation": "文档",
|
||||||
"Shell & utilities theming must also be enabled": "必须同时启用 Shell 与工具主题",
|
"Shell & utilities theming must also be enabled": "必须同时启用 Shell 与工具主题",
|
||||||
|
"Ignored if terminal theming is not enabled": "终端主题未启用时不生效",
|
||||||
"illogical-impulse": "illogical-impulse",
|
"illogical-impulse": "illogical-impulse",
|
||||||
"Donate": "捐助",
|
"Donate": "捐助",
|
||||||
"Terminal": "终端",
|
"Terminal": "终端",
|
||||||
"Shell & utilities": "Shell 与工具",
|
"Shell & utilities": "Shell 与工具",
|
||||||
"Qt apps": "Qt 应用",
|
"Qt apps": "Qt 应用",
|
||||||
|
"Force dark mode in terminal": "终端强制使用深色模式",
|
||||||
"Report a Bug": "报告问题",
|
"Report a Bug": "报告问题",
|
||||||
"Issues": "问题追踪",
|
"Issues": "问题追踪",
|
||||||
"Drag or click a region • LMB: Copy • RMB: Edit": "拖动或点击一个区域 • 鼠标左键:复制 • 鼠标右键:编辑",
|
"Drag or click a region • LMB: Copy • RMB: Edit": "拖动或点击一个区域 • 鼠标左键:复制 • 鼠标右键:编辑",
|
||||||
|
|||||||
Reference in New Issue
Block a user