New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus is not work in tabbed mode? #3466

Open
weynhamz opened this Issue Oct 21, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@weynhamz

weynhamz commented Oct 21, 2018

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

I have many Chromium windows open in tabbed mode and using a Chromium extension called Tabs Outliner to switch the tabs in different Chromium windows. When I double click a tab in Tabs Outliner, if the Chromium window (in tabbed mode) that holds that tab is not currently being focused, nothing happened.

Expected Behavior

The Chromium window should be focused.

Reproduction Instructions

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.15 (2018-03-10) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.15 (2018-03-10) (pid 1314)o abort…)
Loaded i3 config: /home/weynhamz/.i3/config (Last modified: Sun 21 Oct 2018 04:28:16 PM CST, 829 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
# i3 config file
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

set $mod Mod4


#####
#
# Fonts
#
#####

# Font for window titles. It will also be used by the bar unless a different
# font is used in the bar {} block below.

# ISO 10646 = Unicode
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1

# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering and
# chose a FreeType font, such as:
#font pango:DejaVu Sans Mono 8

font pango:文泉驿等宽微米黑 8

#####
#
# Behaviors
#
#####

# Do not changing focus on mouse moving
focus_follows_mouse no

# Wrapper the focus between containers in the same level
force_focus_wrapping no

# Switch back and forth when pressing workspace changing key bindings
workspace_auto_back_and_forth yes

#####
#
# Basic Key Bindings
#
#####

# kill focused window

set $close "Close the window? (y/n)"

mode $close {
    bindsym y kill, mode default
    bindsym Return kill, mode default

    bindsym n mode default
    bindsym Escape mode default
}

bindsym $mod+q mode $close

bindsym $mod+Shift+q kill

# start i3-dmenu-desktop as program launcher
# It is a wrapper around dmenu, which only displays applications shipping a
# .desktop file, so dmenu needs to be installed.
# Use xft patched dmenu in order to use customized fonts to show UTF-8
# characters
#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu='dmenu -fn "文泉驿等宽微米黑-10"' --entry-type=filename --entry-type=command --entry-type=name

# start j4-dmenu-desktop as program launcher
# It is a wrapper around dmenu, which only displays applications shipping a
# .desktop file, so dmenu needs to be installed.
# Use xft patched dmenu in order to use customized fonts to show UTF-8
# characters
bindsym $mod+d exec --no-startup-id j4-dmenu-desktop

bindsym $mod+s exec --no-startup-id layout_manager.sh TEST

# start a terminal
bindsym $mod+Return exec gnome-terminal
#bindsym $mod+Return exec deepin-terminal

# use $mod+Mouse to drag floating windows to their wanted position
floating_modifier $mod

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+w layout tabbed
#bindsym $mod+s layout stacking
bindsym $mod+e layout toggle split

# split in vertical orientation
bindsym $mod+v split vertical

# split in horizontal orientation
bindsym $mod+Shift+v split horizontal

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# Show the first scratchpad window
bindsym $mod+minus scratchpad show

#Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad

set $output_main eDP1
set $output_aside DP1 

workspace 1 output $output_main 
workspace 2 output $output_main 
workspace 3 output $output_main 
workspace 4 output $output_main 
workspace 5 output $output_main 
workspace 6 output $output_main 
workspace 7 output $output_main 
workspace 8 output $output_main 
workspace 9 output $output_main 
workspace 10 output $output_main

workspace 11 output $output_aside 
workspace 12 output $output_aside 
workspace 13 output $output_aside 
workspace 14 output $output_aside 
workspace 15 output $output_aside 
workspace 16 output $output_aside 
workspace 17 output $output_aside 
workspace 18 output $output_aside 
workspace 19 output $output_aside 
workspace 20 output $output_aside 

#####
#
# Focus/Move Key Bindings
#
#####

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
bindsym $mod+Shift+a focus child

# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right

# change workspace
bindsym $mod+Tab workspace next, exec --no-startup-id 'notify-send $(i3-msg -t get_workspaces | jq ".[] | select(.focused==true).name" | cut -d"\"" -f2)'
bindsym $mod+Shift+Tab workspace prev

# switch between the current and the previously focused one
bindsym $mod+z workspace back_and_forth
bindsym $mod+Shift+z move container to workspace back_and_forth

# switch to workspace
bindsym $mod+1 workspace number 11, workspace number 1
bindsym $mod+2 workspace number 12, workspace number 2
bindsym $mod+3 workspace number 13, workspace number 3
bindsym $mod+4 workspace number 14, workspace number 4
bindsym $mod+5 workspace number 15, workspace number 5
bindsym $mod+6 workspace number 16, workspace number 6
bindsym $mod+7 workspace number 17, workspace number 7
bindsym $mod+8 workspace number 18, workspace number 8
bindsym $mod+9 workspace number 19, workspace number 9
bindsym $mod+0 workspace number 20, workspace number 10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10

# move focused container to workspace
bindsym $mod+Control+1 move container to workspace number 11
bindsym $mod+Control+2 move container to workspace number 12
bindsym $mod+Control+3 move container to workspace number 13
bindsym $mod+Control+4 move container to workspace number 14
bindsym $mod+Control+5 move container to workspace number 15
bindsym $mod+Control+6 move container to workspace number 16
bindsym $mod+Control+7 move container to workspace number 17
bindsym $mod+Control+8 move container to workspace number 18
bindsym $mod+Control+9 move container to workspace number 19
bindsym $mod+Control+0 move container to workspace number 20

# move workspace to outputs
bindsym $mod+Control+h move workspace to output left
bindsym $mod+Control+j move workspace to output down
bindsym $mod+Control+k move workspace to output up
bindsym $mod+Control+l move workspace to output right

bindsym $mod+x move workspace to output DP1
bindsym $mod+Shift+x move workspace to output eDP1

# move container to outputs
bindsym $mod+Control+Shift+h move container to output left
bindsym $mod+Control+Shift+j move container to output down
bindsym $mod+Control+Shift+k move container to output up
bindsym $mod+Control+Shift+l move container to output right

bindsym $mod+o move container to output DP1 
bindsym $mod+Shift+o move container to output eDP1

bindsym $mod+Control+Left focus output left
bindsym $mod+Control+Right focus output right
bindsym $mod+Control+Up focus output up
bindsym $mod+Control+Down focus output down

#bindsym $mod+s focus output DP1
#bindsym $mod+Shift+s focus output eDP1


mode "wswitch" {
    bindsym $mod+a focus parent

    # change focus
    bindsym $mod+h focus left
    bindsym $mod+j focus down
    bindsym $mod+k focus up
    bindsym $mod+l focus right
    
    # move focused window
    bindsym $mod+Shift+h move left
    bindsym $mod+Shift+j move down
    bindsym $mod+Shift+k move up
    bindsym $mod+Shift+l move right
    
    # change workspace
    bindsym $mod+Tab workspace next
    bindsym $mod+Shift+Tab workspace prev
    
    # switch between the current and the previously focused one
    bindsym $mod+b workspace back_and_forth
    bindsym $mod+Shift+b move container to workspace back_and_forth
    
    # .....
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

bindsym $mod+Mod1+space mode "wswitch"

#####
#
# i3-input Key Bindings
#
#####

# execute commands
bindsym $mod+F2 exec i3-input

# vim-like marks
bindsym $mod+g exec i3-input -F '[con_mark="%s"] focus' -P 'Goto mark: '
bindsym $mod+m exec i3-input -F 'mark "%s"' -P 'Add mark: '
bindsym $mod+Shift+m exec i3-input -F 'unmark "%s"' -P 'Remove mark: '

# rename workspace
bindsym $mod+Shift+y exec i3-input -F 'rename workspace to "%s"' -P 'New name: '

#####
#
# System Control
#
#####

# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

# reload the configuration file
bindsym $mod+Shift+c reload

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart

# lock i3
bindsym $mod+Control+Return exec "sudo xset +dpms && xset s on; i3lock -c 000000"

#####
#
# Configure i3bar
#
#####

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
    font pango:文泉驿等宽微米黑 8
    position bottom
    tray_output primary
#    status_command i3status -c ~/.i3/config.status
    status_command python3 ~/.i3/config.pystatus
}

####
#
# Resize mode
#
####

# resize window (you can also use the mouse for that)
mode "resize" {
    # These bindings trigger as soon as you enter the resize mode

    bindsym h resize shrink width  5 px or 5 ppt
    bindsym j resize grow   height 5 px or 5 ppt
    bindsym k resize shrink height 5 px or 5 ppt
    bindsym l resize grow   width  5 px or 5 ppt

    # back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

bindsym $mod+r mode "resize"

######
#
# Floating Windows
#
######

#for_window [class="^(?!(Chromium)|(Gnome-terminal)).*" ] floating enable
#for_window [window_role="pop-up" instance="^(?!crx_eggkanocgddhmamlbiijnphhppkpkmkl).*$"] floating enable

for_window [title="^Android Emulator"] floating enable
for_window [class="feh"] floating enable
for_window [class="qiv"] floating enable
for_window [class="Eog"] floating enable
for_window [class="Sxiv"] floating enable
for_window [class="MPlayer"] floating enable
for_window [class="Empathy"] floating enable
for_window [class="VirtualBox"] floating enable
for_window [class="screengrab"] floating enable
for_window [class="zoom"] floating enable
for_window [class="Kalu"] floating enable
for_window [class="Evolution-alarm-notify"] floating enable
for_window [class="Nightingale"] floating enable
for_window [class="Corebird"] floating enable
for_window [class="Gnome-mplayer"] floating enable
for_window [class="Gnome-screenshot"] floating enable
for_window [class="^Nautilus$" instance="^file_progress$"] floating enable
for_window [class="Wine" instance="TeamViewer.exe"] floating enable
#for_window [class="Skype" instance="skype"] floating enable
#for_window [class="skypeforlinux" instance="skypeforlinux"] floating enable
for_window [class="Firefox" instance="Firebug"] floating enable
for_window [instance="sun-awt-X11-XDialogPeer"] floating enable
for_window [instance="sun-awt-X11-XFramePeer"] floating enable
for_window [class="Firefox" instance="Devtools"] floating enable
for_window [class="Slack" instance="slack"] floating disable
for_window [class="Wine" instance="wechat.exe"] floating enable
for_window [class="TeamViewer" instance="TeamViewer"] floating enable
#for_window [instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] focus
for_window [instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] floating disable
for_window [instance="crx_hfilbmblidibnmifcabmolhlaekpfhak"] floating enable
#for_window [instance="crx_eggkanocgddhmamlbiijnphhppkpkmkl"] floating disable
#for_window [instance="crx_eggkanocgddhmamlbiijnphhppkpkmkl"] floating enable

###
#
# Autostart Programs
#
###

exec --no-startup-id nm-applet
exec --no-startup-id mpd ~/.config/mpd/mpd.conf
exec --no-startup-id compton -b
exec --no-startup-id volumeicon
exec --no-startup-id sh ~/.fehbg
#exec --no-startup-id ibus-daemon --xim -d -r
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &>/dev/null &

####
#
# GNOME Intergration
#
####

# show gnome logout dialog
#bindsym $mod+Shift+q exec gnome-session-quit --logout

# show gnome shutdown menu
#bindsym $mod+Shift+s exec gnome-session-quit --power-off

# use gnome-screensaver lock screen
bindsym $mod+Shift+n exec gnome-screensaver-command -l

#exec --no-startup-id "i3-msg 'workspace 10; append_layout ~/.i3/workspace-10.json'"

##
# move floating windows with keys
bindsym $mod+Control+m mode "move" focus floating

mode "move" {
    bindsym $mod+Tab focus right

    bindsym Left  move left
    bindsym Down  move down
    bindsym Up    move up
    bindsym Right move right

    bindsym h     move left
    bindsym j     move down
    bindsym k     move up
    bindsym l     move right

    # back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

#gaps inner 15
#gaps outer 0

focus_on_window_activation focus

show_marks yes
Logfile URL:
- Linux Distribution & Version: Arch Linux
- Are you using a compositor (e.g., xcompmgr or compton): compton

@i3bot i3bot added the bug label Oct 21, 2018

@i3bot

This comment has been minimized.

i3bot commented Oct 21, 2018

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@Airblader

This comment has been minimized.

Member

Airblader commented Oct 21, 2018

When you say tabbed mode, you mean you have Chrome tabs open as i3 tabs, not using the tabs Chrome provides itself, right?

What mechanism does Tabs Outliner use to focus a window? Is it open source?

@weynhamz

This comment has been minimized.

weynhamz commented Oct 22, 2018

I mean I have multiple Chrome windows as i3 tabs, in each Chrome window, multiple Chrome tabs open, and the Tabs Outliner Chrome extension will generate the Chrome windows and tabs in a tree, so that you can double click to activate a certain Chrome tab in certain Chrome window, current problem is that it Chrome tab is activated but the Chrome window does not seem to focus if the Chrome windows are placed in i3 tabbed module.

Here is the Tabs Outliner Chrome extension https://chrome.google.com/webstore/detail/tabs-outliner/eggkanocgddhmamlbiijnphhppkpkmkl

@weynhamz

This comment has been minimized.

weynhamz commented Oct 22, 2018

Here is a screenshot.

deepinscreenshot_select-area_20181022103832

@Airblader

This comment has been minimized.

Member

Airblader commented Oct 23, 2018

That's just the install, not the source code. We generally do not support closed-source software, so we either need to reproduce this with some open-source software or someone needs to figure out what mechanism they use to focus a window (there's more than one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment