mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2025-11-17 09:09:42 +01:00
Compare commits
2 commits
66ca973686
...
07a58afaff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07a58afaff |
||
|
|
2da9d27e54 |
4 changed files with 15 additions and 18 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
./dm.nix
|
./dm.nix
|
||||||
./tlp.nix
|
./tlp.nix
|
||||||
./locale.nix
|
./locale.nix
|
||||||
|
./printing.nix
|
||||||
];
|
];
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,9 @@
|
||||||
ptouch-driver
|
ptouch-driver
|
||||||
epsonscan2
|
epsonscan2
|
||||||
epson-escpr
|
epson-escpr
|
||||||
epson-inkjet-printer-escpr2
|
epson-escpr2
|
||||||
epson_201207w
|
epson_201207w
|
||||||
epson-alc1100
|
epson-alc1100
|
||||||
epson
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
d = "@<C-w>vgd";
|
d = "@<C-w>vgd";
|
||||||
f = "@<C-w>vgy";
|
f = "@<C-w>vgy";
|
||||||
h = ":toggle-option lsp.display-inlay-hints";
|
h = ":toggle-option lsp.display-inlay-hints";
|
||||||
t = "@|flip-bool<ret>";
|
t = ":pipe flip-bool";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
insert = {
|
insert = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
#![feature(pattern)]
|
#![feature(pattern)]
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
hint::black_box,
|
|
||||||
io::{Read, Write},
|
io::{Read, Write},
|
||||||
str::pattern::Pattern,
|
str::pattern::Pattern,
|
||||||
};
|
};
|
||||||
|
|
@ -86,29 +85,27 @@ fn find_bools(input: &str) -> [[Vec<usize>; 2]; BOOL_COUNT] {
|
||||||
input
|
input
|
||||||
.match_indices(it)
|
.match_indices(it)
|
||||||
.filter_map(|it| {
|
.filter_map(|it| {
|
||||||
let char_guard = |c: char| !(c.is_alphanumeric() || c.is_contained_in("-_"));
|
fn char_guard(c: char) -> bool {
|
||||||
let mut allow = true;
|
!(c.is_alphanumeric() || c.is_contained_in("-_"))
|
||||||
|
}
|
||||||
|
|
||||||
if it.0 > 0 {
|
let last_idx = it.0 + it.1.len();
|
||||||
allow &= char_guard(
|
|
||||||
|
(it.0 > 0
|
||||||
|
&& last_idx < input.len()
|
||||||
|
&& char_guard(
|
||||||
input[it.1.floor_char_boundary(it.0 - 1)..it.0]
|
input[it.1.floor_char_boundary(it.0 - 1)..it.0]
|
||||||
.chars()
|
.chars()
|
||||||
.last()
|
.last()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
)
|
||||||
}
|
&& char_guard(
|
||||||
|
|
||||||
let last_idx = it.0 + it.1.len();
|
|
||||||
if last_idx < input.len() {
|
|
||||||
allow &= char_guard(
|
|
||||||
input[(last_idx)..(input.ceil_char_boundary(last_idx + 1))]
|
input[(last_idx)..(input.ceil_char_boundary(last_idx + 1))]
|
||||||
.chars()
|
.chars()
|
||||||
.last()
|
.last()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
))
|
||||||
}
|
.then_some(it.0)
|
||||||
|
|
||||||
allow.then_some(it.0)
|
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue