feat: give yolo a distinct amber cursor
yolo's desktop is only ever seen through a Moonlight window, so its cursor needs to be tellable apart from the client's at a glance. Bibata-Modern-Amber differs in both colour and silhouette from Nordzy. Threads the theme through an option rather than setting it in one place: it was hardcoded in cursor.nix, in hl.env, in the setcursor autostart, and twice more in darkman's mode scripts, which re-set it on every light/dark switch and would have reverted the override. Also drops a stale hl.env pointing HYPRCURSOR_THEME at rose-pine-hyprcursor, which no host installs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.custom.hyprland) cursorTheme cursorSize;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
dconf
|
dconf
|
||||||
@@ -15,14 +18,14 @@
|
|||||||
'';
|
'';
|
||||||
cursor-theme = ''
|
cursor-theme = ''
|
||||||
${pkgs.dconf}/bin/dconf write \
|
${pkgs.dconf}/bin/dconf write \
|
||||||
/org/gnome/desktop/interface/cursor-theme "'Nordzy-cursors'"
|
/org/gnome/desktop/interface/cursor-theme "'${cursorTheme.dark}'"
|
||||||
|
|
||||||
# Set environment variables for current session
|
# Set environment variables for current session
|
||||||
export HYPRCURSOR_THEME="Nordzy-cursors"
|
export HYPRCURSOR_THEME="${cursorTheme.dark}"
|
||||||
export XCURSOR_THEME="Nordzy-cursors"
|
export XCURSOR_THEME="${cursorTheme.dark}"
|
||||||
|
|
||||||
# Update Hyprland cursor theme
|
# Update Hyprland cursor theme
|
||||||
${pkgs.hyprland}/bin/hyprctl setcursor Nordzy-cursors 24
|
${pkgs.hyprland}/bin/hyprctl setcursor ${cursorTheme.dark} ${toString cursorSize}
|
||||||
'';
|
'';
|
||||||
noctalia-theme = ''
|
noctalia-theme = ''
|
||||||
noctalia msg theme-mode-set dark
|
noctalia msg theme-mode-set dark
|
||||||
@@ -37,14 +40,14 @@
|
|||||||
'';
|
'';
|
||||||
cursor-theme = ''
|
cursor-theme = ''
|
||||||
${pkgs.dconf}/bin/dconf write \
|
${pkgs.dconf}/bin/dconf write \
|
||||||
/org/gnome/desktop/interface/cursor-theme "'Nordzy-white'"
|
/org/gnome/desktop/interface/cursor-theme "'${cursorTheme.light}'"
|
||||||
|
|
||||||
# Set environment variables for current session
|
# Set environment variables for current session
|
||||||
export HYPRCURSOR_THEME="Nordzy-white"
|
export HYPRCURSOR_THEME="${cursorTheme.light}"
|
||||||
export XCURSOR_THEME="Nordzy-white"
|
export XCURSOR_THEME="${cursorTheme.light}"
|
||||||
|
|
||||||
# Update Hyprland cursor theme
|
# Update Hyprland cursor theme
|
||||||
${pkgs.hyprland}/bin/hyprctl setcursor Nordzy-white 24
|
${pkgs.hyprland}/bin/hyprctl setcursor ${cursorTheme.light} ${toString cursorSize}
|
||||||
'';
|
'';
|
||||||
noctalia-theme = ''
|
noctalia-theme = ''
|
||||||
noctalia msg theme-mode-set light
|
noctalia msg theme-mode-set light
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
|
cfg = config.custom.hyprland;
|
||||||
nordzy-cursors = pkgs.callPackage ../../../../pkgs/nordzy-cursors/package.nix { };
|
nordzy-cursors = pkgs.callPackage ../../../../pkgs/nordzy-cursors/package.nix { };
|
||||||
cursorSize = config.custom.hyprland.cursorSize;
|
cursorPackage = if cfg.cursorPackage != null then cfg.cursorPackage else nordzy-cursors;
|
||||||
|
cursorSize = cfg.cursorSize;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [
|
home.packages = [
|
||||||
nordzy-cursors
|
cursorPackage
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
HYPRCURSOR_THEME = "Nordzy-cursors"; # Dark variant (default)
|
HYPRCURSOR_THEME = cfg.cursorTheme.dark;
|
||||||
HYPRCURSOR_SIZE = cursorSize;
|
HYPRCURSOR_SIZE = cursorSize;
|
||||||
XCURSOR_THEME = "Nordzy-cursors";
|
XCURSOR_THEME = cfg.cursorTheme.dark;
|
||||||
XCURSOR_SIZE = cursorSize;
|
XCURSOR_SIZE = cursorSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,26 @@ in
|
|||||||
default = 24;
|
default = 24;
|
||||||
description = "Cursor size for XCURSOR_SIZE and HYPRCURSOR_SIZE";
|
description = "Cursor size for XCURSOR_SIZE and HYPRCURSOR_SIZE";
|
||||||
};
|
};
|
||||||
|
cursorPackage = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.package;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Package providing cursorTheme.dark/light under share/icons. null uses
|
||||||
|
the nordzy-cursors package built in ./cursor.nix.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
cursorTheme = {
|
||||||
|
dark = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "Nordzy-cursors";
|
||||||
|
description = "Cursor theme darkman selects in dark mode.";
|
||||||
|
};
|
||||||
|
light = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "Nordzy-white";
|
||||||
|
description = "Cursor theme darkman selects in light mode.";
|
||||||
|
};
|
||||||
|
};
|
||||||
shareOutput = lib.mkOption {
|
shareOutput = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
default = null;
|
default = null;
|
||||||
@@ -204,7 +224,7 @@ in
|
|||||||
-- environment
|
-- environment
|
||||||
hl.env("GDK_SCALE", "2.0")
|
hl.env("GDK_SCALE", "2.0")
|
||||||
hl.env("XCURSOR_SIZE", "${toString cfg.cursorSize}")
|
hl.env("XCURSOR_SIZE", "${toString cfg.cursorSize}")
|
||||||
hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor")
|
hl.env("HYPRCURSOR_THEME", "${cfg.cursorTheme.dark}")
|
||||||
hl.env("HYPRCURSOR_SIZE", "${toString cfg.cursorSize}")
|
hl.env("HYPRCURSOR_SIZE", "${toString cfg.cursorSize}")
|
||||||
-- Route Qt6 apps (incl. the xdph screen-share picker) through qt6ct so
|
-- Route Qt6 apps (incl. the xdph screen-share picker) through qt6ct so
|
||||||
-- the noctalia-generated color scheme actually applies. Without this
|
-- the noctalia-generated color scheme actually applies. Without this
|
||||||
@@ -216,7 +236,7 @@ in
|
|||||||
-- Import the Qt theme var too, so the dbus/systemd-activated
|
-- Import the Qt theme var too, so the dbus/systemd-activated
|
||||||
-- xdg-desktop-portal-hyprland (and its share-picker) inherit it.
|
-- xdg-desktop-portal-hyprland (and its share-picker) inherit it.
|
||||||
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME")
|
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME")
|
||||||
hl.exec_cmd("hyprctl setcursor Nordzy-cursors ${toString cfg.cursorSize}")
|
hl.exec_cmd("hyprctl setcursor ${cfg.cursorTheme.dark} ${toString cfg.cursorSize}")
|
||||||
hl.exec_cmd("hyprsunset")
|
hl.exec_cmd("hyprsunset")
|
||||||
hl.exec_cmd("noctalia")
|
hl.exec_cmd("noctalia")
|
||||||
-- kdeconnectd is only DBus-activated; nothing starts it at login,
|
-- kdeconnectd is only DBus-activated; nothing starts it at login,
|
||||||
|
|||||||
@@ -31,6 +31,15 @@ in
|
|||||||
|
|
||||||
custom.hyprland.cursorSize = 32;
|
custom.hyprland.cursorSize = 32;
|
||||||
|
|
||||||
|
# Amber, and a different silhouette to Nordzy — this desktop is only ever seen
|
||||||
|
# inside a Moonlight window, so the cursor has to be tellable at a glance from
|
||||||
|
# the client's own. Same theme in both modes; darkman would otherwise swap it.
|
||||||
|
custom.hyprland.cursorPackage = pkgs.bibata-cursors;
|
||||||
|
custom.hyprland.cursorTheme = {
|
||||||
|
dark = "Bibata-Modern-Amber";
|
||||||
|
light = "Bibata-Modern-Amber";
|
||||||
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
# Headless browser driver the agent tooling shells out to. Was a global npm
|
# Headless browser driver the agent tooling shells out to. Was a global npm
|
||||||
# install on the ubuntu box.
|
# install on the ubuntu box.
|
||||||
|
|||||||
Reference in New Issue
Block a user