awesome/rofi/launcher_launcher.sh

52 lines
1.2 KiB
Bash
Raw Normal View History

2024-07-06 18:31:50 +00:00
#!/usr/bin/env bash
# Options
power="Power menu"
ssh="SSH Connect"
window="Window switcher"
2024-12-15 13:49:58 +00:00
drun_actions="DRun with actions"
2024-07-06 18:31:50 +00:00
kaomoji="Kaomoji"
# Rofi CMD
rofi_cmd() {
2024-12-15 13:49:58 +00:00
rofi -dmenu \
-window-title "Launcher" \
-i \
-theme $HOME/.config/awesome/rofi/launcher_launcher.rasi \
2024-07-06 18:31:50 +00:00
-theme-str 'listview {columns: 1;}'
}
# Pass variables to rofi dmenu
run_rofi() {
2024-12-15 13:49:58 +00:00
echo -e "$power\n$ssh\n$window\n$drun_actions\n$kaomoji" | rofi_cmd
2024-07-06 18:31:50 +00:00
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$power)
2024-12-15 13:49:58 +00:00
$HOME/.config/awesome/rofi/powermenu.sh
2024-07-06 18:31:50 +00:00
;;
$ssh)
2024-12-15 13:49:58 +00:00
rofi \
-show ssh \
-theme $HOME/.config/awesome/rofi/launcher_launcher.rasi
2024-07-06 18:31:50 +00:00
;;
$window)
2024-12-15 13:49:58 +00:00
rofi \
-show window \
-theme $HOME/.config/awesome/rofi/launcher_launcher.rasi \
-theme-str 'listview {columns: 1; lines: 10;}'
;;
$drun_actions)
rofi \
-show drun \
-theme $HOME/.config/awesome/rofi/launcher.rasi \
-drun-show-actions
2024-07-06 18:31:50 +00:00
;;
$kaomoji)
2024-12-15 13:49:58 +00:00
$HOME/.config/awesome/rofi/kaomoji.sh \
-theme $HOME/.config/awesome/rofi/launcher_launcher.rasi
2024-07-06 18:31:50 +00:00
;;
esac