Skip to content
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

issue with renaming i3 workspaces using IPC: moving a window to another monitor and hovering the mouse back causes unwanted switch to another workspace #5924

Open
2 tasks done
Ali-Flt opened this issue Feb 19, 2024 · 2 comments
Labels
4.23 bug missing-log Read the CONTRIBUTING.md file for instructions waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment.

Comments

@Ali-Flt
Copy link

Ali-Flt commented Feb 19, 2024

Welcome

  • Yes, I'm using the latest major release or the current development version. These are the only supported versions.
  • Yes, I've searched similar issues and discussions on GitHub and didn't find any.

Current Behavior

I am using i3wsr for renaming workspaces automatically but I believe this issue may be related to i3's IPC and not i3wsr so I'm opening it here as well.

When dragging a windows between monitors and hovering back to the previous monitor an unexpected workspace change occurs.

since i3wsr is just a simple code using i3 IPC interface to rename workspaces based on windows inside that workspace, chances are this issue is related to a bug inside i3 IPC so please investigate it. 🙏

Related issue in i3wsr repo: roosta/i3wsr#34

Expected Behavior

After hovering back to the previous monitor the current workspace in that monitor remains unchanged.

Reproduction Instructions

In multi monitor setup:

  1. drag a window from workspace 0 in monitor 1 to workspace 5 in monitor 2
  2. hover mouse back to monitor 1
  3. current workspace of monitor 0 changes from workspace 1 to workspace 2 unexpectedly.

i3 version

Binary i3 version:  4.23 (2023-10-29) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.23 (2023-10-29) (pid 3112)

Config file

set $mod Mod4
set $Lmon HDMI-0
set $Mmon DP-2
set $Rmon DP-1

font pango:Vazir 8

exec --no-startup-id dex --autostart --environment i3
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
exec --no-startup-id nm-applet
exec --no-startup-id i3lock -S 1 -e -f --keylayout 1 --layout-color=ffffff

# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym $mod+Shift+F7 exec xrandr --output $Lmon --off --output DP-0 --off --output $Rmon --off --output $Mmon --primary --mode 2560x1440 --pos 1920x0 -r 165
bindsym $mod+Shift+F8 exec xrandr --output $Lmon --mode 1920x1080 --pos 0x360 --rotate normal -r 75 --output DP-0 --off --output $Rmon --mode 1920x1080 --pos 4480x360 --rotate normal -r 60 --output $Mmon --primary --mode 2560x1440 --pos 1920x0 -r 165
bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 1%+ && pkill -RTMIN+10 i3blocks
bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 1%- && pkill -RTMIN+10 i3blocks
bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+10 i3blocks

#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2.5% && $refresh_i3status
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2.5% && $refresh_i3status
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

bindsym $mod+Escape exec --no-startup-id i3lock -S 1 -e -f --keylayout 1 --layout-color=ffffff --time-color=ffffff --date-color=ffffff --greeter-color=ffffff --color=2f343f --ring-width=20

bindsym $mod+Shift+F11 exec --no-startup-id droidcam-cli -size=1920x1080 adb 4747
bindsym $mod+Shift+F12 exec --no-startup-id killall droidcam-cli

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

# start a terminal
bindsym $mod+Return exec alacritty

# kill focused window
bindsym $mod+Shift+q kill

#bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+Shift+d exec --no-startup-id rofimoji --skin-tone neutral
bindsym $mod+d exec --no-startup-id "rofi -combi-modi window,drun,ssh -show combi -icon-theme Papirus -show-icons -drun-show-actions "
bindsym --release Print exec --no-startup-id maim --select -f png | xclip -selection clipboard -t image/png
bindsym Shift+Print exec --no-startup-id maim -f png | xclip -selection clipboard -t image/png
bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard

# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop

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

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

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

bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

bindsym $mod+b split h
bindsym $mod+v split v
bindsym $mod+m fullscreen toggle
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent

for_window [class="^.*"] border pixel 0
gaps inner 4

set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"

# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10

# bind workspaces to display
workspace $ws1 output $Lmon
workspace $ws2 output $Lmon
workspace $ws3 output $Lmon
workspace $ws4 output $Lmon
workspace $ws5 output $Mmon
workspace $ws6 output $Mmon
workspace $ws7 output $Mmon
workspace $ws8 output $Mmon
workspace $ws9 output $Rmon
workspace $ws10 output $Rmon

