diff --git a/btop/btop.conf b/btop/btop.conf index 10ca1a5..71caf6d 100644 --- a/btop/btop.conf +++ b/btop/btop.conf @@ -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 diff --git a/fish/config.fish b/fish/config.fish index 6032e5c..855e6d8 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -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 diff --git a/fish/fish_variables b/fish/fish_variables index a1839c9..43c581c 100644 --- a/fish/fish_variables +++ b/fish/fish_variables @@ -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 diff --git a/hypr/modules/autostart.conf b/hypr/modules/autostart.conf index 4732b12..3428cc9 100644 --- a/hypr/modules/autostart.conf +++ b/hypr/modules/autostart.conf @@ -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 diff --git a/hypr/modules/keybinds.conf b/hypr/modules/keybinds.conf index 2b62a05..633295c 100644 --- a/hypr/modules/keybinds.conf +++ b/hypr/modules/keybinds.conf @@ -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, diff --git a/hypr/modules/monitors.conf b/hypr/modules/monitors.conf index c032ddf..da1942b 100644 --- a/hypr/modules/monitors.conf +++ b/hypr/modules/monitors.conf @@ -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 diff --git a/hypr/scripts/droidcam-ctrl.sh b/hypr/scripts/droidcam-ctrl.sh new file mode 100755 index 0000000..fb6ddb4 --- /dev/null +++ b/hypr/scripts/droidcam-ctrl.sh @@ -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 diff --git a/hypr/scripts/replay-ctrl.sh b/hypr/scripts/replay-ctrl.sh index 1baab2c..781869a 100755 --- a/hypr/scripts/replay-ctrl.sh +++ b/hypr/scripts/replay-ctrl.sh @@ -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 diff --git a/hypr/scripts/start_droidcam.sh b/hypr/scripts/start_droidcam.sh new file mode 100755 index 0000000..d31d9ec --- /dev/null +++ b/hypr/scripts/start_droidcam.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +scrcpy -d +ANDROID_SERIAL=988e5035584a354b4430 droidcam-cli -a -v -size=1920x1080 adb 4747