diff --git a/Cargo.lock b/Cargo.lock index 5227abe..ebfd75c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,15 +109,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" -[[package]] -name = "bar-ws-monitor" -version = "0.1.0" -dependencies = [ - "serde", - "serde_json", - "swayipc", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -791,38 +782,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "serde" -version = "1.0.209" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.209" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.127" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - [[package]] name = "signal-hook" version = "0.3.17" @@ -903,28 +862,6 @@ dependencies = [ "syn", ] -[[package]] -name = "swayipc" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa5d19f881f372e225095e297072e2e3ee1c4e9e3a46cafe5f5cf70f1313f29" -dependencies = [ - "serde", - "serde_json", - "swayipc-types", -] - -[[package]] -name = "swayipc-types" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e487a656336f74341c70a73a289f68d9ba3cab579ba776352ea0c6cdf603fcda" -dependencies = [ - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "syn" version = "2.0.60" diff --git a/Cargo.toml b/Cargo.toml index 7d9f635..e35ff11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] resolver = "2" -members = [ "programs/bar-ws-monitor", +members = [ "programs/jrnl" ] diff --git a/common.nix b/common.nix index bc82484..99e25fe 100644 --- a/common.nix +++ b/common.nix @@ -42,6 +42,8 @@ with builtins; { environment = { systemPackages = with pkgs; [ + veracrypt + htmlq prusa-slicer @@ -60,14 +62,21 @@ with builtins; { jdk11 jdk libsecret + gh + nix-prefetch-scripts fzf + glab ripgrep + sl + lolcat appimage-run git-crypt file whois p7zip file + nmap + cmatrix tree socat smartmontools @@ -81,10 +90,6 @@ with builtins; { libjxl s10e-jrnl - - ungoogled-chromium - scc - speedtest-rs ]; }; diff --git a/flake.lock b/flake.lock index df5082c..6e741be 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,17 @@ { "nodes": { "crane": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1725125250, - "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", + "lastModified": 1724537630, + "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", "owner": "ipetkov", "repo": "crane", - "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", + "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", "type": "github" }, "original": { @@ -23,11 +28,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1725258763, - "narHash": "sha256-7s5RfYlTljWnKGkK4hOMJCJ0sNQoLYjMxezX3Vijy/0=", + "lastModified": 1724567349, + "narHash": "sha256-w2G1EJlGvgRSC1OAm2147mCzlt6ZOWIiqX/TSJUgrGE=", "owner": "nix-community", "repo": "fenix", - "rev": "0774f58cf1025bbb713971deecc7f07c856be6ed", + "rev": "71fe264f6e208831aa0e7e54ad557a283c375014", "type": "github" }, "original": { @@ -99,11 +104,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1724856988, - "narHash": "sha256-JBLe2CxAhG+J8+x8qmbzkGHNYmGcSiuY2QO4Zhb72lI=", + "lastModified": 1724401716, + "narHash": "sha256-LXTYUVhv6Kz9Iy9DxXSI0J+2/hunUj2fj0Kvw2eDarQ=", "owner": "helix-editor", "repo": "helix", - "rev": "1b5295a3f3d7cccd96eed5bfd394807a4dae87fc", + "rev": "620dfceb849d6b68d41d4f7678bb4675009fef4d", "type": "github" }, "original": { @@ -119,11 +124,11 @@ ] }, "locked": { - "lastModified": 1725180166, - "narHash": "sha256-fzssXuGR/mCeGbzM1ExaTqDz7QDGta3WA4jJsZyRruo=", + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "owner": "nix-community", "repo": "home-manager", - "rev": "471e3eb0a114265bcd62d11d58ba8d3421ee68eb", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "type": "github" }, "original": { @@ -200,11 +205,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1725103162, - "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", "type": "github" }, "original": { @@ -230,11 +235,11 @@ }, "nixpkgs-unstable-small": { "locked": { - "lastModified": 1725274606, - "narHash": "sha256-xXINAjCR8eTmp3AxZTk/PIH9nNoFNN0OM7MUw6eB7oQ=", + "lastModified": 1724558323, + "narHash": "sha256-uPXidysk1BXSayGzpxDW8JUgGvLWS+L1CTlBV3xcQB4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "66a352a3f27a2eb2f27e42a13c6fe245d3be2b98", + "rev": "ba0c72cea47a45556ccd5bc566433bd1242a0f93", "type": "github" }, "original": { @@ -260,11 +265,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1725191098, - "narHash": "sha256-YH0kH5CSOnAuPUB1BUzUqvnKiv5SgDhfMNjrkki9Ahk=", + "lastModified": 1724480527, + "narHash": "sha256-C+roFDGk6Bn/C58NGpyt7cneLCetdRMUfFTkm3O4zWM=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "779d9eee2ea403da447278a7007c9627c8878856", + "rev": "74a6427861eb8d1e3b7c6090b2c2890ff4c53e0e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 52b2f66..fa735be 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,9 @@ }; crane = { url = "github:ipetkov/crane"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; }; fenix = { url = "github:nix-community/fenix"; @@ -52,7 +55,7 @@ pkgs = nixpkgs.legacyPackages.${system}; pkgs-stable = nixpkgs-stable.legacyPackages.${system}; pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages.${system}; - crane-lib = crane.mkLib nixpkgs.legacyPackages.${system}; + crane-lib = crane.lib.${system}; rs-toolchain = with fenix.packages.${system}; combine [ complete.toolchain diff --git a/hosts/catbook-j/configuration.nix b/hosts/catbook-j/configuration.nix index 5ed71d5..d0f1c6b 100644 --- a/hosts/catbook-j/configuration.nix +++ b/hosts/catbook-j/configuration.nix @@ -42,7 +42,7 @@ systemd.services."ModemManager".wantedBy = ["multi-user.target"]; environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl"); + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); S10E_JRNL_FILE_LOC = "/home/jade/Docs/jrnl.md"; }; diff --git a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck deleted file mode 100644 index 6c31965..0000000 --- a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck +++ /dev/null @@ -1,59 +0,0 @@ -(defwindow bottomBar - :monitor 0 - :stacking "fg" - :wm-ignore true - :exclusive true - :geometry (geometry - :width "100%" - :height "32px" - :anchor "bottom center") - (bottomBar)) - -(defwidget bottomBar [] - (overlay - :class "bottomBar" - (centerbox - (box - :halign "start" - (workspaceWidget) - ) - (box - :halign "center" - (label :text "mid") - ) - (box - :halign "end" - (label :text "right") - ) - ) - (box - :class "lesbianFlag" - :height 1 - ( flagEl :flipped true :color "#D52D00") - ( flagEl :flipped true :color "#EF7627") - ( flagEl :flipped true :color "#FF9A56") - ( flagEl :flipped true :color "#FFFFFF") - ( flagEl :flipped true :color "#D162A4") - ( flagEl :flipped true :color "#B55690") - ( flagEl :flipped true :color "#A30262") - ) - ) -) - -(defwidget workspaceWidget [] - (box - :class "workspaces" - (for workspace in workspaces - (button - :class "${workspace.urgent ? "urgent" : ""} ${workspace.focused ? "focused" : 0}" - :onclick "swaymsg workspace ${workspace.name}" - (label :text "${workspace.name}") - ) - ) - ) -) - -(deflisten workspaces - :initial "[]" - "bar-ws-monitor" -) diff --git a/modules/desktop-environment/home/panels/eww/configDir/eww.css b/modules/desktop-environment/home/panels/eww/configDir/eww.css index 229ec7e..3e12d0f 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/eww.css +++ b/modules/desktop-environment/home/panels/eww/configDir/eww.css @@ -1,20 +1,7 @@ -.topBar { +.topbar { margin-bottom: 2px; } label { font: 14pt "FiraCode Nerd Font"; -} - -.workspaces button { - border: 0px; - background-color: #282828; -} - -.workspaces button.urgent { - background-color: #cc241d; -} - -.workspaces button.focused { - background-color: #504935; } \ No newline at end of file diff --git a/modules/desktop-environment/home/panels/eww/configDir/eww.yuck b/modules/desktop-environment/home/panels/eww/configDir/eww.yuck index 5e5d10d..d17d0f0 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/eww.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/eww.yuck @@ -1,2 +1 @@ (include "topBar/topBar.yuck") -(include "bottomBar/bottomBar.yuck") diff --git a/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck b/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck index be4b25f..8963e5a 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck @@ -5,6 +5,7 @@ (defwindow topBar :monitor 0 :stacking "fg" + :windowtype "normal" :wm-ignore true :exclusive true :geometry (geometry @@ -45,11 +46,11 @@ (box :class "transFlag" :height 1 - ( flagEl :flipped false :color "#5BCEFA") - ( flagEl :flipped false :color "#F5A9B8") - ( flagEl :flipped false :color "#FFFFFF") - ( flagEl :flipped false :color "#F5A9B8") - ( flagEl :flipped false :color "#5BCEFA") + ( flagEl :color "#5BCEFA") + ( flagEl :color "#F5A9B8") + ( flagEl :color "#FFFFFF") + ( flagEl :color "#F5A9B8") + ( flagEl :color "#5BCEFA") ) ) ) diff --git a/modules/desktop-environment/home/panels/eww/configDir/util.yuck b/modules/desktop-environment/home/panels/eww/configDir/util.yuck index f0aa592..53b9be5 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/util.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/util.yuck @@ -1,6 +1,6 @@ -(defwidget flagEl [color ?flipped] +(defwidget flagEl [color] (box - :style "border-${flipped ? "top" : "bottom"}: 3px solid ${color}" + :style "border-bottom: 3px solid ${color}" :halign "fill" ) ) diff --git a/modules/desktop-environment/home/sway/default.nix b/modules/desktop-environment/home/sway/default.nix index 2522cc6..75f4bf5 100644 --- a/modules/desktop-environment/home/sway/default.nix +++ b/modules/desktop-environment/home/sway/default.nix @@ -13,7 +13,6 @@ # sway = { # default = ["wlr"]; # }; - config.common.default = "*"; }; services.swayidle = { @@ -26,6 +25,22 @@ ]; }; + programs.waybar = { + enable = true; + systemd = { + enable = true; + target = "sway-session.target"; + }; + settings = { + interactiveBar = { + layer = "top"; + position = "bottom"; + modules-left = ["sway/workspaces" "sway/mode"]; + modules-right = ["wlr/taskbar"]; + }; + }; + }; + wayland.windowManager.sway = { enable = true; systemd = { @@ -64,7 +79,7 @@ }; startup = [ { - command = "eww open topBar; eww open bottomBar"; + command = "eww open topBar"; } { command = "pkill nm-applet; sleep 1 && nm-applet"; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 993e172..63daa0d 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -30,6 +30,14 @@ in ./x.nix ]; + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + programs.seahorse.enable = true; security.pam.services.jade.enableGnomeKeyring = true; @@ -116,7 +124,11 @@ in jellyfin-media-player # from environment.systemPackages cleanup + xdotool + xorg.xwininfo gparted + # uhk-agent + cool-retro-term xdg-desktop-portal-gtk virt-manager ddccontrol-db diff --git a/modules/desktop/fonts.nix b/modules/desktop/fonts.nix index 97c7453..d7b3b12 100644 --- a/modules/desktop/fonts.nix +++ b/modules/desktop/fonts.nix @@ -14,7 +14,6 @@ libertine inter b612 - departure-mono ]; fonts.fontDir.enable = true; } diff --git a/modules/desktop/social.nix b/modules/desktop/social.nix index b8569bc..ea3e560 100644 --- a/modules/desktop/social.nix +++ b/modules/desktop/social.nix @@ -20,6 +20,8 @@ in signal-desktop mumble element-desktop + # nheko + # iamb ]; }; }; diff --git a/programs/bar-ws-monitor/Cargo.toml b/programs/bar-ws-monitor/Cargo.toml deleted file mode 100644 index 5c1a1f6..0000000 --- a/programs/bar-ws-monitor/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "bar-ws-monitor" -version = "0.1.0" -edition = "2021" - -[dependencies] -serde = { version = "1.0.209", features = [ "derive" ] } -serde_json = "1.0.127" -swayipc = "3.0.2" diff --git a/programs/bar-ws-monitor/src/main.rs b/programs/bar-ws-monitor/src/main.rs deleted file mode 100644 index b911272..0000000 --- a/programs/bar-ws-monitor/src/main.rs +++ /dev/null @@ -1,53 +0,0 @@ -use core::panic; - -use serde::Serialize; -use swayipc::{Connection, Event, EventType, Fallible, Workspace, WorkspaceChange}; - -fn main() -> Fallible<()> { - let mut con = Connection::new()?; - let mut workspaces: Vec = con - .get_workspaces()? - .into_iter() - .map(|ws| ws.into()) - .collect(); - println!("{}", serde_json::ser::to_string(&workspaces).unwrap()); - - for ev in con.subscribe([EventType::Workspace])? { - // the lazy/ugly solution! - // we create a new connection and request workspaces again and again and again - // TODO: properly handle events one by one - let mut con = Connection::new()?; - workspaces = con - .get_workspaces()? - .into_iter() - .map(|ws| ws.into()) - .collect(); - println!("{}", serde_json::ser::to_string(&workspaces).unwrap()); - } - - Ok(()) -} - -#[derive(Debug, Serialize)] -struct WsData { - name: String, - focused: bool, - urgent: bool, -} - -impl From for WsData { - fn from( - Workspace { - name, - focused, - urgent, - .. - }: Workspace, - ) -> Self { - WsData { - name, - focused, - urgent, - } - } -}