summary refs log tree commit diff
path: root/bin/modemenu
diff options
context:
space:
mode:
Diffstat (limited to 'bin/modemenu')
-rwxr-xr-xbin/modemenu34
1 files changed, 0 insertions, 34 deletions
diff --git a/bin/modemenu b/bin/modemenu
deleted file mode 100755
index 64ef18e..0000000
--- a/bin/modemenu
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-set -e
-[ -n "$DEBUG" ] && set -x
-
-get_output() {
-	swaymsg -t get_outputs |
-		jq -cr '.[] | select(.type=="output") | [.name, .make + " " + .model] | @tsv' |
-		menu --accept-single |
-		cut -d $'\t' -f 1
-}
-
-list_modes() {
-	local output=$1
-	swaymsg -t get_outputs |
-		jq -cr --arg name "$output" '.[] | select(.type=="output" and .name==$name) | .modes[] | [([.width, "x", .height, "@", .refresh, "Hz"]|join("")), .picture_aspect_ratio // ""] | @tsv'
-}
-
-output=$(get_output)
-
-mode=$( (
-	list_modes "$output"
-	echo -e "\tset scale..."
-) | column -t -s $'\t' |
-	menu)
-
-case "$mode" in
-*"set scale"*)
-	scale=$(echo -e "1.0\n1.5\n2.0" | MENU_PROMPT="set scale" menu)
-	exec swaymsg output "$output" scale "$scale"
-	;;
-*)
-	exec swaymsg output "$output" mode "$mode"
-	;;
-esac