Nwg-dock Showing On the Wrong Screen

Hello! I'm running Garuda Sway, and installed nwg-dock onto my system, but it is showing on the wrong display. Since Sway doesn't have "primary" monitor per say, what do I need to change for it to show on the other monitor that I consider my main one?

Thanks!

System:
  Kernel: 6.1.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=4a52c1b8-23e1-49ac-b44b-de1bcffa4e04 rw [email protected]
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    loglevel=3 ibt=off
  Desktop: sway v: 1.7 info: waybar, nwg-dock dm: greetd
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: B550 Phantom Gaming-ITX/ax serial: N/A
    UEFI: American Megatrends LLC. v: P2.20 date: 08/05/2021
CPU:
  Info: model: AMD Ryzen 5 5500 socket: AM4 bits: 64 type: MT MCP arch: Zen 3
    gen: 4 level: v3 note: check built: 2021-22 process: TSMC n7 (7nm)
    family: 0x19 (25) model-id: 0x50 (80) stepping: 0 microcode: 0xA50000C
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 3600 min/max: 1400/4268 boost: enabled
    base/boost: 3600/4250 scaling: driver: acpi-cpufreq governor: performance
    volts: 1.4 V ext-clock: 100 MHz cores: 1: 3600 2: 3600 3: 3600 4: 3600
    5: 3600 6: 3600 7: 3600 8: 3600 9: 3600 10: 3600 11: 3600 12: 3600
    bogomips: 86234
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU106 [GeForce RTX 2060 SUPER] vendor: Micro-Star MSI
    driver: nouveau v: kernel non-free: 525.xx+ status: current (as of 2022-12)
    arch: Turing code: TUxxx process: TSMC 12nm FF built: 2018-22 pcie: gen: 1
    speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s ports:
    active: DP-3,HDMI-A-1 empty: DP-1,DP-2 bus-ID: 01:00.0 chip-ID: 10de:1f06
    class-ID: 0300 temp: 27.0 C
  Display: server: Xwayland v: 22.1.7 compositor: sway v: 1.7 driver:
    gpu: nouveau note: X driver n/a display-ID: :0
  Monitor-1: DP-3 model: LG (GoldStar) ULTRAGEAR serial: <filter>
    built: 2022 res: 2560x1440 dpi: 93 gamma: 1.2 size: 697x392mm (27.44x15.43")
    diag: 800mm (31.5") ratio: 16:9 modes: max: 2560x1440 min: 640x480
  Monitor-2: HDMI-A-1 model: LG (GoldStar) FULL HD serial: <filter>
    built: 2016 res: 1920x1080 dpi: 102 gamma: 1.2 size: 480x270mm (18.9x10.63")
    diag: 551mm (21.7") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  API: EGL/GBM Message: No known Wayland EGL/GBM data sources.
Audio:
  Device-1: NVIDIA TU106 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.1 chip-ID: 10de:10f9
    class-ID: 0403
  Device-2: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 08:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-3: AMD Family 17h/19h HD Audio vendor: ASRock driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 08:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound API: ALSA v: k6.1.1-zen1-1-zen running: yes
  Sound Interface: sndio v: N/A running: no
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.63 running: yes
Network:
  Device-1: Intel Ethernet I225-V driver: igc v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 port: N/A bus-ID: 05:00.0 chip-ID: 8086:15f3
    class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: N/A modules: iwlwifi pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 06:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF-ID-1: anbox0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-9:3
    chip-ID: 8087:0029 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 1.95 TiB used: 21.31 GiB (1.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:5 vendor: Western Digital
    model: WD BLACK SN770 1TB size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 731030WD temp: 35.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Silicon Power
    model: SPCC M.2 PCIe SSD size: 953.87 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: SN07151 temp: 40.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 type: USB vendor: SMI (STMicroelectronics)
    model: USB DISK size: 116.1 GiB block-size: physical: 512 B logical: 512 B
    type: N/A serial: <filter> rev: 1100 scheme: MBR
Partition:
  ID-1: / raw-size: 105.19 GiB size: 105.19 GiB (100.00%)
    used: 21.31 GiB (20.3%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p4
    maj-min: 259:9
  ID-2: /boot/efi raw-size: 1000 MiB size: 998 MiB (99.80%)
    used: 608 KiB (0.1%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p3
    maj-min: 259:8
  ID-3: /home raw-size: 105.19 GiB size: 105.19 GiB (100.00%)
    used: 21.31 GiB (20.3%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p4
    maj-min: 259:9
  ID-4: /var/log raw-size: 105.19 GiB size: 105.19 GiB (100.00%)
    used: 21.31 GiB (20.3%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p4
    maj-min: 259:9
  ID-5: /var/tmp raw-size: 105.19 GiB size: 105.19 GiB (100.00%)
    used: 21.31 GiB (20.3%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p4
    maj-min: 259:9
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.49 GiB used: 1.2 MiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 32.0 C mobo: N/A gpu: nouveau temp: 27.0 C
  Fan Speeds (RPM): N/A gpu: nouveau fan: 862
Info:
  Processes: 320 Uptime: 10m wakeups: 0 Memory: 15.49 GiB
  used: 2.11 GiB (13.6%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 Packages: pm: pacman pkgs: 1365
  libs: 364 tools: octopi,pamac,paru Shell: garuda-inxi (sudo) default: Bash
  v: 5.1.16 running-in: alacritty inxi: 3.3.24
Garuda (2.6.12-1):
  System install date:     2022-12-22
  Last full system update: 2022-12-22
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Yes
  Snapshots:               Snapper
  Failed units:            systemd-networkd-wait-online.service

I have searched the wikis without being able to find the solution. Any help would be appreciated since I'm pretty new to TWMs but eager to learn!

Hey @nwg ! Love your nwg work! I'm running nwg-dock on my Sway desktop, but it's showing on the wrong monitor (2 display setup). Do you know what changes in my .configs I need to make to have it show on the other monitor? Thanks!

What are you using as your method for starting the dock? You can pass the -o flag to specify what display you want to use. For example:

nwg-dock -o DP-1

:point_up: This launches the dock on my DP-1 monitor, regardless of where the command is run from. Tack the -o option on to however you are starting up the dock and you should be good to go.

You can take a peek at the various options available by running --help.

nwg-dock --help
Usage of nwg-dock:
  -a string
    	Alignment in full width/height: "start", "center" or "end" (default "center")
  -c string
    	Command assigned to the launcher button
  -d	auto-hiDe: show dock when hotspot hovered, close when left or a button clicked
  -debug
    	turn on debug messages
  -f	take Full screen width/height
  -hd int
    	Hotspot Delay [ms]; the smaller, the faster mouse pointer needs to enter hotspot for the dock to appear; set 0 to disable (default 20)
  -i int
    	Icon size (default 48)
  -l string
    	Layer "overlay", "top" or "bottom" (default "overlay")
  -mb int
    	Margin Bottom
  -ml int
    	Margin Left
  -mr int
    	Margin Right
  -mt int
    	Margin Top
  -nolauncher
    	don't show the launcher button
  -nows
    	don't show the workspace switcher
  -o string
    	name of Output to display the dock on
  -p string
    	Position: "bottom", "top" or "left" (default "bottom")
  -r	Leave the program resident, but w/o hotspot
  -s string
    	Styling: css file name (default "style.css")
  -v	display Version information
  -w int
    	number of Workspaces you use (default 8)
  -x	set eXclusive zone: move other windows aside; overrides the "-l" argument
6 Likes

@BluishHumility That fixed it perfectly. Thank you! Totally spaced on running --help for whatever reason. Loving the Sway TWM!

I have the dock added to the sway/default.config file in the .config folder

exec_always nwg-dock

But I'll change it to

exec_always nwg-dock -o DP-3

Thanks again @BluishHumility !

Sorry for being away. @BluishHumility explained it perfectly well.

4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.