summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/config.zig b/src/config.zig
index 9d5f392d..a3cf659c 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -560,7 +560,6 @@ pub const help_buffer = "+Help";
pub const dump_config_buffer = "+DumpConfig";
pub const effect_code_buffer = "+EffectCode";
pub const jumps_buffer = "+Jumps";
-pub const recent_buffer = "+Recent";
pub const preview_buffer = "+Preview";
pub const unsaved_buffer = "+Unsaved";
pub const themes_buffer = "+Themes";
@@ -1002,11 +1001,6 @@ pub const Runtime = struct {
}
};
- pub fn toggleTransition(state: *Runtime, effect: animation.Transition) void {
- std.debug.assert(effect != .off);
- state.panel_transition = if (state.panel_transition == effect) .off else effect;
- }
-
pub const tagline_percent_min: u8 = 1;
pub const tagline_percent_max: u8 = 100;
@@ -1307,7 +1301,7 @@ pub const Runtime = struct {
.transition => |effect| {
const want = switchedTo(argument) catch return false;
if (want == null) {
- state.toggleTransition(effect);
+ state.panel_transition = if (state.panel_transition == effect) .off else effect;
} else if (want.?) {
state.panel_transition = effect;
} else if (state.panel_transition == effect) {
@@ -2021,14 +2015,6 @@ pub const User = struct {
// Relative XDG_CONFIG_HOME values are ignored.
pub fn path(gpa: std.mem.Allocator, env: *const std.process.Environ.Map) !?[]u8 {
- if (builtin.os.tag == .windows) {
- if (env.get("LOCALAPPDATA")) |base| if (base.len != 0)
- return try std.fs.path.join(gpa, &.{ base, "pardes" });
- if (env.get("USERPROFILE")) |home| if (home.len != 0)
- return try std.fs.path.join(gpa, &.{ home, "AppData", "Local", "pardes" });
- return null;
- }
-
if (env.get("XDG_CONFIG_HOME")) |base| if (base.len != 0 and std.fs.path.isAbsolute(base))
return try std.fs.path.join(gpa, &.{ base, "pardes" });
@@ -2061,8 +2047,6 @@ pub const User = struct {
}
test "config path honors XDG and rejects a relative XDG directory" {
- if (builtin.os.tag == .windows) return;
-
var env: std.process.Environ.Map = .init(std.testing.allocator);
defer env.deinit();
try env.put("HOME", "/home/pardes-test");
@@ -2083,8 +2067,6 @@ pub const User = struct {
}
test "config loader reads init inside the config directory" {
- if (builtin.os.tag == .windows) return;
-
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
var base_buf: [std.fs.max_path_bytes]u8 = undefined;