<commit_before>require('do-not-disturb')

-- If an app has windows, and the app is not in this list, entering screen
-- sharing mode will quit that app.
WINDOWED_APPS_WHITELISTED_FOR_SCREEN_SHARING_MODE = {
  'Atom',
  'Atom Beta',
  'Bartender 3',
  'Dash',
  'Dashboard',
  'Google Chrome',
  'Hackable Slack Client',
  'Hammerspoon',
  'LaunchBar',
  'iTerm2',
  'Screenhero',
  'Slack',
}

-- Apps to kill when entering screen sharing mode and to reopen when exiting
-- screen sharing mode.
ESSENTIAL_APPS_ONLY_FOR_NON_SCREEN_SHARING_MODE = {
  'Time Out'
}

-- At startup, use "Do Not Disturb" mode to determine whether we're in screen
-- sharing mode
_isScreenSharingModeEnabled = isDoNotDisturbEnabled()

--------------------------------------------------------------------------------
--- Function
--- Determine whether screen sharing mode is enabled.
---
--- Parameters:
---  * None
---
--- Returns:
---  * A boolean value indicating whether screen sharing mode is enabled.
--------------------------------------------------------------------------------
function isScreenSharingModeEnabled()
  return _isScreenSharingModeEnabled
end

--------------------------------------------------------------------------------
--- Function
--- Fetch a collection of all running applications that have windows.
---
--- Parameters:
---  * None
---
--- Returns:
---  * A table where each key is a string application name and the value is the
--     corresponding hs.application object.<commit_msg>🔥 Time Out<commit_after>require('do-not-disturb')

-- If an app has windows, and the app is not in this list, entering screen
-- sharing mode will quit that app.
WINDOWED_APPS_WHITELISTED_FOR_SCREEN_SHARING_MODE = {
  'Atom',
  'Atom Beta',
  'Bartender 3',
  'Dash',
  'Dashboard',
  'Google Chrome',
  'Hackable Slack Client',
  'Hammerspoon',
  'LaunchBar',
  'iTerm2',
  'Screenhero',
  'Slack',
}

-- Apps to kill when entering screen sharing mode and to reopen when exiting
-- screen sharing mode.
ESSENTIAL_APPS_ONLY_FOR_NON_SCREEN_SHARING_MODE = {
}

-- At startup, use "Do Not Disturb" mode to determine whether we're in screen
-- sharing mode
_isScreenSharingModeEnabled = isDoNotDisturbEnabled()

--------------------------------------------------------------------------------
--- Function
--- Determine whether screen sharing mode is enabled.
---
--- Parameters:
---  * None
---
--- Returns:
---  * A boolean value indicating whether screen sharing mode is enabled.
--------------------------------------------------------------------------------
function isScreenSharingModeEnabled()
  return _isScreenSharingModeEnabled
end

--------------------------------------------------------------------------------
--- Function
--- Fetch a collection of all running applications that have windows.
---
--- Parameters:
---  * None
---
--- Returns:
---  * A table where each key is a string application name and the value is the
--     corresponding hs.application object.
{'fraction_non_alphanumeric': 0.25640161725067384, 'fraction_numerical': 0.0013477088948787063, 'mean_word_length': 1.8465963566634707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2861155', 'n_tokens_mistral': 786, 'n_tokens_neox': 773, 'n_words': 267}