From 40bda4d5bce8577f65f078a416d77aef22ce0f32 Mon Sep 17 00:00:00 2001 From: David Todd Date: Fri, 27 Mar 2020 13:43:29 -0500 Subject: [PATCH] put container mode changes in a seperate menu --- home/.config/i3/conf.d/layout-keybinds.conf | 21 ++++++++++++++++----- home/.config/i3/config | 21 ++++++++++++++++----- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/home/.config/i3/conf.d/layout-keybinds.conf b/home/.config/i3/conf.d/layout-keybinds.conf index f58bc15..9ff4fac 100644 --- a/home/.config/i3/conf.d/layout-keybinds.conf +++ b/home/.config/i3/conf.d/layout-keybinds.conf @@ -25,12 +25,23 @@ bindsym $mod+minus scratchpad show # split orientation bindsym $mod+h split h;exec notify-send 'tile horizontally' bindsym $mod+v split v;exec notify-send 'tile vertically' -bindsym $mod+q split toggle +bindsym $mod+q split toggle;exec notify-send 'tile direction toggled' -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split +# To prevent accidentally changing the workspace mode, those +# keybinds are hidden behind "view_mode" +bindsym $mod+Shift+m mode "view_mode" +mode "view_mode" { + # change container layout (stacked, tabbed, toggle split) + # Also send a notification saying the mode was changed + bindsym $mod+s layout stacking;exec notify-send 'Stacking Mode' + bindsym $mod+w layout tabbed;exec notify-send 'Tabbed Mode' + # Default mode + bindsym $mod+e layout toggle split;exec notify-send 'Split Mode' + + # exit resize mode: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} # change focus vim keybinding bindsym $mod+j focus left diff --git a/home/.config/i3/config b/home/.config/i3/config index 3d005f9..54c2a2e 100644 --- a/home/.config/i3/config +++ b/home/.config/i3/config @@ -277,12 +277,23 @@ bindsym $mod+minus scratchpad show # split orientation bindsym $mod+h split h;exec notify-send 'tile horizontally' bindsym $mod+v split v;exec notify-send 'tile vertically' -bindsym $mod+q split toggle +bindsym $mod+q split toggle;exec notify-send 'tile direction toggled' -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split +# To prevent accidentally changing the workspace mode, those +# keybinds are hidden behind "view_mode" +bindsym $mod+Shift+m mode "view_mode" +mode "view_mode" { + # change container layout (stacked, tabbed, toggle split) + # Also send a notification saying the mode was changed + bindsym $mod+s layout stacking;exec notify-send 'Stacking Mode' + bindsym $mod+w layout tabbed;exec notify-send 'Tabbed Mode' + # Default mode + bindsym $mod+e layout toggle split;exec notify-send 'Split Mode' + + # exit resize mode: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} # change focus vim keybinding bindsym $mod+j focus left