mirror of
https://github.com/edu4rdshl/waybar-rust-modules.git
synced 2026-07-17 23:24:50 +00:00
Add VPN module.
This commit is contained in:
parent
c9542b0dce
commit
d0632fd562
41 changed files with 56 additions and 0 deletions
6
Cargo.lock
generated
Normal file
6
Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
[[package]]
|
||||||
|
name = "waybar-rust-modules"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
13
Cargo.toml
Normal file
13
Cargo.toml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
[package]
|
||||||
|
name = "waybar-rust-modules"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Eduard Tolosa <edu4rdshl@protonmail.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "waybar_vpn"
|
||||||
|
src = "src/bin/waybar_vpn.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
9
src/bin/waybar_vpn.rs
Normal file
9
src/bin/waybar_vpn.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
if Path::new("/proc/sys/net/ipv4/conf/tun0").exists() {
|
||||||
|
println!("{{\"text\": \" ON\"}}");
|
||||||
|
} else {
|
||||||
|
println!("{{\"text\": \" OFF\", \"class\": \"down\"}}");
|
||||||
|
}
|
||||||
|
}
|
||||||
1
target/.rustc_info.json
Normal file
1
target/.rustc_info.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"rustc_fingerprint":16361012863914107182,"outputs":{"4476964694761187371":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/sechacklabs/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n",""],"1164083562126845933":["rustc 1.37.0 (eae3437df 2019-08-13)\nbinary: rustc\ncommit-hash: eae3437dfe991621e8afdc82734f4a172d7ddf9b\ncommit-date: 2019-08-13\nhost: x86_64-unknown-linux-gnu\nrelease: 1.37.0\nLLVM version: 8.0\n",""],"2196823701345282402":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/sechacklabs/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n",""]},"successes":{}}
|
||||||
0
target/debug/.cargo-lock
Normal file
0
target/debug/.cargo-lock
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
fd6d1dce7f695330
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{"rustc":15611408172799703797,"features":"[]","target":5292255576470338685,"profile":14996655781355331481,"path":14354059685716671544,"deps":[],"local":[{"CheckDepInfo":{"dep_info":".fingerprint/waybar-rust-modules-17daf4084cd21a8b/dep-bin-waybar_vpn-17daf4084cd21a8b"}}],"rustflags":[],"metadata":5648991159062139020}
|
||||||
Binary file not shown.
|
|
@ -0,0 +1 @@
|
||||||
|
This file has an mtime of when this was started.
|
||||||
BIN
target/debug/deps/waybar_vpn-17daf4084cd21a8b
Executable file
BIN
target/debug/deps/waybar_vpn-17daf4084cd21a8b
Executable file
Binary file not shown.
5
target/debug/deps/waybar_vpn-17daf4084cd21a8b.d
Normal file
5
target/debug/deps/waybar_vpn-17daf4084cd21a8b.d
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/debug/deps/waybar_vpn-17daf4084cd21a8b: src/bin/waybar_vpn.rs
|
||||||
|
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/debug/deps/waybar_vpn-17daf4084cd21a8b.d: src/bin/waybar_vpn.rs
|
||||||
|
|
||||||
|
src/bin/waybar_vpn.rs:
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/debug/waybar_vpn
Executable file
BIN
target/debug/waybar_vpn
Executable file
Binary file not shown.
1
target/debug/waybar_vpn.d
Normal file
1
target/debug/waybar_vpn.d
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/debug/waybar_vpn: /home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/src/bin/waybar_vpn.rs
|
||||||
0
target/release/.cargo-lock
Normal file
0
target/release/.cargo-lock
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
94fc36d4f4b86bcc
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{"rustc":15611408172799703797,"features":"[]","target":11799719445219010114,"profile":2574335274271406459,"path":1036222786711178230,"deps":[],"local":[{"CheckDepInfo":{"dep_info":".fingerprint/waybar-rust-modules-07a12dde15091900/dep-bin-waybar_rust_modules-07a12dde15091900"}}],"rustflags":[],"metadata":5648991159062139020}
|
||||||
Binary file not shown.
|
|
@ -0,0 +1 @@
|
||||||
|
This file has an mtime of when this was started.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
1067fe49e1fdea12
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{"rustc":15611408172799703797,"features":"[]","target":5292255576470338685,"profile":2574335274271406459,"path":14354059685716671544,"deps":[],"local":[{"CheckDepInfo":{"dep_info":".fingerprint/waybar-rust-modules-8bf3532a5b02e814/dep-bin-waybar_vpn-8bf3532a5b02e814"}}],"rustflags":[],"metadata":5648991159062139020}
|
||||||
Binary file not shown.
|
|
@ -0,0 +1 @@
|
||||||
|
This file has an mtime of when this was started.
|
||||||
BIN
target/release/deps/waybar_rust_modules-07a12dde15091900
Executable file
BIN
target/release/deps/waybar_rust_modules-07a12dde15091900
Executable file
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/release/deps/waybar_rust_modules-07a12dde15091900: src/main.rs
|
||||||
|
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/release/deps/waybar_rust_modules-07a12dde15091900.d: src/main.rs
|
||||||
|
|
||||||
|
src/main.rs:
|
||||||
BIN
target/release/deps/waybar_vpn-8bf3532a5b02e814
Executable file
BIN
target/release/deps/waybar_vpn-8bf3532a5b02e814
Executable file
Binary file not shown.
5
target/release/deps/waybar_vpn-8bf3532a5b02e814.d
Normal file
5
target/release/deps/waybar_vpn-8bf3532a5b02e814.d
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/release/deps/waybar_vpn-8bf3532a5b02e814: src/bin/waybar_vpn.rs
|
||||||
|
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/release/deps/waybar_vpn-8bf3532a5b02e814.d: src/bin/waybar_vpn.rs
|
||||||
|
|
||||||
|
src/bin/waybar_vpn.rs:
|
||||||
BIN
target/release/waybar-rust-modules
Executable file
BIN
target/release/waybar-rust-modules
Executable file
Binary file not shown.
1
target/release/waybar-rust-modules.d
Normal file
1
target/release/waybar-rust-modules.d
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/release/waybar-rust-modules: /home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/src/main.rs
|
||||||
BIN
target/release/waybar_vpn
Executable file
BIN
target/release/waybar_vpn
Executable file
Binary file not shown.
1
target/release/waybar_vpn.d
Normal file
1
target/release/waybar_vpn.d
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/target/release/waybar_vpn: /home/sechacklabs/Projects/Rust/Development/waybar-rust-modules/src/bin/waybar_vpn.rs
|
||||||
Loading…
Add table
Add a link
Reference in a new issue