summaryrefslogtreecommitdiff
path: root/.local/bin/dock
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dock')
-rwxr-xr-x.local/bin/dock17
1 files changed, 5 insertions, 12 deletions
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 "$@"