Install plugins using Fisher.
Replace .config/fish/functions/_tide_item_git.fish
with the file here to use words instead of symbols to describe git repository state.
# Load Antigen | |
# (zsh plugin manager that can install plugins from git repositories) | |
source "/home/aral/antigen.zsh" | |
# Load oh-my-zsh. | |
antigen use oh-my-zsh | |
# Plugins from default repository | |
# (robbyrusell’s oh-my-zsh) | |
antigen bundle git |
Which means that text scale should be 1x when the 4K monitor is plugged in but it should be larger than that (at least ~1.5x) to be legible on the laptop’s screen. (Yes, the manufacturer of the laptop chose the wrong resolution for the screen. It should have been QHD (2560 × 1440) or at most QHD+ (3200×1800) so that you could run it confortably pixel doubled.)
Anyway, it’s not and you’ve already bought it (and it’s otherwise an excellent laptop) but you don’t want to change the text scale every time you plug it into and unplug it from your external monitor.
// | |
// NSView+ChangeAnchorPointWithoutMakingTheLayerJump.swift | |
// | |
// Setting .anchorPoint on a layer makes the layer jump which is most | |
// likely not what you want. This extension fixes that. Useful for Core Animation. | |
// | |
// Usage: (e.g., to set the anchor point to the centre) | |
// | |
// myView.setAnchorPoint(CGPointMake(0.5, 0.5)) | |
// |
// | |
// NSView+CustomTaggable.swift | |
// | |
// Allows you to set tags in Interface Builder for custom NSViews. | |
// | |
// Usage: | |
// | |
// Your custom view must implement the CustomTaggable protocol. Then, in your custom | |
// NSView, declare the customTag property like this: | |
// |
// Unfortunately, this has to be a string right now as IBInspectable enums are not supported at the moment. | |
@IBInspectable var alignmentToParentName:String = "top right" | |
{ | |
didSet | |
{ | |
var name = (alignmentToParentName.lowercaseString as NSString) | |
let top = 0b00, bottom = 0b10, right = 0b00, left = 0b01 | |
var bitmask = 0b0 | |
// The default, even if garbage is entered in Interface Builder, is top right. |
I hereby claim:
To claim this, I am signing this object:
// The docs say that the appearance property of an NSPopover should be set to an | |
// NSPopoverAppearance enum but it actually expects an NSAppearance instance. | |
// e.g., in an NSViewController subclass: | |
let popover = NSPopover() | |
popover.contentViewController = self.storyboard?.instantiateControllerWithIdentifier("someViewController") as? NSViewController | |
popover.appearance = NSAppearance(named: NSAppearanceNameVibrantLight) | |
popover.behavior = NSPopoverBehavior.Transient |
let a = NSDictionary(object: NSNumber(bool: true), forKey: "boolKey") | |
let b: AnyObject? = a.objectForKey("boolKey") | |
if let b:AnyObject = b, c:NSNumber = (b as? NSNumber) where c.boolValue == true | |
{ | |
println("It’s true.") | |
} |