fixed discord streaming
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
|
||||
# exec-once = uwsm app -- waybar
|
||||
# exec-once = uwsm app -- nextcloud --background
|
||||
exec-once = uwsm app -- nm-applet
|
||||
exec-once = rclone mount google_drive: ~/gdrive
|
||||
exec-once = uwsm app -- nm-applet --indicator
|
||||
# exec-once = uwsm app -- rclone mount google_drive: ~/gdrive
|
||||
exec-once = uwsm app -- protonvpn-app
|
||||
exec-once = uwsm app -- hyprpaper
|
||||
exec-once = uwsm app -- /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized &> /dev/null
|
||||
# exec-once = uwsm app -- /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized &> /dev/null
|
||||
exec-once = sleep 5 && ~/.config/hypr/scripts/replay-ctrl.sh start
|
||||
# exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-hyprland
|
||||
|
@@ -3,6 +3,8 @@ $mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
bind = , PRINT, exec, grim -g "$(slurp)" - | wl-copy &
|
||||
bindr = ALT SHIFT, z, exec, ~/.config/hypr/scripts/replay-ctrl.sh save &
|
||||
bindr = ALT, z, exec, ~/.config/hypr/scripts/replay-ctrl.sh toggle &
|
||||
bindr = ALT SHIFT, c, exec, ~/.config/hypr/scripts/droidcam-ctrl.sh toggle &
|
||||
# bind = , PRINT, exec, gscreenshot -c -s
|
||||
bind = $mainMod, RETURN, exec, $terminal
|
||||
bind = $mainMod SHIFT, Q, killactive,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@240, 0x0, 1, bitdepth, 10, cm, wide
|
||||
monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@240, 0x0, 1, bitdepth, 10
|
||||
# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@240, 0x0, 1, bitdepth, 10
|
||||
monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@240, 0x0, 1
|
||||
# monitorv2 {
|
||||
# desc = Samsung Electric Company LC27G7xT H4ZRA00734
|
||||
# mode = 2560x1440@240
|
||||
|
68
hypr/scripts/droidcam-ctrl.sh
Executable file
68
hypr/scripts/droidcam-ctrl.sh
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROGRAM_NAME="droidcam-cli"
|
||||
PID_FILE="/tmp/droidcam.pid"
|
||||
ANDROID_SERIAL=988e5035584a354b4430
|
||||
|
||||
start() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is already active."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is starting ..."
|
||||
|
||||
ANDROID_SERIAL=$ANDROID_SERIAL droidcam-cli -a -v -size=1920x1080 adb 4747 &> /dev/null &
|
||||
echo $! > "$PID_FILE"
|
||||
}
|
||||
|
||||
|
||||
stop() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
kill "$PID"
|
||||
rm "$PID_FILE"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME has been stopped."
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
else
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
stop
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
start
|
||||
fi
|
||||
else
|
||||
start
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
toggle)
|
||||
toggle
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|save}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
@@ -52,6 +52,20 @@ stop() {
|
||||
fi
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
stop
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
start
|
||||
fi
|
||||
else
|
||||
start
|
||||
fi
|
||||
}
|
||||
|
||||
save() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
@@ -79,6 +93,9 @@ case "$1" in
|
||||
save)
|
||||
save
|
||||
;;
|
||||
toggle)
|
||||
toggle
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|save}"
|
||||
exit 1
|
||||
|
4
hypr/scripts/start_droidcam.sh
Executable file
4
hypr/scripts/start_droidcam.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
scrcpy -d
|
||||
ANDROID_SERIAL=988e5035584a354b4430 droidcam-cli -a -v -size=1920x1080 adb 4747
|
Reference in New Issue
Block a user