You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Run terminal commands and launch custom scripts using quick toggle buttons.
15
+
- Run commands and launch custom scripts using quick toggle buttons.
16
16
- Assign custom button names and icons.
17
-
- Enter separate commands to run when the button is switched on and when it is switched off.
18
17
- Run a command at startup to determine the button's initial state based on the command output, or manually specify whether the button starts as on, off, or in its last known state.
19
18
- Run associated on or off command at startup to sync button state if required.
19
+
- Keep button states synced to a command's output.
20
20
- Option to toggle the button only if the command executes successfully and returns exit code 0 (for use with sudo commands using `pkexec sudo` where the command could be canceled or incorrect password entered).
21
21
- Customize toggle button behavior to toggle or be in an always on or off state.
22
22
- Assign keyboard shortcuts to quick toggle buttons.
@@ -63,35 +63,37 @@ There is also an option to export the current configuration for all the toggle b
63
63
64
64
<br>
65
65
66
-
### Appearance
66
+
### Icons
67
67
68
-
Enter the name and icon information to use for the quick toggle button.
68
+
Enter the button name and icon information for each toggle button.
Alternatively, browse the icon directory for your system’s theme (typically /usr/share/icons), or use the [Icon Library app](https://flathub.org/apps/org.gnome.design.IconLibrary).
76
+
Alternatively, browse the icon directory for your system’s theme (typically /usr/share/icons) and enter the name of an icon (without the file extension).
77
77
78
-
To use a custom icon, place an SVG icon in: `~/.local/share/icons/hicolor/scalable/apps/`. Reboot and then enter the icon name (without the file extension).
78
+
To use a custom icon, place the icon in: `~/.local/share/icons/`. Reboot and then enter the icon name (without the file extension).
79
+
80
+
To use separate on/off icons, enter both icon names separated by a comma.
79
81
80
82
<br>
81
83
82
84
### Commands
83
85
84
86
Enter the terminal/shell commands to associate with the quick toggle on/off actions.
- Run multiple commands in parallel by using `&` between commands.
90
92
- Run multiple commands one at a time using `&&` between commands.
91
-
- Commands run silently (no terminal output), so test the full command in a terminal before adding it to the menu.
93
+
- Commands run silently (no terminal output), so test them in a terminal before using.
92
94
- To run a command in a terminal window, use `gnome-terminal -- command`. Note that by default the GNOME terminal will close after the command is complete, but that can be changed in the terminal preferences if needed.
93
95
- For sudo commands that require a password, use `pkexec` before the command to get a password prompt. For example, `pkexec sudo command` prompts for your password and then runs the command. Alternatively, use `gnome-terminal -- sudo command` to open a terminal where you can enter your password.
94
-
- To open the command configuration window for this extension directly, use the command `gnome-extensions prefs custom-command-list@storageb.github.com`.
96
+
- To open the command configuration window for this extension directly, use the command `gnome-extensions prefs custom-command-toggle@storageb.github.com`.
95
97
96
98
<br>
97
99
@@ -100,27 +102,49 @@ Command tips:
100
102
101
103
Specify the state of each toggle button at startup (on, off, the previous state it was in, or check a command's output to determine the state), and select if you want that command to run at startup to sync to the selected toggle state.
If "Run Command at Startup" is selected, there is an option to specify a delay time before the command is executed. Because GNOME extensions load early in the startup process, it may be required to delay your command from running by a few seconds to allow other processes to finish loading first. If this is not required, set the delay to 0.
106
108
107
-
If "Command output" is selected as the Initial State, Enter a command to check its output. If the specified Search Term appears in the command output, the button will be set to ON at startup. Otherwise, the button will be OFF at startup.
109
+
If "Command output" is selected as the Initial State, enter a command to check its output. If the specified Search Term appears in the command output, the button will be set to ON at startup. Otherwise, the button will be OFF at startup.
110
+
111
+
Enable "Keep Toggle State Synced" to periodically check the output of a command and update the button state accordingly. Set "Polling Frequency" to specify how often the command should run in the background.
If using `pkexec` or `gnome-terminal -- command` to run sudo commands, it is recommended to enable Check Command Exit Code so that if an incorrect password is entered or the command is canceled, the button will not toggle if the command does not run.
In the Configuration tab under Advanced, enable "Detailed Logging" to view extension and command output for toggle button and command sync setup and troubleshooting purposes. Run the following command in a terminal to view the output (click the copy button to copy the command):
0 commit comments