Skip to content
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

[Feature]: start wave in full-screen mode #1933

Open
denisdamata opened this issue Feb 8, 2025 · 5 comments
Open

[Feature]: start wave in full-screen mode #1933

denisdamata opened this issue Feb 8, 2025 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers triage Needs triage

Comments

@denisdamata
Copy link

Feature description

Open waveterm directly in full screen (F11 button) is not working:

waveterm --full-screen

Implementation Suggestion

No response

Anything else?

No response

@denisdamata denisdamata added enhancement New feature or request triage Needs triage labels Feb 8, 2025
@esimkowitz esimkowitz changed the title [Feature]: Full screen doesn't work [Feature]: start wave in full-screen mode Feb 8, 2025
@esimkowitz
Copy link
Member

This should be doable, though starting the app with waveterm is only currently supported on Linux

@esimkowitz esimkowitz added the good first issue Good for newcomers label Feb 8, 2025
@denisdamata
Copy link
Author

denisdamata commented Feb 10, 2025

This should be doable, though starting the app with waveterm is only currently supported on Linux

It's not possible and you can't set it to full screen with F11 button when you're inside the Wave terminal

However, I found a partial solution to the problem [ChatGPT] using the Linux window manager called wmcrtl.

Create a .sh file called waveterm-full-screen.sh in the folder where you store your scripts, make it executable

chmod +x waveterm-full-screen.sh

and place the following code inside it

#!/bin/bash

# Start Waveterm with the passed parameters
waveterm "$@" &

# Define a maximum wait time (in seconds)
MAX_WAIT_TIME=10
WAIT_INTERVAL=0.5
elapsed_time=0

# Loop until the "Wave" window is open or the maximum time is reached
while ! wmctrl -l | grep -q "Wave"; do
    sleep $WAIT_INTERVAL
    elapsed_time=$(echo "$elapsed_time + $WAIT_INTERVAL" | bc)

    # Check if the maximum time has been reached
    if (( $(echo "$elapsed_time >= $MAX_WAIT_TIME" | bc -l) )); then
        echo "The 'Wave' window was not found after $MAX_WAIT_TIME seconds."
        exit 1
    fi
done

# Set the "Wave" window to fullscreen
wmctrl -r "Wave" -b toggle,fullscreen

Now create a link for your new command in /usr/bin called fwaveterm (full screen Wave Terminal)

sudo ln -s ~/<YOUR_SCRIPTS_FOLDER>/waveterm-full-screen.sh /usr/bin/fwaveterm

and edit the .desktop file corresponding to Wave Terminal by changing waveterm to fwaveterm. Installing via SNAP open the file with

sudo nano /var/lib/snapd/desktop/applications/waveterm_waveterm.desktop

and edit it

[Desktop Entry]
X-SnapInstanceName=waveterm
Name=Wave
X-SnapAppName=fwaveterm
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/waveterm_waveterm.desktop fwaveterm %U
Terminal=false
Type=Application
Icon=/snap/waveterm/100/meta/gui/icon.png
StartupWMClass=Wave
Comment=Open-Source AI-Native Terminal Built for Seamless Workflows
Keywords=developer;terminal;emulator;
Categories=TerminalEmulator;

@esimkowitz
Copy link
Member

esimkowitz commented Feb 10, 2025

What OS are you on?

@denisdamata
Copy link
Author

What OS are you on?

If I haven't said anything, it's because it's Linux (Ubuntu 24.10).

@esimkowitz
Copy link
Member

Not a given, but thank you for confirming. I think this is certainly doable, I also did some research and at least on Windows and Linux it seems like while F11 is not default-mapped to full-screen, it's also not default-mapped to anything else so we should be able to do this. I'd prefer to handle the launch in full-screen mode as a user setting since we don't currently have a way to pass arguments when launching waveterm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers triage Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants