From 3a273d1ee826a9f2fa46c549e89f3080201e23c1 Mon Sep 17 00:00:00 2001 From: Syed Daanish Date: Thu, 10 Sep 2026 18:41:54 +0100 Subject: [PATCH] Little cleanup. --- config.rb | 8 ++++---- notes.md | 0 src/mruby/initial.ml | 12 ++++++------ writeup.md | 6 ++++++ 4 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 notes.md create mode 100644 writeup.md diff --git a/config.rb b/config.rb index e74a09d..d85c7c6 100644 --- a/config.rb +++ b/config.rb @@ -103,24 +103,24 @@ end end end -bind 86 do |_, ws| +bind 86, :none do |_, ws| next unless in_project?(ws) n = (($current_project - 2) % MAX_PROJECTS) + 1 go_project(n, $current_sub) end -bind 82 do |_, ws| +bind 82, :none do |_, ws| next unless in_project?(ws) n = ($current_project % MAX_PROJECTS) + 1 go_project(n, $current_sub) end -bind 79 do |_, ws| +bind 79, :none do |_, ws| next unless in_project?(ws) go_project($current_project, ($current_sub + 1) % SUBS) end -bind 80 do |_, ws| +bind 80, :none do |_, ws| next unless in_project?(ws) go_project($current_project, ($current_sub - 1 + SUBS) % SUBS) end diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..e69de29 diff --git a/src/mruby/initial.ml b/src/mruby/initial.ml index bb4e85a..4872da5 100644 --- a/src/mruby/initial.ml +++ b/src/mruby/initial.ml @@ -29,14 +29,14 @@ KEY_MAP = { "9" => 18, "0" => 19 } -def bind(key, mod = :alt, &block) +def bind(key, mod = :super, &block) key_ = key.is_a?(String) ? KEY_MAP[key] : key mod = MOD_MAP[mod] raise "unknown key #{key.to_s}" unless key_ raise "unknown modifier" unless mod _bind key_, mod, &block end -def unbind(key, mod = :alt) +def unbind(key, mod = :super) key_ = key.is_a?(String) ? KEY_MAP[key] : key mod = MOD_MAP[mod] raise "unknown key #{key.to_s}" unless key_ @@ -149,24 +149,24 @@ end end end -bind 86 do |_, ws| +bind 86, :none do |_, ws| next unless in_project?(ws) n = (($current_project - 2) % MAX_PROJECTS) + 1 go_project(n, $current_sub) end -bind 82 do |_, ws| +bind 82, :none do |_, ws| next unless in_project?(ws) n = ($current_project % MAX_PROJECTS) + 1 go_project(n, $current_sub) end -bind 79 do |_, ws| +bind 79, :none do |_, ws| next unless in_project?(ws) go_project($current_project, ($current_sub + 1) % SUBS) end -bind 80 do |_, ws| +bind 80, :none do |_, ws| next unless in_project?(ws) go_project($current_project, ($current_sub - 1 + SUBS) % SUBS) end diff --git a/writeup.md b/writeup.md new file mode 100644 index 0000000..4c8fe1b --- /dev/null +++ b/writeup.md @@ -0,0 +1,6 @@ +# Kutu WM + +An X11 window manager written in ocaml. + + +