diff --git a/flake.nix b/flake.nix index e5c7897..8f30908 100644 --- a/flake.nix +++ b/flake.nix @@ -54,8 +54,18 @@ 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"; diff --git a/modules/desktop-environment/home/default.nix b/modules/desktop-environment/home/default.nix index 690a915..06847ca 100644 --- a/modules/desktop-environment/home/default.nix +++ b/modules/desktop-environment/home/default.nix @@ -1,6 +1,6 @@ {...}: { programs.niri.enable = true; - home-manager.users.jade = {pkgs, ...}: { + home-manager.users.jade = {...}: { imports = [ ./notifications.nix ./terminal.nix @@ -17,10 +17,6 @@ services.network-manager-applet.enable = true; xsession.enable = true; - home.packages = [ - pkgs.fluent-reader - ]; - services.gpg-agent = { enable = true; enableNushellIntegration = true; diff --git a/modules/desktop-environment/home/niri/binds.nix b/modules/desktop-environment/home/niri/binds.nix index df6fbc2..f0d3f62 100644 --- a/modules/desktop-environment/home/niri/binds.nix +++ b/modules/desktop-environment/home/niri/binds.nix @@ -54,15 +54,15 @@ "Mod+7".action.focus-workspace = 7; "Mod+8".action.focus-workspace = 8; "Mod+9".action.focus-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; + "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; # column editing stuffs "Mod+BracketLeft".action.consume-or-expel-window-left = []; diff --git a/programs/flip-bool/src/main.rs b/programs/flip-bool/src/main.rs index 8062888..0b99ab8 100644 --- a/programs/flip-bool/src/main.rs +++ b/programs/flip-bool/src/main.rs @@ -1,4 +1,7 @@ -#![feature(pattern, iter_array_chunks, round_char_boundary, iter_collect_into)] +#![feature(iter_array_chunks)] +#![feature(round_char_boundary)] +#![feature(iter_collect_into)] +#![feature(pattern)] use std::{ io::{Read, Write}, @@ -14,16 +17,17 @@ const BOOLS: &[[&str; 2]] = &[ ["no", "yes"], ]; -fn main() -> std::io::Result<()> { +fn main() { let mut input = String::new(); let mut stdin = std::io::stdin(); let mut stdout = std::io::stdout(); - stdin.read_to_string(&mut input)?; + stdin.read_to_string(&mut input).unwrap(); let bool_locs = find_bools(&input); - - stdout.write_all(replace_bools(&mut input, bool_locs).as_bytes()) + stdout + .write_all(replace_bools(&mut input, bool_locs).as_bytes()) + .unwrap(); } type BoolLocs = [[Vec; 2]; BOOL_COUNT]; @@ -92,12 +96,14 @@ fn find_bools(input: &str) -> [[Vec; 2]; BOOL_COUNT] { && char_guard( input[it.1.floor_char_boundary(it.0 - 1)..it.0] .chars() - .last()?, + .last() + .unwrap(), ) && char_guard( input[(last_idx)..(input.ceil_char_boundary(last_idx + 1))] .chars() - .last()?, + .last() + .unwrap(), )) .then_some(it.0) })