summaryrefslogtreecommitdiff
path: root/.local/bin/dock
diff options
context:
space:
mode:
authorAdam Stück <adam@adast.xyz>2023-03-22 07:49:52 +0100
committerAdam Stück <adam@adast.xyz>2023-04-28 20:31:52 +0200
commit1abce784cf269fd98ee5faa09e52ba642f2e61ec (patch)
tree716d9b1961dc7235c665747454f03d5f488bffac /.local/bin/dock
parentc1fae7c333a7c89347b1955e23aadae47e28f20f (diff)
switched from i3 to sway
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 "$@"