summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-06 14:39:55 +0100
committertcmal <me@aria.rip>2024-08-13 17:07:19 +0100
commit89b5f3f87c8022f2d32c422c3516fca2f1538d69 (patch)
tree231457b673cafbfdaea32a8f6a9d8c0aba08a7d3 /src/config.rs
parent5359062bf58a5ff57dfa48492db57f9340ecfbee (diff)
Add tags/workspaces
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs
index 9cbfc40..3182ba7 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -6,8 +6,11 @@ use xkeysym::Keysym;
use crate::{
bind,
+ clients::TagFocus,
conn_info::Colour,
- helpers::{focus_next, focus_prev, spawn, toggle_floating, toggle_fullscreen},
+ helpers::{
+ focus_next, focus_prev, set_tag, set_tag_focus, spawn, toggle_floating, toggle_fullscreen,
+ },
keys::{Keybind, Keybinds},
};
@@ -34,6 +37,25 @@ pub const KEYBINDS: Keybinds = Keybinds(&[
bind!(MAIN_MODIFIER , k -> &focus_prev),
bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , space -> &toggle_floating),
bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , f -> &toggle_fullscreen),
+ bind!(MAIN_MODIFIER , _1 -> &|wm| set_tag_focus(wm, TagFocus::Tag(1))),
+ bind!(MAIN_MODIFIER , _2 -> &|wm| set_tag_focus(wm, TagFocus::Tag(2))),
+ bind!(MAIN_MODIFIER , _3 -> &|wm| set_tag_focus(wm, TagFocus::Tag(3))),
+ bind!(MAIN_MODIFIER , _4 -> &|wm| set_tag_focus(wm, TagFocus::Tag(4))),
+ bind!(MAIN_MODIFIER , _5 -> &|wm| set_tag_focus(wm, TagFocus::Tag(5))),
+ bind!(MAIN_MODIFIER , _6 -> &|wm| set_tag_focus(wm, TagFocus::Tag(6))),
+ bind!(MAIN_MODIFIER , _7 -> &|wm| set_tag_focus(wm, TagFocus::Tag(7))),
+ bind!(MAIN_MODIFIER , _8 -> &|wm| set_tag_focus(wm, TagFocus::Tag(8))),
+ bind!(MAIN_MODIFIER , _9 -> &|wm| set_tag_focus(wm, TagFocus::Tag(9))),
+ bind!(MAIN_MODIFIER , _0 -> &|wm| set_tag_focus(wm, TagFocus::All)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _1 -> &|wm| set_tag(wm, 1)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _2 -> &|wm| set_tag(wm, 2)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _3 -> &|wm| set_tag(wm, 3)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _4 -> &|wm| set_tag(wm, 4)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _5 -> &|wm| set_tag(wm, 5)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _6 -> &|wm| set_tag(wm, 6)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _7 -> &|wm| set_tag(wm, 7)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _8 -> &|wm| set_tag(wm, 8)),
+ bind!(MAIN_MODIFIER.union(ModMask::SHIFT) , _9 -> &|wm| set_tag(wm, 9)),
// { MODKEY, XK_j, focusstack, {.i = +1 } },
// { MODKEY, XK_k, focusstack, {.i = -1 } },
// { MODKEY, XK_i, incnmaster, {.i = +1 } },