Pywal spanning dual monitors

Hello everyone!! I have been searching for how pywal handles dual monitors and haven’t been able to find anything. I take that back. I found a function that will do what I need to do and I put that in my .zshrc. Can you use functions in polybar modules? Currently pywal puts the same wallpaper on each monitor and my resolution is 3840x1080. If anyone can point me in the right direction that would be great.

Rich

System:
  Kernel: 6.7.5-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=6175aced-ff46-4d8b-8a4c-54245f06370a rw rootflags=subvol=@
    quiet loglevel=3 ibt=off
  Desktop: bspwm v: 0.9.10 with: krunner,polybar
    tools: xscreensaver,xscreensaver-systemd avail: physlock,xfce4-screensaver
    vt: 2 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
  Type: Desktop Mobo: Micro-Star model: Z390-A PRO (MS-7B98) v: 1.0
    serial: <superuser required> uuid: <superuser required>
    UEFI: American Megatrends v: 1.B0 date: 08/10/2020
CPU:
  Info: model: Intel Core i7-9700K bits: 64 type: MCP arch: Coffee Lake
    gen: core 9 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xD (13) microcode: 0xFA
  Topology: cpus: 1x cores: 8 smt: <unsupported> cache: L1: 512 KiB
    desc: d-8x32 KiB; i-8x32 KiB L2: 2 MiB desc: 8x256 KiB L3: 12 MiB
    desc: 1x12 MiB
  Speed (MHz): avg: 2345 high: 4939 min/max: 800/4900:5000 scaling:
    driver: intel_pstate governor: performance cores: 1: 4935 2: 800 3: 800
    4: 800 5: 800 6: 4889 7: 800 8: 4939 bogomips: 57600
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA TU116 [GeForce GTX 1650 SUPER] vendor: Micro-Star MSI
    driver: nvidia v: 545.29.06 alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2024-02; EOL~2026-12-xx) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-2022 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 3 speed: 8 GT/s ports: active: none
    off: DP-2,HDMI-A-1 empty: DP-1,DP-3 bus-ID: 01:00.0 chip-ID: 10de:2187
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4
    compositor: Picom v: git-89c2c driver: X: loaded: nvidia
    unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
    gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 81 s-size: 1204x343mm (47.40x13.50")
    s-diag: 1252mm (49.29")
  Monitor-1: DP-2 note: disabled pos: right model: BenQ GW2780
    serial: <filter> built: 2023 res: 1920x1080 hz: 60 dpi: 82 gamma: 1.2
    size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled pos: primary,left
    model: Asus VG278HE serial: <filter> built: 2015 res: 1920x1080 hz: 60
    dpi: 82 gamma: 1.2 size: 598x336mm (23.54x13.23") diag: 686mm (27")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 1650
    SUPER/PCIe/SSE2 memory: 3.91 GiB
  API: Vulkan v: 1.3.276 layers: 1 device: 0 type: discrete-gpu name: NVIDIA
    GeForce GTX 1650 SUPER driver: nvidia v: 545.29.06 device-ID: 10de:2187
    surfaces: xcb,xlib
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
  Device-2: NVIDIA TU116 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:1aeb class-ID: 0403
  API: ALSA v: k6.7.5-zen1-1-zen status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-V vendor: Micro-Star MSI driver: e1000e
    v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15bc class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000
    bus-ID: 03:00.0 chip-ID: 10ec:8161 class-ID: 0200
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: tun0 state: unknown speed: 10000 Mbps duplex: full mac: N/A
  Info: services: NetworkManager, smbd, systemd-timesyncd
Bluetooth:
  Device-1: ASUSTek ASUS USB-BT500 driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-6:3 chip-ID: 0b05:190e
    class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.1
    lmp-v: 10 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
  Local Storage: total: 4.55 TiB used: 376.19 GiB (8.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Seagate
    model: WDS200T3X0C-00SJG0 size: 1.82 TiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 102430WD temp: 47.9 C scheme: MBR
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 4B6Q scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 1B6Q scheme: GPT
  ID-4: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 4B6Q scheme: GPT
Partition:
  ID-1: / raw-size: 1.82 TiB size: 1.82 TiB (100.00%) used: 163.9 GiB (8.8%)
    fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 724 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
    used: 163.9 GiB (8.8%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
    used: 163.9 GiB (8.8%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
    used: 163.9 GiB (8.8%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 62.73 GiB used: 3.5 MiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 8 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 34.0 C pch: 49.0 C mobo: N/A gpu: nvidia
    temp: 47 C
  Fan Speeds (rpm): N/A gpu: nvidia fan: 0%
Info:
  Memory: total: 64 GiB note: est. available: 62.73 GiB used: 6.42 GiB (10.2%)
  Processes: 377 Power: uptime: 5d 1h 45m states: freeze,mem,disk
    suspend: deep avail: s2idle wakeups: 0 hibernate: platform avail: shutdown,
    reboot, suspend, test_resume image: 25.05 GiB
    services: power-profiles-daemon,upowerd Init: systemd v: 255
    default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 2016 libs: 463 tools: octopi,paru Compilers:
    clang: 16.0.6 gcc: 13.2.1 Shell: garuda-inxi default: Zsh v: 5.9
    running-in: alacritty inxi: 3.3.33
Garuda (2.6.23-1):
  System install date:     2023-12-28
  Last full system update: 2024-02-23 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       No/Undetected
  Failed units:            
System:
  Kernel: 6.7.6-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=6175aced-ff46-4d8b-8a4c-54245f06370a rw rootflags=subvol=@
    quiet loglevel=3 ibt=off
  Desktop: bspwm v: 0.9.10 with: polybar
    tools: xscreensaver,xscreensaver-systemd avail: i3lock, physlock,
    xfce4-screensaver vt: 2 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
  Type: Desktop Mobo: Micro-Star model: Z390-A PRO (MS-7B98) v: 1.0
    serial: <superuser required> uuid: <superuser required>
    UEFI: American Megatrends v: 1.B0 date: 08/10/2020
CPU:
  Info: model: Intel Core i7-9700K bits: 64 type: MCP arch: Coffee Lake
    gen: core 9 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xD (13) microcode: 0xFA
  Topology: cpus: 1x cores: 8 smt: <unsupported> cache: L1: 512 KiB
    desc: d-8x32 KiB; i-8x32 KiB L2: 2 MiB desc: 8x256 KiB L3: 12 MiB
    desc: 1x12 MiB
  Speed (MHz): avg: 800 high: 801 min/max: 800/4900:5000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 800 3: 800 4: 800
    5: 801 6: 800 7: 800 8: 800 bogomips: 57600
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA TU116 [GeForce GTX 1650 SUPER] vendor: Micro-Star MSI
    driver: nvidia v: 545.29.06 alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2024-02; EOL~2026-12-xx) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-2022 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 3 speed: 8 GT/s ports: active: none
    off: DP-2,HDMI-A-1 empty: DP-1,DP-3 bus-ID: 01:00.0 chip-ID: 10de:2187
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4
    compositor: Picom v: git-89c2c driver: X: loaded: nvidia
    unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
    gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 81 s-size: 1204x343mm (47.40x13.50")
    s-diag: 1252mm (49.29")
  Monitor-1: DP-2 note: disabled pos: right model: BenQ GW2780
    serial: <filter> built: 2023 res: 1920x1080 hz: 60 dpi: 82 gamma: 1.2
    size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled pos: primary,left
    model: Asus VG278HE serial: <filter> built: 2015 res: 1920x1080 hz: 60
    dpi: 82 gamma: 1.2 size: 598x336mm (23.54x13.23") diag: 686mm (27")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 1650
    SUPER/PCIe/SSE2 memory: 3.91 GiB
  API: Vulkan v: 1.3.276 layers: 1 device: 0 type: discrete-gpu name: NVIDIA
    GeForce GTX 1650 SUPER driver: nvidia v: 545.29.06 device-ID: 10de:2187
    surfaces: xcb,xlib
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
  Device-2: NVIDIA TU116 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:1aeb class-ID: 0403
  API: ALSA v: k6.7.6-zen1-1-zen status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-V vendor: Micro-Star MSI driver: e1000e
    v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15bc class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000
    bus-ID: 03:00.0 chip-ID: 10ec:8161 class-ID: 0200
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: tun0 state: unknown speed: 10000 Mbps duplex: full mac: N/A
  Info: services: NetworkManager, smbd, systemd-timesyncd
Bluetooth:
  Device-1: ASUSTek ASUS USB-BT500 driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-6:5 chip-ID: 0b05:190e
    class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.1
    lmp-v: 10 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
  Local Storage: total: 4.55 TiB used: 362.19 GiB (7.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Seagate
    model: WDS200T3X0C-00SJG0 size: 1.82 TiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 102430WD temp: 44.9 C scheme: MBR
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 4B6Q scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 1B6Q scheme: GPT
  ID-4: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 4B6Q scheme: GPT
Partition:
  ID-1: / raw-size: 1.82 TiB size: 1.82 TiB (100.00%) used: 98.63 GiB (5.3%)
    fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 724 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
    used: 98.63 GiB (5.3%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
    used: 98.63 GiB (5.3%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
    used: 98.63 GiB (5.3%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 62.73 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 8 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 32.0 C pch: 47.0 C mobo: N/A gpu: nvidia
    temp: 41 C
  Fan Speeds (rpm): N/A gpu: nvidia fan: 0%
Info:
  Memory: total: 64 GiB note: est. available: 62.73 GiB used: 4.86 GiB (7.7%)
  Processes: 360 Power: uptime: 1d 5h 30m states: freeze,mem,disk
    suspend: deep avail: s2idle wakeups: 0 hibernate: platform avail: shutdown,
    reboot, suspend, test_resume image: 25.05 GiB
    services: power-profiles-daemon,upowerd Init: systemd v: 255
    default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 2036 libs: 463 tools: octopi,paru Compilers:
    clang: 16.0.6 gcc: 13.2.1 Shell: garuda-inxi default: Zsh v: 5.9
    running-in: alacritty inxi: 3.3.33
Garuda (2.6.23-1):
  System install date:     2023-12-28
  Last full system update: 2024-02-25 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       No/Undetected
  Failed units:            

Me personally using ‘variety’ with small modification of its ‘set_wallpaper’ script to use ‘swaybg’ utility which were forked and modified for multi-monitor systems. You can find last one on Github.

Sorry! Completely forgot. Here below part of the script that I modified in ‘set_wallpaper’ script (~/.config/variety/scripts/) starting from line 232

PID=`pidof swaybg`
if [[ -n $PID ]]; then
    # If swaybg is available, use it as prevents system freeze.
    # See https://github.com/swaywm/sway/issues/5606
    if command -v "swaybg" >/dev/null 2>&1; then
        # Grey background flicker is prevented by killing old swaybg process after new one.
        # See https://github.com/swaywm/swaybg/issues/17#issuecomment-851680720
        #
        # straum rem: 
        #        option 'fill' were changed to option 'multi-monitor' to make
        #        wallpaper span across two monitors
        #
        swaybg -i "$WP" -m multi-monitor &
        if [ ! -z "$PID" ]; then
            sleep 1
            kill $PID 2>/dev/null
        fi
    else
        # straum rem: 
        #        option 'fill' were changed to option 'multi-monitor' to make
        #        wallpaper span across two monitors
        # 
        swaymsg output "*" bg "$WP" multi-monitor 2> /dev/null
    fi
fi

… seems to me that’s all , now :slight_smile:
Good luck!

1 Like

Please open new help request.
Would be nice if we, all, stayed on topic here, screenshots. :smiley:

2 Likes

Sorry I will create a new post.

Please, follow the template and post garuda-inxi :slight_smile:

1 Like

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