Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8e86e0

Browse files
committed
feat(applications): enhance applications widget with additional launch options and command handling
1 parent4ca58f5 commitc8e86e0

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

‎docs/widgets/(Widget)-Applications.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#Applications Widget Options
2+
23
| Option| Type| Default| Description|
34
|------------|--------|---------|-----------------------------------------------------------------------------|
45
|`label`| string| {data}| The label for the applications widget.|
@@ -16,11 +17,14 @@ apps:
1617
options:
1718
label:"{data}"
1819
app_list:
19-
-{icon: "\uf0a2", launch: "notification_center"}
20-
-{icon: "\ueb51", launch: "quick_settings"}
21-
-{icon: "\uf422", launch: "search"}
22-
-{icon: "\uf489", launch: "wt"}
23-
-{icon: "C:\\Users\\marko\\icons\\vscode.png", launch: "C:\\Users\\Username\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"}
20+
-{icon: "\uf0a2", launch: "notification_center"}# launch notification center
21+
-{icon: "\ueb51", launch: "quick_settings"}# launch quick settings
22+
-{icon: "\uf422", launch: "search"}# launch search
23+
-{icon: "\uf489", launch: "wt"}# launch terminal
24+
-{icon: "C:\\Users\\marko\\icons\\vscode.png", launch: "C:\\Users\\Username\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"}# open vscode
25+
-{icon: "\udb81\udc4d",launch: "\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -new-tab www.reddit.com"}# open reddit in new tab in firefox
26+
-{icon: "\udb81\udc4d",launch: "\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -new-window www.reddit.com"}# open reddit in new window in firefox
27+
-{icon: "\udb81\udc4d",launch: "\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -private-window www.reddit.com"}# open reddit in private window in firefox
2428
container_padding:
2529
top:0
2630
left:8

‎src/core/widgets/yasb/applications.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ def execute_code(self, data):
6363
function_map[data]()
6464
else:
6565
try:
66-
command=data.split()
67-
subprocess.Popen(command,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,shell=True)
66+
ifnotany(paramindataforparamin ['-new-tab','-new-window','-private-window']):
67+
data=data.split()
68+
subprocess.Popen(data,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,shell=True)
6869
exceptExceptionase:
6970
logging.error(f"Error starting app:{str(e)}")
7071
exceptExceptionase:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp