-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
open computer:/// trash:/// with xdg-open on V23, and gio open on UOS. Log: as title.
- Loading branch information
Showing
5 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
sys_name=$(grep "^SystemName=" /etc/os-version | cut -d'=' -f2) | ||
sys_ver=$(grep "^MajorVersion=" /etc/os-version | cut -d'=' -f2) | ||
|
||
# this is for adapt the new ApplicationManager. | ||
# open computer/trash root with 'gio open', | ||
# the cgroups of the opened app is not belongs to dde-file-manager, | ||
# which cause the opened apps in dock panel is not dde-file-manager, | ||
# and the new opened dde-file-manager window also wrapped into trash/computer entry. | ||
# the 'xdg-open' in V23 accept the computer/trash scheme, | ||
# So, after opening a directory with xdg-open, | ||
# the application's cgroup can be categorized into the file manager as expected. | ||
|
||
if [ "$sys_name" = "Deepin" ] && [ "$sys_ver" = "23" ]; then | ||
echo "open $1 with xdg-open." | ||
xdg-open $1 | ||
else | ||
echo "open $1 with gio open." | ||
gio open $1 | ||
fi | ||
|