OSX Catalina: work: Difference between revisions

From wikinotes
Line 2: Line 2:
= Install =
= Install =
<blockquote>
<blockquote>
 
== Programs ==
<blockquote>
{|
{|
|-
| [[macports]]
|-
| [[brew]]
|-
|-
| Configure [[terminal.app]]
| Configure [[terminal.app]]
Line 14: Line 11:
|-
|-
| Configure [[easy-move-resize]]
| Configure [[easy-move-resize]]
|-
|}
|}


Line 21: Line 19:
see here https://superuser.com/questions/53051/altclick-drag-window-resizing-on-a-mac-similar-to-x-windows
see here https://superuser.com/questions/53051/altclick-drag-window-resizing-on-a-mac-similar-to-x-windows
}}
}}
</blockquote><!-- Programs -->


== MacOS Settings ==
<blockquote>
<source lang="yaml">
<source lang="yaml">
Settings > Keyboard:
Settings > Keyboard:
Line 74: Line 75:
     - Easy Move+Resize  
     - Easy Move+Resize  
</source>
</source>
</blockquote><!-- MacOS Settings -->


<source lang="yaml">
<source lang="yaml">
Line 90: Line 92:
</source>
</source>


{{ TODO |
== Packages ==
* bind Ctrl+c/v as copy/paste  (from option+c/v)
<blockquote>
* alternatively, consider remapping 'option' as ctrl? most shortcuts seem similar...
nix packages
}}
 
<source lang="bash">
<source lang="bash">
nix -i \
nix -i \
Line 106: Line 106:
</source>
</source>


brew packages
<source lang="bash">
<source lang="bash">
brew install \
brew install \
Line 114: Line 115:
</source>
</source>


neovim-nightly
gems
<syntaxhighlight lang="bash">
sudo gem install ripper-tags
</syntaxhighlight>
 
neovim-nightly (tree-sitter)
<source lang="bash">
<source lang="bash">
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
Line 122: Line 128:
nvim
nvim
</source>
</source>
</blockquote><!-- Packages -->


<source lang="bash">
== dotfiles ==
# brew stuff
<blockquote>
brew install alacritty
There's a whole pile in <code>$salt_userfiles</code>.
 
</blockquote><!-- dotfiles -->
 
# enable salt-minion
echo 'master: lavos.ddns.net' > /opt/local/etc/salt/minion
sudo port load salt-minion
 
 
# python-3.7 as default
sudo port select --set python python37
sudo port select --set python3 python37
 
 
# install ropemode
python -m pip install ropemode \
  rope
 
 
# gems
sudo gem install ripper-tags
 
 
# hand off to saltstack
sudo salt-call test.ping
sudo salt-call -l debug --state-output=mixed state.highstate
</source>
 
<source lang="bash">
# ignore ctags file
git config --global core.excludesfile ~/.gitignore
echo tags > ~/.gitignore
 
# {project}
rippertags -R .
</source>


== Rebind Home/End to Beginning/End ==
== Rebind Home/End to Beginning/End ==

Revision as of 15:26, 19 July 2021

Install

Programs

Configure terminal.app
Configure kinesis savant elite 2 and karabiner
Configure easy-move-resize

TODO:

look into "Better Touch Tool", "easy move resize", native solutions.

see here https://superuser.com/questions/53051/altclick-drag-window-resizing-on-a-mac-similar-to-x-windows

MacOS Settings

Settings > Keyboard:
    Shortcuts:
        Spotlight:
          - Show Spotlight Search: Opt + p
        Mission Control:
            [x] Switch to Desktop {1..9}:  Opt + {num}  # (first press Ctrl+up, create 9x spaces)
            [ ] Show Desktop (disable F11)
        App Shortcuts:
            - (All Applications) Close Tab:     Ctrl+W  # create
            - (Google Chrome) Select Next Tab:  Ctrl+P  # create
            - (Google Chrome) Select Next Tab:  Ctrl+N  # create
    Keyboard:
        Touchbar shows: F1, F2, etc.
    App Shortcuts:
        Modifier Keys:   # NOTE: choose your keyboard from the dropdown
            Caps Lock: Control
            Option:    Command
            Command:   Option
    Text:
        [ ] Add period with double-space

Settings > Trackpack:
    Scroll & Zoom:
        [ ] Scroll Direction: Natural  # invert mouse direction

Settings > Mission Control:
  - [ ] Automatically rearrange Spaces based on most recent use  # windows stay on assigned workspace

(open app): Automator
  File > New > Quick Action:
    - drag (Library > Run Shellscript) into window
    - input: None
    - shellscript: open -n "/Applications/MacPorts/Alacritty.app/Contents/MacOS/alacritty"
  File > Save: 'Alacritty'
Settings > Keyboard:
  Shortcuts:
    Services:
      General:
        Alacritty: Win+Shift+'

 Settings > Security & Privacy:
   Privacy:
     Full Disk Access:
       (add):
         /Applications/MacPorts/Alacritty.app/Contents/MacOS/alacritty

Settings > Users and Groups:
  Login Items (tab):
    - karabiner elements
    - Easy Move+Resize
# Shopify Specific
Backup and Sync from Google  # live backup files to google drive
- Screen Saver under 5min
- Always ask password on screen saver
- hot corner for screen saver

(apple) > System Preferences:
  - internet accounts:
    - icloud:
      - [x] Find my Mac

- install shopify dev

Packages

nix packages

nix -i \
  cmake \
  ripgrep \
  fzf \
  silver-searcher \
  tree-sitter \
  macvim \
  universal-ctags \

brew packages

brew install \
  tmux \
  ipython \
  qutebrowser \
  alacritty

gems

sudo gem install ripper-tags

neovim-nightly (tree-sitter)

curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
mkdir ~/opt
tar -xvf nvim-macos.tar.gz --skip-components=1 -C ~/opt
export PATH=$PATH:/Users/will/opt/bin
nvim

dotfiles

There's a whole pile in $salt_userfiles.

Rebind Home/End to Beginning/End

TODO:

try remapping F13 to insert, so I can use shift+insert

# ~/Library/KeyBindings/DefaultKeyBinding.dict
{
  "\UF729"  = moveToBeginningOfParagraph:; // home
  "\UF72B"  = moveToEndOfParagraph:; // end
  "$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
  "$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
  "^\UF729" = moveToBeginningOfDocument:; // ctrl-home
  "^\UF72B" = moveToEndOfDocument:; // ctrl-end
  "^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
  "^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
}

Keyboard Repeat Rate

TODO:

Document the `defaults` command

NOTE:

This is a bit fast for my liking. Also appears to require a logout/login

https://apple.stackexchange.com/questions/10467/how-to-increase-keyboard-key-repeat-rate-on-os-x

defaults write -g InitialKeyRepeat -int 10  # (trying 12) normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1          # normal minimum is 2 (30 ms)

Drag/Resize Window with Modkey

  • Ctrl + Cmd + Click (Ctrl + win + click)


# requires reboot
defaults write -g NSWindowShouldDragOnGesture -bool true  # enable
defaults delete -g NSWindowShouldDragOnGesture            # disable

Disable Hibernate

sudo pmset -a hibernatemode 0  # disable hibernate
sudo pmset -a hibernatemode 3  # re-enable hibernate