Skip to content

feat(cursors): Cursor launch feedback #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 60 additions & 2 deletions modules/workspace.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ let
example = 24;
description = "The size of the cursor. See the System Settings app for allowed sizes for each cursor theme.";
};
cursorFeedback = lib.mkOption {
type = nullOr str;
default = null;
example = "Bouncing";
description = ''
The cursor feedback icon after launching an application. Valid options are Bouncing, Blinking, Static, and None.
'';
};
taskManagerFeedback = lib.mkOption {
type = nullOr bool;
default = null;
example = true;
description = "The feedback wheel on an application icon after launching an application from the task manager.";
};
animationTime = lib.mkOption {
type = nullOr ints.positive;
default = null;
example = 5;
description = "The duration that the cursorFeedback and taskManagerFeedback run for.";
};
};
};

Expand Down Expand Up @@ -99,7 +119,7 @@ in
default = null;
example = false;
description = ''
Whether clicking the middle mouse button pastes the clipboard content.";
Whether clicking the middle mouse button pastes the clipboard content.
'';
};

Expand Down Expand Up @@ -136,9 +156,12 @@ in
example = {
theme = "Breeze_Snow";
size = 24;
cursorFeedback = "Bouncing";
taskManagerFeedback = true;
animationTime = 5;
};
description = ''
Submodule for configuring the cursor appearance. Both the theme and size are configurable.
Submodule for configuring the cursor appearance. The theme, size, cursor feedback, task manager feedback, and animation time are configurable.
'';
};

Expand Down Expand Up @@ -354,6 +377,41 @@ in
Mouse.cursorSize = cfg.workspace.cursor.size;
}
);
klaunchrc = lib.mkMerge [
(lib.mkIf (cfg.workspace.cursor != null && cfg.workspace.cursor.cursorFeedback != null) (
{
"None" = {
BusyCursorSettings.Blinking = "false";
BusyCursorSettings.Bouncing = "false";
FeedbackStyle.BusyCursor = "false";
};
"Static" = {
BusyCursorSettings.Blinking = "false";
BusyCursorSettings.Bouncing = "false";
FeedbackStyle.BusyCursor = "true";
};
"Blinking" = {
BusyCursorSettings.Blinking = "true";
BusyCursorSettings.Bouncing = "false";
FeedbackStyle.BusyCursor = "true";
};
"Bouncing" = {
BusyCursorSettings.Blinking = "false";
BusyCursorSettings.Bouncing = "true";
FeedbackStyle.BusyCursor = "true";
};
}.${cfg.workspace.cursor.cursorFeedback}
))

(lib.mkIf (cfg.workspace.cursor != null && cfg.workspace.cursor.taskManagerFeedback != null) {
FeedbackStyle.TaskbarButton = cfg.workspace.cursor.taskManagerFeedback;
})

(lib.mkIf (cfg.workspace.cursor != null && cfg.workspace.cursor.animationTime != null) {
BusyCursorSettings.Timeout = cfg.workspace.cursor.animationTime;
TaskbarButtonSettings.Timeout = cfg.workspace.cursor.animationTime;
})
];
ksplashrc.KSplash = (
lib.mkIf (cfg.workspace.splashScreen.theme != null) {
Engine = (
Expand Down