add(hyprlock): now use 50 languages
This commit is contained in:
+27
-15
@@ -6,16 +6,40 @@
|
||||
}: let
|
||||
cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper";
|
||||
clockFont = myConfig.font.monospace;
|
||||
scriptFont = myConfig.font.monospaceScript;
|
||||
greetingConf = "${config.home.homeDirectory}/.cache/hyprlock-greeting.conf";
|
||||
|
||||
hakase-hyprlock = pkgs.writeShellScriptBin "hakase-hyprlock" ''
|
||||
# Get focused monitor
|
||||
monitor=$(hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name')
|
||||
|
||||
# Generate greeting label config
|
||||
cat > ${greetingConf} << EOF
|
||||
label {
|
||||
monitor = $monitor
|
||||
text = cmd[update:200] hakase-hyprlock-typewriter "\$(hakase-hyprlock-text-generator)"
|
||||
color = \$on_surface_variant
|
||||
font_size = 120
|
||||
font_family = ${clockFont} Bold
|
||||
position = 0, 480
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
EOF
|
||||
|
||||
exec hyprlock "$@"
|
||||
'';
|
||||
in {
|
||||
imports = [
|
||||
./scripts/typewriter.nix
|
||||
./scripts/random-text.nix
|
||||
];
|
||||
home.packages = [hakase-hyprlock];
|
||||
programs.hyprlock = {
|
||||
# FIXME: `greeting` has as inconsistency in pos for different monitors
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
source = ~/.config/hypr/hyprlock-colors.conf
|
||||
source = ${greetingConf}
|
||||
|
||||
general {
|
||||
hide_cursor = true
|
||||
@@ -32,18 +56,6 @@ in {
|
||||
vibrancy = 0.2
|
||||
}
|
||||
|
||||
# Greeting (above clock)
|
||||
label {
|
||||
monitor = DP-1
|
||||
text = cmd[update:1000] hakase-hyprlock-text-generator
|
||||
color = $on_surface_variant
|
||||
font_size = 120
|
||||
font_family = ${clockFont} Bold
|
||||
position = 0, 480
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# Hours (top)
|
||||
label {
|
||||
monitor =
|
||||
@@ -71,10 +83,10 @@ in {
|
||||
# Date
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:60000] date '+%A, %B %d'
|
||||
text = cmd[update:60000] echo "<span font_features='ss02'>$(date '+%A, %B %d')</span>"
|
||||
color = $on_surface_variant
|
||||
font_size = 18
|
||||
font_family = ${clockFont}
|
||||
font_family = ${clockFont} Italic
|
||||
position = 0, -320
|
||||
halign = center
|
||||
valign = center
|
||||
|
||||
Reference in New Issue
Block a user