Skip to content

Commit

Permalink
feature: reordering and cleaning up the list of config options (#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmaelMartinez authored Sep 1, 2023
1 parent 4c92af6 commit a1910df
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 133 deletions.
61 changes: 30 additions & 31 deletions app/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,45 @@ Here is the list of available arguments and its usage:

| Option | Usage | Default Value |
|:-:|:-:|:-:|
| help | show the available commands | false |
| version | show the version number | false |
| rightClickWithSpellcheck | Enable/Disable the right click menu with spellchecker | true |
| closeAppOnCross | Close the app when clicking the close (X) cross | false |
| partition | [BrowserWindow](https://electronjs.org/docs/api/browser-window) webpreferences partition | persist:teams-4-linux |
| webDebug | Start with the browser developer tools open | false |
| minimized | Start the application minimized | false |
| url | url to open | [https://teams.microsoft.com/](https://teams.microsoft.com/) |
| proxyServer | Proxy Server with format address:port | None |
| config | config file location | ~/.config/teams-for-linux/config.json |
| chromeUserAgent | user agent string for chrome | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3831.6 Safari/537.36 |
| ntlmV2enabled | set enable-ntlm-v2 value | true |
| appActiveCheckInterval | A numeric value in seconds as poll interval to check if the system is active from being idle | 2 |
| appIcon | Teams app icon to show in the tray | |
| appIconType | Type of tray icon to be used default/light/dark | default |
| appIdleTimeout | A numeric value in seconds as duration before app considers the system as idle | 300 |
| appIdleTimeoutCheckInterval | A numeric value in seconds as poll interval to check if the appIdleTimeout is reached | 10 |
| appLogLevels | Comma separated list of log levels (error,warn,info,debug) | error,warn |
| appTitle | A text to be suffixed with page title | Microsoft Teams |
| authServerWhitelist | set auth-server-whitelist value | * |
| bypassWaylandSourceSelection | A flag indicates whether to bypass wayland source selection dialog when screen a share request is received | false |
| chromeUserAgent | user agent string for chrome | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3831.6 Safari/537.36 |
| customBGServiceBaseUrl | Base URL of the server which provides custom background images | http://localhost |
| customBGServiceConfigFetchInterval | A numeric value in seconds as poll interval to download custom background service configuration. If 0, it will be downloaded only at application start | 0 |
| customBGServiceIgnoreMSDefaults | A flag indicates whether to ignore Microsoft provided images or not | false |
| customCACertsFingerprints | custom CA Certs Fingerprints to allow SSL unrecognized signer or self signed certificate (see below) | [] |
| customCSSName | Custom CSS name for the packaged available css files. Currently those are: "compactDark", "compactLight", "tweaks", "condensedDark" and "condensedLight" | |
| customCSSLocation | Location for custom CSS styles | |
| customCACertsFingerprints | custom CA Certs Fingerprints to allow SSL unrecognized signer or self signed certificate (see below) | [] |
| clientCertPath clientCertPassword | custom Client Certs for corporate authentication (certificate must be in pkcs12 format) | [] |
| appIcon | Teams app icon to show in the tray | |
| appIconType | Type of tray icon to be used default/light/dark | default |
| spellCheckerLanguages | Language codes to use with Electron\'s spell checker (experimental) | [] |
| customUserDir | Custom User Directory so that you can have multiple profiles | |
| appLogLevels | Comma separated list of log levels (error,warn,info,debug) | error,warn |
| clearStorage | Whether to clear the storage before creating the window or not | false |
| disableNotifications | A flag to disable all notifications | false |
| disableNotificationWindowFlash | A flag indicates whether to disable window flashing when there is a notification | false |
| clientCertPath clientCertPassword | custom Client Certs for corporate authentication (certificate must be in pkcs12 format) | [] |
| closeAppOnCross | Close the app when clicking the close (X) cross | false |
| config | config file location | ~/.config/teams-for-linux/config.json |
| defaultURLHandler | Default application to be used to open the HTTP URLs | |
| disableAutogain | A flag indicates whether to disable mic auto gain or not | false |
| disableMeetingNotifications | Whether to disable meeting notifications or not | false |
| disableNotifications | A flag to disable all notifications | false |
| disableNotificationSound | Disable chat/meeting start notification sound | false |
| disableNotificationSoundIfNotAvailable | Disable chat/meeting start notification sound if status is not Available (e.g. busy, in a call) | true |
| appIdleTimeout | A numeric value in seconds as duration before app considers the system as idle | 300 |
| appIdleTimeoutCheckInterval | A numeric value in seconds as poll interval to check if the appIdleTimeout is reached | 10 |
| appActiveCheckInterval | A numeric value in seconds as poll interval to check if the system is active from being idle | 2 |
| screenLockInhibitionMethod | Screen lock inhibition method to be used (Electron/WakeLockSentinel) | Electron |
| customBGServiceBaseUrl | Base URL of the server which provides custom background images | http://localhost |
| customBGServiceIgnoreMSDefaults | A flag indicates whether to ignore Microsoft provided images or not | false |
| customBGServiceConfigFetchInterval | A numeric value in seconds as poll interval to download custom background service configuration. If 0, it will be downloaded only at application start | 0 |
| disableNotificationWindowFlash | A flag indicates whether to disable window flashing when there is a notification | false |
| help | show the available commands | false |
| partition | [BrowserWindow](https://electronjs.org/docs/api/browser-window) webpreferences partition | persist:teams-4-linux |
| proxyServer | Proxy Server with format address:port | None |
| menubar | A value controls the menu bar behaviour (auto/visible/hidden) | auto |
| disableAutogain | A flag indicates whether to disable mic auto gain or not | false |
| defaultURLHandler | Default application to be used to open the HTTP URLs | |
| bypassWaylandSourceSelection | A flag indicates whether to bypass wayland source selection dialog when screen a share request is received | false |

| minimized | Start the application minimized | false |
| ntlmV2enabled | set enable-ntlm-v2 value | true |
| screenLockInhibitionMethod | Screen lock inhibition method to be used (Electron/WakeLockSentinel) | Electron |
| spellCheckerLanguages | Language codes to use with Electron\'s spell checker (experimental) | [] |
| url | url to open | [https://teams.microsoft.com/](https://teams.microsoft.com/) |
| version | show the version number | false |
| webDebug | Start with the browser developer tools open | false |


As an example, to disable the persistence, you can run the following command:
Expand Down
211 changes: 110 additions & 101 deletions app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,56 +20,76 @@ function argv(configPath) {
.env(true)
.config(configFile)
.options({
closeAppOnCross: {
default: false,
describe: 'Close the app when clicking the close (X) cross',
type: 'boolean'
appActiveCheckInterval: {
default: 2,
describe: 'A numeric value in seconds as poll interval to check if the system is active from being idle',
type: 'number'
},
url: {
default: 'https://teams.microsoft.com/',
describe: 'Microsoft Teams URL',
appIcon: {
default: '',
describe: 'Teams app icon to show in the tray',
type: 'string'
},
proxyServer: {
default: null,
describe: 'Proxy Server with format address:port',
appIconType: {
default: 'default',
describe: 'Type of tray icon to be used',
type: 'string',
choices: ['default', 'light', 'dark']
},
appIdleTimeout: {
default: 300,
describe: 'A numeric value in seconds as duration before app considers the system as idle',
type: 'number'
},
appIdleTimeoutCheckInterval: {
default: 10,
describe: 'A numeric value in seconds as poll interval to check if the appIdleTimeout is reached',
type: 'number'
},
appLogLevels: {
default: 'error,warn',
describe: 'Comma separated list of log levels (error,warn,info,debug)',
type: 'string'
},
customUserDir: {
default: null,
describe: 'Custom User Directory so that you can have multiple profiles',
appTitle: {
default: 'Microsoft Teams',
describe: 'A text to be suffixed with page title',
type: 'string'
},
minimized: {
default: false,
describe: 'Start the application minimized',
type: 'boolean'
authServerWhitelist: {
default: '*',
describe: 'Set auth-server-whitelist value',
type: 'string'
},
webDebug: {
bypassWaylandSourceSelection: {
default: false,
describe: 'Enable debug at start',
describe: 'A flag indicates whether to bypass wayland source selection dialog when screen a share request is received',
type: 'boolean'
},
partition: {
default: 'persist:teams-4-linux',
describe: 'BrowserWindow webpreferences partition',
type: 'string'
},
chromeUserAgent: {
default: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${process.versions.chrome} Safari/537.36`,
describe: 'Google Chrome User Agent',
type: 'string'

},
ntlmV2enabled: {
default: 'true',
describe: 'Set enable-ntlm-v2 value',
customBGServiceBaseUrl: {
default: 'http://localhost',
describe: 'Base URL of the server which provides custom background images',
type: 'string'
},
authServerWhitelist: {
default: '*',
describe: 'Set auth-server-whitelist value',
type: 'string'
customBGServiceIgnoreMSDefaults: {
default: false,
describe: 'A flag indicates whether to ignore Microsoft provided images or not',
type: 'boolean'
},
customBGServiceConfigFetchInterval: {
default: 0,
describe: 'A numeric value in seconds as poll interval to download background service config download',
type: 'number'
},
customCACertsFingerprints: {
default: [],
describe: 'Array of custom CA Certs Fingerprints to allow SSL unrecognized signer or self signed certificate',
type: 'array'
},
customCSSName: {
default: '',
Expand All @@ -81,36 +101,51 @@ function argv(configPath) {
describe: 'custom CSS styles file location',
type: 'string'
},
customCACertsFingerprints: {
default: [],
describe: 'Array of custom CA Certs Fingerprints to allow SSL unrecognized signer or self signed certificate',
type: 'array'
},
appLogLevels: {
default: 'error,warn',
describe: 'Comma separated list of log levels (error,warn,info,debug)',
customUserDir: {
default: null,
describe: 'Custom User Directory so that you can have multiple profiles',
type: 'string'
},
clearStorage: {
default: false,
describe: 'Whether to clear the storage before creating the window or not',
type: 'boolean'
},
disableNotifications: {
clientCertPath: {
default: '',
describe: 'Custom Client Certs for corporate authentication (certificate must be in pkcs12 format)',
type: 'string'
},
clientCertPassword: {
default: '',
describe: 'Custom Client Certs password for corporate authentication (certificate must be in pkcs12 format)',
type: 'string'
},
closeAppOnCross: {
default: false,
describe: 'A flag to disable all notifications',
describe: 'Close the app when clicking the close (X) cross',
type: 'boolean'
},
disableNotificationWindowFlash: {
defaultURLHandler: {
default: '',
describe: 'Default application to be used to open the HTTP URLs',
type: 'string'
},
disableAutogain: {
default: false,
describe: 'A flag indicates whether to disable window flashing when there is a notification',
describe: 'A flag indicates whether to disable mic auto gain or not',
type: 'boolean'
},
disableMeetingNotifications: {
default: false,
describe: 'Whether to disable meeting notifications or not',
type: 'boolean'
},
disableNotifications: {
default: false,
describe: 'A flag to disable all notifications',
type: 'boolean'
},
disableNotificationSound: {
default: false,
describe: 'Disable chat/meeting start notification sound',
Expand All @@ -121,82 +156,56 @@ function argv(configPath) {
describe: 'Disables notification sound unless status is Available (e.g. while in a call, busy, etc.)',
type: 'boolean'
},
appIcon: {
default: '',
describe: 'Teams app icon to show in the tray',
type: 'string'
},
spellCheckerLanguages: {
default: [],
describe: 'Array of languages to use with Electron\'s spell checker (experimental)',
type: 'array'
disableNotificationWindowFlash: {
default: false,
describe: 'A flag indicates whether to disable window flashing when there is a notification',
type: 'boolean'
},
appTitle: {
default: 'Microsoft Teams',
describe: 'A text to be suffixed with page title',
partition: {
default: 'persist:teams-4-linux',
describe: 'BrowserWindow webpreferences partition',
type: 'string'
},
appIdleTimeout: {
default: 300,
describe: 'A numeric value in seconds as duration before app considers the system as idle',
type: 'number'
},
appIdleTimeoutCheckInterval: {
default: 10,
describe: 'A numeric value in seconds as poll interval to check if the appIdleTimeout is reached',
type: 'number'
},
appActiveCheckInterval: {
default: 2,
describe: 'A numeric value in seconds as poll interval to check if the system is active from being idle',
type: 'number'
},
screenLockInhibitionMethod: {
default: 'Electron',
describe: 'Screen lock inhibition method to be used (Electron/WakeLockSentinel)',
type: 'string',
choices: ['Electron', 'WakeLockSentinel']
},
customBGServiceBaseUrl: {
default: 'http://localhost',
describe: 'Base URL of the server which provides custom background images',
proxyServer: {
default: null,
describe: 'Proxy Server with format address:port',
type: 'string'
},
customBGServiceIgnoreMSDefaults: {
default: false,
describe: 'A flag indicates whether to ignore Microsoft provided images or not',
type: 'boolean'
},
customBGServiceConfigFetchInterval: {
default: 0,
describe: 'A numeric value in seconds as poll interval to download background service config download',
type: 'number'
},
menubar: {
default: 'auto',
describe: 'A value controls the menu bar behaviour',
type: 'string',
choices: ['auto', 'visible', 'hidden']
},
disableAutogain: {
minimized: {
default: false,
describe: 'A flag indicates whether to disable mic auto gain or not',
describe: 'Start the application minimized',
type: 'boolean'
},
defaultURLHandler: {
default: '',
describe: 'Default application to be used to open the HTTP URLs',
ntlmV2enabled: {
default: 'true',
describe: 'Set enable-ntlm-v2 value',
type: 'string'
},
appIconType: {
default: 'default',
describe: 'Type of tray icon to be used',
screenLockInhibitionMethod: {
default: 'Electron',
describe: 'Screen lock inhibition method to be used (Electron/WakeLockSentinel)',
type: 'string',
choices: ['default', 'light', 'dark']
choices: ['Electron', 'WakeLockSentinel']
},
bypassWaylandSourceSelection: {
spellCheckerLanguages: {
default: [],
describe: 'Array of languages to use with Electron\'s spell checker (experimental)',
type: 'array'
},
url: {
default: 'https://teams.microsoft.com/',
describe: 'Microsoft Teams URL',
type: 'string'
},
webDebug: {
default: false,
describe: 'A flag indicates whether to bypass wayland source selection dialog when screen a share request is received',
describe: 'Enable debug at start',
type: 'boolean'
}
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.3.8",
"version": "1.3.9",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down

0 comments on commit a1910df

Please sign in to comment.