Pactl Script and Game Exit Script Fix
- Add pactl script to control volume - Add pactl to control center rofi menu - Comment out picom on in game_exit script - Set struts when switching layouts in xmonad - Add keybinding for pactl script
This commit is contained in:
parent
1ddbd596b6
commit
73569b9394
@ -14,6 +14,7 @@ rofi_menu() {
|
|||||||
" Compositor - picom"
|
" Compositor - picom"
|
||||||
" Notifications - dunst"
|
" Notifications - dunst"
|
||||||
" Media - playerctl"
|
" Media - playerctl"
|
||||||
|
"墳Volume - pactl"
|
||||||
" Hardware - system76-power"
|
" Hardware - system76-power"
|
||||||
" Power Menu - session"
|
" Power Menu - session"
|
||||||
" Quit - quit"
|
" Quit - quit"
|
||||||
@ -45,6 +46,9 @@ main() {
|
|||||||
--playerctl)
|
--playerctl)
|
||||||
/home/sravan/.scripts/playerctl.sh --rofi
|
/home/sravan/.scripts/playerctl.sh --rofi
|
||||||
;;
|
;;
|
||||||
|
--pactl)
|
||||||
|
/home/sravan/.scripts/pactl.sh --rofi
|
||||||
|
;;
|
||||||
--system76-power)
|
--system76-power)
|
||||||
/home/sravan/.scripts/system76-power.sh --rofi
|
/home/sravan/.scripts/system76-power.sh --rofi
|
||||||
;;
|
;;
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
/home/sravan/.scripts/dunst.sh --dnd
|
/home/sravan/.scripts/dunst.sh --dnd
|
||||||
|
# /home/sravan/.scripts/picom.sh --on
|
||||||
|
53
.scripts/pactl.sh
Executable file
53
.scripts/pactl.sh
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
help_menu() {
|
||||||
|
echo "Script to interact with pactl. Use only one argument at a time."
|
||||||
|
# echo " - Play / Pause: playerctl.sh --play-pause"
|
||||||
|
# echo " - Next: playerctl.sh --next"
|
||||||
|
# echo " - Previous: playerctl.sh --prev"
|
||||||
|
# echo " - Change Player: playerctl.sh --change"
|
||||||
|
# echo " - Rofi Menu: playerctl.sh --rofi"
|
||||||
|
# echo " - Help: playerctl.sh --help OR playerctl.sh -h"
|
||||||
|
}
|
||||||
|
|
||||||
|
rofi_menu() {
|
||||||
|
declare -a options=(
|
||||||
|
" Raise Volume - raise"
|
||||||
|
" Lower Volume - lower"
|
||||||
|
" Mute - mute"
|
||||||
|
" Quit - quit"
|
||||||
|
)
|
||||||
|
|
||||||
|
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||||
|
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||||
|
|
||||||
|
if [[ "$option" != "quit" ]]; then
|
||||||
|
main "--$option" && main "--rofi"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
# No arguments
|
||||||
|
help_menu
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
--help | -h)
|
||||||
|
help_menu
|
||||||
|
;;
|
||||||
|
--raise)
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||||
|
;;
|
||||||
|
--lower)
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||||
|
;;
|
||||||
|
--mute)
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
;;
|
||||||
|
--rofi)
|
||||||
|
rofi_menu
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main $@
|
2
.xmonad
2
.xmonad
@ -1 +1 @@
|
|||||||
Subproject commit f1a1d837c3b0a4fc2cf050b2db9c2ec748b184a6
|
Subproject commit 1acc6a0755996700f288898f0f3bebca2db7ada7
|
62
README.org
62
README.org
@ -6656,6 +6656,63 @@ Configuration for Alacritty, the GPU enhanced terminal emulator.
|
|||||||
main $@
|
main $@
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Volume Control
|
||||||
|
|
||||||
|
#+begin_src shell :shebang #!/bin/bash :tangle .scripts/pactl.sh
|
||||||
|
help_menu() {
|
||||||
|
echo "Script to interact with pactl. Use only one argument at a time."
|
||||||
|
# echo " - Play / Pause: playerctl.sh --play-pause"
|
||||||
|
# echo " - Next: playerctl.sh --next"
|
||||||
|
# echo " - Previous: playerctl.sh --prev"
|
||||||
|
# echo " - Change Player: playerctl.sh --change"
|
||||||
|
# echo " - Rofi Menu: playerctl.sh --rofi"
|
||||||
|
# echo " - Help: playerctl.sh --help OR playerctl.sh -h"
|
||||||
|
}
|
||||||
|
|
||||||
|
rofi_menu() {
|
||||||
|
declare -a options=(
|
||||||
|
" Raise Volume - raise"
|
||||||
|
" Lower Volume - lower"
|
||||||
|
" Mute - mute"
|
||||||
|
" Quit - quit"
|
||||||
|
)
|
||||||
|
|
||||||
|
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i)
|
||||||
|
option=$(printf '%s\n' "${choice}" | awk '{print $NF}')
|
||||||
|
|
||||||
|
if [[ "$option" != "quit" ]]; then
|
||||||
|
main "--$option" && main "--rofi"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
# No arguments
|
||||||
|
help_menu
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
--help | -h)
|
||||||
|
help_menu
|
||||||
|
;;
|
||||||
|
--raise)
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||||
|
;;
|
||||||
|
--lower)
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||||
|
;;
|
||||||
|
--mute)
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
;;
|
||||||
|
--rofi)
|
||||||
|
rofi_menu
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main $@
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** System76 Power Control
|
** System76 Power Control
|
||||||
|
|
||||||
#+begin_src shell :shebang #!/bin/bash :tangle .scripts/system76-power.sh
|
#+begin_src shell :shebang #!/bin/bash :tangle .scripts/system76-power.sh
|
||||||
@ -7021,6 +7078,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam
|
|||||||
|
|
||||||
#+begin_src shell :shebang #!/bin/bash :tangle .scripts/game_exit.sh
|
#+begin_src shell :shebang #!/bin/bash :tangle .scripts/game_exit.sh
|
||||||
/home/sravan/.scripts/dunst.sh --dnd
|
/home/sravan/.scripts/dunst.sh --dnd
|
||||||
|
# /home/sravan/.scripts/picom.sh --on
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Control Center
|
** Control Center
|
||||||
@ -7041,6 +7099,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam
|
|||||||
" Compositor - picom"
|
" Compositor - picom"
|
||||||
" Notifications - dunst"
|
" Notifications - dunst"
|
||||||
" Media - playerctl"
|
" Media - playerctl"
|
||||||
|
"墳Volume - pactl"
|
||||||
" Hardware - system76-power"
|
" Hardware - system76-power"
|
||||||
" Power Menu - session"
|
" Power Menu - session"
|
||||||
" Quit - quit"
|
" Quit - quit"
|
||||||
@ -7072,6 +7131,9 @@ These are scripts that should be run from Lutris when launching or exiting a gam
|
|||||||
--playerctl)
|
--playerctl)
|
||||||
/home/sravan/.scripts/playerctl.sh --rofi
|
/home/sravan/.scripts/playerctl.sh --rofi
|
||||||
;;
|
;;
|
||||||
|
--pactl)
|
||||||
|
/home/sravan/.scripts/pactl.sh --rofi
|
||||||
|
;;
|
||||||
--system76-power)
|
--system76-power)
|
||||||
/home/sravan/.scripts/system76-power.sh --rofi
|
/home/sravan/.scripts/system76-power.sh --rofi
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user