Little cleanup.
This commit is contained in:
@@ -103,24 +103,24 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 86 do |_, ws|
|
bind 86, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
n = (($current_project - 2) % MAX_PROJECTS) + 1
|
n = (($current_project - 2) % MAX_PROJECTS) + 1
|
||||||
go_project(n, $current_sub)
|
go_project(n, $current_sub)
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 82 do |_, ws|
|
bind 82, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
n = ($current_project % MAX_PROJECTS) + 1
|
n = ($current_project % MAX_PROJECTS) + 1
|
||||||
go_project(n, $current_sub)
|
go_project(n, $current_sub)
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 79 do |_, ws|
|
bind 79, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
go_project($current_project, ($current_sub + 1) % SUBS)
|
go_project($current_project, ($current_sub + 1) % SUBS)
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 80 do |_, ws|
|
bind 80, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
go_project($current_project, ($current_sub - 1 + SUBS) % SUBS)
|
go_project($current_project, ($current_sub - 1 + SUBS) % SUBS)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ KEY_MAP = {
|
|||||||
"9" => 18,
|
"9" => 18,
|
||||||
"0" => 19
|
"0" => 19
|
||||||
}
|
}
|
||||||
def bind(key, mod = :alt, &block)
|
def bind(key, mod = :super, &block)
|
||||||
key_ = key.is_a?(String) ? KEY_MAP[key] : key
|
key_ = key.is_a?(String) ? KEY_MAP[key] : key
|
||||||
mod = MOD_MAP[mod]
|
mod = MOD_MAP[mod]
|
||||||
raise "unknown key #{key.to_s}" unless key_
|
raise "unknown key #{key.to_s}" unless key_
|
||||||
raise "unknown modifier" unless mod
|
raise "unknown modifier" unless mod
|
||||||
_bind key_, mod, &block
|
_bind key_, mod, &block
|
||||||
end
|
end
|
||||||
def unbind(key, mod = :alt)
|
def unbind(key, mod = :super)
|
||||||
key_ = key.is_a?(String) ? KEY_MAP[key] : key
|
key_ = key.is_a?(String) ? KEY_MAP[key] : key
|
||||||
mod = MOD_MAP[mod]
|
mod = MOD_MAP[mod]
|
||||||
raise "unknown key #{key.to_s}" unless key_
|
raise "unknown key #{key.to_s}" unless key_
|
||||||
@@ -149,24 +149,24 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 86 do |_, ws|
|
bind 86, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
n = (($current_project - 2) % MAX_PROJECTS) + 1
|
n = (($current_project - 2) % MAX_PROJECTS) + 1
|
||||||
go_project(n, $current_sub)
|
go_project(n, $current_sub)
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 82 do |_, ws|
|
bind 82, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
n = ($current_project % MAX_PROJECTS) + 1
|
n = ($current_project % MAX_PROJECTS) + 1
|
||||||
go_project(n, $current_sub)
|
go_project(n, $current_sub)
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 79 do |_, ws|
|
bind 79, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
go_project($current_project, ($current_sub + 1) % SUBS)
|
go_project($current_project, ($current_sub + 1) % SUBS)
|
||||||
end
|
end
|
||||||
|
|
||||||
bind 80 do |_, ws|
|
bind 80, :none do |_, ws|
|
||||||
next unless in_project?(ws)
|
next unless in_project?(ws)
|
||||||
go_project($current_project, ($current_sub - 1 + SUBS) % SUBS)
|
go_project($current_project, ($current_sub - 1 + SUBS) % SUBS)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Kutu WM
|
||||||
|
|
||||||
|
An X11 window manager written in ocaml.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user