Sway-config/.config/sway/menu.sh
2023-03-23 15:46:11 +01:00

43 lines
1 KiB
Bash

#!/usr/bin/env bash
# This script will open a little menu with different options
# Dependencies: Sway, Bemenu, Unicode, systemd
screenshot () {
case "$(echo -e "🖧 ...von allen Bildschirmen
🗔 ...vom aktiven Fenster
⌗ ...von Auswahl
🖵 ...vom Bildschirm" |
bemenu -p "Foto" "$@")" in
"🖧 ...von allen Bildschirmen") exec .config/sway/screenshot.sh all ;;
"🗔 ...vom aktiven Fenster") exec .config/sway/screenshot.sh focus ;;
"⌗ ...von Auswahl") exec .config/sway/screenshot.sh choice ;;
"🖵 ...vom Bildschirm") exec .config/sway/screenshot.sh ;;
esac
exit 0
}
case "$(echo -e "🖼 Bildschirmfoto...
🌘 gammastep umschalten
🔒 ausloggen
⏻ Herunterfahren
↻ Neustarten
⏾ Standby" |
bemenu -p "Menü" "$@")" in
"🖼 Bildschirmfoto...")
screenshot "$@";;
"🌘 gammastep umschalten")
exec ~/.config/sway/toggle_gammastep.sh ;;
"🔒 ausloggen")
loginctl terminate-user $USER ;;
"⏻ Herunterfahren")
shutdown now ;;
"↻ Neustarten")
reboot ;;
"⏾ Standby")
systemctl suspend ;;
esac
exit 0