Compare commits

..

No commits in common. "28134cfe4eeeb9d08fe8885473c4b59130b04ed5" and "6a7bf0c300727064a7352855ffbf118a44b6a4bf" have entirely different histories.

6 changed files with 10 additions and 107 deletions

View file

@ -1,61 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1709703039,
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -21,30 +21,5 @@
(flakePkg "github:nix-community/zon2nix")
];
};
devShells.default = nixpkgs.legacyPackages.${system}.mkShell {
buildInputs = with pkgs; [
# packages required to build scripts
# TODO: build scripts with nix instead
pkg-config
wayland
wayland-protocols
libgit2
libGL
roswell
] ++
# shorthands for setup.rkt
builtins.map
(cmd: pkgs.writeShellScriptBin cmd ''
./setup.rkt ${cmd}
'') [
"install-scripts"
"install-plugins"
"install-lsps-paru"
"setup-nvim-config"
"setup-nix"
"run-confgen"
];
};
});
}

View file

@ -8,16 +8,14 @@ const log = std.log.scoped(.server);
alloc: std.mem.Allocator,
env: *Mutex(std.process.EnvMap),
ss: std.net.Server,
ss: std.net.StreamServer,
const Server = @This();
pub fn init(alloc: std.mem.Allocator, sockpath: []const u8, env: *Mutex(std.process.EnvMap)) !Server {
return .{
.alloc = alloc,
.ss = try (try std.net.Address.initUnix(sockpath)).listen(.{}),
.env = env,
};
var ss = std.net.StreamServer.init(.{});
try ss.listen(try std.net.Address.initUnix(sockpath));
return .{ .alloc = alloc, .ss = ss, .env = env };
}
pub fn run(self: *Server) !void {
@ -28,7 +26,7 @@ pub fn run(self: *Server) !void {
}
}
pub fn handleConnection(self: *Server, con: std.net.Server.Connection) !void {
pub fn handleConnection(self: *Server, con: std.net.StreamServer.Connection) !void {
defer con.stream.close();
while (true) {
const msg = message.Serverbound.read(con.stream.reader(), self.alloc) catch |e| {

View file

@ -110,15 +110,6 @@ pub fn init(alloc: std.mem.Allocator) !void {
try con.runCommand(&.{ "map-pointer", "normal", "Super", "BTN_LEFT", "move-view" });
try con.runCommand(&.{ "map-pointer", "normal", "Super", "BTN_RIGHT", "resize-view" });
// touchpad config
inline for (.{
.{ "click-method", "clickfinger" },
.{ "tap-button-map", "left-right-middle" },
.{ "tap", "enabled" },
}) |cmd| {
try con.runCommand(&[_][:0]const u8{ "input", "*" } ++ cmd);
}
// tag config
for (0..9) |i| {
var key_buf: [16]u8 = undefined;

View file

@ -1,4 +1,4 @@
#!/usr/bin/env racket
#!/usr/bin/racket
#lang racket
;; Script for setting up the config.
@ -7,12 +7,12 @@
"setup/common.rkt")
;; Valid verbs
(define verbs '(install-scripts install-plugins install-lsps-paru setup-nvim-config setup-nix run-confgen))
(define verbs '(install-scripts install-plugins install-lsps-paru setup-nvim-config setup-nix confgen))
(define verb
(command-line #:program "setup.rkt"
#:usage-help "Sets up my dotfiles. Available verbs:"
"install-scripts, install-plugins, install-lsps-paru, setup-nvim-config, run-confgen"
"install-scripts, install-plugins, install-lsps-paru, setup-nvim-config, confgen"
#:once-each
[("-o" "--bin-output") o "Output directory for executables" (output-bin-path o)]
#:args (verb)
@ -50,6 +50,6 @@
['setup-nix
(local-require "setup/commands/setup-nix.rkt")
(run)]
['run-confgen
(local-require "setup/commands/run-confgen.rkt")
['confgen
(local-require "setup/commands/confgen.rkt")
(run)])