Compare commits

...

3 commits

Author SHA1 Message Date
2b8634a56a
workspace moves from shift to ctrl mod 2025-03-26 23:25:55 +01:00
66c22f7a13
add fluent reader 2025-03-26 23:25:41 +01:00
3ac8ca1f5e
rust stuff(tm) 2025-03-26 23:25:25 +01:00
4 changed files with 21 additions and 33 deletions

View file

@ -54,18 +54,8 @@
combine [
complete.toolchain
];
# rs-platform = pkgs.makeRustPlatform {
# cargo = rs-toolchain;
# rustc = rs-toolchain;
# };
crane-lib = (crane.mkLib nixpkgs.legacyPackages.${system}).overrideToolchain rs-toolchain;
rs-programs = final: prev: {
# s10e-jrnl = rs-platform.buildRustPackage {
# pname = "jrnl";
# version = "0.0.1";
# src = ./programs/jrnl;
# cargoLock.lockFile = ./programs/jrnl/Cargo.lock;
# };
s10e-jrnl = crane-lib.buildPackage {
pname = "s10e-bs";
version = "0.0.1";

View file

@ -1,6 +1,6 @@
{...}: {
programs.niri.enable = true;
home-manager.users.jade = {...}: {
home-manager.users.jade = {pkgs, ...}: {
imports = [
./notifications.nix
./terminal.nix
@ -17,6 +17,10 @@
services.network-manager-applet.enable = true;
xsession.enable = true;
home.packages = [
pkgs.fluent-reader
];
services.gpg-agent = {
enable = true;
enableNushellIntegration = true;

View file

@ -54,15 +54,15 @@
"Mod+7".action.focus-workspace = 7;
"Mod+8".action.focus-workspace = 8;
"Mod+9".action.focus-workspace = 9;
"Mod+Shift+1".action.move-column-to-workspace = 1;
"Mod+Shift+2".action.move-column-to-workspace = 2;
"Mod+Shift+3".action.move-column-to-workspace = 3;
"Mod+Shift+4".action.move-column-to-workspace = 4;
"Mod+Shift+5".action.move-column-to-workspace = 5;
"Mod+Shift+6".action.move-column-to-workspace = 6;
"Mod+Shift+7".action.move-column-to-workspace = 7;
"Mod+Shift+8".action.move-column-to-workspace = 8;
"Mod+Shift+9".action.move-column-to-workspace = 9;
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
# column editing stuffs
"Mod+BracketLeft".action.consume-or-expel-window-left = [];

View file

@ -1,7 +1,4 @@
#![feature(iter_array_chunks)]
#![feature(round_char_boundary)]
#![feature(iter_collect_into)]
#![feature(pattern)]
#![feature(pattern, iter_array_chunks, round_char_boundary, iter_collect_into)]
use std::{
io::{Read, Write},
@ -17,17 +14,16 @@ const BOOLS: &[[&str; 2]] = &[
["no", "yes"],
];
fn main() {
fn main() -> std::io::Result<()> {
let mut input = String::new();
let mut stdin = std::io::stdin();
let mut stdout = std::io::stdout();
stdin.read_to_string(&mut input).unwrap();
stdin.read_to_string(&mut input)?;
let bool_locs = find_bools(&input);
stdout
.write_all(replace_bools(&mut input, bool_locs).as_bytes())
.unwrap();
stdout.write_all(replace_bools(&mut input, bool_locs).as_bytes())
}
type BoolLocs = [[Vec<usize>; 2]; BOOL_COUNT];
@ -96,14 +92,12 @@ fn find_bools(input: &str) -> [[Vec<usize>; 2]; BOOL_COUNT] {
&& char_guard(
input[it.1.floor_char_boundary(it.0 - 1)..it.0]
.chars()
.last()
.unwrap(),
.last()?,
)
&& char_guard(
input[(last_idx)..(input.ceil_char_boundary(last_idx + 1))]
.chars()
.last()
.unwrap(),
.last()?,
))
.then_some(it.0)
})