Skip to content

Conversation

@Kathund
Copy link

@Kathund Kathund commented Jul 22, 2025

You can now remove the recording and settings buttons. They are still kept there by default but my only "issue" is that I forced my self to make an INTERNAL tag/prefix for naming an command. I would like to come up with a better way to do this but I personally couldn't come up with one. I am open to feedback on how we implement start video recording then

@orangci
Copy link
Contributor

orangci commented Jul 22, 2025

image

@Kathund Kathund requested a review from orangci July 22, 2025 08:55
@orangci orangci requested a review from Jas-SinghFSU July 22, 2025 09:11
@Kathund
Copy link
Author

Kathund commented Sep 24, 2025

bump

@Jas-SinghFSU
Copy link
Owner

Sorry for the delay, been busy working on Wayle. I'll get this reviewed today.

@Jas-SinghFSU
Copy link
Owner

const ShortcutButton = ({ shortcut, ...props }: ShortcutButtonProps): JSX.Element => {
    const isRecordingButton = shortcut.command.get() === 'hyprpanel_record';

    return (
        <button
            vexpand
            tooltipText={shortcut.tooltip.get()}
            className={
                isRecordingButton
                    ? bind(isRecording).as((rec) => `${props.className || ''} ${rec ? 'active' : ''}`.trim())
                    : props.className
            }
            onButtonPressEvent={(_, event) => {
                const buttonClicked = event.get_button()[1];

                if (buttonClicked !== Gdk.BUTTON_PRIMARY) {
                    return;
                }

                if (!isRecordingButton) {
                    handleClick(shortcut.command.get());
                    return;
                }

                const sanitizedPath = getRecordingPath().replace(/"/g, '\\"');

                if (isRecording.get() === true) {
                    App.get_window('dashboardmenu')?.set_visible(false);
                    const command = `${SRC_DIR}/scripts/screen_record.sh stop "${sanitizedPath}"`;
                    executeCommand(command);
                    return;
                }

                const monitorDropdownList = MonitorListDropdown() as Gtk.Menu;
                monitorDropdownList.popup_at_pointer(event);
            }}
        >
            <label className={'button-label txt-icon'} label={shortcut.icon.get()} />
        </button>
    );
};

I've updated the recording button logic for ShortcutButton.

@Jas-SinghFSU
Copy link
Owner

We need to add the configuration menu options so users can tweak these settings in src/components/settings/pages/config/menus/dashboard.tsx

                <Option
                    opt={options.menus.dashboard.shortcuts.right.shortcut2.icon}
                    title="Right - Shortcut 2 (Icon)"
                    type="string"
                />
                <Option
                    opt={options.menus.dashboard.shortcuts.right.shortcut2.command}
                    title="Right - Shortcut 2 (Command)"
                    type="string"
                />
                <Option
                    opt={options.menus.dashboard.shortcuts.right.shortcut2.tooltip}
                    title="Right - Shortcut 2 (Tooltip)"
                    type="string"
                />

and

                <Option
                    opt={options.menus.dashboard.shortcuts.right.shortcut4.icon}
                    title="Right - Shortcut 4 (Icon)"
                    type="string"
                />
                <Option
                    opt={options.menus.dashboard.shortcuts.right.shortcut4.command}
                    title="Right - Shortcut 4 (Command)"
                    type="string"
                />
                <Option
                    opt={options.menus.dashboard.shortcuts.right.shortcut4.tooltip}
                    title="Right - Shortcut 4 (Tooltip)"
                    type="string"
                />

@Jas-SinghFSU
Copy link
Owner

Jas-SinghFSU commented Sep 27, 2025

That should cover it. Great work and thank you for contributing ❤️

@Kathund Kathund requested a review from Jas-SinghFSU October 4, 2025 08:42
@Kathund
Copy link
Author

Kathund commented Oct 4, 2025

This should be everything unless i'm being stupid. I'm busy with a different project and currently not really working on much other but still open to questions but most likely respond on gh right now. Feel free to reach me @.kathund on disc (i'm in the server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants