Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions Loop/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -4947,6 +4947,9 @@
}
}
}
},
"Horizontal Fourths" : {

},
"Horizontal Thirds" : {
"localizations" : {
Expand Down Expand Up @@ -21707,6 +21710,28 @@
}
}
},
"Window Direction/Name: First Fourth" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "First Fourth"
}
}
}
},
"Window Direction/Name: Fourth Fourth" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Fourth Fourth"
}
}
}
},
"Window Direction/Name: Fullscreen" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -22652,6 +22677,17 @@
}
}
},
"Window Direction/Name: Left Three Fourths" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Left Three Fourths"
}
}
}
},
"Window Direction/Name: Left Two Thirds" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -23814,6 +23850,17 @@
}
}
},
"Window Direction/Name: Right Three Fourths" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Right Three Fourths"
}
}
}
},
"Window Direction/Name: Right Two Thirds" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -23890,6 +23937,17 @@
}
}
},
"Window Direction/Name: Second Fourth" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Second Fourth"
}
}
}
},
"Window Direction/Name: Shrink Bottom" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -24368,6 +24426,17 @@
}
}
},
"Window Direction/Name: Third Fourth" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Third Fourth"
}
}
}
},
"Window Direction/Name: Top Half" : {
"localizations" : {
"ar" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct DirectionPickerView: View {
.init(.init(localized: "Quarters"), WindowDirection.quarters),
.init(.init(localized: "Horizontal Thirds"), WindowDirection.horizontalThirds),
.init(.init(localized: "Vertical Thirds"), WindowDirection.verticalThirds),
.init(.init(localized: "Horizontal Fourths"), WindowDirection.horizontalFourths),
.init(.init(localized: "Screen Switching"), WindowDirection.screenSwitching),
.init(.init(localized: "Size Adjustment"), WindowDirection.sizeAdjustment),
.init(.init(localized: "Shrink"), WindowDirection.shrink),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ extension WindowDirection {
.init(localized: .init("Window Direction/Name: Bottom Third", defaultValue: "Bottom Third"))
case .bottomTwoThirds:
.init(localized: .init("Window Direction/Name: Bottom Two Thirds", defaultValue: "Bottom Two Thirds"))
case .firstFourth:
.init(localized: .init("Window Direction/Name: First Fourth", defaultValue: "First Fourth"))
case .secondFourth:
.init(localized: .init("Window Direction/Name: Second Fourth", defaultValue: "Second Fourth"))
case .thirdFourth:
.init(localized: .init("Window Direction/Name: Third Fourth", defaultValue: "Third Fourth"))
case .fourthFourth:
.init(localized: .init("Window Direction/Name: Fourth Fourth", defaultValue: "Fourth Fourth"))
case .leftThreeFourths:
.init(localized: .init("Window Direction/Name: Left Three Fourths", defaultValue: "Left Three Fourths"))
case .rightThreeFourths:
.init(localized: .init("Window Direction/Name: Right Three Fourths", defaultValue: "Right Three Fourths"))
case .nextScreen:
.init(localized: .init("Window Direction/Name: Next Screen", defaultValue: "Next Screen"))
case .previousScreen:
Expand Down
12 changes: 12 additions & 0 deletions Loop/Window Management/Window Action/WindowDirection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable {
case horizontalCenterThird = "HorizontalCenterThird"
case leftThird = "LeftThird", leftTwoThirds = "LeftTwoThirds"

// Horizontal Fourths
case firstFourth = "FirstFourth", secondFourth = "SecondFourth", thirdFourth = "ThirdFourth", fourthFourth = "FourthFourth"
case leftThreeFourths = "LeftThreeFourths", rightThreeFourths = "RightThreeFourths"

// Vertical Thirds
case topThird = "TopThird", topTwoThirds = "TopTwoThirds"
case verticalCenterThird = "VerticalCenterThird"
Expand Down Expand Up @@ -64,6 +68,7 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable {
static var quarters: [WindowDirection] { [.topLeftQuarter, .topRightQuarter, .bottomLeftQuarter, .bottomRightQuarter] }
static var horizontalThirds: [WindowDirection] { [.rightThird, .rightTwoThirds, .horizontalCenterThird, .leftTwoThirds, .leftThird] }
static var verticalThirds: [WindowDirection] { [.topThird, .topTwoThirds, .verticalCenterThird, .bottomTwoThirds, .bottomThird] }
static var horizontalFourths: [WindowDirection] { [.firstFourth, .secondFourth, .thirdFourth, .fourthFourth, .leftThreeFourths, .rightThreeFourths] }
static var screenSwitching: [WindowDirection] { [.nextScreen, .previousScreen, .leftScreen, .rightScreen, .topScreen, .bottomScreen] }
static var sizeAdjustment: [WindowDirection] { [.larger, .smaller] }
static var shrink: [WindowDirection] { [.shrinkTop, .shrinkBottom, .shrinkRight, .shrinkLeft, .shrinkHorizontal, .shrinkVertical] }
Expand Down Expand Up @@ -117,6 +122,13 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable {
case .verticalCenterThird: .init(x: 0, y: 1.0 / 3.0, width: 1.0, height: 1.0 / 3.0)
case .bottomThird: .init(x: 0, y: 2.0 / 3.0, width: 1.0, height: 1.0 / 3.0)
case .bottomTwoThirds: .init(x: 0, y: 1.0 / 3.0, width: 1.0, height: 2.0 / 3.0)
// Fourths (Horizontal)
case .firstFourth: .init(x: 0, y: 0, width: 1.0 / 4.0, height: 1.0)
case .secondFourth: .init(x: 1.0 / 4.0, y: 0, width: 1.0 / 4.0, height: 1.0)
case .thirdFourth: .init(x: 2.0 / 4.0, y: 0, width: 1.0 / 4.0, height: 1.0)
case .fourthFourth: .init(x: 3.0 / 4.0, y: 0, width: 1.0 / 4.0, height: 1.0)
case .leftThreeFourths: .init(x: 0, y: 0, width: 3.0 / 4.0, height: 1.0)
case .rightThreeFourths: .init(x: 1.0 / 4.0, y: 0, width: 3.0 / 4.0, height: 1.0)
default: nil
}
}
Expand Down