Sway-config/.config/sway/menu.sh

43 lines
1.1 KiB
Bash

#!/usr/bin/bash
# This script will open a little menu with different options
# Dependencies: Bemenu, emoji-font, systemd
screenshot () {
case "$(echo -e "🖧 ...von allen Bildschirmen
🗔 ...vom aktiven Fenster
⌗ ...von Auswahl
🖵 ...vom Bildschirm" |
wofi --dmenu --lines 5 --prompt "Foto" -c ~/.config/sway/wofi)" 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" |
wofi --dmenu --lines 7 --prompt "Menü" -c ~/.config/sway/wofi)" 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