├── .gitignore ├── src ├── actors │ ├── mod.rs │ ├── i3_ipc.rs │ ├── glimmer_manager.rs │ └── glimmer_instance.rs ├── main.rs └── gtk_utils.rs ├── themes ├── flash.css └── example.css ├── Cargo.toml ├── .github └── workflows │ ├── build-and-release.yaml │ └── bump.yaml ├── LICENSE ├── README.md └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target -------------------------------------------------------------------------------- /src/actors/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod glimmer_instance; 2 | pub mod glimmer_manager; 3 | pub mod i3_ipc; 4 | -------------------------------------------------------------------------------- /themes/flash.css: -------------------------------------------------------------------------------- 1 | #box { 2 | background: rgba(255, 255, 255, 0.2); 3 | transition: background 2s ease, margin 0.2s ease; 4 | margin: 10px; 5 | } 6 | 7 | .animate #box { 8 | background: transparent; 9 | margin: 0px; 10 | } 11 | 12 | #label { 13 | opacity: 0; 14 | } 15 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "glimmer" 3 | version = "0.0.6-alpha.1" 4 | authors = ["Daniel Acuna <4857535+moustacheful@users.noreply.github.com>"] 5 | edition = "2018" 6 | description = "A tool for decorating i3/Sway focused windows" 7 | readme = "README.md" 8 | repository = "https://github.com/moustacheful/glimmer/" 9 | license = "MIT" 10 | 11 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 12 | 13 | [dependencies] 14 | gtk = "0.14.0" 15 | gdk = "0.14.0" 16 | cairo-rs = "0.14.0" 17 | glib = "0.14.0" 18 | tokio-i3ipc = "0.15.0" 19 | tokio-stream = "0.1.6" 20 | actix = "0.12" 21 | clap = { version = "4.0.26", features = ["derive"] } 22 | -------------------------------------------------------------------------------- /.github/workflows/build-and-release.yaml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | tags: v* 4 | 5 | name: Build and Github release 6 | 7 | jobs: 8 | build-and-release: 9 | name: Build and release 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | 14 | - uses: actions-rs/toolchain@v1 15 | with: 16 | toolchain: stable 17 | 18 | - name: Install deps 19 | run: sudo apt-get install libgtk-3-dev 20 | 21 | - name: Build 22 | run: cargo build --release --locked 23 | 24 | - name: Create Github Release 25 | uses: softprops/action-gh-release@v1 26 | with: 27 | files: target/release/glimmer 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | -------------------------------------------------------------------------------- /.github/workflows/bump.yaml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - master 5 | 6 | name: Bump 7 | 8 | jobs: 9 | bump: 10 | name: Bump 11 | runs-on: ubuntu-latest 12 | if: "${{ !startsWith(github.event.head_commit.message, 'chore: Release') }}" 13 | steps: 14 | - uses: actions/checkout@v3 15 | with: 16 | token: "${{ secrets.COMMIT_KEY }}" 17 | 18 | - uses: actions-rs/toolchain@v1 19 | with: 20 | toolchain: stable 21 | 22 | - name: Git config 23 | run: | 24 | git config --global user.name 'Beep Boop' 25 | git config --global user.email 'moustacheful@users.noreply.github.com' 26 | 27 | - name: Release 28 | run: | 29 | cargo login ${{ secrets.PUBLISH_KEY }} 30 | cargo install cargo-release@0.23.1 31 | cargo release patch --no-confirm --no-verify --execute 32 | -------------------------------------------------------------------------------- /themes/example.css: -------------------------------------------------------------------------------- 1 | @keyframes example { 2 | 0% { 3 | border-color: #f5cb42; 4 | border-width: 0px; 5 | } 6 | 5% { 7 | border-width: 2px; 8 | border-top-width: 20px; 9 | border-color: #f5cb42; 10 | } 11 | 90% { 12 | border-top-width: 20px; 13 | border-color: #f5cb42; 14 | } 15 | 95% { 16 | border-top-width: 2px; 17 | border-color: #f5cb42; 18 | } 19 | 20 | 100% { 21 | border-color: transparent; 22 | } 23 | } 24 | 25 | #box { 26 | animation-fill-mode: both; 27 | border: 2px solid transparent; 28 | } 29 | 30 | @keyframes label { 31 | 0% { 32 | opacity: 0; 33 | } 34 | 10% { 35 | opacity: 1; 36 | } 37 | 85% { 38 | opacity: 1; 39 | } 40 | 95% { 41 | opacity: 0; 42 | } 43 | } 44 | 45 | .animate #box { 46 | animation: example 1.5s ease; 47 | } 48 | 49 | #label { 50 | color: black; 51 | opacity: 0; 52 | margin-left: 5px; 53 | } 54 | 55 | .animate #label { 56 | animation: label 1.5s ease; 57 | } 58 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use actix::prelude::*; 2 | use actors::glimmer_manager::AttachSenderMsg; 3 | use clap::Parser; 4 | use std::thread; 5 | mod actors; 6 | mod gtk_utils; 7 | 8 | #[derive(Parser, Debug)] 9 | #[command(author, version, about, long_about = None)] 10 | struct Args { 11 | /// The path of the css file to use 12 | #[arg(short, long)] 13 | styles: String, 14 | } 15 | 16 | fn main() { 17 | let opts = Args::parse(); 18 | 19 | gtk::init().expect("Failed to initialize GTK."); 20 | gtk_utils::setup(opts.styles); 21 | 22 | let sender = gtk_utils::handle_messages(); 23 | 24 | thread::spawn(move || { 25 | let system = System::new(); 26 | 27 | system.block_on(async { 28 | let manager = actors::glimmer_manager::GlimmerManager::from_registry(); 29 | manager.do_send(AttachSenderMsg { sender }); 30 | 31 | actors::i3_ipc::I3Ipc {}.start(); 32 | }); 33 | 34 | system.run().unwrap(); 35 | }); 36 | 37 | gtk::main(); 38 | } 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Daniel Acuña 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/actors/i3_ipc.rs: -------------------------------------------------------------------------------- 1 | use actix::prelude::*; 2 | use std::io; 3 | use tokio_i3ipc::{ 4 | event::{Event, Subscribe}, 5 | reply::Node, 6 | I3, 7 | }; 8 | use tokio_stream::StreamExt; 9 | 10 | use super::glimmer_manager::{GlimmerManager, WindowDataMsg}; 11 | pub struct I3Ipc {} 12 | 13 | trait Find { 14 | fn find_node(self, id: usize) -> Option; 15 | } 16 | 17 | impl Find for Node { 18 | fn find_node(self, id: usize) -> Option { 19 | if self.id == id { 20 | return Some(self); 21 | } 22 | 23 | if self.nodes.is_empty() { 24 | return None; 25 | } 26 | 27 | let mut result: Option = None; 28 | 29 | for n in self.nodes { 30 | if let Some(found) = n.find_node(id) { 31 | result = Some(found); 32 | break; 33 | } 34 | } 35 | 36 | result 37 | } 38 | } 39 | 40 | // impl Find for Node {} 41 | 42 | async fn i3_subscribe() -> io::Result<()> { 43 | let addr = GlimmerManager::from_registry(); 44 | 45 | let mut i3 = I3::connect().await?; 46 | // There must be a better way of doing this instead of using two clients? 47 | let mut i32 = I3::connect().await?; 48 | 49 | i3.subscribe([Subscribe::Window]).await?; 50 | 51 | let mut listener = i3.listen(); 52 | while let Some(evt) = listener.next().await { 53 | if let Event::Window(window_evt) = evt? { 54 | let tree = i32.get_tree().await?; 55 | let found = tree 56 | .find_node(window_evt.container.id) 57 | .unwrap_or(window_evt.container); 58 | 59 | addr.do_send(WindowDataMsg { 60 | change: window_evt.change, 61 | container: found, 62 | }) 63 | } 64 | } 65 | 66 | Ok(()) 67 | } 68 | 69 | impl Actor for I3Ipc { 70 | type Context = Context; 71 | 72 | fn started(&mut self, _ctx: &mut Context) { 73 | // TODO: handle abort, on actor stop? 74 | actix::spawn(async { i3_subscribe().await.unwrap() }); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/actors/glimmer_manager.rs: -------------------------------------------------------------------------------- 1 | use super::glimmer_instance::{GlimmerInstance, InstanceKillNotificationMsg}; 2 | use actix::{prelude::*, WeakAddr}; 3 | use glib::Sender; 4 | use std::collections::HashMap; 5 | use tokio_i3ipc::event::WindowChange; 6 | use tokio_i3ipc::reply::Node; 7 | 8 | #[derive(Debug, Message)] 9 | #[rtype(result = "()")] 10 | pub struct WindowDataMsg { 11 | pub change: WindowChange, 12 | pub container: Node, 13 | } 14 | 15 | #[derive(Debug, Message)] 16 | #[rtype(result = "()")] 17 | pub struct AttachSenderMsg { 18 | pub sender: Sender, 19 | } 20 | 21 | // Actor definition 22 | #[derive(Default)] 23 | pub struct GlimmerManager { 24 | instances: HashMap>, 25 | sender: Option>, 26 | } 27 | 28 | impl Supervised for GlimmerManager {} 29 | impl SystemService for GlimmerManager { 30 | fn start_service(_wrk: &ArbiterHandle) -> Addr { 31 | Self { 32 | instances: HashMap::new(), 33 | sender: None, 34 | } 35 | .start() 36 | } 37 | } 38 | impl Actor for GlimmerManager { 39 | type Context = Context; 40 | } 41 | 42 | impl GlimmerManager { 43 | pub fn get_instance( 44 | &mut self, 45 | msg: &WindowDataMsg, 46 | self_address: Addr, 47 | ) -> &WeakAddr { 48 | let id = msg.container.id; 49 | let sender = self.sender.clone().unwrap(); 50 | let instance = self.instances.entry(id).or_insert_with(|| { 51 | GlimmerInstance::new(id, sender, self_address) 52 | .start() 53 | .downgrade() 54 | }); 55 | 56 | instance 57 | } 58 | } 59 | 60 | impl Handler for GlimmerManager { 61 | type Result = (); 62 | 63 | fn handle(&mut self, msg: WindowDataMsg, ctx: &mut Context) { 64 | let instance = self.get_instance(&msg, ctx.address()); 65 | 66 | if let Some(addr) = instance.upgrade() { 67 | addr.do_send(msg); 68 | } 69 | } 70 | } 71 | 72 | impl Handler for GlimmerManager { 73 | type Result = (); 74 | 75 | fn handle( 76 | &mut self, 77 | msg: InstanceKillNotificationMsg, 78 | _ctx: &mut Self::Context, 79 | ) -> Self::Result { 80 | self.instances.remove(&msg.id); 81 | } 82 | } 83 | 84 | impl Handler for GlimmerManager { 85 | type Result = (); 86 | 87 | fn handle(&mut self, msg: AttachSenderMsg, _ctx: &mut Self::Context) -> Self::Result { 88 | self.sender = Some(msg.sender); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # glimmer 2 | 3 | ## What 4 | 5 | A tool for decorating i3 windows when they get focused, written in Rust. 6 | 7 | https://user-images.githubusercontent.com/4857535/124782646-61e90a80-df12-11eb-8930-a321ecffbee1.mp4 8 | 9 | ## Why 10 | 11 | When using i3-gaps I ran into the following problems. 12 | 13 | - Glitches when using regular borders and titlebars that showed up in the background (as described [here](https://github.com/Airblader/i3/issues/190)), which as far as I know haven't been solved yet. 14 | - The above meant usually relying on transparency or dimming to have a 'highlighted' state, which for me at least beats the purpose of having all your windows in a tiled fashion. To get the highlighted effect you have to lower the opacity or dim it to the point it's too hard to read. 15 | - Even if borders and titlebars _did_ work properly. They just don't gel very well with the `a e s t h e t i c` anyway. 16 | 17 | Eventually I gave up and continued using vanilla i3 instead, but had this idea floating around. It focuses on those shortcomings. Does it solve them? Not too sure myself, but it was a fun experiment. 18 | 19 | ## Requirements 20 | 21 | - i3 (Note that Sway is not currently supported) 22 | - A compositor, since it literally draws windows on top of your windows. 23 | - GTK needs to be on your system to build this application, follow the instructions [here](https://crates.io/crates/gtk) 24 | 25 | For building: 26 | 27 | - Rust v1.5x, currently only tested with **v1.53.0** 28 | 29 | ``` 30 | cargo build && cargo run 31 | ``` 32 | 33 | ## Installation 34 | 35 | #### Pre built binaries 36 | 37 | You can download a pre built-binary from the [releases page](https://github.com/moustacheful/glimmer/releases) 38 | 39 | #### Cargo 40 | 41 | Remember to read the requirements above! 42 | 43 | ``` 44 | cargo install glimmer 45 | ``` 46 | 47 | ## Running and customizing 48 | 49 | ``` 50 | glimmer --styles=./path/to/your/theme.css 51 | ``` 52 | 53 | The css file dictates how the window decorations look like, and they have 2 elements to customize, `#box` which represents the boundaries of the window and `#label`, which has the window title. Additionally, there's an `.animate` class applied to the parent which can help triggering animations for both the box and label. 54 | 55 | There are some examples of this in the `themes` directory. Feel free to contribute more! 56 | 57 | #### Note that the CSS is not full spec, and you can see the supported properties by GTK [here](https://docs.gtk.org/gtk3/css-properties.html) 58 | 59 | A simple example for this, animated using transitions: 60 | 61 | ```css 62 | #box { 63 | background: rgba(255, 200, 0, 0.2); 64 | transition: background 2s ease, margin 0.2s ease; 65 | margin: 10px; 66 | } 67 | 68 | .animate #box { 69 | background: transparent; 70 | margin: 0px; 71 | } 72 | 73 | #label { 74 | opacity: 0; /* Hide the label */ 75 | } 76 | ``` 77 | 78 | This will produce the following 79 | 80 | https://user-images.githubusercontent.com/4857535/124782792-8349f680-df12-11eb-8231-4a356d33f066.mp4 81 | -------------------------------------------------------------------------------- /src/actors/glimmer_instance.rs: -------------------------------------------------------------------------------- 1 | use super::glimmer_manager::{GlimmerManager, WindowDataMsg}; 2 | use crate::gtk_utils::{Messages, WindowShim}; 3 | use actix::prelude::*; 4 | use glib::Sender; 5 | use tokio_i3ipc::event::WindowChange; 6 | use tokio_i3ipc::reply::Rect; 7 | 8 | #[derive(Debug)] 9 | pub struct Geometry { 10 | pub x: i32, 11 | pub y: i32, 12 | pub width: i32, 13 | pub height: i32, 14 | } 15 | 16 | #[derive(Debug, Message)] 17 | #[rtype(result = "()")] 18 | pub struct DismountMsg {} 19 | 20 | #[derive(Debug, Message)] 21 | #[rtype(result = "()")] 22 | pub struct InstanceKillNotificationMsg { 23 | pub id: usize, 24 | } 25 | 26 | // Actor definition 27 | pub struct GlimmerInstance { 28 | pub id: usize, 29 | sender: Sender, 30 | manager: Addr, 31 | kill_handle: Option, 32 | } 33 | 34 | impl Actor for GlimmerInstance { 35 | type Context = Context; 36 | 37 | fn stopped(&mut self, _ctx: &mut Self::Context) { 38 | // Let the manager know the instance died for cleanup 39 | self.manager 40 | .do_send(InstanceKillNotificationMsg { id: self.id }); 41 | // Also destroy the window 42 | self.sender.send(Messages::Destroy(self.id)).unwrap(); 43 | } 44 | } 45 | 46 | impl GlimmerInstance { 47 | pub fn new(id: usize, sender: Sender, manager: Addr) -> Self { 48 | Self { 49 | id, 50 | sender, 51 | kill_handle: None, 52 | manager, 53 | } 54 | } 55 | } 56 | 57 | impl From for Geometry { 58 | fn from(rect: Rect) -> Geometry { 59 | Geometry { 60 | x: rect.x as i32, 61 | y: rect.y as i32, 62 | width: rect.width as i32, 63 | height: rect.height as i32, 64 | } 65 | } 66 | } 67 | 68 | impl From for WindowShim { 69 | fn from(window_data: WindowDataMsg) -> WindowShim { 70 | let rect = window_data.container.rect; 71 | WindowShim { 72 | id: window_data.container.id, 73 | label: window_data.container.name, 74 | geometry: rect.into(), 75 | } 76 | } 77 | } 78 | 79 | impl From for usize { 80 | fn from(window_data: WindowDataMsg) -> usize { 81 | window_data.container.id 82 | } 83 | } 84 | 85 | impl Handler for GlimmerInstance { 86 | type Result = (); 87 | 88 | fn handle(&mut self, msg: WindowDataMsg, ctx: &mut Context) { 89 | let message: Messages = match msg.change { 90 | WindowChange::Focus => Messages::Create(msg.into()), 91 | WindowChange::Close => Messages::Destroy(msg.into()), 92 | WindowChange::Move => Messages::Update(msg.into()), 93 | WindowChange::FullscreenMode => Messages::Update(msg.into()), 94 | 95 | _m => Messages::None, 96 | }; 97 | 98 | self.sender.send(message).unwrap(); 99 | 100 | if let Some(handle) = self.kill_handle { 101 | ctx.cancel_future(handle); 102 | } 103 | 104 | self.kill_handle = Some(ctx.notify_later(DismountMsg {}, std::time::Duration::new(2, 0))); 105 | } 106 | } 107 | 108 | impl Handler for GlimmerInstance { 109 | type Result = (); 110 | 111 | fn handle(&mut self, _msg: DismountMsg, ctx: &mut Self::Context) -> Self::Result { 112 | ctx.stop(); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /src/gtk_utils.rs: -------------------------------------------------------------------------------- 1 | use cairo::{RectangleInt, Region}; 2 | use glib::Sender; 3 | use gtk::prelude::*; 4 | use gtk::{Window, WindowType}; 5 | use std::collections::HashMap; 6 | 7 | use crate::actors::glimmer_instance::Geometry; 8 | 9 | const MAIN_WINDOW_TITLE: &str = "__GLIMMER_WINDOW__"; 10 | 11 | pub fn setup(styles_path: String) { 12 | let css_provider = gtk::CssProvider::new(); 13 | let data = std::fs::read(styles_path).expect("Could not read css file!"); 14 | css_provider 15 | .load_from_data(&data) 16 | .expect("Could not load css into GTK"); 17 | 18 | let screen = gdk::Screen::default().unwrap(); 19 | 20 | let _visual = screen 21 | .rgba_visual() 22 | .expect("No RGBA supported -- this utility makes no sense without it"); 23 | 24 | gtk::StyleContext::add_provider_for_screen(&screen, &css_provider, 1); 25 | } 26 | 27 | pub fn update_window_position(window: &Window, geometry: Geometry) { 28 | let children = window.children(); 29 | let fixed = children 30 | .first() 31 | .unwrap() 32 | .downcast_ref::() 33 | .unwrap(); 34 | 35 | let fixed_children = fixed.children(); 36 | let b = fixed_children 37 | .first() 38 | .unwrap() 39 | .downcast_ref::() 40 | .unwrap(); 41 | 42 | b.set_size_request(geometry.width, geometry.height); 43 | 44 | window.resize(geometry.width, geometry.height); 45 | window.move_(geometry.x, geometry.y); 46 | } 47 | 48 | pub fn build_window(label_string: &str, geometry: Geometry) -> Window { 49 | let window = Window::new(WindowType::Popup); 50 | window.set_title(MAIN_WINDOW_TITLE); 51 | window.set_default_size(1, 1); 52 | window.set_can_focus(false); 53 | window.set_resizable(false); 54 | window.set_app_paintable(true); 55 | window.set_keep_above(true); 56 | 57 | window.connect_draw(|w, _c| { 58 | let rect: RectangleInt = RectangleInt { 59 | x: 0, 60 | y: 0, 61 | width: 0, 62 | height: 0, 63 | }; 64 | let region: Region = Region::create_rectangle(&rect); 65 | 66 | w.window() 67 | .unwrap() 68 | .input_shape_combine_region(®ion, 0, 0); 69 | 70 | gtk::Inhibit(false) 71 | }); 72 | 73 | let container = gtk::FixedBuilder::new().name("container").build(); 74 | let b = gtk::BoxBuilder::new().name("box").build(); 75 | 76 | let label = gtk::LabelBuilder::new() 77 | .name("label") 78 | .label(label_string) 79 | .build(); 80 | 81 | container.add(&b); 82 | container.add(&label); 83 | window.add(&container); 84 | 85 | update_window_position(&window, geometry); 86 | 87 | let screen = gdk::Screen::default().unwrap(); 88 | let visual = screen 89 | .rgba_visual() 90 | .expect("No RGBA supported -- this utility makes no sense without it"); 91 | 92 | window.set_visual(Some(&visual)); 93 | window.show_all(); 94 | 95 | container.style_context().add_class("animate"); 96 | 97 | window 98 | } 99 | 100 | #[derive(Debug)] 101 | pub struct WindowShim { 102 | pub id: usize, 103 | pub label: Option, 104 | pub geometry: Geometry, 105 | } 106 | 107 | #[derive(Debug)] 108 | pub enum Messages { 109 | Create(WindowShim), 110 | Update(WindowShim), 111 | Destroy(usize), 112 | None, 113 | } 114 | 115 | // TODO: remove me in favor of adding classes representing state 116 | pub fn destroy_other_windows(windows: &mut HashMap, selected_id: &usize) { 117 | let keys: Vec = windows.keys().cloned().collect(); 118 | 119 | keys.iter() 120 | .filter(|&key| selected_id != key) 121 | .for_each(|key| windows.remove(&key).unwrap().close()); 122 | } 123 | 124 | pub fn handle_messages() -> Sender { 125 | let ctx = glib::MainContext::default(); 126 | let _guard = ctx.acquire(); 127 | 128 | let (sender, receiver) = glib::MainContext::channel::(glib::PRIORITY_DEFAULT); 129 | let mut windows: HashMap = HashMap::new(); 130 | 131 | receiver.attach(None, move |msg| { 132 | match msg { 133 | Messages::Create(w) => { 134 | destroy_other_windows(&mut windows, &w.id); 135 | 136 | if let Some(old_window) = windows.insert( 137 | w.id, 138 | build_window(&w.label.unwrap_or_else(|| String::from("")), w.geometry), 139 | ) { 140 | old_window.close(); 141 | } 142 | } 143 | 144 | Messages::Update(w) => { 145 | if let Some(window) = windows.get(&w.id) { 146 | update_window_position(&window, w.geometry); 147 | } 148 | } 149 | 150 | Messages::Destroy(id) => { 151 | if let Some(window) = windows.remove(&id) { 152 | window.close(); 153 | } 154 | } 155 | 156 | _ => {} 157 | } 158 | 159 | glib::Continue(true) 160 | }); 161 | 162 | sender 163 | } 164 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "actix" 7 | version = "0.12.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "3720d0064a0ce5c0de7bd93bdb0a6caebab2a9b5668746145d7b3b0c5da02914" 10 | dependencies = [ 11 | "actix-rt", 12 | "actix_derive", 13 | "bitflags", 14 | "bytes", 15 | "crossbeam-channel", 16 | "futures-core", 17 | "futures-sink", 18 | "futures-task", 19 | "futures-util", 20 | "log", 21 | "once_cell", 22 | "parking_lot 0.11.2", 23 | "pin-project-lite", 24 | "smallvec", 25 | "tokio", 26 | "tokio-util 0.6.10", 27 | ] 28 | 29 | [[package]] 30 | name = "actix-rt" 31 | version = "2.7.0" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" 34 | dependencies = [ 35 | "futures-core", 36 | "tokio", 37 | ] 38 | 39 | [[package]] 40 | name = "actix_derive" 41 | version = "0.6.0" 42 | source = "registry+https://github.com/rust-lang/crates.io-index" 43 | checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7" 44 | dependencies = [ 45 | "proc-macro2", 46 | "quote", 47 | "syn", 48 | ] 49 | 50 | [[package]] 51 | name = "anyhow" 52 | version = "1.0.66" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" 55 | 56 | [[package]] 57 | name = "atk" 58 | version = "0.14.0" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "a83b21d2aa75e464db56225e1bda2dd5993311ba1095acaa8fa03d1ae67026ba" 61 | dependencies = [ 62 | "atk-sys", 63 | "bitflags", 64 | "glib", 65 | "libc", 66 | ] 67 | 68 | [[package]] 69 | name = "atk-sys" 70 | version = "0.14.0" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "badcf670157c84bb8b1cf6b5f70b650fed78da2033c9eed84c4e49b11cbe83ea" 73 | dependencies = [ 74 | "glib-sys", 75 | "gobject-sys", 76 | "libc", 77 | "system-deps", 78 | ] 79 | 80 | [[package]] 81 | name = "atty" 82 | version = "0.2.14" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 85 | dependencies = [ 86 | "hermit-abi", 87 | "libc", 88 | "winapi", 89 | ] 90 | 91 | [[package]] 92 | name = "autocfg" 93 | version = "1.1.0" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 96 | 97 | [[package]] 98 | name = "bitflags" 99 | version = "1.3.2" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 102 | 103 | [[package]] 104 | name = "bytes" 105 | version = "1.2.1" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 108 | 109 | [[package]] 110 | name = "cairo-rs" 111 | version = "0.14.9" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "33b5725979db0c586d98abad2193cdb612dd40ef95cd26bd99851bf93b3cb482" 114 | dependencies = [ 115 | "bitflags", 116 | "cairo-sys-rs", 117 | "glib", 118 | "libc", 119 | "thiserror", 120 | ] 121 | 122 | [[package]] 123 | name = "cairo-sys-rs" 124 | version = "0.14.9" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "b448b876970834fda82ba3aeaccadbd760206b75388fc5c1b02f1e343b697570" 127 | dependencies = [ 128 | "glib-sys", 129 | "libc", 130 | "system-deps", 131 | ] 132 | 133 | [[package]] 134 | name = "cfg-expr" 135 | version = "0.8.1" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "b412e83326147c2bb881f8b40edfbf9905b9b8abaebd0e47ca190ba62fda8f0e" 138 | dependencies = [ 139 | "smallvec", 140 | ] 141 | 142 | [[package]] 143 | name = "cfg-if" 144 | version = "1.0.0" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 147 | 148 | [[package]] 149 | name = "clap" 150 | version = "4.0.26" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | checksum = "2148adefda54e14492fb9bddcc600b4344c5d1a3123bd666dcb939c6f0e0e57e" 153 | dependencies = [ 154 | "atty", 155 | "bitflags", 156 | "clap_derive", 157 | "clap_lex", 158 | "once_cell", 159 | "strsim", 160 | "termcolor", 161 | ] 162 | 163 | [[package]] 164 | name = "clap_derive" 165 | version = "4.0.21" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" 168 | dependencies = [ 169 | "heck 0.4.0", 170 | "proc-macro-error", 171 | "proc-macro2", 172 | "quote", 173 | "syn", 174 | ] 175 | 176 | [[package]] 177 | name = "clap_lex" 178 | version = "0.3.0" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" 181 | dependencies = [ 182 | "os_str_bytes", 183 | ] 184 | 185 | [[package]] 186 | name = "crossbeam-channel" 187 | version = "0.5.6" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 190 | dependencies = [ 191 | "cfg-if", 192 | "crossbeam-utils", 193 | ] 194 | 195 | [[package]] 196 | name = "crossbeam-utils" 197 | version = "0.8.12" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" 200 | dependencies = [ 201 | "cfg-if", 202 | ] 203 | 204 | [[package]] 205 | name = "either" 206 | version = "1.8.0" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 209 | 210 | [[package]] 211 | name = "field-offset" 212 | version = "0.3.4" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" 215 | dependencies = [ 216 | "memoffset", 217 | "rustc_version", 218 | ] 219 | 220 | [[package]] 221 | name = "futures-channel" 222 | version = "0.3.25" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" 225 | dependencies = [ 226 | "futures-core", 227 | ] 228 | 229 | [[package]] 230 | name = "futures-core" 231 | version = "0.3.25" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" 234 | 235 | [[package]] 236 | name = "futures-executor" 237 | version = "0.3.25" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" 240 | dependencies = [ 241 | "futures-core", 242 | "futures-task", 243 | "futures-util", 244 | ] 245 | 246 | [[package]] 247 | name = "futures-io" 248 | version = "0.3.25" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" 251 | 252 | [[package]] 253 | name = "futures-sink" 254 | version = "0.3.25" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" 257 | 258 | [[package]] 259 | name = "futures-task" 260 | version = "0.3.25" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" 263 | 264 | [[package]] 265 | name = "futures-util" 266 | version = "0.3.25" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" 269 | dependencies = [ 270 | "futures-core", 271 | "futures-task", 272 | "pin-project-lite", 273 | "pin-utils", 274 | "slab", 275 | ] 276 | 277 | [[package]] 278 | name = "gdk" 279 | version = "0.14.3" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "b9d749dcfc00d8de0d7c3a289e04a04293eb5ba3d8a4e64d64911d481fa9933b" 282 | dependencies = [ 283 | "bitflags", 284 | "cairo-rs", 285 | "gdk-pixbuf", 286 | "gdk-sys", 287 | "gio", 288 | "glib", 289 | "libc", 290 | "pango", 291 | ] 292 | 293 | [[package]] 294 | name = "gdk-pixbuf" 295 | version = "0.14.0" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "534192cb8f01daeb8fab2c8d4baa8f9aae5b7a39130525779f5c2608e235b10f" 298 | dependencies = [ 299 | "gdk-pixbuf-sys", 300 | "gio", 301 | "glib", 302 | "libc", 303 | ] 304 | 305 | [[package]] 306 | name = "gdk-pixbuf-sys" 307 | version = "0.14.0" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "f097c0704201fbc8f69c1762dc58c6947c8bb188b8ed0bc7e65259f1894fe590" 310 | dependencies = [ 311 | "gio-sys", 312 | "glib-sys", 313 | "gobject-sys", 314 | "libc", 315 | "system-deps", 316 | ] 317 | 318 | [[package]] 319 | name = "gdk-sys" 320 | version = "0.14.0" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "0e091b3d3d6696949ac3b3fb3c62090e5bfd7bd6850bef5c3c5ea701de1b1f1e" 323 | dependencies = [ 324 | "cairo-sys-rs", 325 | "gdk-pixbuf-sys", 326 | "gio-sys", 327 | "glib-sys", 328 | "gobject-sys", 329 | "libc", 330 | "pango-sys", 331 | "pkg-config", 332 | "system-deps", 333 | ] 334 | 335 | [[package]] 336 | name = "gio" 337 | version = "0.14.8" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "711c3632b3ebd095578a9c091418d10fed492da9443f58ebc8f45efbeb215cb0" 340 | dependencies = [ 341 | "bitflags", 342 | "futures-channel", 343 | "futures-core", 344 | "futures-io", 345 | "gio-sys", 346 | "glib", 347 | "libc", 348 | "once_cell", 349 | "thiserror", 350 | ] 351 | 352 | [[package]] 353 | name = "gio-sys" 354 | version = "0.14.0" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "c0a41df66e57fcc287c4bcf74fc26b884f31901ea9792ec75607289b456f48fa" 357 | dependencies = [ 358 | "glib-sys", 359 | "gobject-sys", 360 | "libc", 361 | "system-deps", 362 | "winapi", 363 | ] 364 | 365 | [[package]] 366 | name = "glib" 367 | version = "0.14.8" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "7c515f1e62bf151ef6635f528d05b02c11506de986e43b34a5c920ef0b3796a4" 370 | dependencies = [ 371 | "bitflags", 372 | "futures-channel", 373 | "futures-core", 374 | "futures-executor", 375 | "futures-task", 376 | "glib-macros", 377 | "glib-sys", 378 | "gobject-sys", 379 | "libc", 380 | "once_cell", 381 | "smallvec", 382 | ] 383 | 384 | [[package]] 385 | name = "glib-macros" 386 | version = "0.14.1" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | checksum = "2aad66361f66796bfc73f530c51ef123970eb895ffba991a234fcf7bea89e518" 389 | dependencies = [ 390 | "anyhow", 391 | "heck 0.3.3", 392 | "proc-macro-crate", 393 | "proc-macro-error", 394 | "proc-macro2", 395 | "quote", 396 | "syn", 397 | ] 398 | 399 | [[package]] 400 | name = "glib-sys" 401 | version = "0.14.0" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "1c1d60554a212445e2a858e42a0e48cece1bd57b311a19a9468f70376cf554ae" 404 | dependencies = [ 405 | "libc", 406 | "system-deps", 407 | ] 408 | 409 | [[package]] 410 | name = "glimmer" 411 | version = "0.0.6-alpha.1" 412 | dependencies = [ 413 | "actix", 414 | "cairo-rs", 415 | "clap", 416 | "gdk", 417 | "glib", 418 | "gtk", 419 | "tokio-i3ipc", 420 | "tokio-stream", 421 | ] 422 | 423 | [[package]] 424 | name = "gobject-sys" 425 | version = "0.14.0" 426 | source = "registry+https://github.com/rust-lang/crates.io-index" 427 | checksum = "aa92cae29759dae34ab5921d73fff5ad54b3d794ab842c117e36cafc7994c3f5" 428 | dependencies = [ 429 | "glib-sys", 430 | "libc", 431 | "system-deps", 432 | ] 433 | 434 | [[package]] 435 | name = "gtk" 436 | version = "0.14.3" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "2eb51122dd3317e9327ec1e4faa151d1fa0d95664cd8fb8dcfacf4d4d29ac70c" 439 | dependencies = [ 440 | "atk", 441 | "bitflags", 442 | "cairo-rs", 443 | "field-offset", 444 | "futures-channel", 445 | "gdk", 446 | "gdk-pixbuf", 447 | "gio", 448 | "glib", 449 | "gtk-sys", 450 | "gtk3-macros", 451 | "libc", 452 | "once_cell", 453 | "pango", 454 | "pkg-config", 455 | ] 456 | 457 | [[package]] 458 | name = "gtk-sys" 459 | version = "0.14.0" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | checksum = "8c14c8d3da0545785a7c5a120345b3abb534010fb8ae0f2ef3f47c027fba303e" 462 | dependencies = [ 463 | "atk-sys", 464 | "cairo-sys-rs", 465 | "gdk-pixbuf-sys", 466 | "gdk-sys", 467 | "gio-sys", 468 | "glib-sys", 469 | "gobject-sys", 470 | "libc", 471 | "pango-sys", 472 | "system-deps", 473 | ] 474 | 475 | [[package]] 476 | name = "gtk3-macros" 477 | version = "0.14.0" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "21de1da96dc117443fb03c2e270b2d34b7de98d0a79a19bbb689476173745b79" 480 | dependencies = [ 481 | "anyhow", 482 | "heck 0.3.3", 483 | "proc-macro-crate", 484 | "proc-macro-error", 485 | "proc-macro2", 486 | "quote", 487 | "syn", 488 | ] 489 | 490 | [[package]] 491 | name = "heck" 492 | version = "0.3.3" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 495 | dependencies = [ 496 | "unicode-segmentation", 497 | ] 498 | 499 | [[package]] 500 | name = "heck" 501 | version = "0.4.0" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" 504 | 505 | [[package]] 506 | name = "hermit-abi" 507 | version = "0.1.19" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 510 | dependencies = [ 511 | "libc", 512 | ] 513 | 514 | [[package]] 515 | name = "i3ipc-types" 516 | version = "0.15.0" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "02f2ba260abda862b5d62cd7c8496d56da773737f5ca751f8ef501cedf8ada20" 519 | dependencies = [ 520 | "serde", 521 | "serde_json", 522 | "serde_repr", 523 | "tokio", 524 | ] 525 | 526 | [[package]] 527 | name = "instant" 528 | version = "0.1.12" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 531 | dependencies = [ 532 | "cfg-if", 533 | ] 534 | 535 | [[package]] 536 | name = "itertools" 537 | version = "0.10.5" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 540 | dependencies = [ 541 | "either", 542 | ] 543 | 544 | [[package]] 545 | name = "itoa" 546 | version = "1.0.4" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" 549 | 550 | [[package]] 551 | name = "libc" 552 | version = "0.2.137" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" 555 | 556 | [[package]] 557 | name = "lock_api" 558 | version = "0.4.9" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 561 | dependencies = [ 562 | "autocfg", 563 | "scopeguard", 564 | ] 565 | 566 | [[package]] 567 | name = "log" 568 | version = "0.4.17" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 571 | dependencies = [ 572 | "cfg-if", 573 | ] 574 | 575 | [[package]] 576 | name = "memchr" 577 | version = "2.5.0" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 580 | 581 | [[package]] 582 | name = "memoffset" 583 | version = "0.6.5" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 586 | dependencies = [ 587 | "autocfg", 588 | ] 589 | 590 | [[package]] 591 | name = "mio" 592 | version = "0.8.5" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 595 | dependencies = [ 596 | "libc", 597 | "log", 598 | "wasi", 599 | "windows-sys", 600 | ] 601 | 602 | [[package]] 603 | name = "num_cpus" 604 | version = "1.14.0" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" 607 | dependencies = [ 608 | "hermit-abi", 609 | "libc", 610 | ] 611 | 612 | [[package]] 613 | name = "once_cell" 614 | version = "1.16.0" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" 617 | 618 | [[package]] 619 | name = "os_str_bytes" 620 | version = "6.4.0" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "7b5bf27447411e9ee3ff51186bf7a08e16c341efdde93f4d823e8844429bed7e" 623 | 624 | [[package]] 625 | name = "pango" 626 | version = "0.14.8" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "546fd59801e5ca735af82839007edd226fe7d3bb06433ec48072be4439c28581" 629 | dependencies = [ 630 | "bitflags", 631 | "glib", 632 | "libc", 633 | "once_cell", 634 | "pango-sys", 635 | ] 636 | 637 | [[package]] 638 | name = "pango-sys" 639 | version = "0.14.0" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "2367099ca5e761546ba1d501955079f097caa186bb53ce0f718dca99ac1942fe" 642 | dependencies = [ 643 | "glib-sys", 644 | "gobject-sys", 645 | "libc", 646 | "system-deps", 647 | ] 648 | 649 | [[package]] 650 | name = "parking_lot" 651 | version = "0.11.2" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 654 | dependencies = [ 655 | "instant", 656 | "lock_api", 657 | "parking_lot_core 0.8.5", 658 | ] 659 | 660 | [[package]] 661 | name = "parking_lot" 662 | version = "0.12.1" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 665 | dependencies = [ 666 | "lock_api", 667 | "parking_lot_core 0.9.4", 668 | ] 669 | 670 | [[package]] 671 | name = "parking_lot_core" 672 | version = "0.8.5" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 675 | dependencies = [ 676 | "cfg-if", 677 | "instant", 678 | "libc", 679 | "redox_syscall", 680 | "smallvec", 681 | "winapi", 682 | ] 683 | 684 | [[package]] 685 | name = "parking_lot_core" 686 | version = "0.9.4" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" 689 | dependencies = [ 690 | "cfg-if", 691 | "libc", 692 | "redox_syscall", 693 | "smallvec", 694 | "windows-sys", 695 | ] 696 | 697 | [[package]] 698 | name = "pest" 699 | version = "2.4.1" 700 | source = "registry+https://github.com/rust-lang/crates.io-index" 701 | checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8" 702 | dependencies = [ 703 | "thiserror", 704 | "ucd-trie", 705 | ] 706 | 707 | [[package]] 708 | name = "pin-project-lite" 709 | version = "0.2.9" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 712 | 713 | [[package]] 714 | name = "pin-utils" 715 | version = "0.1.0" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 718 | 719 | [[package]] 720 | name = "pkg-config" 721 | version = "0.3.26" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 724 | 725 | [[package]] 726 | name = "proc-macro-crate" 727 | version = "1.2.1" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" 730 | dependencies = [ 731 | "once_cell", 732 | "thiserror", 733 | "toml", 734 | ] 735 | 736 | [[package]] 737 | name = "proc-macro-error" 738 | version = "1.0.4" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 741 | dependencies = [ 742 | "proc-macro-error-attr", 743 | "proc-macro2", 744 | "quote", 745 | "syn", 746 | "version_check", 747 | ] 748 | 749 | [[package]] 750 | name = "proc-macro-error-attr" 751 | version = "1.0.4" 752 | source = "registry+https://github.com/rust-lang/crates.io-index" 753 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 754 | dependencies = [ 755 | "proc-macro2", 756 | "quote", 757 | "version_check", 758 | ] 759 | 760 | [[package]] 761 | name = "proc-macro2" 762 | version = "1.0.47" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 765 | dependencies = [ 766 | "unicode-ident", 767 | ] 768 | 769 | [[package]] 770 | name = "quote" 771 | version = "1.0.21" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 774 | dependencies = [ 775 | "proc-macro2", 776 | ] 777 | 778 | [[package]] 779 | name = "redox_syscall" 780 | version = "0.2.16" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 783 | dependencies = [ 784 | "bitflags", 785 | ] 786 | 787 | [[package]] 788 | name = "rustc_version" 789 | version = "0.3.3" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" 792 | dependencies = [ 793 | "semver", 794 | ] 795 | 796 | [[package]] 797 | name = "ryu" 798 | version = "1.0.11" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 801 | 802 | [[package]] 803 | name = "scopeguard" 804 | version = "1.1.0" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 807 | 808 | [[package]] 809 | name = "semver" 810 | version = "0.11.0" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" 813 | dependencies = [ 814 | "semver-parser", 815 | ] 816 | 817 | [[package]] 818 | name = "semver-parser" 819 | version = "0.10.2" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" 822 | dependencies = [ 823 | "pest", 824 | ] 825 | 826 | [[package]] 827 | name = "serde" 828 | version = "1.0.147" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" 831 | dependencies = [ 832 | "serde_derive", 833 | ] 834 | 835 | [[package]] 836 | name = "serde_derive" 837 | version = "1.0.147" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" 840 | dependencies = [ 841 | "proc-macro2", 842 | "quote", 843 | "syn", 844 | ] 845 | 846 | [[package]] 847 | name = "serde_json" 848 | version = "1.0.88" 849 | source = "registry+https://github.com/rust-lang/crates.io-index" 850 | checksum = "8e8b3801309262e8184d9687fb697586833e939767aea0dda89f5a8e650e8bd7" 851 | dependencies = [ 852 | "itoa", 853 | "ryu", 854 | "serde", 855 | ] 856 | 857 | [[package]] 858 | name = "serde_repr" 859 | version = "0.1.9" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca" 862 | dependencies = [ 863 | "proc-macro2", 864 | "quote", 865 | "syn", 866 | ] 867 | 868 | [[package]] 869 | name = "signal-hook-registry" 870 | version = "1.4.0" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 873 | dependencies = [ 874 | "libc", 875 | ] 876 | 877 | [[package]] 878 | name = "slab" 879 | version = "0.4.7" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 882 | dependencies = [ 883 | "autocfg", 884 | ] 885 | 886 | [[package]] 887 | name = "smallvec" 888 | version = "1.10.0" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 891 | 892 | [[package]] 893 | name = "socket2" 894 | version = "0.4.7" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" 897 | dependencies = [ 898 | "libc", 899 | "winapi", 900 | ] 901 | 902 | [[package]] 903 | name = "strsim" 904 | version = "0.10.0" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 907 | 908 | [[package]] 909 | name = "strum" 910 | version = "0.21.0" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" 913 | 914 | [[package]] 915 | name = "strum_macros" 916 | version = "0.21.1" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" 919 | dependencies = [ 920 | "heck 0.3.3", 921 | "proc-macro2", 922 | "quote", 923 | "syn", 924 | ] 925 | 926 | [[package]] 927 | name = "syn" 928 | version = "1.0.103" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" 931 | dependencies = [ 932 | "proc-macro2", 933 | "quote", 934 | "unicode-ident", 935 | ] 936 | 937 | [[package]] 938 | name = "system-deps" 939 | version = "3.2.0" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6" 942 | dependencies = [ 943 | "anyhow", 944 | "cfg-expr", 945 | "heck 0.3.3", 946 | "itertools", 947 | "pkg-config", 948 | "strum", 949 | "strum_macros", 950 | "thiserror", 951 | "toml", 952 | "version-compare", 953 | ] 954 | 955 | [[package]] 956 | name = "termcolor" 957 | version = "1.1.3" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 960 | dependencies = [ 961 | "winapi-util", 962 | ] 963 | 964 | [[package]] 965 | name = "thiserror" 966 | version = "1.0.37" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 969 | dependencies = [ 970 | "thiserror-impl", 971 | ] 972 | 973 | [[package]] 974 | name = "thiserror-impl" 975 | version = "1.0.37" 976 | source = "registry+https://github.com/rust-lang/crates.io-index" 977 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 978 | dependencies = [ 979 | "proc-macro2", 980 | "quote", 981 | "syn", 982 | ] 983 | 984 | [[package]] 985 | name = "tokio" 986 | version = "1.22.0" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3" 989 | dependencies = [ 990 | "autocfg", 991 | "bytes", 992 | "libc", 993 | "memchr", 994 | "mio", 995 | "num_cpus", 996 | "parking_lot 0.12.1", 997 | "pin-project-lite", 998 | "signal-hook-registry", 999 | "socket2", 1000 | "tokio-macros", 1001 | "winapi", 1002 | ] 1003 | 1004 | [[package]] 1005 | name = "tokio-i3ipc" 1006 | version = "0.15.0" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | checksum = "0b1f23c8d7dd3256ff24928d2cba0277e8a40685a70882c2e9c01b394890abfa" 1009 | dependencies = [ 1010 | "bytes", 1011 | "i3ipc-types", 1012 | "serde", 1013 | "serde_json", 1014 | "tokio", 1015 | "tokio-stream", 1016 | "tokio-util 0.7.4", 1017 | ] 1018 | 1019 | [[package]] 1020 | name = "tokio-macros" 1021 | version = "1.8.0" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" 1024 | dependencies = [ 1025 | "proc-macro2", 1026 | "quote", 1027 | "syn", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "tokio-stream" 1032 | version = "0.1.11" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" 1035 | dependencies = [ 1036 | "futures-core", 1037 | "pin-project-lite", 1038 | "tokio", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "tokio-util" 1043 | version = "0.6.10" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" 1046 | dependencies = [ 1047 | "bytes", 1048 | "futures-core", 1049 | "futures-sink", 1050 | "log", 1051 | "pin-project-lite", 1052 | "tokio", 1053 | ] 1054 | 1055 | [[package]] 1056 | name = "tokio-util" 1057 | version = "0.7.4" 1058 | source = "registry+https://github.com/rust-lang/crates.io-index" 1059 | checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" 1060 | dependencies = [ 1061 | "bytes", 1062 | "futures-core", 1063 | "futures-sink", 1064 | "pin-project-lite", 1065 | "tokio", 1066 | "tracing", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "toml" 1071 | version = "0.5.9" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" 1074 | dependencies = [ 1075 | "serde", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "tracing" 1080 | version = "0.1.37" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1083 | dependencies = [ 1084 | "cfg-if", 1085 | "pin-project-lite", 1086 | "tracing-core", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "tracing-core" 1091 | version = "0.1.30" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1094 | dependencies = [ 1095 | "once_cell", 1096 | ] 1097 | 1098 | [[package]] 1099 | name = "ucd-trie" 1100 | version = "0.1.5" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" 1103 | 1104 | [[package]] 1105 | name = "unicode-ident" 1106 | version = "1.0.5" 1107 | source = "registry+https://github.com/rust-lang/crates.io-index" 1108 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 1109 | 1110 | [[package]] 1111 | name = "unicode-segmentation" 1112 | version = "1.10.0" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" 1115 | 1116 | [[package]] 1117 | name = "version-compare" 1118 | version = "0.0.11" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" 1121 | 1122 | [[package]] 1123 | name = "version_check" 1124 | version = "0.9.4" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1127 | 1128 | [[package]] 1129 | name = "wasi" 1130 | version = "0.11.0+wasi-snapshot-preview1" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1133 | 1134 | [[package]] 1135 | name = "winapi" 1136 | version = "0.3.9" 1137 | source = "registry+https://github.com/rust-lang/crates.io-index" 1138 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1139 | dependencies = [ 1140 | "winapi-i686-pc-windows-gnu", 1141 | "winapi-x86_64-pc-windows-gnu", 1142 | ] 1143 | 1144 | [[package]] 1145 | name = "winapi-i686-pc-windows-gnu" 1146 | version = "0.4.0" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1149 | 1150 | [[package]] 1151 | name = "winapi-util" 1152 | version = "0.1.5" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1155 | dependencies = [ 1156 | "winapi", 1157 | ] 1158 | 1159 | [[package]] 1160 | name = "winapi-x86_64-pc-windows-gnu" 1161 | version = "0.4.0" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1164 | 1165 | [[package]] 1166 | name = "windows-sys" 1167 | version = "0.42.0" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 1170 | dependencies = [ 1171 | "windows_aarch64_gnullvm", 1172 | "windows_aarch64_msvc", 1173 | "windows_i686_gnu", 1174 | "windows_i686_msvc", 1175 | "windows_x86_64_gnu", 1176 | "windows_x86_64_gnullvm", 1177 | "windows_x86_64_msvc", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "windows_aarch64_gnullvm" 1182 | version = "0.42.0" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" 1185 | 1186 | [[package]] 1187 | name = "windows_aarch64_msvc" 1188 | version = "0.42.0" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" 1191 | 1192 | [[package]] 1193 | name = "windows_i686_gnu" 1194 | version = "0.42.0" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" 1197 | 1198 | [[package]] 1199 | name = "windows_i686_msvc" 1200 | version = "0.42.0" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" 1203 | 1204 | [[package]] 1205 | name = "windows_x86_64_gnu" 1206 | version = "0.42.0" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" 1209 | 1210 | [[package]] 1211 | name = "windows_x86_64_gnullvm" 1212 | version = "0.42.0" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" 1215 | 1216 | [[package]] 1217 | name = "windows_x86_64_msvc" 1218 | version = "0.42.0" 1219 | source = "registry+https://github.com/rust-lang/crates.io-index" 1220 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" 1221 | --------------------------------------------------------------------------------