How to display a further panel ONLY on a second monitor and disable it when the monitor is unplugged

Message
Author
spider_Leo
Posts: 14
Joined: Thu Nov 19, 2020 2:57 am

How to display a further panel ONLY on a second monitor and disable it when the monitor is unplugged

#1 Post by spider_Leo »

Hi everybody,

I currently use two monitors additionally to my notebook. I've added for each monitor a new panel.
When I remove my notebook from the docking station, the other panels are not disabled and appear on the screen.

- Notebook: panel on the left
- Monitor #1: panel on the top
- Monitor #2: panel on the top

I would like to have those panels ONLY displayed when further monitors are available, otherwise they should be hidden.

How can I configure that?

Thanks for the help

Code: Select all

System:
  Kernel: 6.14.2-1-liquorix-amd64 [6.14-3~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: audit=0
    intel_pstate=disable amd_pstate=disable BOOT_IMAGE=/boot/vmlinuz-6.14.2-1-liquorix-amd64
    root=UUID=<filter> ro quiet splash resume=UUID=<filter> resume_offset=145901568
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.5_ahs_x64 Libretto Jan 12  2025 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: LENOVO product: 20TNCTO1WW v: ThinkPad T15p Gen 1
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20TNCTO1WW v: SDK0R32862 WIN serial: <superuser required> UEFI: LENOVO
    v: N30ET57W (1.40 ) date: 07/16/2024
Battery:
  ID-1: BAT0 charge: 53.6 Wh (96.1%) condition: 55.8/68.0 Wh (82.1%) volts: 12.7 min: 11.5
    model: Celxpert 5B10W13961 type: Li-poly serial: <filter> status: not charging cycles: 379
CPU:
  Info: model: Intel Core i7-10750H bits: 64 type: MT MCP arch: Comet Lake gen: core 10 level: v3
    note: check built: 2020 process: Intel 14nm family: 6 model-id: 0xA5 (165) stepping: 2
    microcode: 0xFC
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache: L1: 384 KiB
    desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 1895 high: 3179 min/max: 800/2601 boost: enabled scaling:
    driver: acpi-cpufreq governor: ondemand cores: 1: 2600 2: 2600 3: 2265 4: 2600 5: 900 6: 2600
    7: 800 8: 800 9: 800 10: 2601 11: 3179 12: 1000 bogomips: 62399
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: ghostwrite status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow 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: Enhanced / Automatic IBRS; IBPB: conditional; RSB filling;
    PBRSB-eIBRS: SW sequence; BHI: SW loop, KVM: SW loop
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Lenovo driver: i915 v: kernel
    arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: DP-10,DP-5,eDP-1 empty: DP-1,
    DP-11, DP-2, DP-3, DP-6, DP-7, DP-9, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:9bc4
    class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 3 GB Max-Q] vendor: Lenovo driver: N/A
    alternate: nouveau non-free: 530.xx+ status: current (as of 2023-03) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:1c91 class-ID: 0302
  Device-3: Bison Integrated Camera type: USB driver: uvcvideo bus-ID: 1-8:2 chip-ID: 5986:9106
    class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 5760x1080 s-dpi: 96 s-size: 1525x286mm (60.04x11.26")
    s-diag: 1552mm (61.09")
  Monitor-1: not-matched mapped: DP-1-1 pos: center res: 1920x1080 hz: 60 dpi: 93
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A
  Monitor-2: not-matched mapped: DP-2-2 pos: right res: 1920x1080 hz: 60 dpi: 93
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A
  Monitor-3: eDP-1 pos: primary,left model: BOE Display 0x08c2 built: 2019 res: 1920x1080 hz: 60
    dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9
    modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 24.2.8-1mx23ahs renderer: Mesa Intel UHD Graphics (CML GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Comet Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel
    bus-ID: 3-1.5:5 chip-ID: 0bda:4014 alternate: snd_soc_avs,snd_sof_pci_intel_cnl class-ID: 0102
    bus-ID: 00:1f.3 serial: <filter> chip-ID: 8086:06c8 class-ID: 0403
  Device-2: Realtek USB Audio type: USB driver: snd-usb-audio
  API: ALSA v: k6.14.2-1-liquorix-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 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 Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel modules: wl bus-ID: 00:14.3
    chip-ID: 8086:06f0 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:0d4d class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-3: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152 bus-ID: 4-1.2:3
    chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  IF: eth1 state: down mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-14:4 chip-ID: 8087:0026
    class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 3.0 lmp-v: 5.2
    sub-v: 2184 hci-v: 5.2 rev: 2184
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, object transfer, audio, telephony
Drives:
  Local Storage: total: 983.17 GiB used: 62.62 GiB (6.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVLB1T0HBLR-000L7 size: 953.87 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 5M2QEXF7 temp: 35.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Intenso model: Slim Line size: 29.3 GiB
    block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1100 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 953.62 GiB size: 937.58 GiB (98.32%) used: 62.62 GiB (6.7%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 37.02 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 49.0 C pch: 61.0 C mobo: N/A
  Fan Speeds (RPM): fan-1: 2041
Repos:
  Packages: 3227 pm: dpkg pkgs: 3210 libs: 1762 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 17
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ bookworm main non-free
    2: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/mxtemp.list
    1: deb http://linux.teamviewer.com/deb stable main
Info:
  Processes: 369 Uptime: 12h 56m wakeups: 6 Memory: 31.02 GiB used: 4.25 GiB (13.7%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  clang: 14.0.6 Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI

Code: Select all

$ neofetch
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   leo@mx 
@@@@@@@@@@@@%*+--:------=+*%@@@@@@@@@@@@   ------ 
@@@@@@@@@#=. .-+#%@@@@@%#*+--=#@@@@@@@@@   OS: MX x86_64 
@@@@@@@+. .=%@@@@@@@@@@@@@@@@*-:+@@@@@@@   Host: 20TNCTO1WW ThinkPad T15p Gen 1 
@@@@@*.  *@@@@@@@@@@@@@@@@@@@@@%-.*@@@@@   Kernel: 6.14.2-1-liquorix-amd64 
@@@@-  -@@@@@@@@@@@@@@@@@@@@@@@#:  -@@@@   Uptime: 12 hours, 51 mins 
@@@:  -@@@@@@@=.*@@@@@@@@@@@@%-   = :@@@   Packages: 3210 (dpkg), 17 (flatpak) 
@@=  .@@@@@@@@%- :%@@@@@@@@@+   -%@# =@@   Shell: bash 5.2.15 
@%   +@@@@@@@@@@#. =@@@@@@*.  .*@@@@. %@   Resolution: 1920x1080, 1920x1080, 1920x1080 
@+   *@@@@@@*..*@@+  *@@%-   =@@@@@@- +@   DE: Xfce 4.20 
@=   *@@@@%-    -%@@- :=   -%@@@@@@@: +@   WM: Xfwm4 
@+   :@@@=        +@@=   .#@@@@@@@@%  *@   WM Theme: mx-comfort 
@%    +*.          .:     *@@#: +@@:  @@   Theme: Greybird-dark-mx [GTK2/3] 
@@+                   :%@- :-    ::  +@@   Icons: Papirus-mxblue-darkpanes [GTK2/3] 
@@@-                  .=@@=         -@@@   Terminal: xfce4-terminal 
@@+.                     .           +@@   Terminal Font: Liberation Mono 11 
%=..:.................::...........:..-%   CPU: Intel i7-10750H (12) @ 2.600GHz 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   GPU: NVIDIA GeForce GTX 1050 3 GB Max-Q 
                                           GPU: Intel CometLake-H GT2 [UHD Graphics] 
                                           Memory: 3394MiB / 31761MiB

Code: Select all

$ xrandr
Screen 0: minimum 320 x 200, current 5760 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.00*+  59.97    59.96    59.93  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-1-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  74.97    50.00    59.94  
   1680x1050     59.88  
   1600x900      75.00    60.00  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    60.00    59.94  
   720x400       70.08  
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)
DP-2-1 disconnected (normal left inverted right x axis y axis)
DP-2-2 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  74.97    50.00    59.94  
   1680x1050     59.88  
   1600x900      75.00    60.00  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    60.00    59.94  
   720x400       70.08  
DP-2-3 disconnected (normal left inverted right x axis y axis)
Last edited by spider_Leo on Sun Apr 13, 2025 8:29 am, edited 4 times in total.

User avatar
Eadwine Rose
Administrator
Posts: 15284
Joined: Wed Jul 12, 2006 2:10 am

Re: How to display a further panel ONLY on a second monitor and disable it when the monitor is unplugged

#2 Post by Eadwine Rose »

According to the forum rules (please read): Please provide full Quick System Info, use copy for forum button, no edits.
LiveUSB version is OK if needed.
MX-23.6_x64 July 31 2023 * 6.1.0-39amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

spider_Leo
Posts: 14
Joined: Thu Nov 19, 2020 2:57 am

Re: How to display a further panel ONLY on a second monitor and disable it when the monitor is unplugged

#3 Post by spider_Leo »

Eadwine Rose wrote: Sun Apr 13, 2025 8:13 am According to the forum rules (please read): Please provide full Quick System Info, use copy for forum button, no edits.
LiveUSB version is OK if needed.
Sorry for that. I've edited my post

User avatar
CharlesV
Administrator
Posts: 8101
Joined: Sun Jul 07, 2019 5:11 pm

Re: How to display a further panel ONLY on a second monitor and disable it when the monitor is unplugged

#4 Post by CharlesV »

I cannot find any setting that would do this... and there are quite a few unanswered or 'no' answers out there about this too...

However ... I believe you could write a script that would 'kind of hide' the second / third panels when needed.

A hint is given here
https://unix.stackexchange.com/question ... el-in-xfce

of making a specific panel a VERY small height / width. ( 2 or 3 pixels ) ... I would try creating two scripts - one that made a panel VERY small, and one the made it normal again. If that will 'hide' the panel enough for you... then you should be able to automate it when a monitor is plugged in.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Post Reply

Return to “XFCE Desktop Environment”