Added the hyprsunset module (requires hyprland v0.45.0) (#485)

* add sunset module

* Implement hyprsunset module.

* Update themes

* Undo vivids

* Fix vivids
This commit is contained in:
Jas Singh
2024-11-12 03:35:27 -08:00
committed by GitHub
parent a7855baf13
commit 6cab0ff4b7
51 changed files with 1546 additions and 1086 deletions

View File

@@ -36,7 +36,7 @@ export const runAsyncCommand: RunAsyncCommand = (cmd, events, fn, postInputUpdat
.catch((err) => console.error(`Error running command "${cmd}": ${err})`));
};
export function throttle<T extends ThrottleFn>(func: T, limit: number): T {
export function throttleInput<T extends ThrottleFn>(func: T, limit: number): T {
let inThrottle: boolean;
return function (this: ThisParameterType<T>, ...args: Parameters<T>) {
if (!inThrottle) {
@@ -50,9 +50,12 @@ export function throttle<T extends ThrottleFn>(func: T, limit: number): T {
}
export const throttledScrollHandler = (interval: number): ThrottleFn =>
throttle((cmd: string, events: EventArgs, fn: ThrottleFnCallback, postInputUpdater?: VariableType<boolean>) => {
runAsyncCommand(cmd, events, fn, postInputUpdater);
}, 200 / interval);
throttleInput(
(cmd: string, events: EventArgs, fn: ThrottleFnCallback, postInputUpdater?: VariableType<boolean>) => {
runAsyncCommand(cmd, events, fn, postInputUpdater);
},
200 / interval,
);
const dummyVar = Variable('');