diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2015-12-07 16:19:36 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2015-12-07 16:19:36 -0300 |
commit | 69f8194da778a692b6b0c14f43d9611c2072e8ba (patch) | |
tree | 8d9f252bf7a6db515a05800a73b35b21d1692cfb /src/socket/parser.rs | |
parent | 12faa87415d91820503b6b1c98ebabbddc50d665 (diff) | |
download | dotwm-69f8194da778a692b6b0c14f43d9611c2072e8ba.tar.gz |
Implement desktops.
It's somewhat buggy. But works :). There're 2 desktops only for now, maybe later
I will implement something more dynamic
Diffstat (limited to 'src/socket/parser.rs')
-rw-r--r-- | src/socket/parser.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socket/parser.rs b/src/socket/parser.rs index bd73ff6..30487d8 100644 --- a/src/socket/parser.rs +++ b/src/socket/parser.rs @@ -22,7 +22,6 @@ macro_rules! simple_try { } fn modifier_from<'a>(s: &'a str) -> Result<u32, &'static str> { - println!("Getted modifier {}", s); match s { "Mod1" => Ok(xlib::Mod1Mask), "Mod2" => Ok(xlib::Mod2Mask), @@ -99,6 +98,8 @@ fn key<'a>(s: &'a str) -> Result<u32, &'static str> { "X" => Ok(keysym::XK_X), "Y" => Ok(keysym::XK_Y), "Z" => Ok(keysym::XK_Z), + "1" => Ok(keysym::XK_1), + "2" => Ok(keysym::XK_2), "Tab" => Ok(keysym::XK_Tab), "Return" => Ok(keysym::XK_Return), _ => Err("unknown key"), @@ -116,6 +117,7 @@ fn func<'a>(s: &'a str) -> Result<ExecFn, &'static str> { "focus-next" => Ok(focus_next), "close-win" => Ok(close_win), "fullscreen" => Ok(fullscreen), + "change-desktop" => Ok(change_desktop), "quit" => Ok(quit_dotwm), _ => Err("unknown function"), } |