mohamedsherifnoureldin / pctrl Goto Github PK
View Code? Open in Web Editor NEWRust based Linux Process Manager with both a GUI and a TUI
Rust based Linux Process Manager with both a GUI and a TUI
What UX tool/component/crate is used to span TUI and GUI (if any)?
For example: https://dioxuslabs.com
(I'm too lazy to look through the code to analyze on my own, so I hope you don't mind my lazy question... ๐ค)
When running under Ubuntu 22.04, if your terminal's background color is set to white, you cannot see the User Interface as the majority of text uses white as the default color. If I change my terminal's background color to black, or any other color, you are able to see the terminal interface with no issues.
There should be a way to determine the terminal's background color, and if the terminal background is white, then change the default text color to something else.
This stackoverflow article may help.
This patch will enable this to build with stable rust and avoid a panic when a user is not known to the system (i.e., userid not associated with an actual user, as is the case with some pppd VPN plugins)
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index a2e07d0d..569a11b8 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -1,4 +1,3 @@
-#![feature(linked_list_cursors)]
use std::vec::Vec;
//cmd args
diff --git a/src-tauri/src/our_mods/proc_functions.rs b/src-tauri/src/our_mods/proc_functions.rs
index 7d49e0b9..f9c550ed 100644
--- a/src-tauri/src/our_mods/proc_functions.rs
+++ b/src-tauri/src/our_mods/proc_functions.rs
@@ -18,7 +18,7 @@ use std::process::{Command, Stdio};
fn log_data<T>(list: &mut LinkedList<T>, val:T, config: Config) {
if list.len() == config.record_length as usize {
- list.cursor_back_mut().remove_current();
+ list.pop_back();
}
list.push_front(val);
@@ -153,7 +153,12 @@ pub fn update_procs(_pid_table: &mut HashMap<u32, u16>, procs: &mut Vec<Process>
procs[i].priority = stat.priority as u8;
procs[i].start_time = stat.starttime().unwrap();
procs[i].dir = prc.exe().unwrap_or_default();
- procs[i].owner = get_user_by_uid(prc.uid().unwrap_or(0)).unwrap().name().to_str().unwrap_or("Unidentified").to_string();
+ let uid = prc.uid().unwrap_or(0);
+ procs[i].owner = if let Some(user) = get_user_by_uid(uid) {
+ user.name().to_str().unwrap_or("Unidentified").to_string()
+ } else {
+ uid.to_string()
+ };
procs[i].group = get_group_by_gid(stat.pgrp as u32).unwrap_or(Group::new(0, "none")).name().to_str().unwrap_or("Unidentified").to_string();
match prc.fd_count() {
Ok(_fdcount) => {procs[i].open_fds = _fdcount as u16; // only for root user
In your Readme page Demo gifs are taking too long time to load. Also it doesn't appear in Github mobile application
How feasible is a macOS port?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.