From 1abce784cf269fd98ee5faa09e52ba642f2e61ec Mon Sep 17 00:00:00 2001 From: Adam Stück Date: Wed, 22 Mar 2023 07:49:52 +0100 Subject: switched from i3 to sway --- .local/bin/dock | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to '.local/bin/dock') diff --git a/.local/bin/dock b/.local/bin/dock index 5f8ec04..da9a1b2 100755 --- a/.local/bin/dock +++ b/.local/bin/dock @@ -12,23 +12,16 @@ main () { } dock () { - if ! xrandr | grep -q "HDMI-1 connected" ; then + if ! swaymsg -t get_outputs | grep -q "HDMI-A-1" ; then echo "error: HDMI not connected"; exit 1 fi - - # barpos bottom - ~/.local/bin/barlaunch - xrandr --output HDMI-1 --mode 2560x1440 --rate 70 --primary - xrandr --output eDP-1 --off - xwallpaper --center ~/.local/share/bg + swaymsg output HDMI-A-1 enable res 2560x1440@70Hz + swaymsg output eDP-1 disable } undock () { - # barpos top - ~/.local/bin/barlaunch - xrandr --output eDP-1 --mode 1920x1080 --primary - xrandr --output HDMI-1 --off - xwallpaper --center ~/.local/share/bg + swaymsg output eDP-1 enable res 1920x1080 + swaymsg output HDMI-A-1 disable } main "$@" -- cgit v1.2.3-70-g09d2