모니터가 3개 있습니다(노트북용 1개, 외부 모니터 2개). Discord, Gimp, Scilab 등 일부 앱은 노트북 화면이 아닐 때 마우스 클릭을 허용하지 않습니다. 유일한 작업 화면은 입니다 eDP-1
. 마우스는 구성 파일에 나열되지 않은 외부 마우스이지만 터치패드에서도 동일한 현상이 발생합니다.
.config/sway/config
내 파일의 내용은 다음과 같습니다.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod1
set $win Mod4
# Your preferred terminal emulator
set $term kitty
# Your preferred application launcher
set $menu "rofi -modi drun,run -show drun -icon-theme 'Papirus' -show-icons"
set $lock swaylock -c 000000
### Output configuration
output * bg /home/janus/Pictures/Wallpapers/c182c352d778dce5eaf342fdd29fd1e3.jpg fill
output DP-4 resolution 3840x2160 scale 1.3 position -1000,-1660
output DP-2 resolution 3840x2160 scale 1.3 position 1955,-1660 transform 90
output eDP-1 resolution 1920x1080 scale 1 position 0,0
### Input configuration
input "1267:12608:ELAN06FA:00_04F3:3140_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
scroll_method two_finger
tap_button_map lmr
click_method clickfinger
}
input "1386:21098:Wacom_HID_526A_Finger" map_to_output eDP-1
input "1386:21098:Wacom_HID_526A_Pen" map_to_output eDP-1
input * {
xkb_layout "us"
xkb_variant "intl"
}
input "1:AT_Translated_Set_2_keyboard" xkb_model "pc105"
input "76:668:Luciano_Musacchio___s_Magic_Keyboard" xkb_model "pc105"
input "1133:45088:MX_Vertical_Mouse" {
natural_scroll disabled
}
### Key bindings
# Lock screen
bindsym $mod+Ctrl+l exec $lock
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec zenity --question --text="¿Desea cerrar la sesión?" && swaymsg exit
# Moving around:
#
# Move your focus around
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 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
#
# Layout stuff:
#
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
#
# Scratchpad:
#
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Multimedia
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym XF86Search exec google-chrome-stable
bindsym XF86Calculator exec gnome-calculator
exec waybar
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
#bar {
include /etc/sway/config.d/*
# Plasma compatibility improvements
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_role="dialog"] floating enable
for_window [class="krunner"] floating enable; border none
for_window [app_id="org.kde.kcalc"] floating enable; border none
for_window [class="Kmix"] floating enable; border none
for_window [class="spectacle"] floating enable; border none
for_window [class="Klipper"] floating enable; border none
for_window [class="Plasmoidviewer"] floating enable; border none
for_window [class="plasmashell" window_type="notification"] border none, move position 70 ppt 81 ppt
no_focus [class="plasmashell" window_type="notification"]
for_window [title="Desktop @ QRect.*"] kill; floating enable; border none
for_window [title="Calculator"] floating enable
default_border pixel 2
default_floating_border pixel 2
hide_edge_borders --i3 smart
smart_borders on
smart_gaps on
titlebar_border_thickness 0
# Notification Daemon
exec swaync
# Toggle control center
bindsym $mod+a exec swaync-client -t -sw
# Screenshot
bindsym $mod+p exec /usr/share/sway/scripts/grimshot --cursor copy area
bindsym --release Print exec /usr/share/sway/scripts/grimshot --cursor copy area
# Files
bindsym $win+e exec /usr/bin/thunar
exec systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
exec dbus-update-activation-environment WAYLAND_DISPLAY
exec wl-paste -t text --watch clipman store --no-persist```
답변1
이 문제와 해결책을 찾았습니다위키피디아.
이것은 Xwayland의 버그입니다. 제가 하는 방식대로 "음수" 픽셀을 처리하지 않습니다.
output DP-4 resolution 3840x2160 scale 1.3 position -1000,-1660
output DP-2 resolution 3840x2160 scale 1.3 position 1955,-1660 transform 90
output eDP-1 resolution 1920x1080 scale 1 position 0,0
Wikipedia에 표시된 대로 해결책은 부정적인 위치가 없도록 모니터를 재배치하는 것이었습니다. 예를 들어:
output DP-4 resolution 3840x2160 scale 1.3 position 0,0
output DP-2 resolution 3840x2160 scale 1.3 position 2955,0 transform 90
output eDP-1 resolution 1920x1080 scale 1 position 1000,1660