hyprland scripts

This commit is contained in:
Hannes
2025-10-16 20:50:11 +02:00
parent 3add98f7bb
commit 178bff8856
41 changed files with 446 additions and 0 deletions

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"