# move focused container to workspace
#bindsym --whole-window $mod+Shift+button4 exec get_workspace prev
#bindsym --whole-window $mod+Shift+button5 exec get_workspace next
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10

# 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
# 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'"

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

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym semicolon resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}

bindsym $mod+r mode "resize"

bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioStop exec playerctl stop
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous

exec_always --no-startup-id i3wsr
bar {
        i3bar_command i3bar
        position top
        status_command i3blocks
        output primary
        workspace_min_width 45
        tray_output primary
        tray_padding 3
        font pango:Vazir 12
        colors {
                background #003942
                statusline #ffffff
                separator #666666

                focused_workspace  #003942 #F8496C #ffffff
                active_workspace   #003942 #F78C6C #ffffff
                inactive_workspace #003942 #003942 #ffffff
                urgent_workspace   #003942 #C40000 #ffffff
                binding_mode       #003942 #C40000 #ffffff
        }
}

bar {
        i3bar_command i3bar
        status_command i3blocks
        position top
        output nonprimary
        tray_output primary
        workspace_min_width 45
        font pango:Vazir 10
        colors {
                background #003942
                statusline #ffffff
                separator #666666

                focused_workspace  #003942 #F8496C #ffffff
                active_workspace   #003942 #F78C6C #ffffff
                inactive_workspace #003942 #003942 #ffffff
                urgent_workspace   #003942 #C40000 #ffffff
                binding_mode       #003942 #C40000 #ffffff
        }
}

#exec_always --no-startup-id $HOME/.config/polybar/launch.sh
#exec --no-startup-id /usr/lib/gsd-xsettings
#exec_always --no-startup-id gnome-power-manager
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec_always --no-startup-id xrandr --output $Lmon --mode 1920x1080 --pos 0x360 --rotate normal -r 75 --output DP-0 --off --output $Rmon --mode 1920x1080 --pos 4480x360 --rotate normal -r 60 --output $Mmon --primary --mode 2560x1440 --pos 1920x0 --rotate normal -r 165 --output DP-3 --off --output DP-4 --off --output DP-5 --off
#exec --no-startup-id gnome-flashback
#exec --no-startup-id /usr/bin/gnome-screensaver
# exec --no-startup-id "piactl background enable; piactl connect"
#exec_always --no-startup-id lxpolkit
exec_always --no-startup-id dunst
exec_always --no-startup-id setxkbmap -layout us,ir -option '' ;setxkbmap -layout us,ir -option 'grp:alt_shift_toggle';
exec_always --no-startup-id picom -b --experimental-backends
exec_always --no-startup-id "ps -aux | grep wallpaper.sh | grep -v grep | awk '{ print $2 }' | xargs kill -9; bash /home/ali/.my_scripts/wallpaper.sh"
#exec_always --no-startup-id "killall superpaper; superpaper --profile my_wallpaper_2"
exec_always --no-startup-id autotiling
#exec_always --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=secrets
exec_always --no-startup-id clipster -d
exec_always --no-startup-id greenclip daemon>/dev/null

for_window [title="^floating_jcal$"] floating enable
assign [title="^Mixer$"] → output $Mmon
for_window [title="^Mixer$"] floating disable
client.focused #b8e24d #285577 #ffffff #2e9ef4 #b8e24d
for_window [class="^.*"] border pixel 0

Linux distribution & Version

Archlinux (255.3-1-arch)

Are you using a compositor?

I am sure I don't run any compositor

Logfile

No response

@Ali-Flt Ali-Flt added the bug label Feb 19, 2024
@i3bot i3bot added the missing-log Read the CONTRIBUTING.md file for instructions label Feb 19, 2024
@i3bot
Copy link

i3bot commented Feb 19, 2024

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.)

@orestisfl
Copy link
Member

Having logs here could help figure out what IPC commands i3wsr uses that might cause this.

@orestisfl orestisfl added the waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment. label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.23 bug missing-log Read the CONTRIBUTING.md file for instructions waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment.
Projects
None yet
Development

No branches or pull requests

3 participants