multi-line copy/paste, more copy/paste
fix C and D in nimbus romono
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ming-wm-lib"
|
||||
version = "0.1.7"
|
||||
version = "0.2.0"
|
||||
repository = "https://github.com/stjet/ming-wm"
|
||||
description = "library for building windows for ming-wm in rust"
|
||||
readme = "README.md"
|
||||
|
||||
@@ -58,9 +58,11 @@ pub fn listen(mut window_like: impl WindowLike) {
|
||||
let arg = &parts.collect::<Vec<&str>>().join(" ");
|
||||
let output = match method {
|
||||
"handle_message" => {
|
||||
//newlines allowed for ClipboardCopy, but represented by the Linear A char
|
||||
window_like.handle_message(WindowMessage::deserialize(arg).unwrap()).serialize().to_string()
|
||||
},
|
||||
"draw" => {
|
||||
//newlines never allowed
|
||||
window_like.draw(&ThemeInfo::deserialize(arg).unwrap()).serialize().replace("\n", "").to_string()
|
||||
},
|
||||
"title" => {
|
||||
|
||||
@@ -146,7 +146,7 @@ impl Serializable for WindowMessageResponse {
|
||||
WindowMessageResponse::Request(req) => {
|
||||
let req = match req {
|
||||
WindowManagerRequest::OpenWindow(name) => format!("OpenWindow/{}", name),
|
||||
WindowManagerRequest::ClipboardCopy(name) => format!("ClipboardCopy/{}", name),
|
||||
WindowManagerRequest::ClipboardCopy(copy_string) => format!("ClipboardCopy/{}", copy_string.replace("\n", "𐘂")), //serialised output must be 1 line
|
||||
WindowManagerRequest::CloseStartMenu => "CloseStartMenu".to_string(),
|
||||
WindowManagerRequest::Unlock => "Unlock".to_string(),
|
||||
WindowManagerRequest::Lock => "Lock".to_string(),
|
||||
@@ -646,7 +646,7 @@ impl Serializable for WindowMessage {
|
||||
"FullscreenWindow" => Some(ShortcutType::FullscreenWindow),
|
||||
"HalfWidthWindow" => Some(ShortcutType::HalfWidthWindow),
|
||||
"ClipboardCopy" => Some(ShortcutType::ClipboardCopy),
|
||||
"ClipboardPaste" => Some(ShortcutType::ClipboardPaste(get_rest_of_split(&mut parts, Some("/")))),
|
||||
"ClipboardPaste" => Some(ShortcutType::ClipboardPaste(get_rest_of_split(&mut parts, Some("/")).replace("𐘂", "\n"))),
|
||||
_ => None,
|
||||
};
|
||||
if let Some(shortcut) = shortcut {
|
||||
|
||||
Reference in New Issue
Block a user