diff --git a/src/components/menus/dashboard/shortcuts/buttons/ShortcutButtons.tsx b/src/components/menus/dashboard/shortcuts/buttons/ShortcutButtons.tsx index bbd8bca..5f99b56 100644 --- a/src/components/menus/dashboard/shortcuts/buttons/ShortcutButtons.tsx +++ b/src/components/menus/dashboard/shortcuts/buttons/ShortcutButtons.tsx @@ -24,36 +24,60 @@ const ShortcutButton = ({ shortcut, ...props }: ShortcutButtonProps): JSX.Elemen }; export const LeftShortcut1 = (): JSX.Element => { + if (!hasCommand(left.shortcut1)) { + return ; + } + return ( ); }; export const LeftShortcut2 = (): JSX.Element => { + if (!hasCommand(left.shortcut2)) { + return ; + } + return ; }; export const LeftShortcut3 = (): JSX.Element => { + if (!hasCommand(left.shortcut3)) { + return ; + } + return ( ); }; export const LeftShortcut4 = (): JSX.Element => { + if (!hasCommand(left.shortcut4)) { + return ; + } + return ; }; export const RightShortcut1 = (): JSX.Element => { + if (!hasCommand(right.shortcut1)) { + return ; + } + return ; }; export const RightShortcut3 = (): JSX.Element => { + if (!hasCommand(right.shortcut3)) { + return ; + } + return ; }; diff --git a/src/components/menus/dashboard/shortcuts/sections/Column.tsx b/src/components/menus/dashboard/shortcuts/sections/Column.tsx index 312ec1c..b969eb5 100644 --- a/src/components/menus/dashboard/shortcuts/sections/Column.tsx +++ b/src/components/menus/dashboard/shortcuts/sections/Column.tsx @@ -1,9 +1,9 @@ import { BindableChild } from 'astal/gtk3/astalify'; -export const LeftColumn = ({ visibleClass, children }: LeftColumnProps): JSX.Element => { +export const LeftColumn = ({ isVisible, children }: LeftColumnProps): JSX.Element => { return ( - - {visibleClass ? ( + + {isVisible ? ( {children} @@ -25,7 +25,7 @@ export const RightColumn = ({ children }: RightColumnProps): JSX.Element => { }; interface LeftColumnProps { - visibleClass?: boolean; + isVisible?: boolean; children?: BindableChild | BindableChild[]; } diff --git a/src/components/menus/dashboard/shortcuts/sections/Section.tsx b/src/components/menus/dashboard/shortcuts/sections/Section.tsx index edaf654..11489b4 100644 --- a/src/components/menus/dashboard/shortcuts/sections/Section.tsx +++ b/src/components/menus/dashboard/shortcuts/sections/Section.tsx @@ -57,7 +57,7 @@ export const LeftShortcuts = (): JSX.Element => { return ( - + @@ -78,7 +78,7 @@ export const RightShortcuts = (): JSX.Element => { {Variable.derive(rightBindings, () => { return ( - + diff --git a/src/components/osd/helpers.ts b/src/components/osd/helpers.ts index a467066..2899f44 100644 --- a/src/components/osd/helpers.ts +++ b/src/components/osd/helpers.ts @@ -8,6 +8,14 @@ const { enable, duration, active_monitor, monitor } = options.theme.osd; let count = 0; +/* + * So the OSD doesn't show on startup for no reason + */ +let isStartingUp = true; +timeout(3000, () => { + isStartingUp = false; +}); + /** * Handles the reveal state of a Widget.Revealer. * @@ -69,6 +77,10 @@ export const handleRevealWindow = (self: Widget.Window, property: 'revealChild' * @param property The property to check, either 'revealChild' or 'visible'. */ export const handleReveal = (self: Widget.Revealer | Widget.Window, property: 'revealChild' | 'visible'): void => { + if (isStartingUp) { + return; + } + if (self instanceof Widget.Revealer) { handleRevealRevealer(self, property); } else if (self instanceof Widget.Window) {