forked from Shinonome/dots-hyprland
ServicesConfig now edits hyprlock.conf to change the clock format (#1797)
This commit is contained in:
@@ -1,10 +1,4 @@
|
|||||||
$text_color = rgba(FFDAD6FF)
|
source=~/.config/hypr/hyprlock/colors.conf
|
||||||
$entry_background_color = rgba(41000311)
|
|
||||||
$entry_border_color = rgba(896E6C55)
|
|
||||||
$entry_color = rgba(FFDAD6FF)
|
|
||||||
$font_family = Rubik Light
|
|
||||||
$font_family_clock = Rubik Light
|
|
||||||
$font_material_symbols = Material Symbols Rounded
|
|
||||||
|
|
||||||
background {
|
background {
|
||||||
color = rgba(181818FF)
|
color = rgba(181818FF)
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# This configuration is generated by matugen
|
||||||
|
# Changing these variables with matugen still enabled will overwrite them.
|
||||||
|
|
||||||
|
$text_color = rgba(FFDAD6FF)
|
||||||
|
$entry_background_color = rgba(41000311)
|
||||||
|
$entry_border_color = rgba(896E6C55)
|
||||||
|
$entry_color = rgba(FFDAD6FF)
|
||||||
|
$font_family = Rubik Light
|
||||||
|
$font_family_clock = Rubik Light
|
||||||
|
$font_material_symbols = Material Symbols Rounded
|
||||||
@@ -10,8 +10,8 @@ input_path = '~/.config/matugen/templates/hyprland/colors.conf'
|
|||||||
output_path = '~/.config/hypr/hyprland/colors.conf'
|
output_path = '~/.config/hypr/hyprland/colors.conf'
|
||||||
|
|
||||||
[templates.hyprlock]
|
[templates.hyprlock]
|
||||||
input_path = '~/.config/matugen/templates/hyprland/hyprlock.conf'
|
input_path = '~/.config/matugen/templates/hyprland/hyprlock-colors.conf'
|
||||||
output_path = '~/.config/hypr/hyprlock.conf'
|
output_path = '~/.config/hypr/hyprlock/colors.conf'
|
||||||
|
|
||||||
[templates.fuzzel]
|
[templates.fuzzel]
|
||||||
input_path = '~/.config/matugen/templates/fuzzel/fuzzel_theme.ini'
|
input_path = '~/.config/matugen/templates/fuzzel/fuzzel_theme.ini'
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# This configuration is generated by matugen
|
||||||
|
# Changing these variables with matugen still enabled will overwrite them.
|
||||||
|
|
||||||
|
$text_color = rgba({{colors.primary_fixed.default.hex_stripped}}FF)
|
||||||
|
$entry_background_color = rgba({{colors.on_primary_fixed.default.hex_stripped}}11)
|
||||||
|
$entry_border_color = rgba({{colors.outline.default.hex_stripped}}55)
|
||||||
|
$entry_color = rgba({{colors.primary_fixed.default.hex_stripped}}FF)
|
||||||
|
$font_family = Rubik
|
||||||
|
$font_family_clock = Space Grotesk DemiBold
|
||||||
|
$font_material_symbols = Material Symbols Rounded
|
||||||
|
|
||||||
|
$background_image = {{image}}
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
$text_color = rgba({{colors.primary_fixed.default.hex_stripped}}FF)
|
|
||||||
$entry_background_color = rgba({{colors.on_primary_fixed.default.hex_stripped}}11)
|
|
||||||
$entry_border_color = rgba({{colors.outline.default.hex_stripped}}55)
|
|
||||||
$entry_color = rgba({{colors.primary_fixed.default.hex_stripped}}FF)
|
|
||||||
$font_family = Rubik
|
|
||||||
$font_family_clock = Space Grotesk DemiBold
|
|
||||||
$font_material_symbols = Material Symbols Rounded
|
|
||||||
|
|
||||||
background {
|
|
||||||
color = rgba(181818FF)
|
|
||||||
|
|
||||||
path = {{image}}
|
|
||||||
blur_size = 15
|
|
||||||
blur_passes = 4
|
|
||||||
brightness = 0.33
|
|
||||||
}
|
|
||||||
input-field {
|
|
||||||
monitor =
|
|
||||||
size = 250, 50
|
|
||||||
outline_thickness = 2
|
|
||||||
dots_size = 0.1
|
|
||||||
dots_spacing = 0.3
|
|
||||||
outer_color = $entry_border_color
|
|
||||||
inner_color = $entry_background_color
|
|
||||||
font_color = $entry_color
|
|
||||||
fade_on_empty = true
|
|
||||||
|
|
||||||
position = 0, 20
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
monitor =
|
|
||||||
text = $LAYOUT
|
|
||||||
color = $text_color
|
|
||||||
font_size = 14
|
|
||||||
font_family = $font_family
|
|
||||||
position = -30, 30
|
|
||||||
halign = right
|
|
||||||
valign = bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
label { # Caps Lock Warning
|
|
||||||
monitor =
|
|
||||||
text = cmd[update:250] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/check-capslock.sh
|
|
||||||
color = $text_color
|
|
||||||
font_size = 13
|
|
||||||
font_family = $font_family
|
|
||||||
position = 0, -25
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
label { # Clock
|
|
||||||
monitor =
|
|
||||||
text = $TIME
|
|
||||||
color = $text_color
|
|
||||||
font_size = 65
|
|
||||||
font_family = $font_family_clock
|
|
||||||
|
|
||||||
position = 0, 300
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
label { # Date
|
|
||||||
monitor =
|
|
||||||
text = cmd[update:5000] date +"%A, %B %d"
|
|
||||||
color = $text_color
|
|
||||||
font_size = 17
|
|
||||||
font_family = $font_family_clock
|
|
||||||
|
|
||||||
position = 0, 240
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
|
|
||||||
label { # User
|
|
||||||
monitor =
|
|
||||||
text = $USER
|
|
||||||
color = $text_color
|
|
||||||
outline_thickness = 2
|
|
||||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
|
||||||
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
|
|
||||||
dots_center = true
|
|
||||||
font_size = 20
|
|
||||||
font_family = $font_family
|
|
||||||
position = 0, 50
|
|
||||||
halign = center
|
|
||||||
valign = bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
label { # Status
|
|
||||||
monitor =
|
|
||||||
text = cmd[update:5000] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/status.sh
|
|
||||||
color = $text_color
|
|
||||||
font_size = 14
|
|
||||||
font_family = $font_family
|
|
||||||
|
|
||||||
position = 30, -30
|
|
||||||
halign = left
|
|
||||||
valign = top
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,9 @@ import QtQuick.Layouts
|
|||||||
import qs
|
import qs
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
|
import qs.modules.common.functions
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
|
import Quickshell
|
||||||
|
|
||||||
ContentPage {
|
ContentPage {
|
||||||
forceWidth: true
|
forceWidth: true
|
||||||
@@ -211,7 +213,14 @@ ContentPage {
|
|||||||
currentValue: Config.options.time.format
|
currentValue: Config.options.time.format
|
||||||
configOptionName: "time.format"
|
configOptionName: "time.format"
|
||||||
onSelected: newValue => {
|
onSelected: newValue => {
|
||||||
|
if (newValue === "hh:mm") {
|
||||||
|
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME12\\b/TIME/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
|
||||||
|
} else {
|
||||||
|
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME\\b/TIME12/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
|
||||||
|
}
|
||||||
|
|
||||||
Config.options.time.format = newValue;
|
Config.options.time.format = newValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user