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,7 @@
#!/bin/bash
# kill old carla
killall carla
# start new session
nohup carla -n ~/Music/1Player.carxp &

View File

@@ -0,0 +1,7 @@
#!/bin/bash
# kill old carla
killall carla
# start new session
nohup carla -n ~/Music/2Player.carxp &

View File

@@ -0,0 +1,26 @@
[carla] Plugin requested value for 'http://lsp-plug.in/plugins/lv2/mixer_x4_mono/KVT' which is not available
libjack.so.0 loaded successfully!
[carla] Will use LV2 X11 UI for 'LSP Mixer x4 Mono'
[carla] Previously saved client 'Mixer x8 Stereo' not found
[carla] Previously saved client 'LSP Mixer x4 Mono' not found
[carla] Previously saved client 'Simple Low Pass Filter' not found
Carla ready!
[carla] Plugin requested value for 'http://lsp-plug.in/plugins/lv2/mixer_x4_mono/KVT' which is not available
libjack.so.0 loaded successfully!
[carla] Will use LV2 X11 UI for 'LSP Mixer x4 Mono'
[carla] Previously saved client 'Mixer x8 Stereo' not found
[carla] Previously saved client 'LSP Mixer x4 Mono' not found
[carla] Previously saved client 'Simple Low Pass Filter' not found
Carla ready!
[carla] Carla assertion failure: "newFrames > 0" in file CarlaEngineInternal.cpp, line 260
[carla] Plugin requested value for 'http://lsp-plug.in/plugins/lv2/mixer_x4_mono/KVT' which is not available
[carla] Plugin requested value for 'http://lsp-plug.in/plugins/lv2/mixer_x4_mono/KVT' which is not available
libjack.so.0 loaded successfully!
[carla] Will use LV2 X11 UI for 'LSP Mixer x4 Mono'
[carla] Previously saved client 'spotify' not found
[carla] Previously saved client 'Mixer x8 Stereo' not found
[carla] Previously saved client 'LSP Mixer x4 Mono' not found
[carla] Previously saved client 'Simple Low Pass Filter' not found
Carla ready!
[carla] Carla assertion failure: "newFrames > 0" in file CarlaEngineInternal.cpp, line 260
[carla] Plugin requested value for 'http://lsp-plug.in/plugins/lv2/mixer_x4_mono/KVT' which is not available

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Start DBus if not already started
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval "$(dbus-launch --sh-syntax)"
fi
# Start gnome-keyring-daemon
eval "$(/usr/bin/gnome-keyring-daemon --start --components=secrets)"
# Dump environment to file for Fish to import
env | grep -E '^(DBUS_SESSION_BUS_ADDRESS|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|SSH_AUTH_SOCK)=' \
| sed "s/^/set -gx /; s/=/ '/; s/$/'/" > /tmp/gnome-keyring-env.fish

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Source the functions file
notify-send "GoXLR inteface is starting"
# nohup goxlr-daemon &
sleep 10
goxlr-client profiles device load 'Default'
notify-send "GoXLR start complete"

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Source the functions file
source "$HOME/.config/function_helper.sh"
SCRIPT="goxlr-daemon"
SCRIPT2="$HOME/.config/hypr/scripts/goxlr/goxlr-settings-start.sh"
nohup "$SCRIPT" &
send_notification "normal" "GOXLR daemon Started" "Launched the GOXLR Daemon to control the Audio" "$HOME/.icons/BeautyLine-Garuda/apps/scalable/goxlr-utility.svg"
nohup "$SCRIPT2" &

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Source the functions file
source "$HOME/.config/function_helper.sh"
SCRIPT="goxlr-client volume line-out 0"
SCRIPT2="goxlr-client volume headphones 60"
$SCRIPT
$SCRIPT2
send_notification "normal" "Switched to Headphones" "Muted the Speaker and set the Headphones to a appropiate Volume." "$HOME/.icons/BeautyLine-Garuda/apps/scalable/goxlr-utility.svg"

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Source the functions file
source "$HOME/.config/function_helper.sh"
SCRIPT="goxlr-client volume line-out 100"
SCRIPT2="goxlr-client volume headphones 0"
$SCRIPT
$SCRIPT2
send_notification "normal" "Switched to Speaker" "Muted the Headphones and set the Speaker to a appropiate Volume." "$HOME/.icons/BeautyLine-Garuda/apps/scalable/goxlr-utility.svg"

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"

View File

@@ -0,0 +1,18 @@
#!/bin/bash
###
### ~/.config/hypr/scripts/screenshot/screenshot_area.sh
###
time=`date +%Y-%m-%d-%I-%M-%S`
geometry=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | "\(.width)x\(.height)"')
dir="`xdg-user-dir PICTURES`/Screenshots"
file="Screenshot_${time}_${geometry}.png"
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
# Take Screenshot
cd "$dir" && grim -g "$(slurp)" "$file" && wl-copy < "$file"
# Open Screenshot
viewnior ${dir}/"$file"

View File

@@ -0,0 +1,16 @@
#!/bin/bash
###
### ~/.config/hypr/scripts/screenshot/screenshot_area.sh
###
time=`date +%Y-%m-%d-%I-%M-%S`
geometry=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | "\(.width)x\(.height)"')
dir="`xdg-user-dir PICTURES`/Screenshots"
file="Screenshot_${time}_${geometry}.png"
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
# Take Screenshot
cd "$dir" && grim -g "$(slurp)" "$file" && wl-copy < "$file"

View File

