aboutsummaryrefslogtreecommitdiff
path: root/Common/rofi/applets/android/apps.sh
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2021-09-04 12:04:53 +0200
committerJakob Stendahl <jakob.stendahl@outlook.com>2021-09-04 12:04:53 +0200
commit65b7f91e51d90e93c3d7c6704c0a8265467a8ea7 (patch)
tree88301071c7f1840b502f33cbd3b0f7c5e81b0c66 /Common/rofi/applets/android/apps.sh
parenta77563ee1044ffa03f7c49e457a5f7c9f943188f (diff)
parente6df7072ab32493a561fc678eacc119b57981827 (diff)
downloaddotfiles-65b7f91e51d90e93c3d7c6704c0a8265467a8ea7.tar.gz
dotfiles-65b7f91e51d90e93c3d7c6704c0a8265467a8ea7.zip
Merge branch 'master' of https://github.com/JakobS1n/dotfiles
Diffstat (limited to 'Common/rofi/applets/android/apps.sh')
-rwxr-xr-xCommon/rofi/applets/android/apps.sh94
1 files changed, 94 insertions, 0 deletions
diff --git a/Common/rofi/applets/android/apps.sh b/Common/rofi/applets/android/apps.sh
new file mode 100755
index 0000000..466c629
--- /dev/null
+++ b/Common/rofi/applets/android/apps.sh
@@ -0,0 +1,94 @@
+#!/usr/bin/env bash
+
+## Author : Aditya Shakya
+## Mail : adi1090x@gmail.com
+## Github : @adi1090x
+## Twitter : @adi1090x
+
+dir="$HOME/.config/rofi/applets/android"
+rofi_command="rofi -theme $dir/six.rasi"
+
+# Links
+terminal=""
+files=""
+editor=""
+browser=""
+music=""
+settings=""
+
+# Error msg
+msg() {
+ rofi -theme "$dir/message.rasi" -e "$1"
+}
+
+# Variable passed to rofi
+options="$terminal\n$files\n$editor\n$browser\n$music\n$settings"
+
+chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)"
+case $chosen in
+ $terminal)
+ if [[ -f /usr/bin/termite ]]; then
+ termite &
+ elif [[ -f /usr/bin/urxvt ]]; then
+ urxvt &
+ elif [[ -f /usr/bin/kitty ]]; then
+ kitty &
+ elif [[ -f /usr/bin/xterm ]]; then
+ xterm &
+ elif [[ -f /usr/bin/xfce4-terminal ]]; then
+ xfce4-terminal &
+ elif [[ -f /usr/bin/gnome-terminal ]]; then
+ gnome-terminal &
+ else
+ msg "No suitable terminal found!"
+ fi
+ ;;
+ $files)
+ if [[ -f /usr/bin/thunar ]]; then
+ thunar &
+ elif [[ -f /usr/bin/pcmanfm ]]; then
+ pcmanfm &
+ else
+ msg "No suitable file manager found!"
+ fi
+ ;;
+ $editor)
+ if [[ -f /usr/bin/geany ]]; then
+ geany &
+ elif [[ -f /usr/bin/leafpad ]]; then
+ leafpad &
+ elif [[ -f /usr/bin/mousepad ]]; then
+ mousepad &
+ elif [[ -f /usr/bin/code ]]; then
+ code &
+ else
+ msg "No suitable text editor found!"
+ fi
+ ;;
+ $browser)
+ if [[ -f /usr/bin/firefox ]]; then
+ firefox &
+ elif [[ -f /usr/bin/chromium ]]; then
+ chromium &
+ elif [[ -f /usr/bin/midori ]]; then
+ midori &
+ else
+ msg "No suitable web browser found!"
+ fi
+ ;;
+ $music)
+ if [[ -f /usr/bin/lxmusic ]]; then
+ lxmusic &
+ else
+ msg "No suitable music player found!"
+ fi
+ ;;
+ $settings)
+ if [[ -f /usr/bin/xfce4-settings-manager ]]; then
+ xfce4-settings-manager &
+ else
+ msg "No suitable settings manager found!"
+ fi
+ ;;
+esac
+