fixed discord streaming

This commit is contained in:
2025-08-14 03:29:50 +02:00
parent 0eb25b77a6
commit bc86670611
9 changed files with 98 additions and 14 deletions

View File

@@ -57,7 +57,7 @@ update_ms = 2000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "cpu lazy"
proc_sorting = "pid"
#* Reverse sorting order, True or False.
proc_reversed = False
@@ -72,7 +72,7 @@ proc_colors = True
proc_gradient = True
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
proc_per_core = False
proc_per_core = True
#* Show process memory as bytes instead of percent.
proc_mem_bytes = True

View File

@@ -4,11 +4,6 @@ set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
fish_vi_key_bindings
zoxide init --cmd cd fish | source
if not pgrep --full ssh-agent | string collect > /dev/null
eval (ssh-agent -c)
set -Ux SSH_AGENT_PID $SSH_AGENT_PID
set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK
end
if uwsm check may-start && uwsm select
exec uwsm start default
end

View File

@@ -5,8 +5,6 @@ SETUVAR DATABASE_URL:sqlite\x3adatabase\x2esqlite
SETUVAR GLFW_IM_MODULE:ibus
SETUVAR MANPAGER:sh\x20\x2dc\x20\x27col\x20\x2dbx\x20\x7c\x20bat\x20\x2dl\x20man\x20\x2dp\x27
SETUVAR RUST_LOG:debug
SETUVAR --export SSH_AGENT_PID:967
SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXX7Ck8nI/agent\x2e966
SETUVAR SXHKD_SHELL:/usr/bin/bash
SETUVAR ZO_CMD:zo
SETUVAR Z_CMD:z

View File

@@ -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

View File

@@ -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,

View File

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

View File

@@ -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
View File

@@ -0,0 +1,4 @@
#!/bin/sh
scrcpy -d
ANDROID_SERIAL=988e5035584a354b4430 droidcam-cli -a -v -size=1920x1080 adb 4747