mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
ags: add config option for gtk anim duration
This commit is contained in:
parent
132bc97c83
commit
f5885e444c
26 changed files with 60 additions and 87 deletions
|
|
@ -86,7 +86,7 @@ export const ConfigSegmentedSelection = ({
|
||||||
const selectedIcon = Revealer({
|
const selectedIcon = Revealer({
|
||||||
revealChild: id == initIndex,
|
revealChild: id == initIndex,
|
||||||
transition: 'slide_right',
|
transition: 'slide_right',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
child: MaterialIcon('check', 'norm')
|
child: MaterialIcon('check', 'norm')
|
||||||
});
|
});
|
||||||
return Button({
|
return Button({
|
||||||
|
|
|
||||||
|
|
@ -79,10 +79,10 @@ export default ({
|
||||||
const destroyWithAnims = () => {
|
const destroyWithAnims = () => {
|
||||||
widget.sensitive = false;
|
widget.sensitive = false;
|
||||||
notificationBox.setCss(middleClickClose);
|
notificationBox.setCss(middleClickClose);
|
||||||
Utils.timeout(200, () => {
|
Utils.timeout(userOptions.animations.durationSmall, () => {
|
||||||
if (wholeThing) wholeThing.revealChild = false;
|
if (wholeThing) wholeThing.revealChild = false;
|
||||||
}, wholeThing);
|
}, wholeThing);
|
||||||
Utils.timeout(400, () => {
|
Utils.timeout(userOptions.animations.durationSmall * 2, () => {
|
||||||
command();
|
command();
|
||||||
if (wholeThing) {
|
if (wholeThing) {
|
||||||
wholeThing.destroy();
|
wholeThing.destroy();
|
||||||
|
|
@ -135,7 +135,7 @@ export default ({
|
||||||
},
|
},
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Box({ // Box to make sure css-based spacing works
|
child: Box({ // Box to make sure css-based spacing works
|
||||||
homogeneous: true,
|
homogeneous: true,
|
||||||
}),
|
}),
|
||||||
|
|
@ -144,7 +144,7 @@ export default ({
|
||||||
const display = Gdk.Display.get_default();
|
const display = Gdk.Display.get_default();
|
||||||
const notifTextPreview = Revealer({
|
const notifTextPreview = Revealer({
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 120,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
child: Label({
|
child: Label({
|
||||||
xalign: 0,
|
xalign: 0,
|
||||||
|
|
@ -159,7 +159,7 @@ export default ({
|
||||||
});
|
});
|
||||||
const notifTextExpanded = Revealer({
|
const notifTextExpanded = Revealer({
|
||||||
transition: 'slide_up',
|
transition: 'slide_up',
|
||||||
transitionDuration: 120,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
child: Box({
|
child: Box({
|
||||||
vertical: true,
|
vertical: true,
|
||||||
|
|
@ -305,17 +305,17 @@ export default ({
|
||||||
const maxOffset = 10.227;
|
const maxOffset = 10.227;
|
||||||
const endMargin = 20.455;
|
const endMargin = 20.455;
|
||||||
const disappearHeight = 6.818;
|
const disappearHeight = 6.818;
|
||||||
const leftAnim1 = `transition: 200ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
const leftAnim1 = `transition: ${userOptions.animations.durationSmall}ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
||||||
margin-left: -${Number(maxOffset + endMargin)}rem;
|
margin-left: -${Number(maxOffset + endMargin)}rem;
|
||||||
margin-right: ${Number(maxOffset + endMargin)}rem;
|
margin-right: ${Number(maxOffset + endMargin)}rem;
|
||||||
opacity: 0;`;
|
opacity: 0;`;
|
||||||
|
|
||||||
const rightAnim1 = `transition: 200ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
const rightAnim1 = `transition: ${userOptions.animations.durationSmall}ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
||||||
margin-left: ${Number(maxOffset + endMargin)}rem;
|
margin-left: ${Number(maxOffset + endMargin)}rem;
|
||||||
margin-right: -${Number(maxOffset + endMargin)}rem;
|
margin-right: -${Number(maxOffset + endMargin)}rem;
|
||||||
opacity: 0;`;
|
opacity: 0;`;
|
||||||
|
|
||||||
const middleClickClose = `transition: 200ms cubic-bezier(0.85, 0, 0.15, 1);
|
const middleClickClose = `transition: ${userOptions.animations.durationSmall}ms cubic-bezier(0.85, 0, 0.15, 1);
|
||||||
margin-left: ${Number(maxOffset + endMargin)}rem;
|
margin-left: ${Number(maxOffset + endMargin)}rem;
|
||||||
margin-right: -${Number(maxOffset + endMargin)}rem;
|
margin-right: -${Number(maxOffset + endMargin)}rem;
|
||||||
opacity: 0;`;
|
opacity: 0;`;
|
||||||
|
|
@ -400,10 +400,10 @@ export default ({
|
||||||
self.setCss(leftAnim1);
|
self.setCss(leftAnim1);
|
||||||
widget.sensitive = false;
|
widget.sensitive = false;
|
||||||
}
|
}
|
||||||
Utils.timeout(200, () => {
|
Utils.timeout(userOptions.animations.durationSmall, () => {
|
||||||
if (wholeThing) wholeThing.revealChild = false;
|
if (wholeThing) wholeThing.revealChild = false;
|
||||||
}, wholeThing);
|
}, wholeThing);
|
||||||
Utils.timeout(400, () => {
|
Utils.timeout(userOptions.animations.durationSmall * 2, () => {
|
||||||
command();
|
command();
|
||||||
if (wholeThing) {
|
if (wholeThing) {
|
||||||
wholeThing.destroy();
|
wholeThing.destroy();
|
||||||
|
|
@ -432,7 +432,7 @@ export default ({
|
||||||
if (isPopup) Utils.timeout(popupTimeout, () => {
|
if (isPopup) Utils.timeout(popupTimeout, () => {
|
||||||
if (wholeThing) {
|
if (wholeThing) {
|
||||||
wholeThing.revealChild = false;
|
wholeThing.revealChild = false;
|
||||||
Utils.timeout(200, () => {
|
Utils.timeout(userOptions.animations.durationSmall, () => {
|
||||||
if (wholeThing) {
|
if (wholeThing) {
|
||||||
wholeThing.destroy();
|
wholeThing.destroy();
|
||||||
wholeThing = null;
|
wholeThing = null;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ export const Bar = async (monitor = 0) => {
|
||||||
child: Widget.Stack({
|
child: Widget.Stack({
|
||||||
homogeneous: false,
|
homogeneous: false,
|
||||||
transition: 'slide_up_down',
|
transition: 'slide_up_down',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
children: {
|
children: {
|
||||||
'normal': normalBarContent,
|
'normal': normalBarContent,
|
||||||
'focus': focusedBarContent,
|
'focus': focusedBarContent,
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ export default () => {
|
||||||
Revealer({
|
Revealer({
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
transition: 'slide_left',
|
transition: 'slide_left',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Box({
|
child: Box({
|
||||||
className: 'spacing-h-10 margin-left-10',
|
className: 'spacing-h-10 margin-left-10',
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ const BarBattery = () => Box({
|
||||||
className: 'spacing-h-4 txt-onSurfaceVariant',
|
className: 'spacing-h-4 txt-onSurfaceVariant',
|
||||||
children: [
|
children: [
|
||||||
Revealer({
|
Revealer({
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_right',
|
transition: 'slide_right',
|
||||||
child: MaterialIcon('bolt', 'norm', { tooltipText: "Charging" }),
|
child: MaterialIcon('bolt', 'norm', { tooltipText: "Charging" }),
|
||||||
|
|
@ -133,7 +133,7 @@ const BarGroup = ({ child }) => Widget.Box({
|
||||||
});
|
});
|
||||||
const BatteryModule = () => Stack({
|
const BatteryModule = () => Stack({
|
||||||
transition: 'slide_up_down',
|
transition: 'slide_up_down',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
children: {
|
children: {
|
||||||
'laptop': Box({
|
'laptop': Box({
|
||||||
className: 'spacing-h-4', children: [
|
className: 'spacing-h-4', children: [
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js';
|
||||||
const { Box, Icon, Button, Revealer } = Widget;
|
const { Box, Icon, Button, Revealer } = Widget;
|
||||||
const { Gravity } = imports.gi.Gdk;
|
const { Gravity } = imports.gi.Gdk;
|
||||||
|
|
||||||
const revealerDuration = 200;
|
|
||||||
|
|
||||||
const SysTrayItem = (item) => Button({
|
const SysTrayItem = (item) => Button({
|
||||||
className: 'bar-systray-item',
|
className: 'bar-systray-item',
|
||||||
child: Icon({
|
child: Icon({
|
||||||
|
|
@ -32,7 +30,7 @@ export const Tray = (props = {}) => {
|
||||||
const trayRevealer = Widget.Revealer({
|
const trayRevealer = Widget.Revealer({
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
transition: 'slide_left',
|
transition: 'slide_left',
|
||||||
transitionDuration: revealerDuration,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: trayContent,
|
child: trayContent,
|
||||||
});
|
});
|
||||||
return Box({
|
return Box({
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ const ResourceValue = (name, icon, interval, valueUpdateCmd, displayFunc, props
|
||||||
children: [
|
children: [
|
||||||
Revealer({
|
Revealer({
|
||||||
transition: 'slide_left',
|
transition: 'slide_left',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Box({
|
child: Box({
|
||||||
vpack: 'center',
|
vpack: 'center',
|
||||||
vertical: true,
|
vertical: true,
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ export default (monitor = 0) => {
|
||||||
});
|
});
|
||||||
const stack = Stack({
|
const stack = Stack({
|
||||||
transition: 'crossfade',
|
transition: 'crossfade',
|
||||||
transitionDuration: 180,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
children: {
|
children: {
|
||||||
'disabled': Box({}),
|
'disabled': Box({}),
|
||||||
'image': wallpaperImage,
|
'image': wallpaperImage,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ const { execAsync, exec } = Utils;
|
||||||
const { Box, Revealer } = Widget;
|
const { Box, Revealer } = Widget;
|
||||||
import { setupCursorHover } from '../.widgetutils/cursorhover.js';
|
import { setupCursorHover } from '../.widgetutils/cursorhover.js';
|
||||||
|
|
||||||
const ANIMATION_TIME = 150;
|
|
||||||
const pinnedApps = [
|
const pinnedApps = [
|
||||||
'firefox',
|
'firefox',
|
||||||
'org.gnome.Nautilus',
|
'org.gnome.Nautilus',
|
||||||
|
|
@ -48,7 +47,7 @@ const AppButton = ({ icon, ...rest }) => Widget.Revealer({
|
||||||
},
|
},
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_right',
|
transition: 'slide_right',
|
||||||
transitionDuration: ANIMATION_TIME,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Button({
|
child: Widget.Button({
|
||||||
...rest,
|
...rest,
|
||||||
className: 'dock-app-btn',
|
className: 'dock-app-btn',
|
||||||
|
|
@ -128,7 +127,7 @@ const Taskbar = () => Widget.Box({
|
||||||
if (!removedButton) return;
|
if (!removedButton) return;
|
||||||
removedButton.revealChild = false;
|
removedButton.revealChild = false;
|
||||||
|
|
||||||
Utils.timeout(ANIMATION_TIME, () => {
|
Utils.timeout(userOptions.animations.durationLarge, () => {
|
||||||
removedButton.destroy();
|
removedButton.destroy();
|
||||||
box.attribute.map.delete(address);
|
box.attribute.map.delete(address);
|
||||||
box.children = Array.from(box.attribute.map.values());
|
box.children = Array.from(box.attribute.map.values());
|
||||||
|
|
@ -230,7 +229,7 @@ export default () => {
|
||||||
},
|
},
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_up',
|
transition: 'slide_up',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: dockContent,
|
child: dockContent,
|
||||||
// setup: (self) => self
|
// setup: (self) => self
|
||||||
// .hook(Hyprland, (self) => self.attribute.updateShow(self))
|
// .hook(Hyprland, (self) => self.attribute.updateShow(self))
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ const ColorschemeContent = () => Box({
|
||||||
|
|
||||||
export default () => Widget.Revealer({
|
export default () => Widget.Revealer({
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: ColorschemeContent(),
|
child: ColorschemeContent(),
|
||||||
setup: (self) => self.hook(showColorScheme, (revealer) => {
|
setup: (self) => self.hook(showColorScheme, (revealer) => {
|
||||||
revealer.revealChild = showColorScheme.value;
|
revealer.revealChild = showColorScheme.value;
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ const CoverArt = ({ player, ...rest }) => {
|
||||||
const TrackControls = ({ player, ...rest }) => Widget.Revealer({
|
const TrackControls = ({ player, ...rest }) => Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_right',
|
transition: 'slide_right',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Box({
|
child: Widget.Box({
|
||||||
...rest,
|
...rest,
|
||||||
vpack: 'center',
|
vpack: 'center',
|
||||||
|
|
@ -263,7 +263,7 @@ const TrackControls = ({ player, ...rest }) => Widget.Revealer({
|
||||||
const TrackSource = ({ player, ...rest }) => Widget.Revealer({
|
const TrackSource = ({ player, ...rest }) => Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_left',
|
transition: 'slide_left',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Box({
|
child: Widget.Box({
|
||||||
...rest,
|
...rest,
|
||||||
className: 'osd-music-pill spacing-h-5',
|
className: 'osd-music-pill spacing-h-5',
|
||||||
|
|
@ -292,7 +292,7 @@ const TrackTime = ({ player, ...rest }) => {
|
||||||
return Widget.Revealer({
|
return Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_left',
|
transition: 'slide_left',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Box({
|
child: Widget.Box({
|
||||||
...rest,
|
...rest,
|
||||||
vpack: 'center',
|
vpack: 'center',
|
||||||
|
|
@ -382,7 +382,7 @@ const MusicControlsWidget = (player) => Box({
|
||||||
|
|
||||||
export default () => Revealer({
|
export default () => Revealer({
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
child: Box({
|
child: Box({
|
||||||
setup: (self) => self.hook(Mpris, box => {
|
setup: (self) => self.hook(Mpris, box => {
|
||||||
|
|
|
||||||
|
|
@ -396,7 +396,7 @@ export default () => {
|
||||||
return Widget.Revealer({
|
return Widget.Revealer({
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Box({
|
child: Widget.Box({
|
||||||
vertical: true,
|
vertical: true,
|
||||||
className: 'overview-tasks',
|
className: 'overview-tasks',
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export const DirectoryButton = ({ parentPath, name, type, icon }) => {
|
||||||
const actionText = Widget.Revealer({
|
const actionText = Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: "crossfade",
|
transition: "crossfade",
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
className: 'overview-search-results-txt txt txt-small txt-action',
|
className: 'overview-search-results-txt txt txt-small txt-action',
|
||||||
label: 'Open',
|
label: 'Open',
|
||||||
|
|
@ -19,7 +19,7 @@ export const DirectoryButton = ({ parentPath, name, type, icon }) => {
|
||||||
const actionTextRevealer = Widget.Revealer({
|
const actionTextRevealer = Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: "slide_left",
|
transition: "slide_left",
|
||||||
transitionDuration: 300,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
child: actionText,
|
child: actionText,
|
||||||
});
|
});
|
||||||
return Widget.Button({
|
return Widget.Button({
|
||||||
|
|
@ -78,7 +78,7 @@ export const DesktopEntryButton = (app) => {
|
||||||
const actionText = Widget.Revealer({
|
const actionText = Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: "crossfade",
|
transition: "crossfade",
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
className: 'overview-search-results-txt txt txt-small txt-action',
|
className: 'overview-search-results-txt txt txt-small txt-action',
|
||||||
label: 'Launch',
|
label: 'Launch',
|
||||||
|
|
@ -87,7 +87,7 @@ export const DesktopEntryButton = (app) => {
|
||||||
const actionTextRevealer = Widget.Revealer({
|
const actionTextRevealer = Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: "slide_left",
|
transition: "slide_left",
|
||||||
transitionDuration: 300,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
child: actionText,
|
child: actionText,
|
||||||
});
|
});
|
||||||
return Widget.Button({
|
return Widget.Button({
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ export const searchItem = ({ materialIconName, name, actionName, content, onActi
|
||||||
const actionText = Widget.Revealer({
|
const actionText = Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: "crossfade",
|
transition: "crossfade",
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
className: 'overview-search-results-txt txt txt-small txt-action',
|
className: 'overview-search-results-txt txt txt-small txt-action',
|
||||||
label: `${actionName}`,
|
label: `${actionName}`,
|
||||||
|
|
@ -13,7 +13,7 @@ export const searchItem = ({ materialIconName, name, actionName, content, onActi
|
||||||
const actionTextRevealer = Widget.Revealer({
|
const actionTextRevealer = Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: "slide_left",
|
transition: "slide_left",
|
||||||
transitionDuration: 300,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
child: actionText,
|
child: actionText,
|
||||||
})
|
})
|
||||||
return Widget.Button({
|
return Widget.Button({
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ export const SearchAndWindows = () => {
|
||||||
vexpand: true,
|
vexpand: true,
|
||||||
});
|
});
|
||||||
const resultsRevealer = Widget.Revealer({
|
const resultsRevealer = Widget.Revealer({
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
// duration: 200,
|
// duration: 200,
|
||||||
|
|
@ -70,7 +70,7 @@ export const SearchAndWindows = () => {
|
||||||
});
|
});
|
||||||
const entryPromptRevealer = Widget.Revealer({
|
const entryPromptRevealer = Widget.Revealer({
|
||||||
transition: 'crossfade',
|
transition: 'crossfade',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
hpack: 'center',
|
hpack: 'center',
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
|
@ -81,7 +81,7 @@ export const SearchAndWindows = () => {
|
||||||
|
|
||||||
const entryIconRevealer = Widget.Revealer({
|
const entryIconRevealer = Widget.Revealer({
|
||||||
transition: 'crossfade',
|
transition: 'crossfade',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
hpack: 'end',
|
hpack: 'end',
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ const { exec, execAsync } = Utils;
|
||||||
const SessionButton = (name, icon, command, props = {}) => {
|
const SessionButton = (name, icon, command, props = {}) => {
|
||||||
const buttonDescription = Widget.Revealer({
|
const buttonDescription = Widget.Revealer({
|
||||||
vpack: 'end',
|
vpack: 'end',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ const ProviderSwitcher = () => {
|
||||||
const providerList = Revealer({
|
const providerList = Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 180,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Box({
|
child: Box({
|
||||||
vertical: true, className: 'spacing-v-5 sidebar-chat-providerswitcher-list',
|
vertical: true, className: 'spacing-v-5 sidebar-chat-providerswitcher-list',
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -209,7 +209,7 @@ export const OpenaiApiKeyInstructions = () => Box({
|
||||||
homogeneous: true,
|
homogeneous: true,
|
||||||
children: [Revealer({
|
children: [Revealer({
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
setup: (self) => self
|
setup: (self) => self
|
||||||
.hook(GPTService, (self, hasKey) => {
|
.hook(GPTService, (self, hasKey) => {
|
||||||
self.revealChild = (GPTService.key.length == 0);
|
self.revealChild = (GPTService.key.length == 0);
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ export const GoogleAiInstructions = () => Box({
|
||||||
homogeneous: true,
|
homogeneous: true,
|
||||||
children: [Revealer({
|
children: [Revealer({
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
setup: (self) => self
|
setup: (self) => self
|
||||||
.hook(GeminiService, (self, hasKey) => {
|
.hook(GeminiService, (self, hasKey) => {
|
||||||
self.revealChild = (GeminiService.key.length == 0);
|
self.revealChild = (GeminiService.key.length == 0);
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ const WaifuImage = (taglist) => {
|
||||||
const downloadState = Stack({
|
const downloadState = Stack({
|
||||||
homogeneous: false,
|
homogeneous: false,
|
||||||
transition: 'slide_up_down',
|
transition: 'slide_up_down',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
children: {
|
children: {
|
||||||
'api': ImageState('api', 'Calling API'),
|
'api': ImageState('api', 'Calling API'),
|
||||||
'download': ImageState('downloading', 'Downloading image'),
|
'download': ImageState('downloading', 'Downloading image'),
|
||||||
|
|
@ -128,7 +128,7 @@ const WaifuImage = (taglist) => {
|
||||||
});
|
});
|
||||||
const blockImageRevealer = Revealer({
|
const blockImageRevealer = Revealer({
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
child: Overlay({
|
child: Overlay({
|
||||||
child: Box({
|
child: Box({
|
||||||
|
|
@ -328,7 +328,7 @@ export const waifuView = Scrollable({
|
||||||
const waifuTags = Revealer({
|
const waifuTags = Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: 'crossfade',
|
transition: 'crossfade',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Box({
|
child: Box({
|
||||||
className: 'spacing-h-5',
|
className: 'spacing-h-5',
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ const chatPlaceholder = Label({
|
||||||
const chatPlaceholderRevealer = Revealer({
|
const chatPlaceholderRevealer = Revealer({
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
transition: 'crossfade',
|
transition: 'crossfade',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: chatPlaceholder,
|
child: chatPlaceholder,
|
||||||
setup: enableClickthrough,
|
setup: enableClickthrough,
|
||||||
});
|
});
|
||||||
|
|
@ -157,7 +157,7 @@ const textboxArea = Box({ // Entry area
|
||||||
const apiContentStack = Stack({
|
const apiContentStack = Stack({
|
||||||
vexpand: true,
|
vexpand: true,
|
||||||
transition: 'slide_left_right',
|
transition: 'slide_left_right',
|
||||||
transitionDuration: 160,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
children: APIS.reduce((acc, api) => {
|
children: APIS.reduce((acc, api) => {
|
||||||
acc[api.name] = api.contentWidget;
|
acc[api.name] = api.contentWidget;
|
||||||
return acc;
|
return acc;
|
||||||
|
|
@ -166,7 +166,7 @@ const apiContentStack = Stack({
|
||||||
|
|
||||||
const apiCommandStack = Stack({
|
const apiCommandStack = Stack({
|
||||||
transition: 'slide_up_down',
|
transition: 'slide_up_down',
|
||||||
transitionDuration: 160,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
children: APIS.reduce((acc, api) => {
|
children: APIS.reduce((acc, api) => {
|
||||||
acc[api.name] = api.commandBar;
|
acc[api.name] = api.commandBar;
|
||||||
return acc;
|
return acc;
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ export default ({
|
||||||
const content = Revealer({
|
const content = Revealer({
|
||||||
revealChild: revealChild,
|
revealChild: revealChild,
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: Box({
|
child: Box({
|
||||||
className: 'margin-top-5',
|
className: 'margin-top-5',
|
||||||
homogeneous: true,
|
homogeneous: true,
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ const contentStack = Widget.Stack({
|
||||||
// 'stars': Widget.Label({ label: 'GitHub feed will be here' }),
|
// 'stars': Widget.Label({ label: 'GitHub feed will be here' }),
|
||||||
},
|
},
|
||||||
transition: 'slide_up_down',
|
transition: 'slide_up_down',
|
||||||
transitionDuration: 180,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
setup: (stack) => Utils.timeout(1, () => {
|
setup: (stack) => Utils.timeout(1, () => {
|
||||||
stack.shown = defaultShown;
|
stack.shown = defaultShown;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ export default (props) => {
|
||||||
});
|
});
|
||||||
const listContents = Stack({
|
const listContents = Stack({
|
||||||
transition: 'crossfade',
|
transition: 'crossfade',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
children: {
|
children: {
|
||||||
'empty': notifEmptyContent,
|
'empty': notifEmptyContent,
|
||||||
'list': notifList,
|
'list': notifList,
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ const todoListItem = (task, id, isDone, isEven = false) => {
|
||||||
const widgetRevealer = Widget.Revealer({
|
const widgetRevealer = Widget.Revealer({
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 150,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
child: todoContent,
|
child: todoContent,
|
||||||
})
|
})
|
||||||
return widgetRevealer;
|
return widgetRevealer;
|
||||||
|
|
@ -112,7 +112,7 @@ const todoItems = (isDone) => Widget.Scrollable({
|
||||||
const UndoneTodoList = () => {
|
const UndoneTodoList = () => {
|
||||||
const newTaskButton = Revealer({
|
const newTaskButton = Revealer({
|
||||||
transition: 'slide_left',
|
transition: 'slide_left',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: true,
|
revealChild: true,
|
||||||
child: Button({
|
child: Button({
|
||||||
className: 'txt-small sidebar-todo-new',
|
className: 'txt-small sidebar-todo-new',
|
||||||
|
|
@ -131,7 +131,7 @@ const UndoneTodoList = () => {
|
||||||
});
|
});
|
||||||
const cancelAddTask = Revealer({
|
const cancelAddTask = Revealer({
|
||||||
transition: 'slide_right',
|
transition: 'slide_right',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
child: Button({
|
child: Button({
|
||||||
className: 'txt-norm icon-material sidebar-todo-add',
|
className: 'txt-norm icon-material sidebar-todo-add',
|
||||||
|
|
@ -162,13 +162,13 @@ const UndoneTodoList = () => {
|
||||||
});
|
});
|
||||||
const newTaskEntryRevealer = Revealer({
|
const newTaskEntryRevealer = Revealer({
|
||||||
transition: 'slide_right',
|
transition: 'slide_right',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
child: newTaskEntry,
|
child: newTaskEntry,
|
||||||
});
|
});
|
||||||
const confirmAddTask = Revealer({
|
const confirmAddTask = Revealer({
|
||||||
transition: 'slide_right',
|
transition: 'slide_right',
|
||||||
transitionDuration: 200,
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
child: Button({
|
child: Button({
|
||||||
className: 'txt-norm icon-material sidebar-todo-add',
|
className: 'txt-norm icon-material sidebar-todo-add',
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1 @@
|
||||||
$darkmode: true;
|
|
||||||
$primary: #8ccdff;
|
|
||||||
$onPrimary: #003350;
|
|
||||||
$primaryContainer: #004b73;
|
|
||||||
$onPrimaryContainer: #cae6ff;
|
|
||||||
$secondary: #b7c8d9;
|
|
||||||
$onSecondary: #22323f;
|
|
||||||
$secondaryContainer: #394856;
|
|
||||||
$onSecondaryContainer: #d3e4f6;
|
|
||||||
$tertiary: #d0bfe8;
|
|
||||||
$onTertiary: #362b4a;
|
|
||||||
$tertiaryContainer: #4e4162;
|
|
||||||
$onTertiaryContainer: #eddcff;
|
|
||||||
$error: #ffb4a9;
|
|
||||||
$onError: #680003;
|
|
||||||
$errorContainer: #930006;
|
|
||||||
$onErrorContainer: #ffb4a9;
|
|
||||||
$colorbarbg: #0F1012;
|
|
||||||
$background: #0F1012;
|
|
||||||
$onBackground: #e2e2e5;
|
|
||||||
$surface: #1a1c1e;
|
|
||||||
$onSurface: #e2e2e5;
|
|
||||||
$surfaceVariant: #41474d;
|
|
||||||
$onSurfaceVariant: #c2c7ce;
|
|
||||||
$outline: #8b9198;
|
|
||||||
$shadow: #000000;
|
|
||||||
$inverseSurface: #e2e2e5;
|
|
||||||
$inverseOnSurface: #2f3032;
|
|
||||||
$inversePrimary: #006497;
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ let userConfigOptions = {
|
||||||
'defaultTemperature': 0.9,
|
'defaultTemperature': 0.9,
|
||||||
'writingCursor': ' ...', // Warning: Using weird characters can mess up Markdown rendering
|
'writingCursor': ' ...', // Warning: Using weird characters can mess up Markdown rendering
|
||||||
},
|
},
|
||||||
|
'animations': {
|
||||||
|
'durationSmall': 110,
|
||||||
|
'durationLarge': 180,
|
||||||
|
},
|
||||||
'apps': {
|
'apps': {
|
||||||
'imageViewer': 'loupe',
|
'imageViewer': 'loupe',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue