Rofi Menu Back and Quit Options & Startup Script in Control Center
- Add startup processes script to control center - Add a "back" and "quit" rofi menu option where back exits current menu, leaving the option to return to previous menu that called it. Quit kills all rofi processes.
This commit is contained in:
@@ -15,15 +15,19 @@ rofi_menu() {
|
||||
" Notifications - deadd"
|
||||
" Media - playerctl"
|
||||
"墳Volume - pactl"
|
||||
" Startup Processes - startup"
|
||||
" Hardware - system76-power"
|
||||
" Power Menu - session"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
@@ -49,6 +53,9 @@ main() {
|
||||
--pactl)
|
||||
/home/sravan/.scripts/pactl.sh --rofi
|
||||
;;
|
||||
--startup)
|
||||
/home/sravan/.scripts/startup.sh --rofi
|
||||
;;
|
||||
--system76-power)
|
||||
/home/sravan/.scripts/system76-power.sh --rofi
|
||||
;;
|
||||
|
@@ -27,13 +27,16 @@ rofi_menu() {
|
||||
" Toggle Notification Center - toggle-center"
|
||||
" Pause Popup Notifications - pause"
|
||||
" Unpause Popup Notifications - unpause"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
|
@@ -29,13 +29,16 @@ rofi_menu() {
|
||||
" Close Notification - close"
|
||||
" View History - history"
|
||||
" Toggle Do Not Disturb - dnd"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
|
@@ -15,13 +15,16 @@ rofi_menu() {
|
||||
" Lower Volume - lower"
|
||||
" Mute - mute"
|
||||
"﴾ Mixer - mixer"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
|
@@ -20,13 +20,16 @@ rofi_menu() {
|
||||
"⏼ Toggle - toggle"
|
||||
" Turn On - on"
|
||||
" Turn Off - off"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
|
@@ -15,13 +15,16 @@ rofi_menu() {
|
||||
"怜 Next - next"
|
||||
"玲 Previous - prev"
|
||||
"﴾ Change Source - change"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
|
@@ -18,13 +18,16 @@ rofi_menu() {
|
||||
" Reboot - reboot"
|
||||
" Shutdown - shutdown"
|
||||
"鈴 Hibernate - hibernate"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && killall rofi
|
||||
fi
|
||||
}
|
||||
|
@@ -65,13 +65,16 @@ rofi_menu() {
|
||||
"羽 Launch Delayed Processes - delay"
|
||||
" Kill Startup Processes - kill-startup"
|
||||
" Kill Delayed Processes - kill-delay"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
|
@@ -13,13 +13,16 @@ rofi_menu() {
|
||||
declare -a options=(
|
||||
" Switchable Graphics - rofi-graphics"
|
||||
" Performance Profile - rofi-profile"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi"
|
||||
fi
|
||||
}
|
||||
@@ -31,13 +34,16 @@ rofi_graphics_menu() {
|
||||
"Switch to Hybrid Mode - graphics-hybrid"
|
||||
"Switch to Integrated Mode - graphics-integrated"
|
||||
"Switch to Nvidia Mode - graphics-nvidia"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi-graphics"
|
||||
fi
|
||||
}
|
||||
@@ -48,13 +54,16 @@ rofi_profile_menu() {
|
||||
"Switch to Battery Mode - profile-battery"
|
||||
"Switch to Balanced Mode - profile-balanced"
|
||||
"Switch to Performance Mode - profile-performance"
|
||||
" Back - back"
|
||||
" Quit - quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||
|
||||
if [[ "$option" != "quit" ]]; then
|
||||
if [[ "$option" == "quit" ]]; then
|
||||
kilall rofi
|
||||
elif [[ "$option" != "back" ]]; then
|
||||
main "--$option" && main "--rofi-profile"
|
||||
fi
|
||||
}
|
||||
|
11
.scripts/trackpad.sh
Executable file
11
.scripts/trackpad.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
trackpad_id=13
|
||||
|
||||
if xinput list-props $trackpad_id | grep "Device Enabled (.*):.*1" >/dev/null
|
||||
then
|
||||
xinput disable $trackpad_id
|
||||
notify-send -u low -i mouse "Trackpad disabled"
|
||||
else
|
||||
xinput enable $trackpad_id
|
||||
notify-send -u low -i mouse "Trackpad enabled"
|
||||
fi
|
Reference in New Issue
Block a user