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

Add launcher shortcuts on Linux #458

Merged
merged 9 commits into from
Dec 18, 2024

Conversation

spacey-sooty
Copy link
Contributor

@spacey-sooty spacey-sooty commented Oct 18, 2024

Doesn't add desktop shortcuts due to complications with how gnome
handles desktop files

Resolves #136

@spacey-sooty spacey-sooty force-pushed the linux-shortcuts branch 4 times, most recently from 1847f3d to 6459695 Compare October 18, 2024 15:51
@spacey-sooty spacey-sooty changed the title Add shortcuts on Linux Add launcher shortcuts on Linux Oct 18, 2024
@sciencewhiz
Copy link
Contributor

Using a category of Robotics instead of Development might be more relevant

@calcmogul
Copy link
Member

calcmogul commented Oct 19, 2024

Do custom categories like Robotics work?

@calcmogul
Copy link
Member

We probably don't want a .desktop for ToolsUpdater.

[tav@myriad applications]$ ls
'AdvantageScope (WPILib) 2025.desktop'  kscreen-doctor.desktop                  'SysId 2025.desktop'
'Choreo (WPILib) 2025.desktop'          mimeinfo.cache                          'ToolsUpdater 2025.desktop'
'DataLogTool 2025.desktop'              'OutlineViewer 2025.desktop'            wine
'FRC VS Code 2025.desktop'              'PathWeaver 2025.desktop'               wine-extension-chm.desktop
'Glass 2025.desktop'                    'roboRIOTeamNumberSetter 2025.desktop'  wine-extension-hlp.desktop
kscreen-doctor-2.desktop                'RobotBuilder 2025.desktop'             wine-extension-msp.desktop
kscreen-doctor-3.desktop                'Shuffleboard 2025.desktop'             wine-extension-vbs.desktop
kscreen-doctor-4.desktop                'SmartDashboard 2025.desktop'

@sciencewhiz
Copy link
Contributor

Do custom categories like Robotics work?

It's in the spec. https://specifications.freedesktop.org/menu-spec/latest/additional-category-registry.html

Copy link
Contributor

@sciencewhiz sciencewhiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried this on Ubuntu 24.04, and I didn't get tool files installed to ~/local/share/applications, just VS code

@spacey-sooty
Copy link
Contributor Author

spacey-sooty commented Oct 23, 2024

I just tried this on Ubuntu 24.04, and I didn't get tool files installed to ~/local/share/applications, just VS code

Was it a tools only run? Assuming it was its fixed now.

@spacey-sooty spacey-sooty force-pushed the linux-shortcuts branch 2 times, most recently from cf800c1 to dfebd75 Compare October 23, 2024 14:11
@sciencewhiz
Copy link
Contributor

I just tried this on Ubuntu 24.04, and I didn't get tool files installed to ~/local/share/applications, just VS code

Was it a tools only run? Assuming it was its fixed now.

Yes it was tools only, and it's fixed now

@sciencewhiz
Copy link
Contributor

It seems like most of the tools don't show up in the dock when I ran them

@spacey-sooty
Copy link
Contributor Author

It seems like most of the tools don't show up in the dock when I ran them

For me tho showed up after a bit of a wait. I think I might've had to interact with the window as well?

@spacey-sooty
Copy link
Contributor Author

spacey-sooty commented Oct 26, 2024

You can see in the below clip the icon does appear it just takes a while

Screencast.from.2024-10-26.23-03-13.webm

@spacey-sooty
Copy link
Contributor Author

funny note from this, if I have the same version of Choreo installed from Choreo and the installer the installer version will override the launch icon for the Choreo install

@sciencewhiz
Copy link
Contributor

There isn't a delay if launching either the executable or shell script directly, only when using the launcher

Copy link
Contributor

@sciencewhiz sciencewhiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The java tools StartupWMClass weren't correct

@sciencewhiz
Copy link
Contributor

The .desktop files are written with CRLF line endings

@spacey-sooty
Copy link
Contributor Author

The .desktop files are written with CRLF line endings

idrk how we can fix this, the dotnet formatter will want everything in the file to be crlf

@spacey-sooty
Copy link
Contributor Author

I dont think it being written with CRLF endings is an issue and even if it is its seperate to this PR, the vscode desktop file already had this problem.

@calcmogul
Copy link
Member

These shortcuts aren't showing up in a Robotics category for me.
Screenshot_20241111_185532
Screenshot_20241111_185408

Doesn't add desktop shortcuts due to complications with how gnome
handles desktop files

Resolves wpilibsuite#136

Signed-off-by: Jade Turner <spacey-sooty@proton.me>
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
@calcmogul
Copy link
Member

This still didn't sort correctly. The following seems to work though.

diff --git a/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs b/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs
index 989b108..b9a1744 100644
--- a/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs
+++ b/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs
@@ -42,7 +42,7 @@ namespace WPILibInstaller.ViewModels
 [Desktop Entry]
 Version=1.0
 Type=Application
-Categories=Science & Maths
+Categories=Robotics;Science
 Name={name} {frcYear}
 Comment={nameNoWPILib} tool for the 2025 FIRST Robotics Competition season
 Exec={configurationProvider.InstallDirectory}/tools/{nameNoWPILib}.sh
@@ -59,7 +59,7 @@ StartupWMClass={wmClass}
 [Desktop Entry]
 Version=1.0
 Type=Application
-Categories=Robotics
+Categories=Robotics;Science
 Name={name} {frcYear}
 Comment={name} tool for the 2025 FIRST Robotics Competition season
 Exec={configurationProvider.InstallDirectory}/tools/{name}.sh

Signed-off-by: Jade Turner <spacey-sooty@proton.me>
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
@sciencewhiz
Copy link
Contributor

Needs a shortcut for elastic

@sciencewhiz
Copy link
Contributor

On Ubuntu 24.04, only a few are showing up in the launcher (Advantagescope, Elastic, VS Code)

@PeterJohnson PeterJohnson merged commit 002a7dc into wpilibsuite:main Dec 18, 2024
7 checks passed
@spacey-sooty spacey-sooty deleted the linux-shortcuts branch December 18, 2024 04:54
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.

Make tools desktop shortcuts on Linux
4 participants