You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I need to pick it up and go somewhere, disconnecting monitors in the process
All workspaces get relocated on internal laptop display, all good here
When I come back and re-connect the monitors, all workspaces stay on the internal display, and monitors get two fresh unnamed workspaces
Here is my related part of the config:
$ws1=1
$ws2=2
$ws3=3
$ws4=4
$ws5=5
$ws6=6
$ws7=7
$ws8=8
$ws9=9
$ws10=10
$ws11=11
$ws12=12
$ws13=13
monitor=eDP-1,2880x1920@120,0x1080,2
# This sets up monitors based on which are connected at the time
exec = /home/denast/.config/hypr/monitor-setup.sh
workspace=$ws1,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws2,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws3,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws4,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws5,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws6,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws7,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws8,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws9,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws10,monitor:desc:Dell Inc. DELL E2318HR 813CF06GARGB
workspace=$ws11,monitor:eDP-1
workspace=$ws12,monitor:eDP-1
workspace=$ws13,monitor:desc:Hewlett Packard HP E202 6CM023166P
And here is monitor-setup.sh:
(basically, it's a simple script that sets up the monitors based on which of them are connected)
#!/usr/bin/env bash
get_monitor_name() {
hyprctl monitors -j | jq -r '.[] | select((.model | type == "string" and contains($search)) or (.description | type == "string" and contains($search))) | .name' --arg search "$1"
}
# Get monitor names based on partial matches
hp_monitor=$(get_monitor_name "HP")
dell_monitor=$(get_monitor_name "DELL")
laptop_monitor=$(get_monitor_name "BOE")
home_monitor=$(get_monitor_name "LG")
# Check if we're at work (both monitors present)
if [[ -n "$hp_monitor" && -n "$dell_monitor" ]]; then
echo "at work"
hyprctl keyword monitor "${dell_monitor},1920x1080@60,0x0,1"
hyprctl keyword monitor "${hp_monitor},1600x900@60,1920x0,1,transform,3"
hyprctl keyword monitor "${laptop_monitor},2880x1920@120,0x1080,2"
elif [[ -n "$home_monitor" ]]; then
echo "at home"
hyprctl keyword monitor "${home_monitor},2560x1440@144,0x0,1"
hyprctl keyword monitor "${laptop_monitor},disabled"
else
echo "standalone"
hyprctl keyword monitor "${laptop_monitor},2880x1920@120,0x0,2"
fi
One important detail I've also noticed is that on reconnect, both monitors get a new set of DP-X names. On boot they are called DP-9 and DP-10, and after reconnect they become DP-11 and DP-12. I'm also using a type-c dual hdmi adapter which might be a cause of issue? I've tried using desc: to make sure workspaces are matched to the actual physical monitor, not DP-X name, but if it still uses it under the hood, it might cause this issue
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Context:
Here is my related part of the config:
And here is
monitor-setup.sh
:(basically, it's a simple script that sets up the monitors based on which of them are connected)
Here is
hyprctl monitors
output:One important detail I've also noticed is that on reconnect, both monitors get a new set of
DP-X
names. On boot they are calledDP-9
andDP-10
, and after reconnect they becomeDP-11
andDP-12
. I'm also using a type-c dual hdmi adapter which might be a cause of issue? I've tried usingdesc:
to make sure workspaces are matched to the actual physical monitor, notDP-X
name, but if it still uses it under the hood, it might cause this issueBeta Was this translation helpful? Give feedback.
All reactions