Use kanshi for display management in sway
As long as kanshi is running it should automatically manage displays based on the definitions in its config.
This commit is contained in:
parent
ce825d26f2
commit
f6adb60d49
18
kanshi/config
Normal file
18
kanshi/config
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
output eDP-1 scale 2 mode 2560x1440 position 0,0
|
||||||
|
output HDMI-A-1 scale 1 mode 1280x720 position 1280,0
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
output eDP-1 scale 2 mode 2560x1440 position 0,0
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
output eDP-1 disable
|
||||||
|
output DP-3 scale 2 mode 2560x1440 position 0,0
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
output eDP-1 disable
|
||||||
|
output DP-4 scale 2 mode 2560x1440 position 0,0
|
||||||
|
}
|
31
sway/config
31
sway/config
@ -43,35 +43,8 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
|||||||
#
|
#
|
||||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||||
|
|
||||||
# eDP-1 is the internal laptop display
|
# Automatic display management
|
||||||
output eDP-1 {
|
exec kanshi
|
||||||
scale 2
|
|
||||||
resolution 2560x1440
|
|
||||||
position 0,0
|
|
||||||
}
|
|
||||||
|
|
||||||
# DP-3 and DP-4 are display port when connected to dock
|
|
||||||
output DP-3 {
|
|
||||||
scale 2
|
|
||||||
resolution 2560x1440
|
|
||||||
position 1280,0
|
|
||||||
}
|
|
||||||
|
|
||||||
output DP-4 {
|
|
||||||
scale 2
|
|
||||||
resolution 2560x1440
|
|
||||||
position 1280,0
|
|
||||||
}
|
|
||||||
|
|
||||||
output HDMI-A-1 {
|
|
||||||
scale 1
|
|
||||||
resolution 1280x720
|
|
||||||
position 1280,0
|
|
||||||
}
|
|
||||||
|
|
||||||
set $laptop eDP-1
|
|
||||||
bindswitch --reload lid:on output $laptop disable
|
|
||||||
bindswitch --reload lid:off output $laptop enable
|
|
||||||
|
|
||||||
# Wayland overlay bar for sound and brightness level
|
# Wayland overlay bar for sound and brightness level
|
||||||
exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob
|
exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob
|
||||||
|
Loading…
Reference in New Issue
Block a user