Skip to content

Script Settings

sylumer edited this page Mar 18, 2023 · 2 revisions

Overview

The script settings are stored in a PLIST file in the same directory as the main script file. If the file does not exist (such as on first run), the script will populate a default version of the file.

Settings

The following settings are incorporated into the file.

Setting Default Value Description
STEMUXFUNCTIONS .ste-mux-functions.sh The name of the script file containing common functions.
STEMUXTMUXCUSTOM .ste-mux-tmux-custom.sh The name of the script file containing custom TMUX entries.
STEMUXCUSTOM .ste-mux-custom.sh The name of the script file containing custom script entries.
STEMUXICON0 4purCg== This is a base64 representation of a text string used for the plugin in the menu bar when no TMUX sessions are running.
STEMUXICON1 4purCg== This is a base64 representation of a text string used for the plugin in the menu bar when TMUX sessions are running.
STEMUXICONNUMSYMBOL true This is true if a symbol is used to represent the number of running sessions next to the menu bar, and false if it should be a colon followed by the actual number.
  • Note that the file names for the functions, and custom commands are all "dot" files (they begin with a period (".")). This hides them from SwiftBar to stop them being treated as plugins by default.
    • It is possible to point to custom command files in other folders as realpath is used to resolve any navigation that involves a path with a ".." in it.
  • The default icons are identical, but you can of course set them independently if you wish. Just note that when there are active sessions, the number of sessions (up to 9, after that an asterisk is displayed to keep things to a minimal width) is displayed as part of the plugin title.
  • The base64 decoding of 4purCg== (the default for the icons) is .
    • Base64 encoding was used as the default command that is used for writing to and reading from the PLIST file was throwing errors in the script for many non-alphabetic characters (emoji, unusual symbols, etc.) Converting to and from a base64 text string resolved the issue.

Editing PLIST Files

To edit the PLIST files, you could use a PLIST editing application, or the default command line utility.