Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
5bc3b27ab1 |
File diff suppressed because it is too large
Load Diff
32
Cargo.toml
32
Cargo.toml
|
|
@ -7,20 +7,25 @@ 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.3"
|
# vte-rs = "^0.4"
|
||||||
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 = "*"
|
||||||
pango = "*"
|
#gdk4 = "*"
|
||||||
crossbeam-channel = "*"
|
#pango = "*"
|
||||||
glib = "*"
|
# crossbeam-channel = "*"
|
||||||
glib-sys = "*"
|
#glib = "*"
|
||||||
|
#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 = "*"
|
||||||
|
|
@ -29,6 +34,9 @@ structopt = { version = "0.3.21", default_features = false }
|
||||||
[[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"
|
||||||
|
|
|
||||||
20
src/main.rs
20
src/main.rs
|
|
@ -15,15 +15,14 @@
|
||||||
* 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/>.
|
||||||
*/
|
*/
|
||||||
extern crate gio;
|
use gtk::gio;
|
||||||
extern crate gtk;
|
use gtk::glib;
|
||||||
extern crate vte;
|
|
||||||
|
|
||||||
use gio::prelude::*;
|
use gio::prelude::*;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
use glib::clone;
|
use glib::clone;
|
||||||
use gtk::SettingsExt;
|
// use gtk4::SettingsExt;
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
|
|
@ -36,9 +35,7 @@ use window_state::{FullScreenState, StateOperations, WindowPos, WindowState};
|
||||||
|
|
||||||
fn build_ui(application: >k::Application) {
|
fn build_ui(application: >k::Application) {
|
||||||
let window = gtk::ApplicationWindow::new(application);
|
let window = gtk::ApplicationWindow::new(application);
|
||||||
if let Some(settings) = window.get_settings() {
|
window.settings().set_gtk_enable_animations(false);
|
||||||
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();
|
||||||
|
|
@ -49,9 +46,10 @@ fn build_ui(application: >k::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("Waydrop");
|
window.set_title(Some("Waydrop"));
|
||||||
window.set_border_width(0);
|
// window.border().set_left(0);ò
|
||||||
window.move_(0, 0);
|
let surf = window.surface();
|
||||||
|
// 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);
|
||||||
|
|
@ -236,7 +234,7 @@ fn build_ui(application: >k::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, gtk::get_current_event_time());
|
window_state::bring_up(&window, &w_state3, gtk4::get_current_event_time());
|
||||||
};
|
};
|
||||||
use wake_listener::RpcCommand::*;
|
use wake_listener::RpcCommand::*;
|
||||||
match cmd {
|
match cmd {
|
||||||
|
|
|
||||||
|
|
@ -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 13");
|
let font = pango::FontDescription::from_string("Iosevka Regular 14");
|
||||||
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("#65657b7b8383").unwrap_or(gdk::RGBA::white());
|
let fg = gdk::RGBA::from_str("#002d38").unwrap_or(gdk::RGBA::white());
|
||||||
let bg = gdk::RGBA::from_str("#fdfdf6f6e3e3").unwrap_or(gdk::RGBA::black());
|
let bg = gdk::RGBA::from_str("#f1e9d2").unwrap_or(gdk::RGBA::black());
|
||||||
let palette = (&[
|
let palette = (&[
|
||||||
"#070736364242",
|
"#070736364242",
|
||||||
"#dcdc32322f2f",
|
"#dcdc32322f2f",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue