39 lines
906 B
Bash
Executable File
39 lines
906 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
## Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
|
|
|
|
DIR="$HOME/.config/berry"
|
|
rofi_cmd="rofi -theme $DIR/rofi/themes/asroot.rasi"
|
|
|
|
# Apps
|
|
terminal=" Alacritty"
|
|
files=" Thunar"
|
|
editor=" Geany"
|
|
clifm=" Ranger"
|
|
vim=" Vim"
|
|
|
|
# Variable passed to rofi
|
|
options="$terminal\n$files\n$editor\n$clifm\n$vim"
|
|
term='alacritty --class alacritty-float,alacritty-float --config-file /root/.config/alacritty/alacritty.yml'
|
|
|
|
# Functions
|
|
|
|
chosen="$(echo -e "$options" | $rofi_cmd -p "Run as root" -dmenu -selected-row 0)"
|
|
case $chosen in
|
|
$terminal)
|
|
"$DIR"/bin/asroot.sh "$term"
|
|
;;
|
|
$files)
|
|
"$DIR"/bin/asroot.sh 'dbus-run-session thunar'
|
|
;;
|
|
$editor)
|
|
"$DIR"/bin/asroot.sh geany
|
|
;;
|
|
$clifm)
|
|
"$DIR"/bin/asroot.sh "$term -e ranger"
|
|
;;
|
|
$vim)
|
|
"$DIR"/bin/asroot.sh "$term -e vim"
|
|
;;
|
|
esac
|