diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-05-30 18:13:20 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-05-30 18:13:20 +0200 |
commit | 2783d1b3f76dfae4232cea35308481b544c24db9 (patch) | |
tree | 15a7bfc25f75c55de6dd4d7618eb34d34e02ef3f | |
parent | modules/i3status-rust: Use correct `cfg` value (diff) | |
download | nixos-config-2783d1b3f76dfae4232cea35308481b544c24db9.zip |
pkgs/yambar-modules: Drop
I migrated away from yambar, and i3status-rust provides a batter alternative for these anyways.
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/.envrc | 13 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/.gitignore | 11 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/Cargo.lock | 140 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/Cargo.toml | 19 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/flake.lock | 61 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/flake.lock.license | 9 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/flake.nix | 41 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/package.nix | 23 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/src/cpu.rs | 31 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/src/main.rs | 36 | ||||
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/src/memory.rs | 39 | ||||
-rwxr-xr-x | pkgs/by-name/ya/yambar-modules/update.sh | 6 |
12 files changed, 0 insertions, 429 deletions
diff --git a/pkgs/by-name/ya/yambar-modules/.envrc b/pkgs/by-name/ya/yambar-modules/.envrc deleted file mode 100644 index 294de504..00000000 --- a/pkgs/by-name/ya/yambar-modules/.envrc +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. - -use flake diff --git a/pkgs/by-name/ya/yambar-modules/.gitignore b/pkgs/by-name/ya/yambar-modules/.gitignore deleted file mode 100644 index d888531a..00000000 --- a/pkgs/by-name/ya/yambar-modules/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. - -/target diff --git a/pkgs/by-name/ya/yambar-modules/Cargo.lock b/pkgs/by-name/ya/yambar-modules/Cargo.lock deleted file mode 100644 index d77812b5..00000000 --- a/pkgs/by-name/ya/yambar-modules/Cargo.lock +++ /dev/null @@ -1,140 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -version = 4 - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "libc" -version = "0.2.172" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" - -[[package]] -name = "ntapi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" -dependencies = [ - "winapi", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "sysinfo" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" -dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "rayon", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "yambar-modules" -version = "0.1.0" -dependencies = [ - "sysinfo", -] diff --git a/pkgs/by-name/ya/yambar-modules/Cargo.toml b/pkgs/by-name/ya/yambar-modules/Cargo.toml deleted file mode 100644 index 45078170..00000000 --- a/pkgs/by-name/ya/yambar-modules/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. - -[package] -name = "yambar-modules" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -sysinfo = "0.28.4" diff --git a/pkgs/by-name/ya/yambar-modules/flake.lock b/pkgs/by-name/ya/yambar-modules/flake.lock deleted file mode 100644 index 5b6484da..00000000 --- a/pkgs/by-name/ya/yambar-modules/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1747312588, - "narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b1bebd0fe266bbd1820019612ead889e96a8fa2d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/pkgs/by-name/ya/yambar-modules/flake.lock.license b/pkgs/by-name/ya/yambar-modules/flake.lock.license deleted file mode 100644 index eae6a84c..00000000 --- a/pkgs/by-name/ya/yambar-modules/flake.lock.license +++ /dev/null @@ -1,9 +0,0 @@ -nixos-config - My current NixOS configuration - -Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -SPDX-License-Identifier: GPL-3.0-or-later - -This file is part of my nixos-config. - -You should have received a copy of the License along with this program. -If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. diff --git a/pkgs/by-name/ya/yambar-modules/flake.nix b/pkgs/by-name/ya/yambar-modules/flake.nix deleted file mode 100644 index 99ec66a8..00000000 --- a/pkgs/by-name/ya/yambar-modules/flake.nix +++ /dev/null @@ -1,41 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - description = "Extension modules for yambar(1)"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - nixpkgs, - flake-utils, - ... - }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages."${system}"; - in { - devShells.default = pkgs.mkShell { - packages = with pkgs; [ - # rust stuff - cargo - clippy - rustc - rustfmt - - cargo-edit - cargo-expand - ]; - }; - }); -} -# vim: ts=2 - diff --git a/pkgs/by-name/ya/yambar-modules/package.nix b/pkgs/by-name/ya/yambar-modules/package.nix deleted file mode 100644 index ea25633e..00000000 --- a/pkgs/by-name/ya/yambar-modules/package.nix +++ /dev/null @@ -1,23 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{rustPlatform}: -rustPlatform.buildRustPackage { - pname = "yambar-modules"; - version = "0.1.0"; - - src = ./.; - cargoLock = { - lockFile = ./Cargo.lock; - }; - - meta = { - mainProgram = "yambar-modules"; - }; -} diff --git a/pkgs/by-name/ya/yambar-modules/src/cpu.rs b/pkgs/by-name/ya/yambar-modules/src/cpu.rs deleted file mode 100644 index f53107a8..00000000 --- a/pkgs/by-name/ya/yambar-modules/src/cpu.rs +++ /dev/null @@ -1,31 +0,0 @@ -// nixos-config - My current NixOS configuration -// -// Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -// SPDX-License-Identifier: GPL-3.0-or-later -// -// This file is part of my nixos-config. -// -// You should have received a copy of the License along with this program. -// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. - -use std::{thread, time::Duration}; - -use sysinfo::{CpuExt, System, SystemExt}; - -pub fn cpu() { - let mut sys = System::new(); - - loop { - sys.refresh_cpu(); - let cpu_usage: f32 = sys.cpus().iter().map(|cpu| cpu.cpu_usage()).sum(); - println!( - "cpu|range:0-100|{:.0}", - cpu_usage / sys.cpus().iter().count() as f32 - ); - println!(); - - // Sleeping to give the system time to run for long - // enough to have useful information. - thread::sleep(Duration::from_secs(3)); - } -} diff --git a/pkgs/by-name/ya/yambar-modules/src/main.rs b/pkgs/by-name/ya/yambar-modules/src/main.rs deleted file mode 100644 index 03bafadf..00000000 --- a/pkgs/by-name/ya/yambar-modules/src/main.rs +++ /dev/null @@ -1,36 +0,0 @@ -// nixos-config - My current NixOS configuration -// -// Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -// SPDX-License-Identifier: GPL-3.0-or-later -// -// This file is part of my nixos-config. -// -// You should have received a copy of the License along with this program. -// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. - -use std::{env::args, process}; - -mod cpu; -mod memory; - -fn main() { - let args: Vec<String> = args().collect(); - - if args.len() != 2 { - eprintln!("Usage: yambar-modules cpu|memory"); - process::exit(1); - } - - match args[1].as_str() { - "cpu" => { - cpu::cpu(); - } - "memory" => { - memory::memory(); - } - other => { - eprintln!("'{other}' is not a valid command. Only 'cpu' or 'memory'."); - process::exit(1); - } - } -} diff --git a/pkgs/by-name/ya/yambar-modules/src/memory.rs b/pkgs/by-name/ya/yambar-modules/src/memory.rs deleted file mode 100644 index 7c2c4669..00000000 --- a/pkgs/by-name/ya/yambar-modules/src/memory.rs +++ /dev/null @@ -1,39 +0,0 @@ -// nixos-config - My current NixOS configuration -// -// Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -// SPDX-License-Identifier: GPL-3.0-or-later -// -// This file is part of my nixos-config. -// -// You should have received a copy of the License along with this program. -// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. - -use std::{thread, time::Duration}; - -use sysinfo::{System, SystemExt}; - -pub fn memory() { - let mut sys = System::new(); - - loop { - sys.refresh_memory(); - - let memory_percentage: f64 = - 100 as f64 * (sys.used_memory() as f64 / sys.total_memory() as f64); - - println!("memperc|string|{:.0}", memory_percentage); - if sys.total_swap() > 0 { - let swap_percentage: f64 = - 100 as f64 * (sys.used_swap() as f64 / sys.total_swap() as f64); - println!("swapperc|string|{:.0}", swap_percentage); - println!("swapstate|bool|true"); - } else { - println!("swapstate|bool|false"); - } - println!(""); - - // Sleeping to give the system time to run for long - // enough to have useful information. - thread::sleep(Duration::from_secs(3)); - } -} diff --git a/pkgs/by-name/ya/yambar-modules/update.sh b/pkgs/by-name/ya/yambar-modules/update.sh deleted file mode 100755 index b9404867..00000000 --- a/pkgs/by-name/ya/yambar-modules/update.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh - -[ "$1" = "upgrade" ] && cargo upgrade -cargo update - -# vim: ft=sh |