Fix compilation errors
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
cd07f3d37d1e2f34a574c04e649e79939de199a1- Parents
-
8b30643 - Tree
157dd29
cd07f3d
cd07f3d37d1e2f34a574c04e649e79939de199a18b30643
157dd29| Status | File | + | - |
|---|---|---|---|
| A |
flake.lock
|
82 | 0 |
| M |
gartray/src/daemon.rs
|
1 | 1 |
| M |
gartray/src/ipc.rs
|
3 | 4 |
| M |
gartray/src/main.rs
|
5 | 1 |
| M |
gartray/src/panel/mod.rs
|
1 | 2 |
| M |
gartray/src/tray/xembed.rs
|
1 | 1 |
flake.lockadded@@ -0,0 +1,82 @@ | ||
| 1 | +{ | |
| 2 | + "nodes": { | |
| 3 | + "flake-utils": { | |
| 4 | + "inputs": { | |
| 5 | + "systems": "systems" | |
| 6 | + }, | |
| 7 | + "locked": { | |
| 8 | + "lastModified": 1731533236, | |
| 9 | + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", | |
| 10 | + "owner": "numtide", | |
| 11 | + "repo": "flake-utils", | |
| 12 | + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", | |
| 13 | + "type": "github" | |
| 14 | + }, | |
| 15 | + "original": { | |
| 16 | + "owner": "numtide", | |
| 17 | + "repo": "flake-utils", | |
| 18 | + "type": "github" | |
| 19 | + } | |
| 20 | + }, | |
| 21 | + "nixpkgs": { | |
| 22 | + "locked": { | |
| 23 | + "lastModified": 1768564909, | |
| 24 | + "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", | |
| 25 | + "owner": "NixOS", | |
| 26 | + "repo": "nixpkgs", | |
| 27 | + "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", | |
| 28 | + "type": "github" | |
| 29 | + }, | |
| 30 | + "original": { | |
| 31 | + "owner": "NixOS", | |
| 32 | + "ref": "nixos-unstable", | |
| 33 | + "repo": "nixpkgs", | |
| 34 | + "type": "github" | |
| 35 | + } | |
| 36 | + }, | |
| 37 | + "root": { | |
| 38 | + "inputs": { | |
| 39 | + "flake-utils": "flake-utils", | |
| 40 | + "nixpkgs": "nixpkgs", | |
| 41 | + "rust-overlay": "rust-overlay" | |
| 42 | + } | |
| 43 | + }, | |
| 44 | + "rust-overlay": { | |
| 45 | + "inputs": { | |
| 46 | + "nixpkgs": [ | |
| 47 | + "nixpkgs" | |
| 48 | + ] | |
| 49 | + }, | |
| 50 | + "locked": { | |
| 51 | + "lastModified": 1768877311, | |
| 52 | + "narHash": "sha256-abSDl0cNr0B+YCsIDpO1SjXD9JMxE4s8EFnhLEFVovI=", | |
| 53 | + "owner": "oxalica", | |
| 54 | + "repo": "rust-overlay", | |
| 55 | + "rev": "59e4ab96304585fde3890025fd59bd2717985cc1", | |
| 56 | + "type": "github" | |
| 57 | + }, | |
| 58 | + "original": { | |
| 59 | + "owner": "oxalica", | |
| 60 | + "repo": "rust-overlay", | |
| 61 | + "type": "github" | |
| 62 | + } | |
| 63 | + }, | |
| 64 | + "systems": { | |
| 65 | + "locked": { | |
| 66 | + "lastModified": 1681028828, | |
| 67 | + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | |
| 68 | + "owner": "nix-systems", | |
| 69 | + "repo": "default", | |
| 70 | + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | |
| 71 | + "type": "github" | |
| 72 | + }, | |
| 73 | + "original": { | |
| 74 | + "owner": "nix-systems", | |
| 75 | + "repo": "default", | |
| 76 | + "type": "github" | |
| 77 | + } | |
| 78 | + } | |
| 79 | + }, | |
| 80 | + "root": "root", | |
| 81 | + "version": 7 | |
| 82 | +} | |
gartray/src/daemon.rsmodified@@ -4,7 +4,7 @@ use anyhow::{Context, Result}; | ||
| 4 | 4 | use std::fs; |
| 5 | 5 | use std::io::Write; |
| 6 | 6 | use std::path::PathBuf; |
| 7 | -use std::sync::mpsc::{self, Receiver}; | |
| 7 | +use std::sync::mpsc::Receiver; | |
| 8 | 8 | use tokio::signal::unix::{signal, SignalKind}; |
| 9 | 9 | use tracing::{debug, info, warn}; |
| 10 | 10 | |
gartray/src/ipc.rsmodified@@ -9,7 +9,7 @@ use std::os::unix::net::{UnixListener, UnixStream}; | ||
| 9 | 9 | use std::path::PathBuf; |
| 10 | 10 | use std::sync::mpsc::{self, Receiver, Sender}; |
| 11 | 11 | use std::thread; |
| 12 | -use tracing::{debug, error, info, warn}; | |
| 12 | +use tracing::{debug, error, info}; | |
| 13 | 13 | |
| 14 | 14 | /// Get the path to the IPC socket |
| 15 | 15 | pub fn socket_path() -> PathBuf { |
@@ -88,10 +88,9 @@ impl IpcServer { | ||
| 88 | 88 | socket_path: socket_path(), |
| 89 | 89 | listener: None, |
| 90 | 90 | tx, |
| 91 | - rx: Some(rx), | |
| 91 | + rx: None, | |
| 92 | 92 | }; |
| 93 | - let rx = server.rx.clone(); | |
| 94 | - (server, rx.unwrap()) | |
| 93 | + (server, rx) | |
| 95 | 94 | } |
| 96 | 95 | |
| 97 | 96 | /// Start listening for connections |
gartray/src/main.rsmodified@@ -59,10 +59,14 @@ async fn main() -> Result<()> { | ||
| 59 | 59 | let cli = Cli::parse(); |
| 60 | 60 | |
| 61 | 61 | match cli.command { |
| 62 | - Some(Commands::Daemon { foreground }) | None => { | |
| 62 | + Some(Commands::Daemon { foreground }) => { | |
| 63 | 63 | info!("Starting gartray daemon"); |
| 64 | 64 | daemon::run(cli.config, foreground || cli.foreground).await |
| 65 | 65 | } |
| 66 | + None => { | |
| 67 | + info!("Starting gartray daemon"); | |
| 68 | + daemon::run(cli.config, cli.foreground).await | |
| 69 | + } | |
| 66 | 70 | Some(Commands::Panel) => { |
| 67 | 71 | info!("Showing quick settings panel"); |
| 68 | 72 | ipc::send_command("panel").await |
gartray/src/panel/mod.rsmodified@@ -17,6 +17,5 @@ pub trait PanelModule { | ||
| 17 | 17 | /// Update module state |
| 18 | 18 | fn update(&mut self); |
| 19 | 19 | |
| 20 | - /// Render the module widget | |
| 21 | - // fn render(&self, renderer: &mut Renderer, rect: Rect); | |
| 20 | + // TODO: fn render(&self, renderer: &mut Renderer, rect: Rect); | |
| 22 | 21 | } |
gartray/src/tray/xembed.rsmodified@@ -5,12 +5,12 @@ | ||
| 5 | 5 | use std::collections::HashMap; |
| 6 | 6 | use anyhow::{Context, Result}; |
| 7 | 7 | use gartk_x11::{Connection, Window, WindowConfig}; |
| 8 | -use x11rb::connection::Connection as X11Connection; | |
| 9 | 8 | use x11rb::protocol::xproto::{ |
| 10 | 9 | self, Atom, AtomEnum, ClientMessageEvent, ConfigureWindowAux, |
| 11 | 10 | ConnectionExt, CreateWindowAux, EventMask, PropMode, WindowClass, |
| 12 | 11 | }; |
| 13 | 12 | use x11rb::protocol::Event; |
| 13 | +use x11rb::wrapper::ConnectionExt as WrapperConnectionExt; | |
| 14 | 14 | use tracing::{debug, info, warn}; |
| 15 | 15 | |
| 16 | 16 | use crate::config::TrayConfig; |