3 Commits

Author SHA1 Message Date
kenji 6f884ad114 add(binds): jellyfin 2026-01-05 22:02:08 -06:00
kenji 1f3c44afb7 add(hyprlock): now use 50 languages 2026-01-05 22:02:01 -06:00
kenji 7bc837aeaf fix(monitors): color and vrr are borked 2026-01-05 22:01:35 -06:00
6 changed files with 111 additions and 26 deletions
+10
View File
@@ -13,14 +13,18 @@
"SUPER, W, Open Browser, exec, uwsm app -- firefox" "SUPER, W, Open Browser, exec, uwsm app -- firefox"
"SUPER, Y, Toggle YouTube, togglespecialworkspace, youtube" "SUPER, Y, Toggle YouTube, togglespecialworkspace, youtube"
"SUPER SHIFT, Y, Move to YouTube Special Workspace, movetoworkspace, special:youtube" "SUPER SHIFT, Y, Move to YouTube Special Workspace, movetoworkspace, special:youtube"
"SUPER, I, Toggle Jellyfin, togglespecialworkspace, jellyfin"
"SUPER SHIFT, I, Move to Jellyfin Special Workspace, movetoworkspace, special:jellyfin"
]; ];
workspace = [ workspace = [
"special:youtube, on-created-empty:uwsm app -- firefox -P YouTube --name youtube" "special:youtube, on-created-empty:uwsm app -- firefox -P YouTube --name youtube"
"special:jellyfin, on-created-empty:uwsm app -- firefox -P Jellyfin --name jellyfin"
]; ];
windowrulev2 = [ windowrulev2 = [
"workspace special:youtube, class:^(youtube)$" "workspace special:youtube, class:^(youtube)$"
"workspace special:jellyfin, class:^(jellyfin)$"
]; ];
}; };
imports = [ imports = [
@@ -58,6 +62,12 @@
name = "YouTube"; name = "YouTube";
url = "https://youtube.com"; url = "https://youtube.com";
}; };
jellyfin = import ./profiles/web-app.nix {
inherit pkgs myConfig;
id = 2;
name = "Jellyfin";
url = "https://watch.sakamoto.dev";
};
hakase = { hakase = {
search.force = true; search.force = true;
isDefault = true; isDefault = true;
+1 -1
View File
@@ -10,7 +10,7 @@
general = { general = {
after_sleep_cmd = "hyprctl dispatch dpms on"; after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false; ignore_dbus_inhibit = false;
lock_cmd = "hyprlock"; lock_cmd = "hakase-hyprlock";
before_sleep_cmd = "loginctl lock-session"; # lock before suspend before_sleep_cmd = "loginctl lock-session"; # lock before suspend
}; };
+27 -15
View File
@@ -6,16 +6,40 @@
}: let }: let
cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper"; cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper";
clockFont = myConfig.font.monospace; 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 { in {
imports = [ imports = [
./scripts/typewriter.nix ./scripts/typewriter.nix
./scripts/random-text.nix ./scripts/random-text.nix
]; ];
home.packages = [hakase-hyprlock];
programs.hyprlock = { programs.hyprlock = {
# FIXME: `greeting` has as inconsistency in pos for different monitors
enable = true; enable = true;
extraConfig = '' extraConfig = ''
source = ~/.config/hypr/hyprlock-colors.conf source = ~/.config/hypr/hyprlock-colors.conf
source = ${greetingConf}
general { general {
hide_cursor = true hide_cursor = true
@@ -32,18 +56,6 @@ in {
vibrancy = 0.2 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) # Hours (top)
label { label {
monitor = monitor =
@@ -71,10 +83,10 @@ in {
# Date # Date
label { label {
monitor = 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 color = $on_surface_variant
font_size = 18 font_size = 18
font_family = ${clockFont} font_family = ${clockFont} Italic
position = 0, -320 position = 0, -320
halign = center halign = center
valign = center valign = center
+69 -8
View File
@@ -1,16 +1,77 @@
{pkgs, ...}: let {pkgs, ...}: let
hakase-hyprlock-text-generator = pkgs.writeShellScriptBin "hakase-hyprlock-text-generator" '' hakase-hyprlock-text-generator = pkgs.writeShellScriptBin "hakase-hyprlock-text-generator" ''
hour=$(date +%H) cache_file="''${XDG_RUNTIME_DIR:-/tmp}/hyprlock_greeting"
name="$USER" pid_file="''${XDG_RUNTIME_DIR:-/tmp}/hyprlock_greeting_pid"
if [[ $hour -lt 12 ]]; then current_pid=$(pgrep -x hyprlock | head -1)
greeting=""
elif [[ $hour -lt 18 ]]; then # Pick new greeting only when hyprlock restarts
greeting="" if [[ -f $pid_file && -f $cache_file ]]; then
else old_pid=$(cat "$pid_file")
greeting="" if [[ "$old_pid" == "$current_pid" ]]; then
cat "$cache_file"
exit 0
fi
fi fi
greetings=(
"Hello"
"Hola"
"Bonjour"
"Hallo"
"Ciao"
"Olá"
"Привет"
""
""
""
"مرحبا"
"שלום"
""
""
"Γειά σου"
"Merhaba"
"Xin chào"
"Cześć"
"Hej"
"Ahoj"
"Szia"
"Salut"
"Привіт"
""
""
"Jambo"
"Aloha"
"Sawubona"
"Habari"
"Hei"
"Hallå"
"Hei"
"Kamusta"
"Salam"
"Selamat"
"Saluton"
"Tere"
"Sveiki"
"Labas"
"Здраво"
"Здравей"
"Bok"
"Përshëndetje"
"Բdelays"
""
"Сайн уу"
""
""
""
""
)
idx=$((RANDOM % ''${#greetings[@]}))
greeting="''${greetings[$idx]}"
echo "$current_pid" > "$pid_file"
echo "$greeting" > "$cache_file"
echo "$greeting" echo "$greeting"
''; '';
in { in {
+1 -1
View File
@@ -37,7 +37,7 @@
echo "''${text:0:$letter}_" echo "''${text:0:$letter}_"
else else
# Toggle every 4 calls (at 200ms update = ~800ms blink) # Toggle every 4 calls (at 200ms update = ~800ms blink)
if (((blink / 20) % 2 == 0)); then if (((blink / 4) % 2 == 0)); then
echo "''${text}_" echo "''${text}_"
else else
echo "''${text}<span alpha=\"1%\">_</span>" echo "''${text}<span alpha=\"1%\">_</span>"
+3 -1
View File
@@ -3,6 +3,7 @@
myConfig = { myConfig = {
font = { font = {
monospace = "MonoLisa"; monospace = "MonoLisa";
monospaceScript = "MonoLisa Italic @ss02=1";
sans = "Sans"; sans = "Sans";
}; };
nixos = { nixos = {
@@ -23,7 +24,7 @@
}; };
hyprland = { hyprland = {
monitors = [ monitors = [
"DP-1,highres@180,0x1080,1,bitdepth,10,cm,hdr,sdrbrightness,1.4,sdrsaturation,0.98,vrr,0" "DP-1,highres@165,0x1080,1,vrr,0"
"DP-2, highres@165,760x0,1" "DP-2, highres@165,760x0,1"
"HDMI-A-1, highres@highrr@120, 3440x1440, 1.6" "HDMI-A-1, highres@highrr@120, 3440x1440, 1.6"
]; ];
@@ -59,6 +60,7 @@
myConfig = { myConfig = {
font = { font = {
monospace = "MonoLisa"; monospace = "MonoLisa";
monospaceScript = "MonoLisa Italic @ss02=1";
sans = "Sans"; sans = "Sans";
}; };
nixos = { nixos = {