Commit 6cd0abe0 authored by Jay Ta'ala's avatar Jay Ta'ala
Browse files

Focus container now using fallback behaviour in case that have selected window...

Focus container now using fallback behaviour in case that have selected window without container (excluding workspace container).  Updated conky_shortcuts.
parent 757931f3
...@@ -25,7 +25,7 @@ ${color2}bmenu - ${color}mod+Ctrl+b ...@@ -25,7 +25,7 @@ ${color2}bmenu - ${color}mod+Ctrl+b
${color2}morc_menu - ${color}mod+z ${color2}morc_menu - ${color}mod+z
${color2}kill focused - ${color}mod+Shift+q ${color2}kill focused - ${color}mod+Shift+q
${color2}toggle split direction - ${color}mod+q[e] ${color2}toggle split direction - ${color}mod+[q|e]
${color2}container layout (tabd) - ${color}mod+w ${color2}container layout (tabd) - ${color}mod+w
${color2}container layout (stck) - ${color}mod+s ${color2}container layout (stck) - ${color}mod+s
${color2}child container (horz) - ${color}mod+Alt+q ${color2}child container (horz) - ${color}mod+Alt+q
...@@ -38,14 +38,17 @@ ${color2}tab with previous window - ${color}mod+Shift+z ...@@ -38,14 +38,17 @@ ${color2}tab with previous window - ${color}mod+Shift+z
${color2}splith with next window - ${color}mod+x ${color2}splith with next window - ${color}mod+x
${color2}splith with previous window - ${color}mod+Shift+x ${color2}splith with previous window - ${color}mod+Shift+x
${color2}toggle floating - ${color}mod+Shift+Space ${color2}focus windows - ${color}mod+[hjkl | arrow_keys]
${color2}toggle sticky - ${color}mod+Shift+s ${color2}focus containers - ${color}mod+Ctrl+[hjkl | arrow_keys]
${color2}window opacity up[dn] - ${color}mod+Alt+x[z]
${color2}switch to workspace 1-8 - ${color}mod+1-8 ${color2}switch to workspace 1-8 - ${color}mod+1-8
${color2}send to workspace 1-8 - ${color}mod+Alt+1-8 ${color2}send to workspace 1-8 - ${color}mod+Alt+1-8
${color2}navigate workspaces - ${color}mod+Ctrl+arrowkeys ${color2}navigate workspaces - ${color}mod+Ctrl+arrowkeys
${color2}toggle floating - ${color}mod+Shift+Space
${color2}toggle sticky - ${color}mod+Shift+s
${color2}window opacity up[dn] - ${color}mod+Alt+[x|z]
${color2}exit - ${color}mod+0 ${color2}exit - ${color}mod+0
${color2}help - ${color}mod+Shift+h ${color2}help - ${color}mod+Shift+h
${color2}mod = ${color}<Super> ${color2}mod = ${color}<Super>
......
...@@ -113,11 +113,12 @@ bindsym $mod+j focus down ...@@ -113,11 +113,12 @@ bindsym $mod+j focus down
bindsym $mod+k focus up bindsym $mod+k focus up
bindsym $mod+l focus right bindsym $mod+l focus right
# container focusing # container focusing (with fallback for case where window is direct child of workspace container)
bindsym $mod+Ctrl+h focus parent, focus left # NOTE: requires xdotool
bindsym $mod+Ctrl+j focus parent, focus down bindsym $mod+Ctrl+h exec "WINDOW=$(xdotool getactivewindow); i3-msg \\"focus parent; focus left; focus child\\"; NEW_WINDOW=$(xdotool getactivewindow); if [ \\"$NEW_WINDOW\\" -eq \\"$WINDOW\\" ]; then i3-msg \\"focus left\\"; fi"
bindsym $mod+Ctrl+k focus parent, focus up bindsym $mod+Ctrl+j exec "WINDOW=$(xdotool getactivewindow); i3-msg \\"focus parent; focus down; focus child\\"; NEW_WINDOW=$(xdotool getactivewindow); if [ \\"$NEW_WINDOW\\" -eq \\"$WINDOW\\" ]; then i3-msg \\"focus down\\"; fi"
bindsym $mod+Ctrl+l focus parent, focus right bindsym $mod+Ctrl+k exec "WINDOW=$(xdotool getactivewindow); i3-msg \\"focus parent; focus up; focus child\\"; NEW_WINDOW=$(xdotool getactivewindow); if [ \\"$NEW_WINDOW\\" -eq \\"$WINDOW\\" ]; then i3-msg \\"focus up\\"; fi"
bindsym $mod+Ctrl+l exec "WINDOW=$(xdotool getactivewindow); i3-msg \\"focus parent; focus right; focus child\\"; NEW_WINDOW=$(xdotool getactivewindow); if [ \\"$NEW_WINDOW\\" -eq \\"$WINDOW\\" ]; then i3-msg \\"focus right\\"; fi"
# move focused window # move focused window
bindsym $mod+Shift+Left move left 100px bindsym $mod+Shift+Left move left 100px
...@@ -139,9 +140,10 @@ workspace_auto_back_and_forth yes ...@@ -139,9 +140,10 @@ workspace_auto_back_and_forth yes
# Set $con_title (embedded script) - used in split orientations below. # Set $con_title (embedded script) - used in split orientations below.
# Two options for container title_format below (comment out one). The first one leaves the shown title as i3 deault (e.g. %title). # Two options for container title_format below (comment out one). The first one leaves the shown title as i3 deault (e.g. %title).
# The second option uses application window title (but colored and bolded) that was selected when the container was created. # The second option uses application window title (but colored and bolded) that was selected when the container was created.
# NOTE: requires xdotool
# #
#set $con_title focus parent; title_format "<span foreground='#ff8c85'><b> 📦 %title</b></span>"; focus child; title_format " %title" #set $con_title focus parent; title_format "<span foreground='#ff8c85'><b> 📦 %title</b></span>"; focus child; title_format " %title"
set $con_title exec "answer=$(xdotool getwindowfocus getwindowname); i3-msg focus parent, title_format \\"<span foreground='#ff8c85'><b> ⮡$answer</b></span>\\", focus child" set $con_title exec "ANSWER=$(xdotool getwindowfocus getwindowname); i3-msg focus parent, title_format \\"<span foreground='#ff8c85'><b> ⮡\\"$ANSWER\\"</b></span>\\", focus child"
# split orientations # split orientations
bindsym $mod+q layout toggle split;exec notify-send 'layout toggled' bindsym $mod+q layout toggle split;exec notify-send 'layout toggled'
...@@ -193,7 +195,7 @@ bindsym $mod+a focus parent ...@@ -193,7 +195,7 @@ bindsym $mod+a focus parent
bindsym $mod+Shift+a focus child bindsym $mod+Shift+a focus child
# dynamic renaming of parent container # dynamic renaming of parent container
bindsym $mod+slash exec "answer=$(zenity --title=\\"i3-msg title_format\\" --text \\"Change %title for parent container\\" --entry); if [ -n \\"$answer\\" ]; then i3-msg focus parent, title_format \\"<span foreground='#ff8c85'><b> 📦 $answer</b></span>\\", focus child; fi" bindsym $mod+slash exec "ANSWER=$(zenity --title=\\"i3-msg title_format\\" --text \\"Change %title for parent container\\" --entry); if [ -n \\"$ANSWER\\" ]; then i3-msg focus parent, title_format \\"<span foreground='#ff8c85'><b> 📦 $ANSWER</b></span>\\", focus child; fi"
bindsym $mod+Mod1+slash focus parent, title_format "<span foreground='#ff8c85'><b> 📦 %title</b></span>", focus child bindsym $mod+Mod1+slash focus parent, title_format "<span foreground='#ff8c85'><b> 📦 %title</b></span>", focus child
# move the currently focused window to the scratchpad # move the currently focused window to the scratchpad
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment