OSX Maverick: wintermute: Difference between revisions
(→Xmonad) |
(closes all blockquotes, so renders in pandoc) |
||
Line 26: | Line 26: | ||
</source> | </source> | ||
</blockquote><!-- Adding Chimera Bootloader to Grub2 --> | </blockquote><!-- Adding Chimera Bootloader to Grub2 --> | ||
</blockquote><!-- Install --> | |||
= Core Setup = | = Core Setup = | ||
Line 131: | Line 132: | ||
#### Logout and log back in for MODIFIER-KEY changes to take effect. | #### Logout and log back in for MODIFIER-KEY changes to take effect. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Terminal === | === Terminal === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
defaults write com.apple.finder NSUserKeyEquivalents '{"Move to Trash"="\U007F";}' ## Bind 'Delete' to delete files in Finder | defaults write com.apple.finder NSUserKeyEquivalents '{"Move to Trash"="\U007F";}' ## Bind 'Delete' to delete files in Finder | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Home/End/Page/SelectWord/ShiftInsert === | === Home/End/Page/SelectWord/ShiftInsert === | ||
Line 150: | Line 147: | ||
#### ~/Library/KeyBindings/DefaultKeyBinding.dict | #### ~/Library/KeyBindings/DefaultKeyBinding.dict | ||
/* | /* | ||
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely | This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely | ||
match default behavior on Windows systems. This particular mapping assumes | match default behavior on Windows systems. This particular mapping assumes | ||
that you have also switched the Control and Command keys already. | that you have also switched the Control and Command keys already. | ||
This key mapping is more appropriate after switching Ctrl for Command in this menu: | |||
Apple->System Preferences->Keyboard & Mouse->Keyboard->Modifier Keys...-> | |||
Change Control Key to Command | |||
Change Command key to Control | |||
This applies to OS X 10.5 and possibly other versions. | |||
Here is a rough cheatsheet for syntax. | |||
Key Modifiers | |||
^ : Ctrl | |||
$ : Shift | |||
~ : Option (Alt) | |||
@ : Command (Apple) | |||
# : Numeric Keypad | |||
Non-Printable Key Codes | |||
Up Arrow: \UF700 Backspace: \U0008 F1: \UF704 | |||
Down Arrow: \UF701 Tab: \U0009 F2: \UF705 | |||
Left Arrow: \UF702 Escape: \U001B F3: \UF706 | |||
Right Arrow: \UF703 Enter: \U000A ... | |||
Insert: \UF727 Page Up: \UF72C | |||
Delete: \UF728 Page Down: \UF72D | |||
Home: \UF729 Print Screen: \UF72E | |||
End: \UF72B Scroll Lock: \UF72F | |||
Break: \UF732 Pause: \UF730 | |||
SysReq: \UF731 Menu: \UF735 | |||
Help: \UF746 | |||
NOTE: typically the Windows 'Insert' key is mapped to what Macs call 'Help'. | |||
Regular Mac keyboards don't even have the Insert key, but provide 'Fn' instead, | |||
which is completely different. | |||
*/ | |||
{ | |||
"\UF729" = "moveToBeginningOfLine:"; /* Home */ | |||
"@\UF729" = "moveToBeginningOfDocument:"; /* Cmd + Home */ | |||
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */ | |||
"@$\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Cmd + Home */ | |||
"\UF72B" = "moveToEndOfLine:"; /* End */ | |||
"@\UF72B" = "moveToEndOfDocument:"; /* Cmd + End */ | |||
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */ | |||
"@$\UF72B" = "moveToEndOfDocumentAndModifySelection:"; /* Shift + Cmd + End */ | |||
"\UF72C" = "pageUp:"; /* PageUp */ | |||
"\UF72D" = "pageDown:"; /* PageDown */ | |||
"$\UF728" = "cut:"; /* Shift + Del */ | |||
"$\UF727" = "paste:"; /* Shift + Ins */ | |||
"@\UF727" = "copy:"; /* Cmd + Ins */ | |||
"$\UF746" = "paste:"; /* Shift + Help */ | |||
"@\UF746" = "copy:"; /* Cmd + Help (Ins) */ | |||
"@\UF702" = "moveWordBackward:"; /* Cmd + LeftArrow */ | |||
"@\UF703" = "moveWordForward:"; /* Cmd + RightArrow */ | |||
"@$\UF702" = "moveWordBackwardAndModifySelection:"; /* Shift + Cmd + Leftarrow */ | |||
"@$\UF703" = "moveWordForwardAndModifySelection:"; /* Shift + Cmd + Rightarrow */ | |||
} | |||
#### | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- hotkeys --> | </blockquote><!-- hotkeys --> | ||
== Autostart Programs == | == Autostart Programs == | ||
Line 232: | Line 214: | ||
option. I'm backing up the crontab, so it doesn't require documentation | option. I'm backing up the crontab, so it doesn't require documentation | ||
here, but here is where/what I have autostarting on login: | here, but here is where/what I have autostarting on login: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
### Preparation | |||
# You cannot autostart programs that are in the 'Utilities' folder, however | |||
# if you Rclick > Make Alias, then copy that alias to your Applications Folder | |||
# you can Autostart it. Here are some of the preparations I had to make: | |||
/Applications/Ulitites/X11 > Make Alias | /Applications/Ulitites/X11 > Make Alias | ||
Line 254: | Line 235: | ||
=== Terminal.App === | === Terminal.App === | ||
<blockquote> | <blockquote> | ||
See [[terminal.app]] | See [[terminal.app]] | ||
< | </blockquote><!-- Terminal.App --> | ||
=== iterm2 === | === iterm2 === | ||
Line 269: | Line 249: | ||
iTerm > Preferences > General > (Check Load Preferences from custom folder or URL) > Save Settings to Folder | iTerm > Preferences > General > (Check Load Preferences from custom folder or URL) > Save Settings to Folder | ||
/Users/will/.iterm2 | /Users/will/.iterm2 | ||
# Save Settings To Folder | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- rxvt-unicode --> | </blockquote><!-- rxvt-unicode --> | ||
=== rxvt-unicode === | === rxvt-unicode === | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# Install XQuartz | |||
# http://xquartz.macosforge.org/landing/ | |||
sudo port install rxvt-unicode | sudo port install rxvt-unicode | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- rxvt-unicode --> | </blockquote><!-- rxvt-unicode --> | ||
</blockquote><!-- Terminal --> | </blockquote><!-- Terminal --> | ||
== enable root == | == enable root == | ||
Line 326: | Line 268: | ||
wanted to use sudo/visudo. | wanted to use sudo/visudo. | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# | # prior to MountainLion | ||
dsenableroot | dsenableroot | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- root --> | </blockquote><!-- root --> | ||
== Fonts == | == Fonts == | ||
<blockquote> | <blockquote> | ||
http://www.fontsquirrel.com/fonts/droid-sans-mono | http://www.fontsquirrel.com/fonts/droid-sans-mono | ||
</blockquote><!-- Fonts --> | </blockquote><!-- Fonts --> | ||
== Xmonad == | == Xmonad == | ||
<blockquote> | <blockquote> | ||
Xmonad compiles and runs, but only manages X11 windows. | Xmonad compiles and runs, but only manages X11 windows. | ||
~/.xinitrc.d/90-xmonad.hs | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
#! /bin/sh | #! /bin/sh | ||
USERWM=$HOME/Library/Haskell/bin/xmonad | USERWM=$HOME/Library/Haskell/bin/xmonad | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
chmod +x ~/.xinitrc.d/90-xmonad.sh | chmod +x ~/.xinitrc.d/90-xmonad.sh | ||
sudo port install xft2 | sudo port install xft2 | ||
cabal update | cabal update | ||
Line 372: | Line 295: | ||
cabal install xmonad | cabal install xmonad | ||
cabal install xmonad-contrib --flags="-use_xft" | cabal install xmonad-contrib --flags="-use_xft" | ||
cp /private/etc/X11/xinit/xinitrc ~/.xinitrc | cp /private/etc/X11/xinit/xinitrc ~/.xinitrc | ||
chmod +w ~/.xinitrc | chmod +w ~/.xinitrc | ||
</syntaxhighlight> | |||
~/.xinitrc | |||
<syntaxhighlight lang="bash"> | |||
#comment out the line 'exec quartz-wm' and add PATH-TO-XMONAD/xmonad after it. | #comment out the line 'exec quartz-wm' and add PATH-TO-XMONAD/xmonad after it. | ||
/Users/will/.cabal/bin/xmonad | /Users/will/.cabal/bin/xmonad | ||
quartz-wm --only-proxy & | quartz-wm --only-proxy & # sync X11/OSX clipboards | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Xmonad --> | </blockquote><!-- Xmonad --> | ||
== Amethyst == | == Amethyst == | ||
<blockquote> | <blockquote> | ||
See [[amethyst]] | |||
</blockquote><!-- Amethyst --> | </blockquote><!-- Amethyst --> | ||
== ntfs == | == ntfs == | ||
<blockquote> | <blockquote> | ||
https://osxfuse.github.io/ | <syntaxhighlight lang="yaml"> | ||
http://macntfs-3g.blogspot.com/2010/10/ntfs-3g-for-mac-os-x-2010102.html | https://osxfuse.github.io/ # install osxfuse | ||
http://macntfs-3g.blogspot.com/2010/10/ntfs-3g-for-mac-os-x-2010102.html # install ntfs3g | |||
</syntaxhighlight> | |||
</blockquote><!-- ntfs --> | </blockquote><!-- ntfs --> | ||
</blockquote><!-- Core Setup --> |
Latest revision as of 23:38, 1 July 2022
Install
Adding Chimera bootloader to Grub2
This information is no longer accurate. See Wintermute Archlinux documentation under UEFI. The following article explains how I originally got OSX booting with grub-bios.
#### /etc/grub.d/40_custom # append: menuentry "OSX Mountain Lion" { set root='(hd1)' chainloader +1 }NOTE:
we're chainloading the chimera bootloader, you don't need to specify the partition.
# update grub in linux sudo update-grub
Core Setup
programs
brew macports xquartz urxvt xcode brew install caskroom/cask/brew-cask brew install \ zsh \ git \ tmux \ bash \ gcc \ coreutils \ findutils \ w3m \ vifm \ ghc \ cabal-install \ homebrew/x11/dmenu \ vim \ macvim \ Caskroom/cask/sublime-text \ Caskroom/cask/osxfuse \ grep \ gawk \ imagemagick \ ffmpeg \ pyside sudo port install fehHostname
sudo scutil --set HostName wintermute # set hostnameShell
Add to
/etc/shells
/usr/local/bin/zshchsh -s /usr/local/bin/zshBasics
System Preferences > Sharing > Remote Login # enable sshd System Preferences > Audio > Alert Volume # (slide to 0% so terminal audio bells are disabled) System Preferences > Security & Privacy > Allow Apps Downloaded from (anywhere)Hotkeys
Note
The below system should work with standard keyboards, my matias keyboard however needs a special fix. In the KeyboardMenu, set 'Capslock','Control' to 'No Action', then run the program seil, binding CapsLock to keycode 59, Control to keycode 55. Reboot. (capslock confirmed, uncertain about ctrl key to command key)
Swap Command/Ctrl, Capslock/Ctrl
After logout/re-login, this works both within OSX, and also for XQuartz (X11) applications without any xmodmap hackery.Keyboard Menu
System Preferences > Keyboard ## (will make vim scroll more bearable) ## Key Repeat(fastest) ## Delay Until Repeat (fastest) ## Requires re-login System Preferences > Keyboard > Modifier Keys ## CapsLock: Control ## Control: Command #### Logout and log back in for MODIFIER-KEY changes to take effect.Terminal
defaults write com.apple.finder NSUserKeyEquivalents '{"Move to Trash"="\U007F";}' ## Bind 'Delete' to delete files in FinderHome/End/Page/SelectWord/ShiftInsert
I haven't actually had success with this one yet, I currently have it disabled so that the above Ctrl/Capslock swap works correctly.
mkdir ~/Library/KeyBindings #### ~/Library/KeyBindings/DefaultKeyBinding.dict /* This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely match default behavior on Windows systems. This particular mapping assumes that you have also switched the Control and Command keys already. This key mapping is more appropriate after switching Ctrl for Command in this menu: Apple->System Preferences->Keyboard & Mouse->Keyboard->Modifier Keys...-> Change Control Key to Command Change Command key to Control This applies to OS X 10.5 and possibly other versions. Here is a rough cheatsheet for syntax. Key Modifiers ^ : Ctrl $ : Shift ~ : Option (Alt) @ : Command (Apple) # : Numeric Keypad Non-Printable Key Codes Up Arrow: \UF700 Backspace: \U0008 F1: \UF704 Down Arrow: \UF701 Tab: \U0009 F2: \UF705 Left Arrow: \UF702 Escape: \U001B F3: \UF706 Right Arrow: \UF703 Enter: \U000A ... Insert: \UF727 Page Up: \UF72C Delete: \UF728 Page Down: \UF72D Home: \UF729 Print Screen: \UF72E End: \UF72B Scroll Lock: \UF72F Break: \UF732 Pause: \UF730 SysReq: \UF731 Menu: \UF735 Help: \UF746 NOTE: typically the Windows 'Insert' key is mapped to what Macs call 'Help'. Regular Mac keyboards don't even have the Insert key, but provide 'Fn' instead, which is completely different. */ { "\UF729" = "moveToBeginningOfLine:"; /* Home */ "@\UF729" = "moveToBeginningOfDocument:"; /* Cmd + Home */ "$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */ "@$\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Cmd + Home */ "\UF72B" = "moveToEndOfLine:"; /* End */ "@\UF72B" = "moveToEndOfDocument:"; /* Cmd + End */ "$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */ "@$\UF72B" = "moveToEndOfDocumentAndModifySelection:"; /* Shift + Cmd + End */ "\UF72C" = "pageUp:"; /* PageUp */ "\UF72D" = "pageDown:"; /* PageDown */ "$\UF728" = "cut:"; /* Shift + Del */ "$\UF727" = "paste:"; /* Shift + Ins */ "@\UF727" = "copy:"; /* Cmd + Ins */ "$\UF746" = "paste:"; /* Shift + Help */ "@\UF746" = "copy:"; /* Cmd + Help (Ins) */ "@\UF702" = "moveWordBackward:"; /* Cmd + LeftArrow */ "@\UF703" = "moveWordForward:"; /* Cmd + RightArrow */ "@$\UF702" = "moveWordBackwardAndModifySelection:"; /* Shift + Cmd + Leftarrow */ "@$\UF703" = "moveWordForwardAndModifySelection:"; /* Shift + Cmd + Rightarrow */ } ####Autostart Programs
OSX has both a crontab, and a graphical autostart option. I'm backing up the crontab, so it doesn't require documentation here, but here is where/what I have autostarting on login:
### Preparation # You cannot autostart programs that are in the 'Utilities' folder, however # if you Rclick > Make Alias, then copy that alias to your Applications Folder # you can Autostart it. Here are some of the preparations I had to make: /Applications/Ulitites/X11 > Make Alias Copy/Paste to /Applications/ #### Preferences > Users & Groups > will > LoginItems (tab) * Applications/FinderPath * Applications/X11 (Alias)Terminal
Terminal.App
See terminal.app
iterm2
iterm2 is the go-to OSX terminal. I'd rather use urxvt, or better still, suckless-st but this can be my crutch until I get sorted. https://www.iterm2.com/
mkdir /Users/will/.iterm2 iTerm > Preferences > General > (Check Load Preferences from custom folder or URL) > Save Settings to Folder /Users/will/.iterm2 # Save Settings To Folderrxvt-unicode
# Install XQuartz # http://xquartz.macosforge.org/landing/ sudo port install rxvt-unicodeenable root
On old versions of OSX, you need to enable the root account if you wanted to use sudo/visudo.
# prior to MountainLion dsenableroot
Fonts
Xmonad
Xmonad compiles and runs, but only manages X11 windows.
~/.xinitrc.d/90-xmonad.hs
#! /bin/sh USERWM=$HOME/Library/Haskell/bin/xmonadchmod +x ~/.xinitrc.d/90-xmonad.sh sudo port install xft2 cabal update LIBRARY_PATH=/opt/X11/lib:$LIBRARY_PATH cabal install X11 ## install X11 cabal install xmonad cabal install xmonad-contrib --flags="-use_xft" cp /private/etc/X11/xinit/xinitrc ~/.xinitrc chmod +w ~/.xinitrc~/.xinitrc
#comment out the line 'exec quartz-wm' and add PATH-TO-XMONAD/xmonad after it. /Users/will/.cabal/bin/xmonad quartz-wm --only-proxy & # sync X11/OSX clipboardsAmethyst
See amethyst
ntfs
https://osxfuse.github.io/ # install osxfuse http://macntfs-3g.blogspot.com/2010/10/ntfs-3g-for-mac-os-x-2010102.html # install ntfs3g