Compare commits

..

No commits in common. "boh" and "master" have entirely different histories.
boh ... master

4 changed files with 359 additions and 731 deletions

1032
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,25 +7,20 @@ license = "GPLv3"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
# vte-rs = "^0.4" vte-rs = "^0.3"
# vte-sys = "*" vte-sys = "*"
#gio = "*" gio = "*"
#gio-sys = "*" gio-sys = "*"
# gtk = { version = "*", features = ["v3_22"] } gtk = { version = "*", features = ["v3_22"] }
# gdk-sys = "*" gdk-sys = "*"
# gdk = "*" gdk = "*"
#gdk4 = "*" pango = "*"
#pango = "*" crossbeam-channel = "*"
# crossbeam-channel = "*" glib = "*"
#glib = "*" glib-sys = "*"
#glib-sys = "*"
zbus = "1.0.0" zbus = "1.0.0"
zvariant = "*" zvariant = "*"
# structopt = { version = "0.3.21", default_features = false } structopt = { version = "0.3.21", default_features = false }
[dependencies.gtk]
package = "gtk4"
version = "^0.6.2"
features = ["v4_10"]
# jsonrpc-ipc-server = "^14.0" # jsonrpc-ipc-server = "^14.0"
# jsonrpc-derive = "*" # jsonrpc-derive = "*"
@ -34,9 +29,6 @@ features = ["v4_10"]
[[bin]] [[bin]]
name = "waydrop" name = "waydrop"
path = "src/main.rs" path = "src/main.rs"
[[bin]]
name = "asd"
path = "src/asd.rs"
[[bin]] [[bin]]
name = "waydrop-ctl" name = "waydrop-ctl"

View File

@ -15,14 +15,15 @@
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/ */
use gtk::gio; extern crate gio;
use gtk::glib; extern crate gtk;
extern crate vte;
use gio::prelude::*; use gio::prelude::*;
use gtk::prelude::*; use gtk::prelude::*;
use glib::clone; use glib::clone;
// use gtk4::SettingsExt; use gtk::SettingsExt;
use std::env::args; use std::env::args;
use std::thread; use std::thread;
@ -35,7 +36,9 @@ use window_state::{FullScreenState, StateOperations, WindowPos, WindowState};
fn build_ui(application: &gtk::Application) { fn build_ui(application: &gtk::Application) {
let window = gtk::ApplicationWindow::new(application); let window = gtk::ApplicationWindow::new(application);
window.settings().set_gtk_enable_animations(false); if let Some(settings) = window.get_settings() {
settings.set_property_gtk_enable_animations(false);
}
let w_state = WindowState::new_arc(WindowPos::Hidden, FullScreenState::NotFull); let w_state = WindowState::new_arc(WindowPos::Hidden, FullScreenState::NotFull);
let w_state0 = w_state.clone(); let w_state0 = w_state.clone();
let w_state1 = w_state.clone(); let w_state1 = w_state.clone();
@ -46,10 +49,9 @@ fn build_ui(application: &gtk::Application) {
let w_state6 = w_state.clone(); let w_state6 = w_state.clone();
let w_state7 = w_state.clone(); let w_state7 = w_state.clone();
window.set_title(Some("Waydrop")); window.set_title("Waydrop");
// window.border().set_left(0);ò window.set_border_width(0);
let surf = window.surface(); window.move_(0, 0);
// window.move_(0, 0);
//window.maximize(); //window.maximize();
window.set_position(gtk::WindowPosition::None); window.set_position(gtk::WindowPosition::None);
window.set_type_hint(gdk::WindowTypeHint::Dock); window.set_type_hint(gdk::WindowTypeHint::Dock);
@ -234,7 +236,7 @@ fn build_ui(application: &gtk::Application) {
//tabs::focus_tab_corrente(&nb); //tabs::focus_tab_corrente(&nb);
rx.attach(None, move |cmd| { rx.attach(None, move |cmd| {
let tira_su = || { let tira_su = || {
window_state::bring_up(&window, &w_state3, gtk4::get_current_event_time()); window_state::bring_up(&window, &w_state3, gtk::get_current_event_time());
}; };
use wake_listener::RpcCommand::*; use wake_listener::RpcCommand::*;
match cmd { match cmd {

View File

@ -45,7 +45,7 @@ pub fn build_tab(
// .expect("errore css"); // .expect("errore css");
// sty.add_provider(&css, 10000); // sty.add_provider(&css, 10000);
let font = pango::FontDescription::from_string("Iosevka Regular 14"); let font = pango::FontDescription::from_string("Iosevka Regular 13");
vte.set_font(Some(&font)); vte.set_font(Some(&font));
let gio_cancellable = gio::Cancellable::get_current(); let gio_cancellable = gio::Cancellable::get_current();
let shell = shell.unwrap_or(vec![var("SHELL").unwrap_or("/bin/sh".to_string())]); let shell = shell.unwrap_or(vec![var("SHELL").unwrap_or("/bin/sh".to_string())]);
@ -101,8 +101,8 @@ pub fn build_tab(
// Setto colori terminale // Setto colori terminale
use glib::translate::ToGlibPtr; use glib::translate::ToGlibPtr;
use std::str::FromStr; use std::str::FromStr;
let fg = gdk::RGBA::from_str("#002d38").unwrap_or(gdk::RGBA::white()); let fg = gdk::RGBA::from_str("#65657b7b8383").unwrap_or(gdk::RGBA::white());
let bg = gdk::RGBA::from_str("#f1e9d2").unwrap_or(gdk::RGBA::black()); let bg = gdk::RGBA::from_str("#fdfdf6f6e3e3").unwrap_or(gdk::RGBA::black());
let palette = (&[ let palette = (&[
"#070736364242", "#070736364242",
"#dcdc32322f2f", "#dcdc32322f2f",