add stuff for rofi

This commit is contained in:
ksyasuda
2021-10-29 13:14:44 -07:00
parent a521b036ae
commit 79ef117431
11 changed files with 320 additions and 612 deletions

18
scripts/rofi/rofi-picom.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
ARGS=(
"Enable Picom"
"Disable Picom"
)
CHOICE=$(printf "%s\n" "${ARGS[@]}" | rofi -config ~/SudacodeRice/rofi/rofidmenu.rasi -dmenu -l 5 -i -p "Picom Options")
# printf '%s\n' {$CHOICE} | awk '{print $NF}'
echo "$CHOICE"
if [[ "$CHOICE" == "Enable Picom" ]]; then
~/SudacodeRice/scripts/picom.sh
elif [[ "$CHOICE" == "Disable Picom" ]]; then
~/SudacodeRice/scripts/picom.sh -k
fi

28
scripts/rofi/rofi-ssh.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
CMD=$(ssh)
ARGS=(
"Depot - root@dc1lxpdepot01.westlakefinancial.com"
"Depot02 - kyasuda@dc1lxsdepot02.westlakefinancial.com"
"Jobrunner01 - root@dc1vpjobrunner01.westlakefinancial.com"
"Jobrunner02 - root@mdr-s-jobrunner02.westlakefinancial.com"
"Jobrunner03 - kyasuda@dc1vsjobrunner03.westlakefinancial.com"
"Quit"
)
CHOICE=$(printf "%s\n" "${ARGS[@]}" | rofi -config ~/SudacodeRice/rofi/rofidmenu.rasi -dmenu -l 5 -i -p "SSH Helper")
if [[ "$CHOICE" == "Quit" ]]; then
printf "%s\n" "NICE" && exit 1
fi
if [ "$CHOICE" ]; then
TARGET=$(printf "%s\n" "${CHOICE}" | awk '{print $1}')
INFO=$(printf "%s\n" "${CHOICE}" | awk '{print $NF}')
echo "TARGET $TARGET"
python ~/Work/scripts/pass.py "$TARGET"
alacritty -e ssh "$INFO"
else
printf "%s\n" "DONE." && exit 0
fi