Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jay Ta'ala
jt-config-repo
Commits
b21c895e
Commit
b21c895e
authored
Oct 18, 2022
by
Jay Ta'ala
Browse files
EXPERIMENTAL: getting window focus and name for smart $mod+r
parent
5721027c
Changes
2
Show whitespace changes
Inline
Side-by-side
i3/config
View file @
b21c895e
...
@@ -84,7 +84,8 @@ for_window [class=".*"] title_window_icon padding 3px
...
@@ -84,7 +84,8 @@ for_window [class=".*"] title_window_icon padding 3px
focus_wrapping no
focus_wrapping no
# parent focus switch (useful for master/stack switching) - has fallback for no focus_wrapping
# parent focus switch (useful for master/stack switching) - has fallback for no focus_wrapping
# required xdotool
# required xdotool
bindsym $mod+r exec --no-startup-id "WINDOW=$(xdotool getactivewindow); i3-msg \\"focus parent; focus left; focus child\\"; NEW_WINDOW=$(xdotool getactivewindow); if [ \\"$NEW_WINDOW\\" -eq \\"$WINDOW\\" ]; then i3-msg \\"focus parent; focus right\\"; fi"
set $focusroot x=$(xdotool getwindowfocus getwindowname); while [ \\"$x\\" != \\"i3\\" ]; do i3-msg \\"focus parent\\"; x=$(xdotool getwindowfocus getwindowname); done
bindsym $mod+r exec --no-startup-id "WINDOW=$(xdotool getactivewindow); $focusroot; i3-msg \\"focus child, focus left\\"; x=$(xdotool getwindowfocus getwindowname); if [ \\"$x\\" == \\"\\" ]; then $focusroot; i3-msg \\"focus child, focus right\\"; fi"
# Hide borders <none|vertical|horizontal|both|smart>
# Hide borders <none|vertical|horizontal|both|smart>
hide_edge_borders none
hide_edge_borders none
...
...
i3/config.simple
View file @
b21c895e
...
@@ -84,7 +84,8 @@ for_window [class=".*"] title_window_icon padding 3px
...
@@ -84,7 +84,8 @@ for_window [class=".*"] title_window_icon padding 3px
focus_wrapping no
focus_wrapping no
# parent focus switch (useful for master/stack switching) - has fallback for no focus_wrapping
# parent focus switch (useful for master/stack switching) - has fallback for no focus_wrapping
# required xdotool
# required xdotool
bindsym $mod+r exec --no-startup-id "WINDOW=$(xdotool getactivewindow); i3-msg \\"focus parent; focus left; focus child\\"; NEW_WINDOW=$(xdotool getactivewindow); if [ \\"$NEW_WINDOW\\" -eq \\"$WINDOW\\" ]; then i3-msg \\"focus parent; focus right\\"; fi"
set $focusroot x=$(xdotool getwindowfocus getwindowname); while [ \\"$x\\" != \\"i3\\" ]; do i3-msg \\"focus parent\\"; x=$(xdotool getwindowfocus getwindowname); done
bindsym $mod+r exec --no-startup-id "WINDOW=$(xdotool getactivewindow); $focusroot; i3-msg \\"focus child, focus left\\"; x=$(xdotool getwindowfocus getwindowname); if [ \\"$x\\" == \\"\\" ]; then $focusroot; i3-msg \\"focus child, focus right\\"; fi"
# Hide borders <none|vertical|horizontal|both|smart>
# Hide borders <none|vertical|horizontal|both|smart>
hide_edge_borders none
hide_edge_borders none
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment