Skip to content

Commit

Permalink
Merge pull request #2573 from mitya57/wx-desktop-files
Browse files Browse the repository at this point in the history
Use separate desktop files for TTY and GUI versions
  • Loading branch information
elfmz authored Dec 22, 2024
2 parents 55216c8 + 5e347d6 commit 43d165a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
7 changes: 6 additions & 1 deletion far2l/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,17 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
else()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/DE/far2l.desktop" "${CMAKE_CURRENT_BINARY_DIR}/DE/far2l.desktop")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/DE/far2ledit.desktop" "${CMAKE_CURRENT_BINARY_DIR}/DE/far2ledit.desktop")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/DE/far2l-wx.desktop" "${CMAKE_CURRENT_BINARY_DIR}/DE/far2l-wx.desktop")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/DE/far2ledit-wx.desktop" "${CMAKE_CURRENT_BINARY_DIR}/DE/far2ledit-wx.desktop")

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/DE/icons" DESTINATION "share" USE_SOURCE_PERMISSIONS COMPONENT desktop FILES_MATCHING PATTERN "*")

# Have to make desktop files executable, see:
# https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission_Bit_Required
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DE/far2l.desktop" "${CMAKE_CURRENT_BINARY_DIR}/DE/far2ledit.desktop"
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DE/far2l.desktop"
"${CMAKE_CURRENT_BINARY_DIR}/DE/far2ledit.desktop"
"${CMAKE_CURRENT_BINARY_DIR}/DE/far2l-wx.desktop"
"${CMAKE_CURRENT_BINARY_DIR}/DE/far2ledit-wx.desktop"
DESTINATION "share/applications"
COMPONENT desktop
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE)
Expand Down
11 changes: 11 additions & 0 deletions far2l/DE/far2l-wx.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Name=far2l (WX GUI)
GenericName=far2l
Comment=File and archive manager
Exec=far2l --notty
TryExec=far2l
Terminal=false
Categories=Utility;FileManager;System;FileTools;
Icon=far2l
StartupNotify=true
8 changes: 4 additions & 4 deletions far2l/DE/far2l.desktop
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[Desktop Entry]
Type=Application
Name=far2l
Name=far2l (Terminal)
GenericName=far2l
Comment=File and archive manager
Exec=far2l
Exec=far2l --tty
TryExec=far2l
Terminal=false
Categories=Utility;FileManager;
Terminal=true
Categories=Utility;FileManager;System;FileTools;
Icon=far2l
StartupNotify=true
13 changes: 13 additions & 0 deletions far2l/DE/far2ledit-wx.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Desktop Entry]
Type=Application
Name=Far2l Editor (WX GUI)
Name[ru]=Редактор Far2l (WX GUI)
Comment=Edit text files
Comment[ru]=Редактирование текстовых файлов
Exec=far2ledit --notty %f
TryExec=far2ledit
Terminal=false
MimeType=text/plain;
Categories=Utility;TextEditor;
Icon=far2ledit
Keywords=editor;console;text;
6 changes: 3 additions & 3 deletions far2l/DE/far2ledit.desktop
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Desktop Entry]
Type=Application
Name=Far2l Editor
Name[ru]=Редактор Far2l
Name=Far2l Editor (Terminal)
Name[ru]=Редактор Far2l (Терминал)
Comment=Edit text files
Comment[ru]=Редактирование текстовых файлов
Exec=far2ledit %f
Exec=far2ledit --tty %f
TryExec=far2ledit
Terminal=true
MimeType=text/plain;
Expand Down

0 comments on commit 43d165a

Please sign in to comment.