files
This commit is contained in:
20
config/hypr/scripts/dock-startup.sh
Executable file
20
config/hypr/scripts/dock-startup.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define your monitor names
|
||||
EXTERNAL="DP-1"
|
||||
LAPTOP="eDP-1"
|
||||
|
||||
# Kill any existing dock instances
|
||||
pkill -f nwg-dock-hyprland
|
||||
|
||||
# Give Wayland a little more time to clear the screen edge
|
||||
sleep 0.6
|
||||
|
||||
# Check if the external monitor is actively connected
|
||||
if hyprctl monitors | grep -q "Monitor $EXTERNAL"; then
|
||||
# Launch on external using Hyprland's native exec
|
||||
hyprctl dispatch exec "nwg-dock-hyprland -o $EXTERNAL -p bottom -a center -ml 10 -mr 10 -mb 10 -i 28 -nolauncher -x"
|
||||
else
|
||||
# Fallback to laptop
|
||||
hyprctl dispatch exec "nwg-dock-hyprland -o $LAPTOP -p bottom -a center -ml 10 -mr 10 -mb 10 -i 28 -nolauncher -x"
|
||||
fi
|
||||
21
config/hypr/scripts/opacity.sh
Executable file
21
config/hypr/scripts/opacity.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# Usage: opacity.sh [increase|decrease]
|
||||
|
||||
STEP=0.1
|
||||
ADDRESS=$(hyprctl activewindow -j | grep -oP '"address": "\K[^"]+')
|
||||
CURRENT=$(hyprctl getprop active opacity | grep -oP '[\d.]+' | head -1)
|
||||
|
||||
if [[ -z "$CURRENT" ]]; then
|
||||
CURRENT=1.0
|
||||
fi
|
||||
|
||||
if [[ "$1" == "increase" ]]; then
|
||||
NEW=$(echo "$CURRENT + $STEP" | bc)
|
||||
else
|
||||
NEW=$(echo "$CURRENT - $STEP" | bc)
|
||||
fi
|
||||
|
||||
# Clamp between 0.1 and 1.0
|
||||
NEW=$(echo "if ($NEW > 1.0) 1.0 else if ($NEW < 0.1) 0.1 else $NEW" | bc)
|
||||
|
||||
hyprctl dispatch setprop active opacity "$NEW"
|
||||
25
config/hypr/scripts/replay-startup.sh
Executable file
25
config/hypr/scripts/replay-startup.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define your monitors
|
||||
EXTERNAL="DP-1"
|
||||
LAPTOP="eDP-1"
|
||||
REPLAY_DIR="$HOME/Videos/Replays"
|
||||
|
||||
# Ensure the output directory exists
|
||||
mkdir -p "$REPLAY_DIR"
|
||||
|
||||
# Kill any existing recorder instances to prevent duplicates/errors
|
||||
# 2>/dev/null hides the "no process found" message if it wasn't running
|
||||
killall gpu-screen-recorder 2>/dev/null
|
||||
# Give the hardware encoder a fraction of a second to free up
|
||||
sleep 0.5
|
||||
|
||||
# Check if the external monitor is actively connected
|
||||
if hyprctl monitors | grep -q "Monitor $EXTERNAL"; then
|
||||
TARGET_MONITOR=$EXTERNAL
|
||||
else
|
||||
TARGET_MONITOR=$LAPTOP
|
||||
fi
|
||||
|
||||
# Launch the recorder on the chosen monitor in the background
|
||||
gpu-screen-recorder -w "$TARGET_MONITOR" -f 60 -r 120 -c mp4 -a default_output -a "alsa_input.pci-0000_00_1f.3.analog-stereo" -o "$REPLAY_DIR" &
|
||||
Reference in New Issue
Block a user