Fix known errors found from feedback (DBUS problems, pulseaudio start, one vlc example with error. typos)

This commit is contained in:
Timothyxxx
2024-05-18 04:49:29 +08:00
parent 661b568d43
commit 25e808cc91
6 changed files with 15 additions and 12 deletions

View File

@@ -23,7 +23,7 @@
"func": "exact_match",
"result": {
"type": "vm_command_line",
"command": "pactl list sinks | grep '^[[:space:]]Volume:' | head -n 1 | awk '{print $5}' | sed 's/%//g'",
"command": "pulseaudio --start\npactl list sinks | grep '^[[:space:]]Volume:' | head -n 1 | awk '{print $5}' | sed 's/%//g'",
"shell": true
},
"expected": {

View File

@@ -32,7 +32,7 @@
{
"type": "execute",
"parameters": {
"command": "xdg-open /home/user/project",
"command": "export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus'\nxdg-open /home/user/project",
"shell": true
}
}

View File

@@ -7,7 +7,8 @@
{
"type": "execute",
"parameters": {
"command": "gsettings set org.gnome.shell favorite-apps \"['thunderbird.desktop']\""
"command": "export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus'\ngsettings set org.gnome.shell favorite-apps \"['thunderbird.desktop']\"",
"shell": true
}
},
{
@@ -19,7 +20,8 @@
{
"type": "execute",
"parameters": {
"command": "gsettings set org.gnome.shell favorite-apps \"['thunderbird.desktop', 'vim.desktop', 'google-chrome.desktop']\""
"command": "export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus'\ngsettings set org.gnome.shell favorite-apps \"['thunderbird.desktop', 'vim.desktop', 'google-chrome.desktop']\"",
"shell": true
}
},
{
@@ -41,7 +43,8 @@
"func": "check_gnome_favorite_apps",
"result": {
"type": "vm_command_line",
"command": "gsettings get org.gnome.shell favorite-apps"
"command": "export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus'\ngsettings get org.gnome.shell favorite-apps",
"shell": true
},
"expected": {
"type": "rule",