@@ -0,0 +1,13 @@
time=`date +%Y-%m-%d-%I-%M-%S`
geometry=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .current_mode.width, .current_mode.height' | tr '\n' 'x')
dir="`xdg-user-dir PICTURES`/Screenshots"
file="Screenshot_${time}_${geometry}.png"
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
# Take Screenshot
cd "$dir" && sleep 0.5 && grim "$file" && wl-copy < "$file"
# Open Screenshot
viewnior ${dir}/"$file"

View File

@@ -0,0 +1,15 @@
time=`date +%Y-%m-%d-%I-%M-%S`
geometry=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | "\(.width)x\(.height)"')
dir="`xdg-user-dir PICTURES`/Screenshots"
file="Screenshot_${time}_${geometry}.png"
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
focused_window=$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
# Take Screenshot
cd "$dir" && grim -g "$focused_window" "$file" && wl-copy < "$file"
# Open Screenshot
viewnior ${dir}/"$file"

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,31 @@
#!/bin/bash
timeout=50 # 10 seconds max (50 * 0.2s)
count=0
while (( count < timeout )); do
# Grab both address and floating status
read -r win_addr floating <<< $(hyprctl -j clients | jq -r '.[] | select(.title == "Grayjay") | "\(.address) \(.floating)"')
if [[ -n "$win_addr" ]]; then
# Add 0x prefix if missing
if [[ "$win_addr" != 0x* ]]; then
win_addr="0x$win_addr"
fi
# If the window is floating, toggle to make it tiled
if [[ "$floating" == "true" ]]; then
hyprctl dispatch togglefloating address:$win_addr
fi
# Move to workspace 2 silently
hyprctl dispatch movetoworkspacesilent 2,address:$win_addr
exit 0
fi
sleep 0.2
((count++))
done
echo "Grayjay window not found within timeout." >&2
exit 1

View File

@@ -0,0 +1,39 @@
#!/bin/bash
timeout=50 # 10 seconds max (50 * 0.2s)
count=0
while (( count < timeout )); do
win_addr=$(hyprctl clients | awk '
/^Window/ { addr=$2 }
/title: GoXLR Utility/ { print addr }
')
if [[ -n "$win_addr" ]]; then
# Add 0x prefix if missing
if [[ "$win_addr" != 0x* ]]; then
win_addr="0x$win_addr"
fi
# Get fullscreen state (1 or 0)
fullscreen_state=$(hyprctl clients | awk -v addr="${win_addr#0x}" '
$1 == "Window" && $2 == addr { found=1 }
found && /^fullscreen:/ { print $2; exit }
')
if [[ "$fullscreen_state" == "1" ]]; then
hyprctl dispatch fullscreen address:$win_addr
echo "Fullscreen disabled for GoXLR Utility."
else
echo "GoXLR Utility is not fullscreen."
fi
exit 0
fi
sleep 0.2
((count++))
done
echo "GoXLR Utility window not found within timeout." >&2
exit 1

View File

@@ -0,0 +1 @@
/home/honney/.config/hypr/scripts/wallpapers/wallpapers/moody-flowers.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

@@ -0,0 +1,73 @@
#!/bin/bash
# _ _ _ _____ __ __ _____ _____ _____ _____ _____
# | | | | _ | | | | | _ | _ | _ | __| __ |
# | | | | | |__| |__| __| | __| __| -|
# |_____|__|__|_____|_____|__| |__|__|__| |_____|__|__|
#
current_wp="$HOME/.config/hypr/scripts/wallpapers/current_wallpaper"
blurred_wp="$HOME/.config/hypr/scripts/wallpapers/current_wallpaper_blurred.png"
wallpapers_dir="$HOME/.config/hypr/scripts/wallpapers/wallpapers"
blur="50x30"
# write path to wp into file
if [ ! -f $current_wp ]; then
touch $current_wp
echo "$HOME/wallpapers/default.png" > "$current_wp"
fi
# current wallpaper path
current_wallpaper=$(cat "$current_wp")
# echo "$current_wallpaper"
wallpapers=$(ls "$wallpapers_dir"/*.png "$wallpapers_dir"/*.jpg 2>/dev/null)
# Convert the wallpapers list into an array
wallpapers_array=($wallpapers)
# Get the index of the current wallpaper in the array
current_index=-1
for i in "${!wallpapers_array[@]}"; do
if [ "${wallpapers_array[$i]}" == "$current_wallpaper" ]; then
current_index=$i
break
fi
done
# If current wallpaper is not found in the list, set it to the first wallpaper
if [ "$current_index" -eq -1 ]; then
current_index=0
fi
# Determine the next wallpaper (loop back to the start if we're at the end)
next_index=$(( (current_index + 1) % ${#wallpapers_array[@]} ))
next_wallpaper="${wallpapers_array[$next_index]}"
# Update the current wallpaper path in the file
echo "$next_wallpaper" > "$current_wp"
# echo "Current wallpaper is now: $next_wallpaper"
wal -q -i $next_wallpaper
# launch waybar based on new wallpaper colors
source "$HOME/.cache/wal/colors.sh"
~/.config/waybar/launch.sh &
# update soft link to cava colors based on wallpaper colors
# (cava needs to manually be restarted)
ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config"
hyprctl hyprpaper preload "$next_wallpaper"
hyprctl hyprpaper wallpaper ",$next_wallpaper"
# Create Blurred Wallpaper
magick $next_wallpaper -resize 3840x2160\! $next_wallpaper
echo ":: Resized"
echo "Next wallpaper path: $next_wallpaper"
echo "Blurred wallpaper path: $blurred_wp"
if [ ! "$blur" == "0x0" ] ; then
magick $next_wallpaper -blur $blur $blurred_wp
echo ":: Blurred"
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB