<commit_before>#!/usr/bin/env coffee -p

# Reload shortcut first
Key.on 'r', ['cmd', 'alt', 'ctrl'], -> Phoenix.reload()

# Cardinal directions
NORTH = 'north'
SOUTH = 'south'
EAST = 'east'
WEST = 'west'
DIR = 'DIR'
DIRS = [NORTH, SOUTH, EAST, WEST]

# Axes
VERTICAL = 'VERTICAL'
HORIZONTAL = 'HORIZONTAL'
AXIS = 'AXIS'
AXES = [VERTICAL, HORIZONTAL]

# Preferences
# AVAILABLE KEYS: f v g
Phoenix.set openAtLogin: true
p =
  ## WINDOWS
  wins:
    tolerance: 10                # Tolerance for window movement (for pouring)
    unit: 100                    # Increment for moving and resizing
    gap: 20                      # Gap between windows

  ## MODAL DIALOGS
  modals:
    unit: 10                     # Increment for overlapping modal offset
    gap: 10                      # Gap between modals
    duration: 3                  # Seconds modal stays open
    weight: 24                   # Font weight of modals
    appearance: 'dark'           # Appearance (vibrance) of modals

  ## MODES
  hints:                         ## WINDOW HINT MODE
    stopEvents:                  # Events which halt hint mode
      [ 'screensDidChange'
      , 'spaceDidChange'
      , 'mouseDidLeftClick'
      , 'mouseDidRightClick'
      , 'appDidActivate'
      , 'appDidHide'
      , 'appDidShow'
      , 'windowDidFocus'
      , 'windowDidMove'
      , 'windowDidMinimize'
      , 'windowDidUnminimize' ]
    chars: 'FJDKSLAGHRUEIWOVNCM' # Hint characters (in order)
    titleLength: 15              # Maximum hint title length
    titleCont: '…'               # String to indicate title continuation
    debounce: 150                # Milliseconds to debounce hints

  input:                         ## GENERAL INPUT MODE
    stopEvents:                  # Events which halt input mode
      [ 'screensDidChange'
      , 'spaceDidChange'
      , 'mouseDidLeftClick'
      , 'mouseDidRightClick' ]
    cursor: 'ˌ'                  # String to show to represent cursor position

  eval:                          ## JAVASCRIPT EVAL MODE
    prompt: '> '                 # Prompt character
    instantPrefix: '@'           # Prefix to toggle "instant eval"
    progressStr: '…'             # String to show while "instant eval" errors

  shell:                         ## SHELL COMMAND MODE
    prompt: '$ '                 # Prompt character
    bin: '/usr/local/bin/bash'   # Shell to run (abs. path)

  ## KEYBINDINGS
  keys:
    ## MODIFIER KEYS
    mods:
      base: ['cmd', 'alt']
      move: ['cmd', 'alt', 'shift']
      size: ['cmd', 'ctrl']
      pour: ['cmd', 'alt', 'ctrl']
      tile: ['cmd', 'ctrl', 'shift']
      fall: ['alt', 'shift']

    ## MULTI-MODIFIER KEYS
    dirs:                    # Directionals
      h: WEST
      j: SOUTH
      k: NORTH
      l: EAST
    offsets:                 # Next, previous
      n:  1
      p: -1

    ## ACTIVATE WITH mods.base
    snaps:                   # Toggle: window snap proportions
      q:      [-1/2, -1/2]
      a:      [-1/2, 1  ]
      z:      [-1/2, 1/2 ]
      ']':    [1/2,  -1/2]
      '\'':   [1/2,  1  ]
      '/':    [1/2,  1/2 ]
      'down': [1, 1/2]
      'up':   [1, -1/2]
    maximize: 'm'            # Toggle: maximize window, w/ gaps
    center: 'c'              # Toggle: center window
    reFill: 'u'              # Toggle: grow window to fill empty space
    status: 'i'              # Show datetime in notification
    mouseOut: '.'            # Move mouse to lower right corner
    winHintMode: 'y'         # Activate window hint mode
    scrHintMode: 's'         # Activate screen hint mode
    evalInputMode: ';'       # Activate JS eval mdoe
    shellInputMode: 'return' # Activate shell input mode
    apps:                    # Launch applications
      t: 'kitty'
      e: 'Finder'
      ',': 'Google Chrome'

    ## ACTIVATE WITH mods.pour
    spaceAll: 's'            # Put window on all spaces

# Utilities
Object.prototype.map = (f) ->
  Object.keys(this).reduce ((o, k) => o[k] = f this[k], k; o), {}
Array.prototype.extend = (a) -> @push a...
Array.prototype.contains = (x) -> -1 < @indexOf x
Array.prototype.equals = (a) -> _.all (_.zip this, a).map ([a, b]) -> a == b
Array.prototype.subsets = -><commit_msg>phoenix: Switch back to iTerm.<commit_after>#!/usr/bin/env coffee -p

# Reload shortcut first
Key.on 'r', ['cmd', 'alt', 'ctrl'], -> Phoenix.reload()

# Cardinal directions
NORTH = 'north'
SOUTH = 'south'
EAST = 'east'
WEST = 'west'
DIR = 'DIR'
DIRS = [NORTH, SOUTH, EAST, WEST]

# Axes
VERTICAL = 'VERTICAL'
HORIZONTAL = 'HORIZONTAL'
AXIS = 'AXIS'
AXES = [VERTICAL, HORIZONTAL]

# Preferences
# AVAILABLE KEYS: f v g
Phoenix.set openAtLogin: true
p =
  ## WINDOWS
  wins:
    tolerance: 10                # Tolerance for window movement (for pouring)
    unit: 100                    # Increment for moving and resizing
    gap: 20                      # Gap between windows

  ## MODAL DIALOGS
  modals:
    unit: 10                     # Increment for overlapping modal offset
    gap: 10                      # Gap between modals
    duration: 3                  # Seconds modal stays open
    weight: 24                   # Font weight of modals
    appearance: 'dark'           # Appearance (vibrance) of modals

  ## MODES
  hints:                         ## WINDOW HINT MODE
    stopEvents:                  # Events which halt hint mode
      [ 'screensDidChange'
      , 'spaceDidChange'
      , 'mouseDidLeftClick'
      , 'mouseDidRightClick'
      , 'appDidActivate'
      , 'appDidHide'
      , 'appDidShow'
      , 'windowDidFocus'
      , 'windowDidMove'
      , 'windowDidMinimize'
      , 'windowDidUnminimize' ]
    chars: 'FJDKSLAGHRUEIWOVNCM' # Hint characters (in order)
    titleLength: 15              # Maximum hint title length
    titleCont: '…'               # String to indicate title continuation
    debounce: 150                # Milliseconds to debounce hints

  input:                         ## GENERAL INPUT MODE
    stopEvents:                  # Events which halt input mode
      [ 'screensDidChange'
      , 'spaceDidChange'
      , 'mouseDidLeftClick'
      , 'mouseDidRightClick' ]
    cursor: 'ˌ'                  # String to show to represent cursor position

  eval:                          ## JAVASCRIPT EVAL MODE
    prompt: '> '                 # Prompt character
    instantPrefix: '@'           # Prefix to toggle "instant eval"
    progressStr: '…'             # String to show while "instant eval" errors

  shell:                         ## SHELL COMMAND MODE
    prompt: '$ '                 # Prompt character
    bin: '/usr/local/bin/bash'   # Shell to run (abs. path)

  ## KEYBINDINGS
  keys:
    ## MODIFIER KEYS
    mods:
      base: ['cmd', 'alt']
      move: ['cmd', 'alt', 'shift']
      size: ['cmd', 'ctrl']
      pour: ['cmd', 'alt', 'ctrl']
      tile: ['cmd', 'ctrl', 'shift']
      fall: ['alt', 'shift']

    ## MULTI-MODIFIER KEYS
    dirs:                    # Directionals
      h: WEST
      j: SOUTH
      k: NORTH
      l: EAST
    offsets:                 # Next, previous
      n:  1
      p: -1

    ## ACTIVATE WITH mods.base
    snaps:                   # Toggle: window snap proportions
      q:      [-1/2, -1/2]
      a:      [-1/2, 1  ]
      z:      [-1/2, 1/2 ]
      ']':    [1/2,  -1/2]
      '\'':   [1/2,  1  ]
      '/':    [1/2,  1/2 ]
      'down': [1, 1/2]
      'up':   [1, -1/2]
    maximize: 'm'            # Toggle: maximize window, w/ gaps
    center: 'c'              # Toggle: center window
    reFill: 'u'              # Toggle: grow window to fill empty space
    status: 'i'              # Show datetime in notification
    mouseOut: '.'            # Move mouse to lower right corner
    winHintMode: 'y'         # Activate window hint mode
    scrHintMode: 's'         # Activate screen hint mode
    evalInputMode: ';'       # Activate JS eval mdoe
    shellInputMode: 'return' # Activate shell input mode
    apps:                    # Launch applications
      t: 'iTerm'
      e: 'Finder'
      ',': 'Google Chrome'

    ## ACTIVATE WITH mods.pour
    spaceAll: 's'            # Put window on all spaces

# Utilities
Object.prototype.map = (f) ->
  Object.keys(this).reduce ((o, k) => o[k] = f this[k], k; o), {}
Array.prototype.extend = (a) -> @push a...
Array.prototype.contains = (x) -> -1 < @indexOf x
Array.prototype.equals = (a) -> _.all (_.zip this, a).map ([a, b]) -> a == b
Array.prototype.subsets = ->
{'fraction_non_alphanumeric': 0.12080218345793284, 'fraction_numerical': 0.011866619200189867, 'mean_word_length': 1.6755555555555555, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '6461930', 'n_tokens_mistral': 2800, 'n_tokens_neox': 2642, 'n_words': 786}