Compare commits

..

No commits in common. "4488cbcf1b05590c5877f0407c298a241cc30393" and "07a58afaff73f025bd4a027b78e9a8215716e8c8" have entirely different histories.

12 changed files with 74 additions and 98 deletions

View file

@ -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";

View file

@ -2,6 +2,7 @@
imports = [
./audio.nix
./eduroam.nix
./xdg-portals.nix
./home
./media
./dm.nix

View file

@ -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;

View file

@ -29,7 +29,7 @@
(box
:halign "end"
; (label :text "${iceData.speed}km/h")
(mullvadThing)
(iceTacho)
)
)
)
@ -47,26 +47,14 @@
)
)
(deflisten mullvad
:initial "{\"state\":\"init\"}"
`mullvad status -j listen`
)
(defwidget mullvadThing []
(box
:class "container"
(button
:height 16
:width 16
:class "mullvad-state-${mullvad.state}"
)
)
)
(defwidget iceTacho []
(box
:class "iceTacho"
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
(circular-progress
:value { iceTachoData.frac * 60 + 20 }
:thickness 3
)
(label :text "${iceTachoData.speed} km/h")
)
)

View file

@ -33,20 +33,4 @@ label {
.traveldingsWindow {
border-radius: 15px;
}
.mullvad-state-connected {
background-color: #98971a
}
.mullvad-state-connecting {
background-color: #d79921
}
.mullvad-state-disconnected {
background-color: #cc241d
}
.mullvad-state-init {
background-color: #458588
}

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+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 = [];

View file

@ -5,8 +5,6 @@
./input.nix
./binds.nix
./style.nix
./privacy.nix
./quirks.nix
];
programs.niri.settings = {
outputs."eDP-1" = {
@ -14,7 +12,9 @@
};
spawn-at-startup = [
{command = ["eww" "open-many" "topBar" "bottomBar"];}
{
command = ["eww" "open-many" "topBar" "bottomBar"];
}
{
command = [
"${pkgs.swaybg}/bin/swaybg"
@ -25,5 +25,20 @@
];
}
];
window-rules = [
# TODO: privacy screen rules
{
matches = [
{
app-id = "steam";
}
];
open-focused = false;
}
];
# fix electron apps not doing wayland
environment.ELECTRON_OZONE_PLATFORM_HINT = "auto";
};
}

View file

@ -1,21 +0,0 @@
{...}: {
programs.niri.settings = {
layer-rules = [
{
matches = [
{namespace = "notifications";}
];
block-out-from = "screen-capture";
}
];
window-rules = [
{
matches = [
{app-id = "^signal|Element|org\.gnome\.Evolution$";}
{title = "^.*(Discord|Beispiel Screenshare block Bug).*$";}
];
block-out-from = "screen-capture";
}
];
};
}

View file

@ -1,18 +0,0 @@
{...}: {
programs.niri.settings = {
window-rules = [
# handle steam grabbing focus 1000 times on startup
{
matches = [
{
app-id = "steam";
}
];
open-focused = false;
}
];
# fix electron apps not doing wayland
environment.ELECTRON_OZONE_PLATFORM_HINT = "auto";
};
}

View file

@ -0,0 +1,17 @@
{pkgs, ...}: {
services.gnome.gnome-keyring.enable = true;
xdg.portal = {
enable = true;
config.common = {
default = ["gtk"];
"org.freedesktop.impl.portal.Screencast" = ["gnome"];
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
};
extraPortals = [
pkgs.xdg-desktop-portal-gnome
pkgs.xdg-desktop-portal-gtk
];
};
}

View file

@ -16,8 +16,6 @@ alias cl = cargo clippy;
alias cb = cargo build;
alias cch = cargo check;
alias jb = just build;
alias togglecaps = xdotool key Caps_Lock;
alias TOGGLECAPS = togglecaps;

View file

@ -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<usize>; 2]; BOOL_COUNT];
@ -92,12 +96,14 @@ 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()?,
.last()
.unwrap(),
)
&& char_guard(
input[(last_idx)..(input.ceil_char_boundary(last_idx + 1))]
.chars()
.last()?,
.last()
.unwrap(),
))
.then_some(it.0)
})