hyprland scripts
This commit is contained in:
36
.config/hypr/scripts/makropad/button01.sh
Executable file
36
.config/hypr/scripts/makropad/button01.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Dependencies: hyprctl, jq, wtype
|
||||
# Make sure Discord is running
|
||||
if ! pgrep -x "Discord" > /dev/null; then
|
||||
echo "Discord is not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the active window before switching (optional)
|
||||
ACTIVE_WIN=$(hyprctl activewindow -j | jq -r '.address')
|
||||
|
||||
# Find the address of the Discord window
|
||||
DISCORD_WIN=$(hyprctl clients -j | jq -r '.[] | select(.class == "discord") | .address')
|
||||
|
||||
if [ -z "$DISCORD_WIN" ]; then
|
||||
echo "Could not find Discord window."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Focus Discord
|
||||
hyprctl dispatch focuswindow address:$DISCORD_WIN
|
||||
|
||||
# Give it a moment to receive focus
|
||||
sleep 0.1
|
||||
|
||||
# Send Ctrl+Shift+M to toggle mute
|
||||
wtype -M ctrl -M shift -k M -m shift -m ctrl
|
||||
|
||||
# (Optional) Return to previous window
|
||||
if [ -n "$ACTIVE_WIN" ]; then
|
||||
sleep 0.1
|
||||
hyprctl dispatch focuswindow address:$ACTIVE_WIN
|
||||
fi
|
||||
|
||||
hyprctl notify 1 500 0 "Row 1, Colums 1"
|
||||
8
.config/hypr/scripts/makropad/button02.sh
Executable file
8
.config/hypr/scripts/makropad/button02.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
playerctl previous
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 1, Colums 2" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
8
.config/hypr/scripts/makropad/button03.sh
Executable file
8
.config/hypr/scripts/makropad/button03.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
playerctl play-pause
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 1, Colums 3" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
9
.config/hypr/scripts/makropad/button04.sh
Executable file
9
.config/hypr/scripts/makropad/button04.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
playerctl next
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 1, Colums 4" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
|
||||
41
.config/hypr/scripts/makropad/button05.sh
Executable file
41
.config/hypr/scripts/makropad/button05.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle Discord "Deafen" (mutes mic and audio output)
|
||||
# Dependencies: hyprctl, jq, wtype
|
||||
|
||||
# Check if Discord is running
|
||||
if ! pgrep -x "Discord" > /dev/null; then
|
||||
echo "Discord is not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get currently active window address
|
||||
ACTIVE_WIN=$(hyprctl activewindow -j | jq -r '.address')
|
||||
|
||||
# Find Discord's window address
|
||||
DISCORD_WIN=$(hyprctl clients -j | jq -r '.[] | select(.class == "discord") | .address')
|
||||
|
||||
if [ -z "$DISCORD_WIN" ]; then
|
||||
echo "Discord window not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Focus the Discord window
|
||||
hyprctl dispatch focuswindow address:$DISCORD_WIN
|
||||
|
||||
# Give Discord time to focus
|
||||
sleep 0.1
|
||||
|
||||
# Send Ctrl + Shift + D to toggle "Deafen"
|
||||
wtype -M ctrl -M shift -k D -m shift -m ctrl
|
||||
|
||||
# Optional: Restore focus to the previous window
|
||||
if [ -n "$ACTIVE_WIN" ]; then
|
||||
sleep 0.1
|
||||
hyprctl dispatch focuswindow address:$ACTIVE_WIN
|
||||
fi
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 2, Colums 1" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
6
.config/hypr/scripts/makropad/button06.sh
Executable file
6
.config/hypr/scripts/makropad/button06.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 2, Colums 2" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
6
.config/hypr/scripts/makropad/button07.sh
Executable file
6
.config/hypr/scripts/makropad/button07.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 2, Colums 3" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
6
.config/hypr/scripts/makropad/button08.sh
Executable file
6
.config/hypr/scripts/makropad/button08.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 2, Colums 4" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
6
.config/hypr/scripts/makropad/button09.sh
Executable file
6
.config/hypr/scripts/makropad/button09.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 3, Colums 1" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
6
.config/hypr/scripts/makropad/button10.sh
Executable file
6
.config/hypr/scripts/makropad/button10.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 3, Colums 2" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
6
.config/hypr/scripts/makropad/button11.sh
Executable file
6
.config/hypr/scripts/makropad/button11.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 3, Colums 3" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
6
.config/hypr/scripts/makropad/button12.sh
Executable file
6
.config/hypr/scripts/makropad/button12.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add shared script Functions
|
||||
source "$HOME/.config/function_helper.sh"
|
||||
|
||||
send_notification "low" "Pressed Makropad Button" "Row 3, Colums 4" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/keyboard.svg"
|
||||
Reference in New Issue
Block a user