diff --git a/.scripts/control-center.sh b/.scripts/control-center.sh index 0ae44c6..395b5ec 100755 --- a/.scripts/control-center.sh +++ b/.scripts/control-center.sh @@ -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 ;; diff --git a/.scripts/deadd.sh b/.scripts/deadd.sh index 13ccf87..11224a1 100755 --- a/.scripts/deadd.sh +++ b/.scripts/deadd.sh @@ -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 } diff --git a/.scripts/dunst.sh b/.scripts/dunst.sh index 416d564..b67c7e3 100755 --- a/.scripts/dunst.sh +++ b/.scripts/dunst.sh @@ -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 } diff --git a/.scripts/pactl.sh b/.scripts/pactl.sh index fb0df57..b79ab5f 100755 --- a/.scripts/pactl.sh +++ b/.scripts/pactl.sh @@ -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 } diff --git a/.scripts/picom.sh b/.scripts/picom.sh index 1faa6b5..73c6072 100755 --- a/.scripts/picom.sh +++ b/.scripts/picom.sh @@ -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 } diff --git a/.scripts/playerctl.sh b/.scripts/playerctl.sh index aca9c96..948a19d 100755 --- a/.scripts/playerctl.sh +++ b/.scripts/playerctl.sh @@ -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 } diff --git a/.scripts/session.sh b/.scripts/session.sh index b1d6491..7c3e604 100755 --- a/.scripts/session.sh +++ b/.scripts/session.sh @@ -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 } diff --git a/.scripts/startup.sh b/.scripts/startup.sh index 2ec5f34..18a0554 100755 --- a/.scripts/startup.sh +++ b/.scripts/startup.sh @@ -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 } diff --git a/.scripts/system76-power.sh b/.scripts/system76-power.sh index eb6be49..df9d018 100755 --- a/.scripts/system76-power.sh +++ b/.scripts/system76-power.sh @@ -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 } diff --git a/.scripts/trackpad.sh b/.scripts/trackpad.sh new file mode 100755 index 0000000..cc7d7d5 --- /dev/null +++ b/.scripts/trackpad.sh @@ -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 diff --git a/README.org b/README.org index 7ea9e61..2f46ece 100644 --- a/README.org +++ b/README.org @@ -661,13 +661,16 @@ Pull and update submodules " 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 } @@ -1156,13 +1159,16 @@ Each label is represented as a clickable button in the notification center. The " 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 } @@ -2654,13 +2660,16 @@ See [[https://github.com/phillipberndt/autorandr#hook-scripts][autorandr hook sc "⏼ 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 } @@ -7200,13 +7209,16 @@ Configuration for Alacritty, the GPU enhanced terminal emulator. "怜 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 } @@ -7261,13 +7273,16 @@ Configuration for Alacritty, the GPU enhanced terminal emulator. " 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 } @@ -7335,13 +7350,16 @@ Configuration for Alacritty, the GPU enhanced terminal emulator. 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 } @@ -7353,13 +7371,16 @@ Configuration for Alacritty, the GPU enhanced terminal emulator. "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 } @@ -7370,13 +7391,16 @@ Configuration for Alacritty, the GPU enhanced terminal emulator. "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 } @@ -7468,13 +7492,16 @@ Configuration for Alacritty, the GPU enhanced terminal emulator. " 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 } @@ -7595,13 +7622,16 @@ Configuration for Alacritty, the GPU enhanced terminal emulator. "羽 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 } @@ -7708,15 +7738,19 @@ These are scripts that should be run from Lutris when launching or exiting a gam " 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 } @@ -7742,6 +7776,9 @@ These are scripts that should be run from Lutris when launching or exiting a gam --pactl) /home/sravan/.scripts/pactl.sh --rofi ;; + --startup) + /home/sravan/.scripts/startup.sh --rofi + ;; --system76-power) /home/sravan/.scripts/system76-power.sh --rofi ;;