add keysymdef.rs

This commit is contained in:
Akshat Deshpande 2022-07-29 11:31:33 -05:00
parent 85c82e7504
commit cd2e9bab9e
5 changed files with 1128 additions and 1776 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/target
/.idea

View file

@ -159,7 +159,7 @@ impl<'de> Visitor<'de> for KeybindVisitor {
'C' => mask.set_control(true),
'S' => mask.set_shift(true),
'A' => mask.set_mod1(true), // alt key
'W' => mask.set_mod4(true), // super key, 'w' for windows because S is taken
'W' => mask.set_mod4(true), // super key, 'w' for windows BECAUSE S is taken
_ => return Err(E::custom(format!("no such modifier: {}", c))),
};
}

File diff suppressed because it is too large Load diff

View file

@ -50,7 +50,7 @@ pub async fn listener_task<P: AsRef<Path>>(
drop(sender.send(buf)); // go back to ms word clippy
// we can unwrap here because if the channel is closed then something's not right
// we can unwrap here BECAUSE if the channel is closed then something's not right
if let Err(e) = result_recv.recv().await.unwrap() {
stream.write_all(format!("{}", e).as_bytes()).await?;
} else {
@ -68,7 +68,7 @@ pub async fn on_recv<Dpy: AsyncDisplay + ?Sized>(
let res = { data.parse::<Action>() };
if let Ok(ref a) = res {
a.eval(manager, conn).await?; // Don't send these errors over the channel, because they're
a.eval(manager, conn).await?; // Don't send these errors over the channel, BECAUSE they're
// xcrab errors, not msg errors
}

View file

@ -626,7 +626,7 @@ impl XcrabWindowManager {
pub fn may_not_exist(res: breadx::Result) -> breadx::Result {
match res {
// if its a `Window` error, that means it happened because
// if its a `Window` error, that means it happened BECAUSE
// a window failed to exist, and we want to allow those
Err(BreadError::XProtocol {
error_code: ErrorCode(3),
@ -834,7 +834,7 @@ impl FramedWindow {
async fn frame<Dpy: AsyncDisplay + ?Sized>(conn: &mut Dpy, win: Window) -> Result<FramedWindow> {
let root = conn.default_root();
// here, we cant use `may_not_exist` because we need the geometry
// here, we cant use `may_not_exist` BECAUSE we need the geometry
let geometry = win.geometry_immediate_async(conn).await?;
let frame = conn